Browse Source

[修改]修改对比数据报错

tangshan
邵佳豪 4 years ago
parent
commit
1421fbd8be
  1. 28
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts

28
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -165,7 +165,7 @@ export class WaitExamineerComponent implements OnInit {
differentContentOfBuildingsInfo: any//当前单位变更数据 之 建筑信息
differentContentOfFunction: any = []//当前单位变更数据 之 功能分区
differentContentOfPicture: any//当前单位变更数据 之 实景图
bianzhi=false
bianzhi = false
radioClick(e, item) {
this.selectedItem = item
console.log(item)
@ -179,6 +179,8 @@ export class WaitExamineerComponent implements OnInit {
// 实景图
this.differentContentOfPicture = differentContent.filter(item => item.propertyName == 'realityImageGroups')
if (differentContent.filter(item => item.propertyName == 'buildings').length != 0) {
//建筑信息
this.differentContentOfBuildingsInfo = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0]))
this.differentContentOfBuildingsInfo.childrens.forEach(element => {
@ -195,7 +197,7 @@ export class WaitExamineerComponent implements OnInit {
}
});
});
}
}
@ -212,20 +214,20 @@ export class WaitExamineerComponent implements OnInit {
this.viewer = {}
if (item.contentType == 11) {
this.bianzhi=false
this.bianzhi = false
window.setTimeout(() => {
this.showtype = 3
sessionStorage.setItem('companyId', item.itemId)
}, 0)
} else if (item.contentType == 12) {
this.bianzhi=false
this.bianzhi = false
//水源
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => {
this.waterData = data
this.showtype = 12
})
} else if (item.contentType == 13) {
this.bianzhi=false
this.bianzhi = false
//消防力量
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data: any) => {
if (data.forceType != 0) {//如果是其他消防力量
@ -247,7 +249,7 @@ export class WaitExamineerComponent implements OnInit {
})
} else if (item.contentType == 14) {
this.bianzhi=false
this.bianzhi = false
//联动力量
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data: any) => {
@ -261,12 +263,12 @@ export class WaitExamineerComponent implements OnInit {
this.companyId = data.companyId
this.companyName = data.companyName
if (data.planType != 2 && data.planType != 1) {
if(data.planMode==2){
this.bianzhi=true
this.src=`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
if (data.planMode == 2) {
this.bianzhi = true
this.src = `/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
}else{
this.bianzhi=false
} else {
this.bianzhi = false
this.fetchUrl = data.attachmentUrls[0]
var index = this.fetchUrl.indexOf("\/")
if (this.fetchUrl.substr(0, index) == 'psw') {
@ -289,7 +291,7 @@ export class WaitExamineerComponent implements OnInit {
}
} else {
this.bianzhi=false
this.bianzhi = false
this.organizationName = item.organizationName
this.planData = data
this.handleData()
@ -325,7 +327,7 @@ export class WaitExamineerComponent implements OnInit {
let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf'
src = `/api/Objects/PlanPlatform/` + arr.join('.')
}else if (suffix == 'pdf') {
} else if (suffix == 'pdf') {
src = `/api/Objects/PlanPlatform/` + this.fetchUrl
}
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src);

Loading…
Cancel
Save