电表报表

This commit is contained in:
白菜
2025-07-09 23:52:19 +08:00
parent b8827248cb
commit 0336e67ac5
6 changed files with 118 additions and 55 deletions

View File

@ -98,11 +98,12 @@ export default {
})
},
getData(){
this.loading=true;
const {siteId,pcs,activeBtn}=this;
const [start='',end='']=(this.dateRange || [])
if(!pcs) return
//接口调用完成之后 设置图表、结束loading
getStackData({siteId,deviceId:pcs,startTime:formatDate(start),endTime:formatDate(end),dataType:activeBtn}).then(response => {
this.loading=true;
getStackData({siteId,deviceId:pcs,startTime:formatDate(start),endTime:formatDate(end),dataType:activeBtn}).then(response => {
this.setOption(response?.data || [])
}).finally(()=>{this.loading=false;})
@ -152,9 +153,15 @@ export default {
},
init(){
this.loading = true
this.pcs=''
this.pcsOptions=[]
this.initChart()
this.getPcsList().then(()=>{
this.onReset()
if(this.pcs){
this.onReset()
}else{
this.loading = false
}
})
}
},