diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 3cc2c43..49ae59d 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -7,6 +7,7 @@ export class CanvasShareDataService { constructor() { } + selectStorey:any; //选择当前 楼层 数据 originalcompanyBuildingData:any; // 单位/建筑 数据 originaleveryStoreyData:any; // 总平面图/楼层/区域 楼层数据 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index af7938d..78de45b 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -776,7 +776,8 @@ export class CollectionToolsComponent implements OnInit { this.getSitePlanCompanyData() //获取 单位 数据 this.http.get('/api/CompanyAccount/SitePlans').subscribe(data=>{ this.sitePlanData = data - this.selectingSitePlan = this.sitePlanData[0] || '' + this.selectingSitePlan = this.sitePlanData[0] || {} + this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 this.selectSitePlanIndex = 0 this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 @@ -792,7 +793,8 @@ export class CollectionToolsComponent implements OnInit { this.getBuildingData(params) //获取 建筑 数据 this.http.get('/api/CompanyAccount/BuildingAreas',{params}).subscribe(data=>{ this.sitePlanData = data - this.selectingSitePlan = this.sitePlanData[0] || '' + this.selectingSitePlan = this.sitePlanData[0] || {} + this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 this.selectSitePlanIndex = 0 this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据 @@ -848,6 +850,7 @@ export class CollectionToolsComponent implements OnInit { if (this.selectSitePlanIndex != index) { this.selectingSitePlan = item this.selectSitePlanIndex = index + this.canvasData.selectStorey = item //服务中 存一份数据 if (this.checkedBuildingIndex==-1) { //总平面图时 this.getSitePlanStorey(item) //获取 平面图 楼层数据 } else { //楼层/区域时 @@ -1064,6 +1067,7 @@ export class CollectionToolsComponent implements OnInit { this.http.get('/api/CompanyAccount/SitePlans').subscribe(data=>{ this.sitePlanData = data this.selectingSitePlan = this.sitePlanData[this.selectSitePlanIndex] + this.canvasData.selectStorey = this.sitePlanData[this.selectSitePlanIndex] //服务中 存一份数据 const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -1079,6 +1083,7 @@ export class CollectionToolsComponent implements OnInit { this.http.get('/api/CompanyAccount/BuildingAreas',{params}).subscribe(data=>{ this.sitePlanData = data this.selectingSitePlan = this.sitePlanData[this.selectSitePlanIndex] + this.canvasData.selectStorey = this.sitePlanData[this.selectSitePlanIndex] //服务中 存一份数据 const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000