|
|
|
@ -1559,6 +1559,7 @@ export class addattinf{
|
|
|
|
|
addAttinfBuild=[] |
|
|
|
|
buildnewDate=[] |
|
|
|
|
addAttinfFile |
|
|
|
|
filenewDate=[] |
|
|
|
|
facilityItems |
|
|
|
|
ngOnInit(): void{ |
|
|
|
|
console.log(this.data) |
|
|
|
@ -1616,7 +1617,6 @@ async getattinf(){
|
|
|
|
|
let restlt=await new Promise((resolve) => { |
|
|
|
|
this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{ |
|
|
|
|
data.forEach((buildDate,buildi,buildarr) => { |
|
|
|
|
//this.addAttinfBuild.push(...buildarr[buildi].propertyInfos)
|
|
|
|
|
this.buildnewDate.push(...buildarr[buildi].propertyInfos) |
|
|
|
|
resolve(data) |
|
|
|
|
}); |
|
|
|
@ -1626,22 +1626,11 @@ async getattinf(){
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
})
|
|
|
|
|
/* value.attinf.forEach((elattinf,fi,farr) => { |
|
|
|
|
this.addAttinfBuild.forEach((element,ei,earr) => { |
|
|
|
|
if(farr[fi].propertyName==earr[ei].propertyName){ |
|
|
|
|
if(farr[fi].completed==true&&earr[ei].completed==false){ |
|
|
|
|
farr[fi].completed=earr[ei].completed |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
element.olddata=element.propertyValue |
|
|
|
|
}); */ |
|
|
|
|
let temp=0 |
|
|
|
|
this.buildnewDate=JSON.parse(JSON.stringify(this.buildnewDate)) |
|
|
|
|
let temp=0 |
|
|
|
|
this.buildnewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
temp=0 |
|
|
|
|
this.addAttinfBuild.forEach((addval,addi,addarr)=>{ |
|
|
|
|
|
|
|
|
|
if(buildval.propertyName==addval.propertyName){ |
|
|
|
|
temp++ |
|
|
|
|
} |
|
|
|
@ -1651,6 +1640,18 @@ async getattinf(){
|
|
|
|
|
this.addAttinfBuild.push(buildval) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.addAttinfBuild.forEach((addval,addi,addarr)=>{ |
|
|
|
|
temp=0 |
|
|
|
|
this.buildnewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
if(buildarr[buindi].propertyName==addarr[addi].propertyName){ |
|
|
|
|
temp++ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(temp==0){ |
|
|
|
|
console.log(addarr[addi]) |
|
|
|
|
this.addAttinfBuild.splice(addi,1) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log(this.buildnewDate) |
|
|
|
|
console.log(this.addAttinfBuild) |
|
|
|
|
|
|
|
|
@ -1668,7 +1669,50 @@ async getattinf(){
|
|
|
|
|
console.log(this.addAttinfFile) |
|
|
|
|
}) |
|
|
|
|
}else if(value.surveyName=='消防设施'&&value.attinf!=undefined){ |
|
|
|
|
this.filenewDate=[] |
|
|
|
|
this.addAttinfFile=value.attinf |
|
|
|
|
this.addAttinfFile=JSON.parse(JSON.stringify(this.addAttinfFile)) |
|
|
|
|
let paramsdata:any ={ |
|
|
|
|
categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId |
|
|
|
|
} |
|
|
|
|
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)) |
|
|
|
|
let temp=0 |
|
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
temp=0 |
|
|
|
|
this.filenewDate.forEach((addval,addi,addarr)=>{ |
|
|
|
|
if(buildval.propertyName==addval.propertyName){ |
|
|
|
|
temp++ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(temp==0){ |
|
|
|
|
console.log(buildval) |
|
|
|
|
this.filenewDate.push(buildval) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.filenewDate.forEach((addval,addi,addarr)=>{ |
|
|
|
|
temp=0 |
|
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
if(buildarr[buindi].propertyName==addarr[addi].propertyName){ |
|
|
|
|
temp++ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(temp==0){ |
|
|
|
|
console.log(addarr[addi]) |
|
|
|
|
this.filenewDate.splice(addi,1) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -1718,7 +1762,7 @@ export class zdydisaster{
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
if(this.level==undefined||this.level==''){ |
|
|
|
|
this.snackBar.open('请选择类型!','确定',config); |
|
|
|
|
}else if(this.level!=2&&(this.headName==undefined||this.headName=='')){ |
|
|
|
|
}else if((this.level!=2&&this.level!=1)&&(this.headName==undefined||this.headName=='')){ |
|
|
|
|
this.snackBar.open('请输入表头名称!','确定',config); |
|
|
|
|
}else if(this.level==2&&(this.lieNumber==0||this.lieNumber==undefined) ){ |
|
|
|
|
this.snackBar.open('请输入列数!','确定',config); |
|
|
|
|