From 1aabceeff93f110ac6916b811c65b41bea08196e Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Wed, 30 Jun 2021 14:57:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=AF=95=E5=8D=87=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 253 +++++++++--------- .../create-plan-online-five.component.ts | 75 +++--- .../meet-plan/meet-plan.component.ts | 2 +- .../onetwo-entry-plan.component.ts | 2 +- .../type-plan/type-plan.component.ts | 2 +- .../plan-template/plan-template.component.ts | 17 +- 6 files changed, 184 insertions(+), 167 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 f9b5e29..8b7d0e5 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 @@ -173,9 +173,8 @@ 建筑列表
-
- +
+ {{item.name}}
@@ -412,148 +411,152 @@
-
- 单位基本信息 -
-
- {{buildingName}} -
-
-
-
- {{element.surveyName}} - - +
+
+
+ {{itemunit.name}}
-
- -
-
-
- {{attack.head}} - - -
-
- - - - - - - - - - -
- -
- -
-
+
+
+
+ {{element.surveyName}} + +
- - -
- -
-
-
- - +
+ +
+
+
+ {{attack.head}} + + +
+
+ + + + + + + + + + +
+ +
+ +
+
+
+ +
-
-
-
-
-
- - + +
+
+
+ + +
+
-
-
- -
-
-
-
- {{attack.name}} +
+
+
+ + +
-
-
-
- - +
+ +
+
+
+
+ {{attack.name}} +
+
+
+
+ + +
+
+
+
- -
- -
- -
-
- - - -
-
- -
-
- - - -
-
- -
-
-
- - + +
+
+ + + +
-
-
-
- - -
-
- - -
+ +
+
+ + +
-
-
- - +
+ +
+
+
+ +
-
- - +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
-
- - -
+
-
+ + +
-
+
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 c749a33..e78c386 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 @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-06-16 13:56:54 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-29 17:00:09 + * @LastEditTime: 2021-06-30 14:01:35 */ import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; @@ -77,12 +77,13 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.getRealPicture() }else if(this.selectedItem == '单位概况'){ this.getAllBuildings() - this.planTemplateData[0].attribute[0].attinf[0].value=this.unitData.usci - this.planTemplateData[0].attribute[0].attinf[1].value=this.unitData.buildingTypes[0].name - this.planTemplateData[0].attribute[0].attinf[2].value=this.unitData.contacts - this.planTemplateData[0].attribute[0].attinf[3].value=this.unitData.phone - this.planTemplateData[0].attribute[0].attinf[4].value=this.unitData.organizationName - this.planTemplateData[0].attribute[0].attinf[5].value=this.unitData.address + console.log(this.planTemplateData) + this.planTemplateData[1].attribute[0].attinf[0].value=this.unitData.usci + this.planTemplateData[1].attribute[0].attinf[1].value=this.unitData.buildingTypes[0].name + this.planTemplateData[1].attribute[0].attinf[2].value=this.unitData.contacts + this.planTemplateData[1].attribute[0].attinf[3].value=this.unitData.phone + this.planTemplateData[1].attribute[0].attinf[4].value=this.unitData.organizationName + this.planTemplateData[1].attribute[0].attinf[5].value=this.unitData.address } /* else if (this.selectedItem == '单位概况') { //this.getAllBuildings() } */ else if (this.selectedItem == '预案附件') { @@ -302,16 +303,23 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) }) this.allBuildings = data - if(this.planTemplateData[0].building==undefined){ - this.planTemplateData[0].building=[] - } - for(var i=0;i { + console.log(result) if(result!=undefined){ //this.newleftTabledata[i].name=result.name if(operation=='edit'){ @@ -202,13 +203,13 @@ export class PlanTemplateComponent implements OnInit { data:this.newleftTabledata[this.leftclicki].data==null?null:this.newleftTabledata[this.leftclicki].data==0?null:this.newleftTabledata[this.leftclicki].data }); dialogRef.afterClosed().subscribe(result => { - //console.log(result,this.newleftTabledata) + console.log(result,this.newleftTabledata) this.newleftTabledata.forEach((value,index,array)=>{ if(array[index].buildingTypeId==this.buildingTypeId&&array[index].planCategory==this.planCategory){ if(result!=undefined){ result.forEach((valuer,i,rarr) => { //添加分组名称 - if(array[index].data==null){ + if(array[index].data==null||array[index].data.length==0){ array[index].data=result }else{ array[index].data[i].completed=rarr[i].completed @@ -246,7 +247,7 @@ export class PlanTemplateComponent implements OnInit { if(groupName=='单位概况'){ const dialogRef = this.dialog.open(adddwsurvey, {//调用open方法打开对话框并且携带参数过去 width: '240px', - height:'510px', + height:'420px', disableClose:true, data:this.group }); @@ -528,6 +529,7 @@ export class addPlanname{ unitname//单位类型名称 allunittype//所有单位信息 basicCategoryId + facilityCategoryId//消防设施id ngOnInit(): void { this.getUnittype() } @@ -566,6 +568,7 @@ export class addPlanname{ this.allunittype.forEach(element => { if(element.id==this.unitid){ this.basicCategoryId=element.basicCategoryId + this.facilityCategoryId=element.facilityCategoryId } }); let planData={ @@ -574,6 +577,7 @@ export class addPlanname{ buildingTypeId:this.unitid, unitname:this.unitname, basicCategoryId:this.basicCategoryId, + facilityCategoryId:this.facilityCategoryId, data:[] } this.dialogRef.close(planData) @@ -733,8 +737,7 @@ export class adddwsurvey{ {surveyName:'四周毗邻',completed:false,attinf:[{name:'东',value:''},{name:'西',value:''},{name:'南',value:''},{name:'北',value:''}]}, {surveyName:'消防设施',completed:false},{surveyName:'进攻通道',completed:false}, {surveyName:'重点部位',completed:false,attinf:[{heafName:'',body:[{name:'重点部位名称',value:''},{name:'重点部位所在位置',value:''},{name:'建筑结构',value:''},{name:'使用性质',value:''},{name:'主要危险性',value:''}]}]}, - {surveyName:'功能分区',completed:false,attinf:[{name:'',value:''}]},{surveyName:'行车路线',completed:false},{surveyName:'千米水源',completed:false}, - {surveyName:'实景图',completed:false} + {surveyName:'功能分区',completed:false,attinf:[{name:'',value:''}]} ] ngOnInit(): void{ console.log(this.data) @@ -831,11 +834,13 @@ getattinf(){ categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId } this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((data:any)=>{ + console.log(data) this.addAttinfFile=data this.addAttinfFile.forEach(element => { element.completed=false element.value='' }); + console.log(this.addAttinfFile) }) }else if(value.surveyName=='消防设施'&&value.attinf!=undefined){ this.addAttinfFile=value.attinf