电表报表
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user