|
|
|
@ -1728,6 +1728,28 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
} //if
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.element.nativeElement.querySelector('#rightOperate')) { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.position = 'fixed' |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.left = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().left + document.getElementById("leftDiv").offsetWidth + 'px' |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.top = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().top - 32 + 'px' |
|
|
|
|
}, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
hoverSitePlan(item,key){ |
|
|
|
|
if(key == this.selectSitePlanIndex){ |
|
|
|
|
if (this.element.nativeElement.querySelector('#rightOperate')) {
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.position = 'fixed' |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.left = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().left + document.getElementById("leftDiv").offsetWidth + 'px' |
|
|
|
|
this.element.nativeElement.querySelector('#rightOperate').style.top = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().top - 32 + 'px' |
|
|
|
|
}, 0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//新增平面图 楼层/区域
|
|
|
|
@ -1957,13 +1979,13 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
//保存建筑数据
|
|
|
|
|
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); |
|
|
|
|
CompanyData.data = JSON.stringify(CompanyData.data) |
|
|
|
|
this.http.post("/api/CompanyData", CompanyData, {params: {companyId: this.params.companyId}}).subscribe(data => { |
|
|
|
|
this.http.post("/api/CompanyData", CompanyData, { params: { companyId: this.params.companyId } }).subscribe(data => { |
|
|
|
|
list.push(1) |
|
|
|
|
if (list.length === 4) { this.updateCurrentFloor() } |
|
|
|
|
}) |
|
|
|
|
//批量保存单位毗邻
|
|
|
|
|
let CompanyAdjoins = this.canvasData.getCompanyAdjoinInfo() |
|
|
|
|
this.http.post("/api/CompanyAdjoins/Batch", CompanyAdjoins, {params:{companyId: this.params.companyId}}).subscribe(data => { |
|
|
|
|
this.http.post("/api/CompanyAdjoins/Batch", CompanyAdjoins, { params: { companyId: this.params.companyId } }).subscribe(data => { |
|
|
|
|
list.push(1) |
|
|
|
|
if (list.length === 4) { this.updateCurrentFloor() } |
|
|
|
|
}, err => { |
|
|
|
@ -1978,13 +2000,13 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
//批量保存单位重点部位
|
|
|
|
|
let CompanyImportantLocations = this.canvasData.getCompanyImportantLocations() |
|
|
|
|
this.http.post("/api/CompanyImportantLocations/Batch", CompanyImportantLocations, {params:{companyId: this.params.companyId}}).subscribe(data => { |
|
|
|
|
this.http.post("/api/CompanyImportantLocations/Batch", CompanyImportantLocations, { params: { companyId: this.params.companyId } }).subscribe(data => { |
|
|
|
|
list.push(1) |
|
|
|
|
if (list.length === 4) { this.updateCurrentFloor() } |
|
|
|
|
}) |
|
|
|
|
//批量保存单位消防设施素材
|
|
|
|
|
let CompanyFacilityAssets = this.canvasData.getAllCompanyFacilityAssetInfo() |
|
|
|
|
this.http.post("/api/CompanyFacilityAssets/Batch", CompanyFacilityAssets, {params: {companyId: this.params.companyId}}).subscribe(data => { |
|
|
|
|
this.http.post("/api/CompanyFacilityAssets/Batch", CompanyFacilityAssets, { params: { companyId: this.params.companyId } }).subscribe(data => { |
|
|
|
|
list.push(1) |
|
|
|
|
if (list.length === 4) { this.updateCurrentFloor() } |
|
|
|
|
}) |
|
|
|
@ -2021,7 +2043,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
//建筑数据
|
|
|
|
|
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); |
|
|
|
|
CompanyData.data = JSON.stringify(CompanyData.data) |
|
|
|
|
this.http.post("/api/BuildingData", CompanyData, {params: { companyId: this.params.companyId}}).subscribe(data => { |
|
|
|
|
this.http.post("/api/BuildingData", CompanyData, { params: { companyId: this.params.companyId } }).subscribe(data => { |
|
|
|
|
list.push(1) |
|
|
|
|
if (list.length === 4) { this.updateCurrentFloor() } |
|
|
|
|
}) |
|
|
|
@ -2065,15 +2087,15 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
let planData = this.getSitePlanCompanyData() //获取 单位 数据
|
|
|
|
|
this.http.get('/api/SitePlans', { params: this.params }).subscribe(data => { |
|
|
|
|
this.sitePlanData = data |
|
|
|
|
this.selectingSitePlan = this.sitePlanData[this.sitePlanData.length-1] || {} |
|
|
|
|
this.canvasData.selectStorey = this.sitePlanData[this.sitePlanData.length-1] || {} //服务中 存一份数据
|
|
|
|
|
this.selectSitePlanIndex = this.sitePlanData.length-1 |
|
|
|
|
|
|
|
|
|
this.selectingSitePlan = this.sitePlanData[this.sitePlanData.length - 1] || {} |
|
|
|
|
this.canvasData.selectStorey = this.sitePlanData[this.sitePlanData.length - 1] || {} //服务中 存一份数据
|
|
|
|
|
this.selectSitePlanIndex = this.sitePlanData.length - 1 |
|
|
|
|
|
|
|
|
|
Promise.all([fireData, planData]).then((res) => { |
|
|
|
|
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) //重新加载 新楼层
|
|
|
|
|
} else { //楼层/区域
|
|
|
|
|
let params = { buildingId: this.beforeOneCheckedBuilding.id } |
|
|
|
@ -2081,10 +2103,10 @@ export class CollectionToolsBuildingComponent implements OnInit {
|
|
|
|
|
let planData = this.getBuildingData(params) //获取 建筑 数据
|
|
|
|
|
this.http.get('/api/BuildingAreas', { params }).subscribe(data => { |
|
|
|
|
this.sitePlanData = data |
|
|
|
|
this.selectingSitePlan = this.sitePlanData[this.sitePlanData.length-1] || {} |
|
|
|
|
this.canvasData.selectStorey = this.sitePlanData[this.sitePlanData.length-1] || {} //服务中 存一份数据
|
|
|
|
|
this.selectSitePlanIndex = this.sitePlanData.length-1 |
|
|
|
|
|
|
|
|
|
this.selectingSitePlan = this.sitePlanData[this.sitePlanData.length - 1] || {} |
|
|
|
|
this.canvasData.selectStorey = this.sitePlanData[this.sitePlanData.length - 1] || {} //服务中 存一份数据
|
|
|
|
|
this.selectSitePlanIndex = this.sitePlanData.length - 1 |
|
|
|
|
|
|
|
|
|
Promise.all([fireData, planData]).then((res) => { |
|
|
|
|
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
|