From afe20a612a1e83efe4bf32b93379deeebaf56cb5 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Tue, 26 Jan 2021 15:12:51 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=87=8D=E7=82=B9?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=AE=A1=E7=90=86=E5=AE=8C=E6=95=B4=E5=BA=A6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=E6=B8=85=E7=A9=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../key-unit-management/key-unit-management.component.html | 4 ++-- .../key-unit-management/key-unit-management.component.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.html b/src/app/key-unit/key-unit-management/key-unit-management.component.html index ea625a8..3f25a16 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.html +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.html @@ -75,11 +75,11 @@
- + 🠊 - +
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 03424f3..90b7e9a 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 @@ -548,6 +548,8 @@ export class KeyUnitManagementComponent implements OnInit { this.PageNumber = 1 this.pageEvent.pageIndex = 0 this.integritySort = '' + this.integrityScoreMax=undefined + this.integrityScoreMin=undefined this.getAllKeyUnit(); } //编辑单位名称 From 812aae1383a940754723e60363921d17d720de82 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 27 Jan 2021 09:52:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=A1=86=E9=80=89=E5=A4=9A=E4=B8=AA=E7=B4=A0=E6=9D=90=E5=90=8E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B1=E5=90=8C=E6=8B=A5=E6=9C=89=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.html | 110 +++++++++- .../collection-tools.component.ts | 170 +++++++++++++++- .../collection-tools.component.html | 115 ++++++++++- .../collection-tools.component.ts | 191 +++++++++++++++++- .../collection-tools.component.html | 113 ++++++++++- .../collection-tools.component.ts | 172 +++++++++++++++- .../working-area/working-area.component.ts | 2 +- 7 files changed, 838 insertions(+), 35 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..a3b1434 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -174,7 +174,7 @@ -
+

面积(平方米)

{{canvasData.selectStorey.area}}

详情

@@ -183,7 +183,7 @@
-
+

{{assetName}}

@@ -315,8 +315,112 @@
-
+ + +
+
+

宽度(像素)

+ +

高度(像素)

+ +

角度

+
+ + +
+
+ +
+

厚度

+
+ + +
+
+
+
+ 颜色 +
+ +
+
+
+
    +
  • +
+
+ 透明度 + + {{colorDivSliderValue}}% +
+
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ + + +
+

{{item.PropertyName}}

