From 18cf583fb0589df660a8889dcafe133f09dd2c60 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Fri, 14 Jan 2022 10:20:53 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=9C=A8=E7=BA=BF=E7=BC=96?= =?UTF-8?q?=E5=88=B6=E9=A2=84=E6=A1=88=E9=A2=84=E8=A7=88=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 268 +++++++----------- .../create-plan-online-five.component.ts | 61 ++-- 2 files changed, 139 insertions(+), 190 deletions(-) diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 490a57a..6c47d3f 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -455,8 +455,8 @@ line-height: 40px; color: #b99a00;">{{element.headName}} - - + + @@ -807,31 +807,32 @@
-
-
+
+
- - - - - -
{{info.propertyName}}{{info.propertyValue}}
+
+ + + + + +
{{info.propertyName}}{{info.propertyValue}}
@@ -852,26 +853,27 @@
-
+
- - - - - -
{{info.name}}{{info.value}}
+
+ + + + + +
{{info.name}}{{info.value}}
@@ -879,48 +881,56 @@
-
-
- - - - - - - - -
{{info.name}}{{info.value}}
+
+
+
+ + + +
+ +
+ + + + + +
{{info.name}}{{info.value}}
-
-
- - - - - - - - -
{{info.name}}{{info.value}}
+
+
+
+ + + + +
+ + + + + + +
{{info.name}}{{info.value}}
@@ -938,121 +948,57 @@ color: #b99a00;" *ngIf="pattern == 'look'">{{parts.heafName}}
-
+
- - - - - -
- {{parts.body[0].name}} - - - {{parts.body[0].value}} - -
+
- - - - - -
- {{parts.body[1].name}} - - - {{parts.body[1].value}} - -
+
- - - - - -
- {{parts.body[2].name}} - - - {{parts.body[2].value}} - -
+
- - - - - -
- {{parts.body[3].name}} - - - {{parts.body[3].value}} - -
+
- - - - - -
- {{parts.body[4].name}} - - - {{parts.body[4].value}} - -
+
+ + + + + +
+ {{partsbody.name}} + + + {{partsbody.value}} + +
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index a6147b8..7378932 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -2237,6 +2237,7 @@ export class adddwsurveys{ return item.zdy!=undefined })//模板传过来自定义数据 this.addAttinfBuild=JSON.parse(JSON.stringify(this.addAttinfBuild)) + console.log(this.addAttinfBuild) let paramsdata:any ={ categoryId:this.data.buildingID } @@ -2265,7 +2266,7 @@ export class adddwsurveys{ }) if(temp==0){ //模板数据少于接口数据 - console.log(buildval) + // console.log(buildval) this.addAttinfBuild.push(buildval) } }) @@ -2311,37 +2312,39 @@ export class adddwsurveys{ }else if(this.data.element.surveyName=='消防设施'&&this.data.element.attinf!=undefined){ this.filenewDate=[] this.addAttinfFile=this.data.element.attinf.filter(element => { - return element.zdy==undefined + return element.zdy==false }); this.zdyData=this.data.element.attinf.filter(element => { return element.zdy!=undefined }); - this.addAttinfFile=JSON.parse(JSON.stringify(this.addAttinfFile)) - console.log(this.addAttinfFile) - this.http.get("/api/BuildingTypes").subscribe((buildData:any)=>{ - buildData.forEach(async element => { - if(element.id==this.data.fid){ - this.facilityCategoryId=element.facilityCategoryId - let paramsdata:any ={ - categoryId:this.facilityCategoryId + //this.addAttinfFile=JSON.parse(JSON.stringify(this.addAttinfFile)) + console.log(this.addAttinfFile,this.zdyData) + let restlt=await new Promise((resolve) => { + this.http.get("/api/BuildingTypes").subscribe((buildData:any)=>{ + buildData.forEach(async element => { + if(element.id==this.data.fid){ + this.facilityCategoryId=element.facilityCategoryId + let paramsdata:any ={ + categoryId:this.facilityCategoryId + } + this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((data:any)=>{ + data.forEach((buildDate,buildi,buildarr) => { + this.filenewDate.push(buildDate) + resolve(data) + }); + this.filenewDate.forEach(element => { + element.completed=false + //element.olddata=element.propertyValue + }); + }) } - let restlt=await new Promise((resolve) => { - this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((data:any)=>{ - data.forEach((buildDate,buildi,buildarr) => { - this.filenewDate.push(buildDate) - resolve(data) - }); - this.filenewDate.forEach(element => { - element.completed=false - //element.olddata=element.propertyValue - }); - }) - }) - } + }) }) }) + this.filenewDate=JSON.parse(JSON.stringify(this.filenewDate)) + console.log(this.filenewDate) let temp=0 this.filenewDate.forEach((buildval,buindi,buildarr)=>{ temp=0 @@ -2351,21 +2354,21 @@ export class adddwsurveys{ } }) if(temp==0){ - console.log(buildval) + //console.log(buildval) this.addAttinfFile.push(buildval) } }) this.addAttinfFile.forEach((addval,addi,addarr)=>{ temp=0 this.filenewDate.forEach((buildval,buindi,buildarr)=>{ - if(buildarr[buindi].id==addarr[addi].id){ + if(buildval.name==addval.name){ temp++ } - if(temp==0){ - this.addAttinfFile.splice(addi,1) - } + }) - + if(temp==0){ + this.addAttinfFile.splice(addi,1) + } }) this.addAttinfFile.push(...this.zdyData) }