From 0893958222df275c8d4c38f1f3264372407e6e96 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Wed, 27 Jan 2021 10:12:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=9F=A5=E7=9C=8B/?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A8=A1=E5=BC=8F=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.html | 2 +- .../collection-tools.component.ts | 26 +++++++----------- .../collection-tools.component.html | 2 +- .../collection-tools.component.ts | 23 +++++++--------- .../collection-tools.component.html | 2 +- .../collection-tools.component.ts | 27 +++++-------------- 6 files changed, 28 insertions(+), 54 deletions(-) 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 76bf745..f9f64c0 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -24,7 +24,7 @@ - + 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 fb2e03b..9c7692a 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -607,23 +607,17 @@ export class CollectionToolsBuildingComponent implements OnInit { this.canvasData.isChange = true } - - isSixShow = true - isSixbtn = true //控制想定作业编辑按钮 isediticon = true //控制查看编辑模式的编辑模式小笔按钮 ngOnInit(): void { - if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ - this.isSixbtn = false - } - - if(!this.isSixbtn && sessionStorage.getItem("six") == "edit"){ - this.isSixShow = true - } - if(!this.isSixbtn && sessionStorage.getItem("six") == "look"){ + if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式 this.isEditPattern = false this.isediticon = false + this.canvasData.gameMode = GameMode.Assignment + } else if (this.router.url.indexOf("keyUnit/editplaninfo")!= -1) { //编辑模式 + this.canvasData.gameMode = GameMode.BasicInformation } + //gis模块平面图 if(this.router.url.indexOf("gis") != -1 && sessionStorage.getItem("gisplan") == "look"){ this.isEditPattern = false @@ -641,7 +635,7 @@ export class CollectionToolsBuildingComponent implements OnInit { event.preventDefault(); }; }) - + this.canvasData.getMessage().subscribe((message: any)=>{ if(message == "send a message"){ this.refurbishTreeData() @@ -652,10 +646,10 @@ export class CollectionToolsBuildingComponent implements OnInit { ngAfterViewInit(): void { - //gis模块平面图 - if(this.router.url.indexOf("gis") == -1) { - this.getAllBuildings(true) //获取所有建筑 - } + //不是gis模块平面图 + if(this.router.url.indexOf("gis") == -1) { + this.getAllBuildings(true) //获取所有建筑 + } // 监听canvas组件选中素材事件 this.canvas.on("select",obj=>{ //选中素材属性注入函数 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 ac69822..65afdc5 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -24,7 +24,7 @@ - + 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 d4b9d0b..6a3d059 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -607,22 +607,17 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.isChange = true } - isSixShow = true - isSixbtn = true //控制想定作业编辑按钮 isediticon = true //控制查看编辑模式的编辑模式小笔按钮 ngOnInit(): void { - if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ - this.isSixbtn = false - } - - if(!this.isSixbtn && sessionStorage.getItem("six") == "edit"){ - this.isSixShow = true - } - if(!this.isSixbtn && sessionStorage.getItem("six") == "look"){ + if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式 this.isEditPattern = false this.isediticon = false + this.canvasData.gameMode = GameMode.Assignment + } else if (this.router.url.indexOf("keyUnit/editplaninfo")!= -1) { //编辑模式 + this.canvasData.gameMode = GameMode.BasicInformation } + //gis模块平面图 if(this.router.url.indexOf("gis") != -1 && sessionStorage.getItem("gisplan") == "look"){ this.isEditPattern = false @@ -651,10 +646,10 @@ export class CollectionToolsPlanComponent implements OnInit { ngAfterViewInit(): void { - //gis模块平面图 - if(this.router.url.indexOf("gis") == -1) { - this.getSitePlan() - } + //不是gis模块平面图 + if(this.router.url.indexOf("gis") == -1) { + this.getSitePlan() + } // 监听canvas组件选中素材事件 this.canvas.on("select",obj=>{ //选中素材属性注入函数 diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index be34123..56cd5d5 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -58,7 +58,7 @@ - + diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 9ac9bd6..93c93c0 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -619,28 +619,13 @@ export class CollectionToolsComponent implements OnInit { this.canvasData.isChange = true } - - isSixShow = true - isSixbtn = true //控制想定作业编辑按钮 - isxxx = true //控制查看编辑模式的编辑模式按钮 - ngOnInit(): void { - this.canvasData.gameMode = GameMode.Assignment - if(this.router.url.indexOf("keyUnit/viewunitinfoplan") == -1 && this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ - this.isSixbtn = false - } - if(!this.isSixbtn && sessionStorage.getItem("six") == "edit"){ - this.isSixShow = true - } - if(!this.isSixbtn && sessionStorage.getItem("six") == "look"){ + this.canvasData.gameMode = GameMode.Assignment + if (sessionStorage.getItem('editable') == "0") { //查看模式 this.isEditPattern = false - this.isxxx = false - } + } else { - if (sessionStorage.getItem('editable') == "0") { - this.isEditPattern = false - this.isxxx = false } this.getAllLibrary('plan') //获取素材库 @@ -655,18 +640,18 @@ export class CollectionToolsComponent implements OnInit { event.preventDefault(); }; }) - + this.canvasData.getMessage().subscribe((message: any)=>{ if(message == "send a message"){ this.refurbishTreeData() } }) + } ngAfterViewInit(): void { - this.getSitePlan() // 监听canvas组件选中素材事件 this.canvas.on("select",obj=>{ @@ -2280,7 +2265,7 @@ export class CollectionToolsComponent implements OnInit { if(selectPanelPoint.Data){ for(let key in selectPanelPoint.Data.Stock){ //筛选数据 没有匹配全部放入到 其他 数组 let noMatch = this.allFireElements.find( every=> every.id===selectPanelPoint.Data.Stock[key].FireElementId ) - if (!noMatch) { + if (!noMatch && selectPanelPoint.Data.Stock[key].Id != "图例") { this.allFireElements[this.allFireElements.length-1].children.push(selectPanelPoint.Data.Stock[key]) } }