Browse Source

[完善]完善0不能保存问题

develop
邵佳豪 5 years ago
parent
commit
8655de2592
  1. 19
      src/app/ui/basicinfo/basicinfo.component.ts

19
src/app/ui/basicinfo/basicinfo.component.ts

@ -1241,12 +1241,9 @@ export class BasicinfoComponent implements OnInit {
// console.log(this.houses[key])
// console.log(value)
this.houses[key].buildingBasicGroups[0].propertyInfos.forEach(item => {
// for (const key in value) {
// if(item.propertyName == key){
// }
// }
if(item.propertyValue){
if(item.propertyValue || item.propertyValue == 0){
// item.propertyValue = "" + value[key]
item.propertyValue = String(item.propertyValue)
}
@ -1314,9 +1311,10 @@ export class BasicinfoComponent implements OnInit {
bodyObj.buildingBasicGroups[0].propertyInfos.forEach(item => {
for (const key in value) {
if (item.propertyName == key) {
// if(item.propertyValue){
if(item.propertyValue || item.propertyValue == 0){
// item.propertyValue = "" + value[key]
item.propertyValue = String(value[key])
// }
}
}
}
@ -1984,10 +1982,9 @@ export class BasicinfoComponent implements OnInit {
item.propertyInfos.forEach(element => {
delete element.isshowrule
delete element.rulevalue
if(element.propertyValue){
element.propertyValue = String(element.propertyValue)
if( element.propertyValue || element.propertyValue == 0){
element.propertyValue = String(element.propertyValue)
}
});
item.buildingId = newObj.buildingId
item.companyId = this.unitinfo.id

Loading…
Cancel
Save