diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index aa7fc19..62c8cc0 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -86,6 +86,13 @@ export class CanvasShareDataService { * 更新建筑数据 */ public updateBuildingData() { + // 删除建筑数据中当前层数据 + Object.keys(this.originalcompanyBuildingData.data).forEach((key) => { + if (this.originalcompanyBuildingData.data[key].FloorId === this.selectStorey.id) { + delete this.originalcompanyBuildingData.data[key]; + } + }); + // 新增当前层数据到建筑数据 Object.keys(this.originaleveryStoreyData.data).forEach((key) => { this.originalcompanyBuildingData.data[key] = this.originaleveryStoreyData.data[key]; });