From a8798658ec48f5978f17cfd222033bc2f192e21c Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Thu, 4 Mar 2021 15:08:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E5=9B=BE=E4=BE=8BBUG?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3,=20=E5=AD=98=E5=82=A8companyId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../key-unit-management.component.ts | 1 + .../collection-tools.component.ts | 33 +++++++++++-------- .../collection-tools.component.ts | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts index ac9f958..205f437 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts @@ -478,6 +478,7 @@ export class KeyUnitManagementComponent implements OnInit { if(item.id == selectedunitArr[0]){ let companyName = item.name sessionStorage.setItem("companyName",companyName) + sessionStorage.setItem("companyId",item.id) } }); sessionStorage.setItem("editable","1") 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 1b6e0e6..fe08f8b 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -1502,7 +1502,7 @@ export class CollectionToolsBuildingComponent implements OnInit { // } for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) - if (!noMatch) { + if (!noMatch && storeyData.data[key].Id != "图例") { this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) } } @@ -1706,19 +1706,26 @@ export class CollectionToolsBuildingComponent implements OnInit { //新增平面图 楼层/区域 foundPanel (e) { e.stopPropagation() - let data = { - isBuilding: this.checkedBuildingIndex==-1? false:true, - Panel: this.beforeOneCheckedBuilding, - order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0, - } - let dialogRef = this.dialog.open(leftFunctionalDomainBuildingComponent,{data}); - dialogRef.afterClosed().subscribe(data=>{ - if (data =='总平面图') { - this.renovateSitePlan() - } else if (data =='建筑') { - this.renovateBuilding() + if (this.beforeOneCheckedBuilding.id) { + let data = { + isBuilding: this.checkedBuildingIndex==-1? false:true, + Panel: this.beforeOneCheckedBuilding, + order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0, } - }) + let dialogRef = this.dialog.open(leftFunctionalDomainBuildingComponent,{data}); + dialogRef.afterClosed().subscribe(data=>{ + if (data =='总平面图') { + this.renovateSitePlan() + } else if (data =='建筑') { + this.renovateBuilding() + } + }) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择建筑','确定',config); + } } //编辑平面图 楼层/区域 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 19f6408..5bd8a51 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -1513,7 +1513,7 @@ export class CollectionToolsPlanComponent implements OnInit { // } // for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 // let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) - // if (!noMatch) { + // if (!noMatch && storeyData.data[key].Id != "图例") { // this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) // } // }