From 42b253ce9925e8ea118a73c25443c0da1f3418a1 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 19 Nov 2021 10:31:40 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=A2=84=E6=A1=88=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=BB=BA=E7=AD=91=E4=BF=A1=E6=81=AF=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-template/plan-template.component.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 17dfbde..1a94a53 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -481,8 +481,8 @@ export class PlanTemplateComponent implements OnInit { }else{ this.attPanle=true const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去 - width: '240px', - height:'400px', + width: '290px', + height:'440px', disableClose:true, data:{newleftTabledata:this.newleftTabledata,surveyName:surveyName,leftclicki:this.leftclicki} }); @@ -1589,12 +1589,15 @@ getattinf(){ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId } 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 => { element.completed=false element.olddata=element.propertyValue }); - console.log(this.addAttinfBuild) + //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){ this.addAttinfBuild=value.attinf @@ -1602,18 +1605,19 @@ getattinf(){ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId } 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) => { value.attinf.forEach((elattinf,fi,farr) => { if(earr[ei].propertyName==farr[fi].propertyName){ earr[ei].completed=farr[fi].completed } - }); element.olddata=element.propertyValue }); - console.log(this.addAttinfBuild) + //console.log(this.addAttinfBuild) }) }else if(value.surveyName=='消防设施'&&value.attinf==undefined){ let paramsdata:any ={