From 24b584b99fd1851f00ce2e414de30c4ab67bdcb8 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 27 Jul 2023 10:58:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=85=BC=E5=AE=B9=E7=81=AB?= =?UTF-8?q?=E7=8B=90=E6=B8=B8=E8=A7=88=E5=99=A8=E6=95=B0=E5=AD=97=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 18 ++++++++------- .../collection-tools.component.ts | 23 ++++++++++--------- .../collection-tools.component.ts | 19 ++++++++------- 3 files changed, 33 insertions(+), 27 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 8476d77..1bb5f8e 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -514,15 +514,17 @@ export class CollectionToolsBuildingComponent implements OnInit { //动态属性素材input框值改变 assetInputChange(i, e) { - let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { - return i.PropertyName == item.PropertyName; - }); - if (this.myIsNaN(e.target.value)) { - e.target.value = String(e.target.value); + if (e.target.value) { + let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { + return i.PropertyName == item.PropertyName; + }); + if (this.myIsNaN(e.target.value)) { + e.target.value = String(e.target.value); + } + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value; + this.canvasData.isChange = true; + this.canvas.refreshIcon(this.canvasAssetObj.Id); } - this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value; - this.canvasData.isChange = true; - this.canvas.refreshIcon(this.canvasAssetObj.Id); } //判断是否是数字类型 myIsNaN(value) { 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 54b2bb7..38aab3b 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -366,16 +366,18 @@ export class CollectionToolsPlanComponent implements OnInit { } //动态属性素材input框值改变 assetInputChange(i, e) { - let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { - return i.PropertyName == item.PropertyName; - }); - if (this.myIsNaN(e.target.value)) { - e.target.value = String(e.target.value); - } - this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value; - this.canvasData.isChange = true; - if (!this.isGis) { - this.canvas.refreshIcon(this.canvasAssetObj.Id); + if (e.target.value) { + let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { + return i.PropertyName == item.PropertyName; + }); + if (this.myIsNaN(e.target.value)) { + e.target.value = String(e.target.value); + } + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value; + this.canvasData.isChange = true; + if (!this.isGis) { + this.canvas.refreshIcon(this.canvasAssetObj.Id); + } } } @@ -1014,7 +1016,6 @@ export class CollectionToolsPlanComponent implements OnInit { //如果是基本信息编辑模式 // console.log(1234, object); for (const key in object) { - if (object[key].Name == "毗邻") { //如果是相同楼层,则筛选出毗邻 object[key].PropertyInfos.forEach((element) => { diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index ae02336..d363aa7 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -433,15 +433,18 @@ export class CollectionToolsComponent implements OnInit { //动态属性素材input框值改变 assetInputChange(i, e) { - let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { - return i.PropertyName == item.PropertyName - }) - if (this.myIsNaN(e.target.value)) { - e.target.value = String(e.target.value) + if(e.target.value){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item) => { + return i.PropertyName == item.PropertyName + }) + if (this.myIsNaN(e.target.value)) { + e.target.value = String(e.target.value) + } + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) } - this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value - this.canvasData.isChange = true - this.canvas.refreshIcon(this.canvasAssetObj.Id) + } //动态属性素材布尔值框改变radio