|
|
|
@ -62,6 +62,9 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
planTypeIndex //平面图类型 选择是总平面图还是层平面图
|
|
|
|
@ -174,6 +177,10 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
let differentContent = JSON.parse(this.selectedItem.differentContent) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('差异信息', differentContent) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 单位信息
|
|
|
|
|
this.differentContentOfUnitInfo = differentContent.filter(item => item.propertyName == 'basicInfo') |
|
|
|
|
// 实景图
|
|
|
|
@ -183,9 +190,31 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
if (differentContent.filter(item => item.propertyName == 'buildings').length != 0) { |
|
|
|
|
//建筑信息
|
|
|
|
|
this.differentContentOfBuildingsInfo = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
|
|
|
|
|
|
function resolveDiff(list: Array<DiffItem>, path?: Array<string>): Array<Result> { |
|
|
|
|
let resultList: Array<Result> = []; |
|
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
|
if (path == null) path = []; |
|
|
|
|
let item = list[i]; |
|
|
|
|
//递归最底层
|
|
|
|
|
if (!item.childrens.length) { |
|
|
|
|
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.childrens = element.childrens.filter(item => item.isObj == false) |
|
|
|
|
element.difData = resolveDiff(element.childrens) |
|
|
|
|
}); |
|
|
|
|
// console.log('建筑信息', this.differentContentOfBuildingsInfo
|
|
|
|
|
//功能分区
|
|
|
|
|
let differentContentOfFunction = JSON.parse(JSON.stringify(differentContent.filter(item => item.propertyName == 'buildings')[0])) |
|
|
|
|
this.differentContentOfFunction = [] |
|
|
|
@ -799,4 +828,19 @@ 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 |
|
|
|
|
} |