|
|
|
@ -894,15 +894,23 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
if (this.selectingSitePlan && this.selectingSitePlan.id) { |
|
|
|
|
//打开遮罩层
|
|
|
|
|
this.maskLayerService.sendMessage(true) |
|
|
|
|
//遍历 建筑数据 删除多余数据
|
|
|
|
|
let object = this.canvasData.originalcompanyBuildingData.data |
|
|
|
|
let adjoinArr = [] //毗邻数组
|
|
|
|
|
Object.keys(object).forEach(key=>{ |
|
|
|
|
let isExist = this.sitePlanData.find(item=>{ return item.id === object[key].FloorId }) |
|
|
|
|
if (isExist === undefined) { |
|
|
|
|
console.log(object[key],'当前楼层已被删除') |
|
|
|
|
delete object[key] |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
//遍历 建筑数据 删除多余数据
|
|
|
|
|
this.saveNum = [] |
|
|
|
|
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); |
|
|
|
|
SitePlanData.data = JSON.stringify(SitePlanData.data) |
|
|
|
|
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); |
|
|
|
|
CompanyData.data = JSON.stringify(CompanyData.data) |
|
|
|
|
|
|
|
|
|
let object = this.canvasData.originalcompanyBuildingData.data |
|
|
|
|
let adjoinArr = [] //毗邻数组
|
|
|
|
|
|
|
|
|
|
if (this.pattern) {//如果是基本信息编辑模式
|
|
|
|
|
for (const key in object) { |
|
|
|
|
if (object[key].Name == "毗邻") {//如果是相同楼层,则筛选出毗邻
|
|
|
|
@ -1882,6 +1890,8 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
deletePlaneData(item) { |
|
|
|
|
const isDelete = confirm('您确定要删除吗'); |
|
|
|
|
if (isDelete) { |
|
|
|
|
//打开遮罩层
|
|
|
|
|
this.maskLayerService.sendMessage(true) |
|
|
|
|
if (this.checkedBuildingIndex == -1) { //总平面图
|
|
|
|
|
let isHave = this.canvasData.allDisposalNode.find(items => { return items.sitePlanId === item.id }) |
|
|
|
|
if (isHave == undefined) { |
|
|
|
@ -1933,9 +1943,11 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
if (isCompany === -1) { |
|
|
|
|
this.http.post("/api/CompanyData", newData).subscribe(data => { }) |
|
|
|
|
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
|
} else { |
|
|
|
|
this.http.post("/api/BuildingData", newData, { params: this.params }).subscribe(data => { }) |
|
|
|
|
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|