From 63a05f390d8bfbd98fc6a495cdab544de1ffcfb5 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 17 Aug 2021 10:37:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=80=BB=E5=B9=B3=E9=9D=A2?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=B3=A8=E7=B4=A0=E6=9D=90=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 7 ------- .../ui/collection-tools-plan/collection-tools.component.ts | 7 ++++++- tsconfig.app.json | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) 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 fc7723e..1634663 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -1225,13 +1225,6 @@ export class CollectionToolsBuildingComponent implements OnInit { }) } - //拖拽tree - drop(e) { - // console.log(1111,e) - } - drop2(e) { - // console.log(222,e) - } //创建建筑 createBuilding() { 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 a4da17b..918f365 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -704,6 +704,11 @@ export class CollectionToolsPlanComponent implements OnInit { if (this.router.url.indexOf("gis") == -1 && this.router.url.indexOf("createplanonlinefive") == -1) { this.getSitePlan() } + //监听数据变化后 + this.canvas.on('canvasDataChanged', () => { + // 收到数据表示共享数据发生变化 + this.renovateTreeData(false) + }); } copyAssetData: any //存储用于复制的素材 @@ -827,7 +832,7 @@ export class CollectionToolsPlanComponent implements OnInit { } } SitePlanData.data = JSON.stringify(SitePlanData.data) - + let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); CompanyData.data = JSON.stringify(CompanyData.data) diff --git a/tsconfig.app.json b/tsconfig.app.json index d1ca95a..453e9b8 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -2,7 +2,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", - "types": ["swiper"] + "types": ["swiper"], + "experimentalDecorators": true, // 主要是这个 }, "files": [ "src/main.ts",