|
|
@ -100,8 +100,10 @@ export class BasicinfoComponent implements OnInit { |
|
|
|
element.data = [] |
|
|
|
element.data = [] |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.houses = data |
|
|
|
this.houses = data |
|
|
|
// console.log('单位下所有建筑',data)
|
|
|
|
|
|
|
|
|
|
|
|
if(this.houses.length != 0){ |
|
|
|
this.getBuildingInfo() |
|
|
|
this.getBuildingInfo() |
|
|
|
|
|
|
|
}
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -508,10 +510,12 @@ export class BasicinfoComponent implements OnInit { |
|
|
|
selectedTabChange(e){ |
|
|
|
selectedTabChange(e){ |
|
|
|
// console.log(e)
|
|
|
|
// console.log(e)
|
|
|
|
this.selectedBuildingIndex = e.index |
|
|
|
this.selectedBuildingIndex = e.index |
|
|
|
|
|
|
|
if(this.houses.length != 0){ |
|
|
|
if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){ |
|
|
|
if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){ |
|
|
|
this.getBuildingInfo() |
|
|
|
this.getBuildingInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//表格加一行
|
|
|
|
//表格加一行
|
|
|
|
addline(ele){ |
|
|
|
addline(ele){ |
|
|
|
let newObj = JSON.parse(JSON.stringify(ele[0])) |
|
|
|
let newObj = JSON.parse(JSON.stringify(ele[0])) |
|
|
|