|
|
|
@ -460,7 +460,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
//console.log(this.buildingsData)
|
|
|
|
|
if (this.planTemplateData[index].building == undefined) { |
|
|
|
|
this.planTemplateData[index].building = [] |
|
|
|
|
if (this.planTemplateData[index].attribute[1].attinf != undefined) { |
|
|
|
|
/* if (this.planTemplateData[index].attribute[1].attinf != undefined) { |
|
|
|
|
this.planTemplateData[index].attribute[1].attinf.forEach(pData => { |
|
|
|
|
this.buildingsData.forEach((bDara, bi, bArr) => { |
|
|
|
|
if (bDara.buildingBasicGroups.length > 0) { |
|
|
|
@ -470,7 +470,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} */ |
|
|
|
|
|
|
|
|
|
for (var i = 0; i < this.buildDataName.length; i++) { |
|
|
|
|
if (i == 0) { |
|
|
|
@ -567,18 +567,46 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
groupName: "单位概况" |
|
|
|
|
} |
|
|
|
|
getTemplateData() { |
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
|
|
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { |
|
|
|
|
console.log('预案内容', data) |
|
|
|
|
/* if(this.route.snapshot.queryParams.haveNew==true){ |
|
|
|
|
if(this.route.snapshot.queryParams.haveNew!=undefined){ |
|
|
|
|
this.planTemplateData=[] |
|
|
|
|
let obj = { |
|
|
|
|
completed: true, |
|
|
|
|
groupName: "封面", |
|
|
|
|
attribute: { |
|
|
|
|
planNumber: '', |
|
|
|
|
planName: this.route.snapshot.queryParams.planName, |
|
|
|
|
objName: this.unitData.name, |
|
|
|
|
unitNature: this.unitData.buildingTypes[0].name, |
|
|
|
|
planLevel: '', |
|
|
|
|
disasterType: '火灾', |
|
|
|
|
fireproofingLevel: '', |
|
|
|
|
fireproofingAdminister: this.unitData.organizationName, |
|
|
|
|
putOutFireAdminister: '', |
|
|
|
|
producer: { |
|
|
|
|
name: '', |
|
|
|
|
duty: '' |
|
|
|
|
}, |
|
|
|
|
verifier: { |
|
|
|
|
name: '', |
|
|
|
|
duty: '' |
|
|
|
|
}, |
|
|
|
|
auditTime: '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.planTemplateData.unshift(obj) |
|
|
|
|
|
|
|
|
|
this.planTemplateData.push(this.danweInfo) |
|
|
|
|
} */ |
|
|
|
|
/* this.planTemplateData = JSON.parse(data.webTextData).filter(item => |
|
|
|
|
this.planTemplateData.push({completed: true,groupName: '新建'}) |
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
}else{ |
|
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { |
|
|
|
|
console.log('预案内容', data) |
|
|
|
|
|
|
|
|
|
this.planTemplateData = JSON.parse(data.webTextData).filter(item => |
|
|
|
|
item.completed == true |
|
|
|
|
) */ |
|
|
|
|
this.planTemplateData=JSON.parse(data.webTextData) |
|
|
|
|
) |
|
|
|
|
//this.planTemplateData=JSON.parse(data.webTextData)
|
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
if (this.planTemplateData[0].groupName != '封面') { |
|
|
|
|
let obj = { |
|
|
|
@ -659,6 +687,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//引入数据json
|
|
|
|
|