|
|
@ -529,13 +529,13 @@ export class PlanTemplateComponent implements OnInit { |
|
|
|
console.log(this.newleftTabledata) |
|
|
|
console.log(this.newleftTabledata) |
|
|
|
} |
|
|
|
} |
|
|
|
//消防设施表格具体属性编辑
|
|
|
|
//消防设施表格具体属性编辑
|
|
|
|
fileAdd(facilityItems,filei){ |
|
|
|
fileAdd(facilityItems,filei,filename){ |
|
|
|
if(facilityItems.length!=0){ |
|
|
|
if(facilityItems.length!=0){ |
|
|
|
const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
const dialogRef = this.dialog.open(addattinf, {//调用open方法打开对话框并且携带参数过去
|
|
|
|
width: '240px', |
|
|
|
width: '240px', |
|
|
|
height:'400px', |
|
|
|
height:'400px', |
|
|
|
disableClose:true, |
|
|
|
disableClose:true, |
|
|
|
data:{facilityItems:facilityItems} |
|
|
|
data:{facilityItems:facilityItems,filename,newleftTabledata:this.newleftTabledata,leftclicki:this.leftclicki} |
|
|
|
}); |
|
|
|
}); |
|
|
|
dialogRef.afterClosed().subscribe(result => { |
|
|
|
dialogRef.afterClosed().subscribe(result => { |
|
|
|
console.log(result) |
|
|
|
console.log(result) |
|
|
@ -549,7 +549,7 @@ export class PlanTemplateComponent implements OnInit { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.group=this.newleftTabledata[this,this.leftclicki].data |
|
|
|
this.group=this.newleftTabledata[this.leftclicki].data |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.newleftTabledata) |
|
|
|
console.log(this.newleftTabledata) |
|
|
|
}); |
|
|
|
}); |
|
|
@ -1744,7 +1744,7 @@ async getattinf(){ |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.filenewDate.forEach(element => { |
|
|
|
this.filenewDate.forEach(element => { |
|
|
|
element.completed=false |
|
|
|
element.completed=false |
|
|
|
element.olddata=element.propertyValue |
|
|
|
//element.olddata=element.propertyValue
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
})
|
|
|
|
})
|
|
|
@ -1752,26 +1752,26 @@ async getattinf(){ |
|
|
|
let temp=0 |
|
|
|
let temp=0 |
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
temp=0 |
|
|
|
temp=0 |
|
|
|
this.filenewDate.forEach((addval,addi,addarr)=>{ |
|
|
|
this.addAttinfFile.forEach((addval,addi,addarr)=>{ |
|
|
|
if(buildval.propertyName==addval.propertyName){ |
|
|
|
if(buildval.name==addval.name){ |
|
|
|
temp++ |
|
|
|
temp++ |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(temp==0){ |
|
|
|
if(temp==0){ |
|
|
|
console.log(buildval) |
|
|
|
console.log(buildval) |
|
|
|
this.filenewDate.push(buildval) |
|
|
|
this.addAttinfFile.push(buildval) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.filenewDate.forEach((addval,addi,addarr)=>{ |
|
|
|
this.addAttinfFile.forEach((addval,addi,addarr)=>{ |
|
|
|
temp=0 |
|
|
|
temp=0 |
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
this.filenewDate.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
if(buildarr[buindi].propertyName==addarr[addi].propertyName){ |
|
|
|
if(buildarr[buindi].name==addarr[addi].name){ |
|
|
|
temp++ |
|
|
|
temp++ |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(temp==0){ |
|
|
|
if(temp==0){ |
|
|
|
console.log(addarr[addi]) |
|
|
|
console.log(addarr[addi]) |
|
|
|
this.filenewDate.splice(addi,1) |
|
|
|
this.addAttinfFile.splice(addi,1) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -1779,11 +1779,52 @@ async getattinf(){ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
//消防设施最里层数据
|
|
|
|
|
|
|
|
let apifile |
|
|
|
this.facilityItems=JSON.parse(JSON.stringify(this.data.facilityItems))
|
|
|
|
this.facilityItems=JSON.parse(JSON.stringify(this.data.facilityItems))
|
|
|
|
console.log(this.facilityItems) |
|
|
|
console.log(this.facilityItems) |
|
|
|
/* this.facilityItems.forEach(element => { |
|
|
|
//请求接口,看数据是否有变化
|
|
|
|
element.completed=false |
|
|
|
let paramsdata:any ={ |
|
|
|
}); */ |
|
|
|
categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let fileResult=await new Promise((resolve) => { |
|
|
|
|
|
|
|
this.http.get("/api/FacilityGroups",{params:paramsdata}).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
apifile=fileResult |
|
|
|
|
|
|
|
let apifileData//消防设施最内层数据
|
|
|
|
|
|
|
|
apifile.forEach(element => { |
|
|
|
|
|
|
|
if(element.name==this.data.filename){ |
|
|
|
|
|
|
|
apifileData=element.facilityItems |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
console.log(apifileData) |
|
|
|
|
|
|
|
let temp=0 |
|
|
|
|
|
|
|
apifileData.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
|
|
|
temp=0 |
|
|
|
|
|
|
|
this.facilityItems.forEach((addval,addi,addarr)=>{ |
|
|
|
|
|
|
|
if(buildval.name==addval.name){ |
|
|
|
|
|
|
|
temp++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if(temp==0){ |
|
|
|
|
|
|
|
console.log(buildval) |
|
|
|
|
|
|
|
this.facilityItems.push(buildval) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.facilityItems.forEach((addval,addi,addarr)=>{ |
|
|
|
|
|
|
|
temp=0 |
|
|
|
|
|
|
|
apifileData.forEach((buildval,buindi,buildarr)=>{ |
|
|
|
|
|
|
|
if(buildarr[buindi].name==addarr[addi].name){ |
|
|
|
|
|
|
|
temp++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if(temp==0){ |
|
|
|
|
|
|
|
console.log(addarr[addi]) |
|
|
|
|
|
|
|
this.facilityItems.splice(addi,1) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|