陈鹏飞 4 years ago
parent
commit
9945248cdf
  1. 12
      src/app/ui/basicinfo/basicinfo.component.ts

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

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

Loading…
Cancel
Save