Browse Source

[修改]预案模板建筑信息缺失问题

tangshan
陈敬瑜 3 years ago
parent
commit
42b253ce99
  1. 18
      src/app/ui/plan-template/plan-template.component.ts

18
src/app/ui/plan-template/plan-template.component.ts

@ -481,8 +481,8 @@ export class PlanTemplateComponent implements OnInit {
}else{ }else{
this.attPanle=true this.attPanle=true
const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去 const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去
width: '240px', width: '290px',
height:'400px', height:'440px',
disableClose:true, disableClose:true,
data:{newleftTabledata:this.newleftTabledata,surveyName:surveyName,leftclicki:this.leftclicki} data:{newleftTabledata:this.newleftTabledata,surveyName:surveyName,leftclicki:this.leftclicki}
}); });
@ -1589,12 +1589,15 @@ getattinf(){
categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId
} }
this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{
this.addAttinfBuild=data[0].propertyInfos data.forEach(buildDate => {
this.addAttinfBuild.push(...buildDate.propertyInfos)
});
this.addAttinfBuild.forEach(element => { this.addAttinfBuild.forEach(element => {
element.completed=false element.completed=false
element.olddata=element.propertyValue element.olddata=element.propertyValue
}); });
console.log(this.addAttinfBuild) //console.log(this.addAttinfBuild)
}) })
}else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){ }else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){
this.addAttinfBuild=value.attinf this.addAttinfBuild=value.attinf
@ -1602,18 +1605,19 @@ getattinf(){
categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId
} }
this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{
this.addAttinfBuild=data[0].propertyInfos data.forEach((buildDate,buildi,buildarr) => {
this.addAttinfBuild.push(...buildarr[buildi].propertyInfos)
});
this.addAttinfBuild.forEach((element,ei,earr) => { this.addAttinfBuild.forEach((element,ei,earr) => {
value.attinf.forEach((elattinf,fi,farr) => { value.attinf.forEach((elattinf,fi,farr) => {
if(earr[ei].propertyName==farr[fi].propertyName){ if(earr[ei].propertyName==farr[fi].propertyName){
earr[ei].completed=farr[fi].completed earr[ei].completed=farr[fi].completed
} }
}); });
element.olddata=element.propertyValue element.olddata=element.propertyValue
}); });
console.log(this.addAttinfBuild) //console.log(this.addAttinfBuild)
}) })
}else if(value.surveyName=='消防设施'&&value.attinf==undefined){ }else if(value.surveyName=='消防设施'&&value.attinf==undefined){
let paramsdata:any ={ let paramsdata:any ={

Loading…
Cancel
Save