电表报表
This commit is contained in:
@ -151,9 +151,10 @@ export default {
|
||||
},
|
||||
//表格数据
|
||||
async getTableData(){
|
||||
this.loading=true;
|
||||
const {stackId,clusterId,date} =this.search
|
||||
const {siteId,pageNum,pageSize}=this
|
||||
if(!stackId) return
|
||||
this.loading=true;
|
||||
await getClusterData({dateTime:formatDate(date),stackId,clusterId,siteId,pageNum,pageSize}).then(response => {
|
||||
this.tableData=response?.rows || [];
|
||||
this.totalSize = response?.total || 0
|
||||
@ -177,10 +178,19 @@ export default {
|
||||
}).finally(() => {this.clusterloading =false})
|
||||
},
|
||||
async init(){
|
||||
this.loading = true
|
||||
this.search={stackId:'',clusterId:'',date:''}
|
||||
this.stackOptions=[]//{id:'',deviceName:''}
|
||||
this.clusterOptions=[]//{id:'',deviceName:''}
|
||||
this.tableData=[]
|
||||
// 只有页面初次加载或切换站点的时候调用电池堆列表,其他情况不需要
|
||||
await this.getStackList()
|
||||
await this.getClusterList()
|
||||
await this.onReset()
|
||||
if(this.search.stackId){
|
||||
await this.getClusterList()
|
||||
await this.onReset()
|
||||
}else{
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user