Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用Angular将嵌套数据显示到行扩展表中?_Angular_Rowexpansion - Fatal编程技术网

如何使用Angular将嵌套数据显示到行扩展表中?

如何使用Angular将嵌套数据显示到行扩展表中?,angular,rowexpansion,Angular,Rowexpansion,ExpandedData(行数据){ this.columnsForExpansion=[ {字段:'keyName',标题:'',宽度:this.SelectedSystems.length==1?'60%: this.SelectedSystems.length==2?'52%:'46%}, {字段:“systemOne”,标题:“”,宽度:this.SelectedSystems.length==1?'40%: this.SelectedSystems.length==2?'29.5%':

ExpandedData(行数据){
this.columnsForExpansion=[
{字段:'keyName',标题:'',宽度:this.SelectedSystems.length==1?'60%:
this.SelectedSystems.length==2?'52%:'46%},
{字段:“systemOne”,标题:“”,宽度:this.SelectedSystems.length==1?'40%:
this.SelectedSystems.length==2?'29.5%':'20%'},
{字段:“systemTwo”,标题:“”,宽度:this.SelectedSystems.length==1?'0%:
this.SelectedSystems.length==2?'18.5%':'19%'},
{字段:“systemThree”,标题:“”,宽度:this.SelectedSystems.length==1?'0%:
this.SelectedSystems.length==2?'0%:'15%}
]
if(rowData.name==‘帐户级别数据’){
this.AllJsonResponse=[]
this.mainResponse.forEach((响应,索引)=>{
const propertyValues=Object.values(this.main响应[索引][“帐户级别]);
log(PropertyValue,“主值”);
})
this.mainResponse.forEach((响应,索引)=>{
Object.keys(this.main响应[索引][“帐户级别]).forEach(键=>{
if(typeof(this.mainResponse[index][“Account Level”][key][0])==“object”)
{
this.InnerJson=this.mainResponse[index][“帐户级别”][key][0];
Object.keys(this.mainResponse[index][“帐户级别”][key][0]).forEach(key=>{
//this.AllJsonResponse.push(键)
});
log(this.ArrayJson,“ArrayJson”)
//log(this.InnerJson,“对象数据”);
}
否则{
var keyObj2=Object.keys(resp[“帐户级别]);
console.log(keyObj2.length,“length”);
var keyObj2=Object.keys(resp);
////console.log(keyObj2.length,“length”)
如果(!this.AllJsonResponse.includes(key))
{
this.AllJsonResponse.push(键)
//SuperObject.push({“keyName”:key})
}
else if(this.AllJsonResponse.includes(key)){
//这个。推车。推(键);
}
}
});
})
this.mainResponse.forEach((响应,索引)=>{
this.expansionLevel[索引]=this.main响应[索引][“帐户级别”]
this.checekDataVison=this.expansionLevel[index];
log(this.expansionLevel[index],“dsf”);
})
if(this.expansionLevel[1]!=“”){
this.hideexpand=false;
}
否则{
this.hideexpand=true;
}
//this.mainResponse.forEach((响应,索引)=>{
//Object.keys(this.main响应[索引][“帐户级别]).forEach(键=>{
//this.AllJsonResponse.forEach(元素=>{
//if(element.keyName==key){
//element.value[index]=this.mainResponse[index][key]
//       }
//     })
//   })
// })
log(this.AllJsonResponse)
}
else if(rowData.name==“客户级数据”){
this.AllJsonResponse=[]
this.mainResponse.forEach((响应,索引)=>{
Object.keys(this.main响应[索引][“客户级别]).forEach(键=>{
if(类型(resp[key])=='object')
{
console.log(typeof(resp[key]),“对象数据”)
}
否则{
如果(!this.AllJsonResponse.includes(key))
{
this.AllJsonResponse.push(键)
//SuperObject.push({“keyName”:key})
}
else if(this.AllJsonResponse.includes(key)){
//这个。推车。推(键);
}
}
});
})
this.mainResponse.forEach((响应,索引)=>{
this.expansionLevel[索引]=this.mainResponse[索引][“客户级别”]
this.checekDataVison=this.expansionLevel[index];
log(this.checekDataVison,“客户级”);
})
}
console.log(this.expansionLevel)
}
this.cols=[
{字段:'expandButton',标题:'',宽度:'10%},
{字段:'Headers',标题:'Headers',宽度:'40%},
{字段:“systemOne”,标题:“SSP数据”,宽度:“30%”,
{字段:“systemTwo”,标题:“视觉数据”,宽度:“30%”,
]
控制台日志(“视觉模式检查”)
这个。SelectedSystems=[0];
this.SelectedSystems.forEach((系统,索引)=>{
如果(系统==0){
this.GetService.ComparisonTableCheck()。然后((resp:any)=>{
this.mainResponse[索引]=响应配置文件;
//这一点:加载=错误;
这个.ErrorVision=false;
this.VisionTable=true;
log(this.tableResponse,“this.tableResponse”)
},
错误=>{
这个.ErrorVision=true;
})
}
})

{{col.header}}
{{rowData.name}
{{item}}
{{expansionLevel[0][item].SERVICE1}
{{expansionLevel[0][item].Prod1}

请更正格式()并只提供您试图运行的最低限度的相关代码。