+ + +
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ +
+
+
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..99d4520 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -17,7 +17,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service'; import { MaskLayerService } from 'src/app/mask-layer.service'; import * as ObjectID from 'bson-objectid'; - +import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem'; @Component({ selector: 'app-collection-tools-building', templateUrl: './collection-tools.component.html', @@ -83,9 +83,11 @@ export class CollectionToolsBuildingComponent implements OnInit { setTimeout(() => { obj.PropertyInfos.forEach(item => { if(item.PropertyType == 4){ - this.gallery = new Viewer(document.getElementById('viewerjs'),{ - url: 'data-original' - }); + if(document.getElementById('viewerjs')){ + this.gallery = new Viewer(document.getElementById('viewerjs'),{ + url: 'data-original' + }); + } } }) }, 0); @@ -611,7 +613,67 @@ export class CollectionToolsBuildingComponent implements OnInit { isSixShow = true isSixbtn = true //控制想定作业编辑按钮 isediticon = true //控制查看编辑模式的编辑模式小笔按钮 + + + isMultipleAsset:boolean = false//框选多个素材属性显隐 + multipleAsset:any = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + }//多个素材共同属性 + multipleAssetData:any//当前多选的素材 + firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { + let _this = this + AxMessageSystem.addListener('selectionChanged', ()=>{ + if(this.canvas.selection.size() == 1){//如果是单选 + this.isMultipleAsset = false + // console.log('单选',this.canvas.selection.first().assetData) + this.setAssetsProperty(this.canvas.selection.first().assetData) + }else if(this.canvas.selection.size()){ + // console.log('多选') + this.multipleAssetData = this.canvas.selection.all() + this.firstMultipleAssetData = this.canvas.selection.first() + this.multipleAsset = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + } + this.isMultipleAsset = true + let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比 + let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式 + let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode) + if(isInteractiveMode){ + this.multipleAsset.InteractiveMode = InteractiveMode + } + let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0 + if(isFillMode){ + this.multipleAsset.FillMode = 0 + } + this.canvas.selection.first().assetData.PropertyInfos.forEach(i => { + let index = 0 + this.canvas.selection.all().forEach(item => { + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){ + index++ + if(index == this.canvas.selection.size()){ + let newElement = JSON.parse(JSON.stringify(element)) + newElement.PropertyValue = '' + this.multipleAsset.PropertyInfos.push(newElement) + } + } + }); + }) + }) + } + }, this) + if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ this.isSixbtn = false @@ -648,6 +710,106 @@ export class CollectionToolsBuildingComponent implements OnInit { } }) } + //多选宽度共同改变 + multipleAssetWidthInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Width = this.multipleAsset.Width + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选高度共同改变 + multipleAssetHeightInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Height = this.multipleAsset.Height + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选角度共同改变 + multipleAssetAngleInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Angle = this.multipleAsset.Angle + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选厚度共同改变 + multipleAssetThicknessInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Thickness = this.multipleAsset.Thickness + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选颜色共同改变 + multipleSelectedcolor:any + multipleAssetSelectcolor(item,key){ + //在当前透明度基础上改变颜色 + this.multipleSelectedcolor = item + this.multipleAssetData.forEach(item=>{ + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选颜色滑竿改变 + multipleColorDivSliderChange(){ + let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01) + //根据滑竿值改变16进制颜色后两位 + function replacepos(text,start,stop,replacetext){ + let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1); + return mystr; + } + this.multipleAssetData.forEach(item=>{ + this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16)) + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选状态动态属性素材input框值改变 + multipleAssetInputChange(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材radio框值改变 + multipleAssetRadioChange(i,value){ + // e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = value + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材下拉框值改变 + multipleSupplyArea(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } 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..9985e7b 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -153,7 +153,7 @@
属性
-
+

面积(平方米)

{{canvasData.selectStorey.area}}

详情

@@ -162,14 +162,14 @@
-
+

{{assetName}}

宽度(像素)

- +

高度(像素)

- +

角度

是否高亮

- + 选中高亮
@@ -295,7 +295,110 @@
- + +
+
+

宽度(像素)

+ +

高度(像素)

+ +

角度

+
+ + +
+
+ +
+

厚度

+
+ + +
+
+
+
+ 颜色 +
+ +
+
+
+
    +
  • +
+
+ 透明度 + + {{colorDivSliderValue}}% +
+
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ + + +
+

{{item.PropertyName}}

+ + +
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ +
+
+
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..b726bde 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -17,7 +17,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service'; import { MaskLayerService } from 'src/app/mask-layer.service'; import * as ObjectID from 'bson-objectid'; - +import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem'; @Component({ selector: 'app-collection-tools-plan', templateUrl: './collection-tools.component.html', @@ -83,9 +83,11 @@ export class CollectionToolsPlanComponent implements OnInit { setTimeout(() => { obj.PropertyInfos.forEach(item => { if(item.PropertyType == 4){ - this.gallery = new Viewer(document.getElementById('viewerjs'),{ - url: 'data-original' - }); + if(document.getElementById('viewerjs')){ + this.gallery = new Viewer(document.getElementById('viewerjs'),{ + url: 'data-original' + }); + } } }) }, 0); @@ -408,7 +410,10 @@ export class CollectionToolsPlanComponent implements OnInit { //素材是否高亮改变----->本地操作行为 assetHighLightIunput(){ - + // console.log(this.isHighLight,this.canvasAssetObj) + // let arr = [] + // arr.push(this.canvasAssetObj.Id) + // this.canvas.setHighlight(arr) } //动态属性素材input框值改变 @@ -610,12 +615,70 @@ export class CollectionToolsPlanComponent implements OnInit { isSixShow = true isSixbtn = true //控制想定作业编辑按钮 isediticon = true //控制查看编辑模式的编辑模式小笔按钮 + + isMultipleAsset:boolean = false//框选多个素材属性显隐 + multipleAsset:any = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + }//多个素材共同属性 + multipleAssetData:any//当前多选的素材 + firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { + let _this = this + AxMessageSystem.addListener('selectionChanged', ()=>{ + if(this.canvas.selection.size() == 1){//如果是单选 + this.isMultipleAsset = false + console.log('单选',this.canvas.selection.first().assetData) + this.setAssetsProperty(this.canvas.selection.first().assetData) + }else if(this.canvas.selection.size()){ + console.log('多选') + this.multipleAssetData = this.canvas.selection.all() + this.firstMultipleAssetData = this.canvas.selection.first() + this.multipleAsset = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + } + this.isMultipleAsset = true + let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比 + let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式 + let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode) + if(isInteractiveMode){ + this.multipleAsset.InteractiveMode = InteractiveMode + } + let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0 + if(isFillMode){ + this.multipleAsset.FillMode = 0 + } + this.canvas.selection.first().assetData.PropertyInfos.forEach(i => { + let index = 0 + this.canvas.selection.all().forEach(item => { + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){ + index++ + if(index == this.canvas.selection.size()){ + let newElement = JSON.parse(JSON.stringify(element)) + newElement.PropertyValue = '' + this.multipleAsset.PropertyInfos.push(newElement) + } + } + }); + }) + }) + console.log(666,_this.multipleAsset.PropertyInfos) + } + }, this) 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 } @@ -647,6 +710,112 @@ export class CollectionToolsPlanComponent implements OnInit { } }) } + //多选宽度共同改变 + multipleAssetWidthInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Width = this.multipleAsset.Width + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选高度共同改变 + multipleAssetHeightInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Height = this.multipleAsset.Height + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选角度共同改变 + multipleAssetAngleInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Angle = this.multipleAsset.Angle + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选厚度共同改变 + multipleAssetThicknessInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Thickness = this.multipleAsset.Thickness + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选颜色共同改变 + multipleSelectedcolor:any + multipleAssetSelectcolor(item,key){ + //在当前透明度基础上改变颜色 + this.multipleSelectedcolor = item + this.multipleAssetData.forEach(item=>{ + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选颜色滑竿改变 + multipleColorDivSliderChange(){ + let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01) + //根据滑竿值改变16进制颜色后两位 + function replacepos(text,start,stop,replacetext){ + let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1); + return mystr; + } + this.multipleAssetData.forEach(item=>{ + this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16)) + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选状态动态属性素材input框值改变 + multipleAssetInputChange(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材radio框值改变 + multipleAssetRadioChange(i,value){ + // e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = value + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材下拉框值改变 + multipleSupplyArea(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + + + + + + @@ -655,11 +824,11 @@ export class CollectionToolsPlanComponent implements OnInit { if(this.router.url.indexOf("gis") == -1) { this.getSitePlan() } - // 监听canvas组件选中素材事件 - this.canvas.on("select",obj=>{ - //选中素材属性注入函数 - this.setAssetsProperty(obj.assetData) - }) + // // 监听canvas组件选中素材事件 + // this.canvas.on("select",obj=>{ + // //选中素材属性注入函数 + // this.setAssetsProperty(obj.assetData) + // }) // 监听canvas组件取消选中素材事件 this.canvas.on("deselect",obj=>{ this.isShowProperty = false diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index be34123..34a7582 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -227,7 +227,7 @@
-
+

面积(平方米)

{{canvasData.selectStorey.area}}

详情

@@ -236,14 +236,14 @@
-
+

{{assetName}}

宽度(像素)

- +

高度(像素)

- +

角度

- + +
+
+

宽度(像素)

+ +

高度(像素)

+ +

角度

+
+ + +
+
+ +
+

厚度

+
+ + +
+
+
+
+ 颜色 +
+ +
+
+
+
    +
  • +
+
+ 透明度 + + {{colorDivSliderValue}}% +
+
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ + + +
+

{{item.PropertyName}}

+ + +
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ +
+
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 9ac9bd6..34893d5 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -16,7 +16,7 @@ import { GameMode } from 'src/app/working-area/model/gameMode'; import { ActivatedRoute, Router } from '@angular/router'; import { MaskLayerService } from 'src/app/mask-layer.service'; import * as ObjectID from 'bson-objectid'; - +import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem'; @Component({ selector: 'app-collection-tools', templateUrl: './collection-tools.component.html', @@ -82,9 +82,11 @@ export class CollectionToolsComponent implements OnInit { setTimeout(() => { obj.PropertyInfos.forEach(item => { if(item.PropertyType == 4){ - this.gallery = new Viewer(document.getElementById('viewerjs'),{ - url: 'data-original' - }); + if(document.getElementById('viewerjs')){ + this.gallery = new Viewer(document.getElementById('viewerjs'),{ + url: 'data-original' + }); + } } }) }, 0); @@ -624,7 +626,68 @@ export class CollectionToolsComponent implements OnInit { isSixbtn = true //控制想定作业编辑按钮 isxxx = true //控制查看编辑模式的编辑模式按钮 + + isMultipleAsset:boolean = false//框选多个素材属性显隐 + multipleAsset:any = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + }//多个素材共同属性 + multipleAssetData:any//当前多选的素材 + firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { + let _this = this + AxMessageSystem.addListener('selectionChanged', ()=>{ + if(this.canvas.selection.size() == 1){//如果是单选 + this.isMultipleAsset = false + // console.log('单选',this.canvas.selection.first().assetData) + this.setAssetsProperty(this.canvas.selection.first().assetData) + }else if(this.canvas.selection.size()){ + // console.log('多选') + this.multipleAssetData = this.canvas.selection.all() + this.firstMultipleAssetData = this.canvas.selection.first() + this.multipleAsset = { + Width:null, + Height:null, + Angle:null, + Thickness:null, + Color:null, + PropertyInfos:[] + } + this.isMultipleAsset = true + let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比 + let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式 + let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode) + if(isInteractiveMode){ + this.multipleAsset.InteractiveMode = InteractiveMode + } + let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0 + if(isFillMode){ + this.multipleAsset.FillMode = 0 + } + this.canvas.selection.first().assetData.PropertyInfos.forEach(i => { + let index = 0 + this.canvas.selection.all().forEach(item => { + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){ + index++ + if(index == this.canvas.selection.size()){ + let newElement = JSON.parse(JSON.stringify(element)) + newElement.PropertyValue = '' + this.multipleAsset.PropertyInfos.push(newElement) + } + } + }); + }) + }) + } + }, this) + + + 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 @@ -663,7 +726,106 @@ export class CollectionToolsComponent implements OnInit { }) } - + //多选宽度共同改变 + multipleAssetWidthInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Width = this.multipleAsset.Width + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选高度共同改变 + multipleAssetHeightInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Height = this.multipleAsset.Height + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选角度共同改变 + multipleAssetAngleInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Angle = this.multipleAsset.Angle + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选厚度共同改变 + multipleAssetThicknessInput(){ + this.multipleAssetData.forEach(item=>{ + item.assetData.Thickness = this.multipleAsset.Thickness + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + }) + } + //多选颜色共同改变 + multipleSelectedcolor:any + multipleAssetSelectcolor(item,key){ + //在当前透明度基础上改变颜色 + this.multipleSelectedcolor = item + this.multipleAssetData.forEach(item=>{ + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选颜色滑竿改变 + multipleColorDivSliderChange(){ + let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01) + //根据滑竿值改变16进制颜色后两位 + function replacepos(text,start,stop,replacetext){ + let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1); + return mystr; + } + this.multipleAssetData.forEach(item=>{ + this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16)) + item.assetData.Color = this.multipleSelectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(item.assetData.Id) + }) + } + //多选状态动态属性素材input框值改变 + multipleAssetInputChange(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材radio框值改变 + multipleAssetRadioChange(i,value){ + // e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = value + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } + //多选状态动态属性素材下拉框值改变 + multipleSupplyArea(i,e){ + e.stopPropagation() + this.multipleAssetData.forEach(item=>{ + // console.log(item) + item.assetData.PropertyInfos.forEach(element => { + if(element.PropertyName == i.PropertyName){ + element.PropertyValue = i.PropertyValue + this.canvas.refreshIcon(item.assetData.Id) + this.canvasData.isChange = true + } + }) + }) + } ngAfterViewInit(): void { diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 7f80485..5cc6f48 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -453,7 +453,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV */ public refreshIcon(id: string): void { const icon = this.backgroundImage.children.find(item => item.name === id); - console.log(icon); + // console.log(icon); if (icon instanceof AxImageShape) { icon.refresh(); } else if (icon instanceof MultipointIcon) { From 5964aa16f7671877017a99b5459fc70ae6cb6bfb Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 27 Jan 2021 09:53:11 +0800 Subject: [PATCH 3/6] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 b726bde..e434e0c 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -632,10 +632,10 @@ export class CollectionToolsPlanComponent implements OnInit { AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 this.isMultipleAsset = false - console.log('单选',this.canvas.selection.first().assetData) + // console.log('单选',this.canvas.selection.first().assetData) this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ - console.log('多选') + // console.log('多选') this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() this.multipleAsset = { @@ -672,7 +672,7 @@ export class CollectionToolsPlanComponent implements OnInit { }); }) }) - console.log(666,_this.multipleAsset.PropertyInfos) + // console.log(666,_this.multipleAsset.PropertyInfos) } }, this) @@ -772,7 +772,7 @@ export class CollectionToolsPlanComponent implements OnInit { multipleAssetInputChange(i,e){ e.stopPropagation() this.multipleAssetData.forEach(item=>{ - console.log(item) + // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = i.PropertyValue @@ -786,7 +786,7 @@ export class CollectionToolsPlanComponent implements OnInit { multipleAssetRadioChange(i,value){ // e.stopPropagation() this.multipleAssetData.forEach(item=>{ - console.log(item) + // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = value @@ -800,7 +800,7 @@ export class CollectionToolsPlanComponent implements OnInit { multipleSupplyArea(i,e){ e.stopPropagation() this.multipleAssetData.forEach(item=>{ - console.log(item) + // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = i.PropertyValue 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 4/6] =?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]) } } From b1c64d506eb8bc6f016b8d19118d824c40969ef1 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 27 Jan 2021 10:39:48 +0800 Subject: [PATCH 5/6] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E6=A1=86=E9=80=89=E5=90=8E=E9=9A=90=E8=97=8F=E7=B4=A0=E6=9D=90?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.html | 2 +- .../collection-tools-building/collection-tools.component.ts | 3 +++ .../ui/collection-tools-plan/collection-tools.component.html | 2 +- .../ui/collection-tools-plan/collection-tools.component.ts | 5 +++++ src/app/ui/collection-tools/collection-tools.component.html | 2 +- src/app/ui/collection-tools/collection-tools.component.ts | 3 +++ 6 files changed, 14 insertions(+), 3 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 a3b1434..ede2dc6 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -318,7 +318,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 99d4520..1cf70e0 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -635,6 +635,7 @@ export class CollectionToolsBuildingComponent implements OnInit { this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ // console.log('多选') + this.isShowProperty = true this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() this.multipleAsset = { @@ -671,6 +672,8 @@ export class CollectionToolsBuildingComponent implements OnInit { }); }) }) + }else if(this.canvas.selection.size() == 0){ + this.isShowProperty = false } }, this) 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 9985e7b..31a4da6 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -296,7 +296,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 e434e0c..c2aeac9 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -629,6 +629,7 @@ export class CollectionToolsPlanComponent implements OnInit { firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { let _this = this + AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 this.isMultipleAsset = false @@ -636,6 +637,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ // console.log('多选') + this.isShowProperty = true this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() this.multipleAsset = { @@ -673,6 +675,8 @@ export class CollectionToolsPlanComponent implements OnInit { }) }) // console.log(666,_this.multipleAsset.PropertyInfos) + }else if(this.canvas.selection.size() == 0){ + this.isShowProperty = false } }, this) @@ -831,6 +835,7 @@ export class CollectionToolsPlanComponent implements OnInit { // }) // 监听canvas组件取消选中素材事件 this.canvas.on("deselect",obj=>{ + console.log(77777) this.isShowProperty = false }) //监听数据变化后 diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 34a7582..fcc81e6 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -370,7 +370,7 @@
-
+

宽度(像素)

diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 34893d5..14799a7 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -647,6 +647,7 @@ export class CollectionToolsComponent implements OnInit { this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ // console.log('多选') + this.isShowProperty = true this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() this.multipleAsset = { @@ -683,6 +684,8 @@ export class CollectionToolsComponent implements OnInit { }); }) }) + }else if(this.canvas.selection.size() == 0){ + this.isShowProperty = false } }, this) From 48d0fcc44f63c3b91fa3daba8e346126a5117c4b Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Wed, 27 Jan 2021 10:42:33 +0800 Subject: [PATCH 6/6] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 12 +----------- .../collection-tools.component.ts | 11 +---------- .../collection-tools/collection-tools.component.ts | 13 +------------ 3 files changed, 3 insertions(+), 33 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 a28b8bb..730f4ce 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -671,7 +671,6 @@ export class CollectionToolsBuildingComponent implements OnInit { } }, this) - if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式 this.isEditPattern = false this.isediticon = false @@ -810,17 +809,8 @@ export class CollectionToolsBuildingComponent implements OnInit { ngAfterViewInit(): void { //不是gis模块平面图 if(this.router.url.indexOf("gis") == -1) { - this.getAllBuildings(true) //获取所有建筑 + this.getAllBuildings(true) //获取所有建筑 } - // 监听canvas组件选中素材事件 - this.canvas.on("select",obj=>{ - //选中素材属性注入函数 - this.setAssetsProperty(obj.assetData) - }) - // 监听canvas组件取消选中素材事件 - this.canvas.on("deselect",obj=>{ - this.isShowProperty = false - }) //监听数据变化后 this.canvas.on('canvasDataChanged',()=>{ // 收到数据表示共享数据发生变化 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 03adbaf..e40b92d 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -812,17 +812,8 @@ export class CollectionToolsPlanComponent implements OnInit { ngAfterViewInit(): void { //不是gis模块平面图 if(this.router.url.indexOf("gis") == -1) { - this.getSitePlan() + this.getSitePlan() } - // // 监听canvas组件选中素材事件 - // this.canvas.on("select",obj=>{ - // //选中素材属性注入函数 - // this.setAssetsProperty(obj.assetData) - // }) - // 监听canvas组件取消选中素材事件 - this.canvas.on("deselect",obj=>{ - this.isShowProperty = false - }) //监听数据变化后 this.canvas.on('canvasDataChanged',()=>{ // 收到数据表示共享数据发生变化 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index b453523..2220aee 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -633,6 +633,7 @@ export class CollectionToolsComponent implements OnInit { multipleAssetData:any//当前多选的素材 firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { + let _this = this AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 @@ -770,7 +771,6 @@ export class CollectionToolsComponent implements OnInit { multipleAssetInputChange(i,e){ e.stopPropagation() this.multipleAssetData.forEach(item=>{ - // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = i.PropertyValue @@ -784,7 +784,6 @@ export class CollectionToolsComponent implements OnInit { multipleAssetRadioChange(i,value){ // e.stopPropagation() this.multipleAssetData.forEach(item=>{ - // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = value @@ -798,7 +797,6 @@ export class CollectionToolsComponent implements OnInit { multipleSupplyArea(i,e){ e.stopPropagation() this.multipleAssetData.forEach(item=>{ - // console.log(item) item.assetData.PropertyInfos.forEach(element => { if(element.PropertyName == i.PropertyName){ element.PropertyValue = i.PropertyValue @@ -811,15 +809,6 @@ export class CollectionToolsComponent implements OnInit { ngAfterViewInit(): void { this.getSitePlan() - // 监听canvas组件选中素材事件 - this.canvas.on("select",obj=>{ - //选中素材属性注入函数 - this.setAssetsProperty(obj.assetData) - }) - // 监听canvas组件取消选中素材事件 - this.canvas.on("deselect",obj=>{ - this.isShowProperty = false - }) //监听数据变化后 this.canvas.on('canvasDataChanged',()=>{ // 收到数据表示共享数据发生变化