电表报表

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

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