|
|
|
@ -588,7 +588,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
getTemplateData() { |
|
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { |
|
|
|
|
console.log('预案内容', data) |
|
|
|
|
if(this.route.snapshot.queryParams.haveNew!=undefined&&data.webTextData==null){ |
|
|
|
|
if(this.route.snapshot.queryParams.haveNew!=undefined&&this.route.snapshot.queryParams.planMode==4){ |
|
|
|
|
this.planTemplateData=[] |
|
|
|
|
let obj = { |
|
|
|
|
completed: true, |
|
|
|
@ -1486,7 +1486,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
if(fileNum==0){ |
|
|
|
|
this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].facilityItems.push({ name: '', value: '',completed:true,zdy:true}) |
|
|
|
|
}else{ |
|
|
|
|
this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ propertyName: '', value: '',completed:true,zdy:true,facilityItems:[] }) |
|
|
|
|
this.planTemplateData[index].building[attacki].body[bodyi].attinf.push({ name: '', value: '',completed:true,zdy:true,facilityItems:[] }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -2199,9 +2199,9 @@ export class adddwsurveys{
|
|
|
|
|
constructor(private http: HttpClient,public dialogRef: MatDialogRef<adddwsurveys>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} |
|
|
|
|
addAttinfBuild=[] |
|
|
|
|
buildnewDate=[] |
|
|
|
|
addAttinfFile |
|
|
|
|
addAttinfFile//过滤消防设施外层数据
|
|
|
|
|
filenewDate=[] |
|
|
|
|
facilityItems |
|
|
|
|
facilityItems//过滤消防设施最内层数据
|
|
|
|
|
facilityCategoryId//消防设施内容id
|
|
|
|
|
zdyData//模板传过来自定义的数据
|
|
|
|
|
ngOnInit(): void{ |
|
|
|
@ -2372,10 +2372,19 @@ export class adddwsurveys{
|
|
|
|
|
}else{ |
|
|
|
|
//消防设施最里层数据
|
|
|
|
|
let apifile |
|
|
|
|
this.facilityItems=JSON.parse(JSON.stringify(this.data.facilityItems))
|
|
|
|
|
this.facilityItems=this.data.facilityItems.filter(element => { |
|
|
|
|
return element.zdy==undefined |
|
|
|
|
}); |
|
|
|
|
this.zdyData=this.data.facilityItems.filter(element => { |
|
|
|
|
return element.zdy!=undefined |
|
|
|
|
}); |
|
|
|
|
this.facilityItems=JSON.parse(JSON.stringify(this.facilityItems))
|
|
|
|
|
console.log(this.facilityItems) |
|
|
|
|
//请求接口,看数据是否有变化
|
|
|
|
|
this.http.get("/api/BuildingTypes").subscribe((buildData:any)=>{ |
|
|
|
|
let paramsdata:any ={ |
|
|
|
|
categoryId:this.data.fid |
|
|
|
|
} |
|
|
|
|
this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((buildData:any)=>{ |
|
|
|
|
buildData.forEach(async element => { |
|
|
|
|
if(element.id==this.data.fid){ |
|
|
|
|
this.facilityCategoryId=element.facilityCategoryId |
|
|
|
@ -2424,7 +2433,7 @@ export class adddwsurveys{
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.facilityItems.push(...this.zdyData) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|