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