diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index 6b76bf3..2286f3a 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -88,19 +88,14 @@ add -
+
+ (click)='selectSitePlan(item,key)' (mouseenter)="hoverSitePlan(item,key)"> - - - - - - + @@ -112,7 +107,7 @@ -

keyboard_arrow_up @@ -561,23 +556,6 @@

-
-
-
-
- 节点详情 -
-
- 注意事项 -
-
-
- - -
-
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index 14de846..b2d6591 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -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) diff --git a/src/app/ui/collection-tools-building/panel.scss b/src/app/ui/collection-tools-building/panel.scss index dea5232..1e7a582 100644 --- a/src/app/ui/collection-tools-building/panel.scss +++ b/src/app/ui/collection-tools-building/panel.scss @@ -129,9 +129,6 @@ #rightOperate{ width: 50px; height: 100px; - position: absolute; - top: -32px; - right: -48px; z-index: 99999; border-radius: 0 100px 100px 0; background-color: #F0F4F7; diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index 77ea3d9..a4ca870 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -72,19 +72,13 @@ add -
+
+ (click)='selectSitePlan(item,key)' (mouseenter)="hoverSitePlan(item,key)"> - - - - - - @@ -96,7 +90,7 @@ -

keyboard_arrow_up diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index f7d8d32..cd34d19 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -1642,7 +1642,7 @@ export class CollectionToolsPlanComponent implements OnInit { //点击选中 平面图 楼层/区域 时 isGis: boolean selectSitePlan(item, index) { - console.log('点击楼层', item) + // console.log('点击楼层', item) if (item.isGis) { this.isGis = true } else { @@ -1691,8 +1691,26 @@ export class CollectionToolsPlanComponent 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); + } + } + } - //新增平面图 楼层/区域 foundPanel(e) { e.stopPropagation() diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss index ef131fc..a55f935 100644 --- a/src/app/ui/collection-tools-plan/panel.scss +++ b/src/app/ui/collection-tools-plan/panel.scss @@ -130,9 +130,6 @@ #rightOperate{ width: 50px; height: 100px; - position: absolute; - top: -32px; - right: -48px; z-index: 99999; border-radius: 0 100px 100px 0; background-color: #F0F4F7; diff --git a/src/index.html b/src/index.html index 5060ae3..db6e7cb 100644 --- a/src/index.html +++ b/src/index.html @@ -23,13 +23,13 @@ - - - + + + - +