Browse Source

[完善]兼容火狐游览器数字输入框

tianjin
邵佳豪 2 years ago
parent
commit
24b584b99f
  1. 18
      src/app/ui/collection-tools-building/collection-tools.component.ts
  2. 23
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  3. 19
      src/app/ui/collection-tools/collection-tools.component.ts

18
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) {

23
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) => {

19
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

Loading…
Cancel
Save