|
|
@ -62,6 +62,9 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
this.getAlltabledate() |
|
|
|
this.getAlltabledate() |
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
planTypeIndex //平面图类型 选择是总平面图还是层平面图
|
|
|
|
planTypeIndex //平面图类型 选择是总平面图还是层平面图
|
|
|
@ -168,7 +171,7 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
differentContentOfBuildingsInfo: any//当前单位变更数据 之 建筑信息
|
|
|
|
differentContentOfBuildingsInfo: any//当前单位变更数据 之 建筑信息
|
|
|
|
differentContentOfFunction: any = []//当前单位变更数据 之 功能分区
|
|
|
|
differentContentOfFunction: any = []//当前单位变更数据 之 功能分区
|
|
|
|
differentContentOfPicture: any//当前单位变更数据 之 实景图
|
|
|
|
differentContentOfPicture: any//当前单位变更数据 之 实景图
|
|
|
|
bianzhi=false |
|
|
|
bianzhi = false |
|
|
|
radioClick(e, item) { |
|
|
|
radioClick(e, item) { |
|
|
|
this.selectedItem = item |
|
|
|
this.selectedItem = item |
|
|
|
console.log(item) |
|
|
|
console.log(item) |
|
|
@ -177,28 +180,56 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
let differentContent = JSON.parse(this.selectedItem.differentContent) |
|
|
|
let differentContent = JSON.parse(this.selectedItem.differentContent) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('差异信息', differentContent) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 单位信息
|
|
|
|
// 单位信息
|
|
|
|
this.differentContentOfUnitInfo = differentContent.filter(item => item.propertyName == 'basicInfo') |
|
|
|
this.differentContentOfUnitInfo = differentContent.filter(item => item.propertyName == 'basicInfo') |
|
|
|
// 实景图
|
|
|
|
// 实景图
|
|
|
|
this.differentContentOfPicture = differentContent.filter(item => item.propertyName == 'realityImageGroups') |
|
|
|
this.differentContentOfPicture = differentContent.filter(item => item.propertyName == 'realityImageGroups') |
|
|
|
|
|
|
|
|
|
|
|
//建筑信息
|
|
|
|
|
|
|
|
this.differentContentOfBuildingsInfo = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
if (differentContent.filter(item => item.propertyName == 'buildings').length != 0) { |
|
|
|
this.differentContentOfBuildingsInfo.childrens.forEach(element => { |
|
|
|
//建筑信息
|
|
|
|
element.childrens = element.childrens.filter(item => item.isObj == false) |
|
|
|
this.differentContentOfBuildingsInfo = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
}); |
|
|
|
|
|
|
|
//功能分区
|
|
|
|
function resolveDiff(list: Array<DiffItem>, path?: Array<string>): Array<Result> { |
|
|
|
let differentContentOfFunction = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
let resultList: Array<Result> = []; |
|
|
|
this.differentContentOfFunction = [] |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
differentContentOfFunction.childrens.forEach(item => { |
|
|
|
if (path == null) path = []; |
|
|
|
item.childrens.forEach(i => { |
|
|
|
let item = list[i]; |
|
|
|
if (i.propertyName == "buildingFunctionalDivisions") { |
|
|
|
//递归最底层
|
|
|
|
i.propertyName = item.propertyName |
|
|
|
if (!item.childrens.length) { |
|
|
|
this.differentContentOfFunction.push(i) |
|
|
|
let res = new Result(); |
|
|
|
|
|
|
|
res.path = path.concat([item.displayName]); |
|
|
|
|
|
|
|
res.oldValue = item.oldValue; |
|
|
|
|
|
|
|
res.newValue = item.newValue; |
|
|
|
|
|
|
|
resultList.push(res); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
!!item.displayName && path.push(item.displayName); |
|
|
|
|
|
|
|
let deepList = resolveDiff(item.childrens, path) |
|
|
|
|
|
|
|
resultList = resultList.concat(deepList); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return resultList; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.differentContentOfBuildingsInfo.childrens.forEach(element => { |
|
|
|
|
|
|
|
element.difData = resolveDiff(element.childrens) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
// console.log('建筑信息', this.differentContentOfBuildingsInfo
|
|
|
|
|
|
|
|
//功能分区
|
|
|
|
|
|
|
|
let differentContentOfFunction = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
|
|
|
|
this.differentContentOfFunction = [] |
|
|
|
|
|
|
|
differentContentOfFunction.childrens.forEach(item => { |
|
|
|
|
|
|
|
item.childrens.forEach(i => { |
|
|
|
|
|
|
|
if (i.propertyName == "buildingFunctionalDivisions") { |
|
|
|
|
|
|
|
i.propertyName = item.propertyName |
|
|
|
|
|
|
|
this.differentContentOfFunction.push(i) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -215,20 +246,20 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
this.viewer = {} |
|
|
|
this.viewer = {} |
|
|
|
|
|
|
|
|
|
|
|
if (item.contentType == 11) { |
|
|
|
if (item.contentType == 11) { |
|
|
|
this.bianzhi=false |
|
|
|
this.bianzhi = false |
|
|
|
window.setTimeout(() => { |
|
|
|
window.setTimeout(() => { |
|
|
|
this.showtype = 3 |
|
|
|
this.showtype = 3 |
|
|
|
sessionStorage.setItem('companyId', item.itemId) |
|
|
|
sessionStorage.setItem('companyId', item.itemId) |
|
|
|
}, 0) |
|
|
|
}, 0) |
|
|
|
} else if (item.contentType == 12) { |
|
|
|
} else if (item.contentType == 12) { |
|
|
|
this.bianzhi=false |
|
|
|
this.bianzhi = false |
|
|
|
//水源
|
|
|
|
//水源
|
|
|
|
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => { |
|
|
|
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => { |
|
|
|
this.waterData = data |
|
|
|
this.waterData = data |
|
|
|
this.showtype = 12 |
|
|
|
this.showtype = 12 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (item.contentType == 13) { |
|
|
|
} else if (item.contentType == 13) { |
|
|
|
this.bianzhi=false |
|
|
|
this.bianzhi = false |
|
|
|
//消防力量
|
|
|
|
//消防力量
|
|
|
|
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data: any) => { |
|
|
|
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data: any) => { |
|
|
|
if (data.forceType != 0) {//如果是其他消防力量
|
|
|
|
if (data.forceType != 0) {//如果是其他消防力量
|
|
|
@ -250,7 +281,7 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (item.contentType == 14) { |
|
|
|
} else if (item.contentType == 14) { |
|
|
|
this.bianzhi=false |
|
|
|
this.bianzhi = false |
|
|
|
//联动力量
|
|
|
|
//联动力量
|
|
|
|
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data: any) => { |
|
|
|
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data: any) => { |
|
|
|
|
|
|
|
|
|
|
@ -264,35 +295,35 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
this.companyId = data.companyId |
|
|
|
this.companyId = data.companyId |
|
|
|
this.companyName = data.companyName |
|
|
|
this.companyName = data.companyName |
|
|
|
if (data.planType != 2 && data.planType != 1) { |
|
|
|
if (data.planType != 2 && data.planType != 1) { |
|
|
|
if(data.planMode==2){ |
|
|
|
if (data.planMode == 2) { |
|
|
|
this.bianzhi=true |
|
|
|
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 = `/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}`
|
|
|
|
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.bianzhi=false |
|
|
|
|
|
|
|
this.fetchUrl = data.attachmentUrls[0] |
|
|
|
|
|
|
|
var index = this.fetchUrl.indexOf("\/") |
|
|
|
|
|
|
|
if (this.fetchUrl.substr(0, index) == 'psw') { |
|
|
|
|
|
|
|
this.showtype = 1 |
|
|
|
|
|
|
|
var obj = document.getElementById('viewer') |
|
|
|
|
|
|
|
if (obj != null) { |
|
|
|
|
|
|
|
obj.innerHTML = '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
window.setTimeout(() => { |
|
|
|
|
|
|
|
this.viewer = new photoViewer({ |
|
|
|
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
|
|
|
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.lookWord() |
|
|
|
this.bianzhi = false |
|
|
|
} |
|
|
|
this.fetchUrl = data.attachmentUrls[0] |
|
|
|
|
|
|
|
var index = this.fetchUrl.indexOf("\/") |
|
|
|
|
|
|
|
if (this.fetchUrl.substr(0, index) == 'psw') { |
|
|
|
|
|
|
|
this.showtype = 1 |
|
|
|
|
|
|
|
var obj = document.getElementById('viewer') |
|
|
|
|
|
|
|
if (obj != null) { |
|
|
|
|
|
|
|
obj.innerHTML = '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
window.setTimeout(() => { |
|
|
|
|
|
|
|
this.viewer = new photoViewer({ |
|
|
|
|
|
|
|
container: document.querySelector('#viewer'), |
|
|
|
|
|
|
|
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.lookWord() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.bianzhi=false |
|
|
|
this.bianzhi = false |
|
|
|
this.organizationName = item.organizationName |
|
|
|
this.organizationName = item.organizationName |
|
|
|
this.planData = data |
|
|
|
this.planData = data |
|
|
|
this.handleData() |
|
|
|
this.handleData() |
|
|
@ -328,7 +359,7 @@ export class WaitExamineerComponent implements OnInit { |
|
|
|
let arr = this.fetchUrl.split('.') |
|
|
|
let arr = this.fetchUrl.split('.') |
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
src = `/api/Objects/PlanPlatform/` + arr.join('.') |
|
|
|
src = `/api/Objects/PlanPlatform/` + arr.join('.') |
|
|
|
}else if (suffix == 'pdf') { |
|
|
|
} else if (suffix == 'pdf') { |
|
|
|
src = `/api/Objects/PlanPlatform/` + this.fetchUrl |
|
|
|
src = `/api/Objects/PlanPlatform/` + this.fetchUrl |
|
|
|
} |
|
|
|
} |
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); |
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); |
|
|
@ -801,3 +832,18 @@ export class remark { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DiffItem { |
|
|
|
|
|
|
|
newValue: any |
|
|
|
|
|
|
|
oldValue: any |
|
|
|
|
|
|
|
childrens: Array<DiffItem> |
|
|
|
|
|
|
|
operation: number |
|
|
|
|
|
|
|
displayName: string |
|
|
|
|
|
|
|
propertyName: string |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Result { |
|
|
|
|
|
|
|
path: string[] |
|
|
|
|
|
|
|
oldValue: any |
|
|
|
|
|
|
|
newValue: any |
|
|
|
|
|
|
|
} |