电表、液冷、功率曲线
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<el-card shadow="always" class="common-card-container time-range-card" style="margin-top:20px">
|
||||
<div slot="header" class="time-range-header">
|
||||
<span class="card-title">功率曲线</span>
|
||||
<date-range-select ref="dateRangeSelect" @updateDate="updateDate"/>
|
||||
<date-range-select ref="dateRangeSelect" @reset="resetTime" @updateDate="updateDate"/>
|
||||
</div>
|
||||
<div class="card-main" v-loading="loading">
|
||||
<div id="glqxEchart" style="height: 310px;"></div>
|
||||
@ -41,6 +41,9 @@ export default {
|
||||
this.dateRange=data || []
|
||||
this.getData()
|
||||
},
|
||||
resetTime(){
|
||||
this.dateRangeInit=true;
|
||||
},
|
||||
getData(){
|
||||
const {siteId}=this;
|
||||
let [start='',end='']=(this.dateRange || [])
|
||||
@ -101,15 +104,18 @@ export default {
|
||||
},true)
|
||||
},
|
||||
initChart() {
|
||||
if(this.chart) return
|
||||
this.chart = echarts.init(document.querySelector('#glqxEchart'));
|
||||
},
|
||||
init(){
|
||||
this.$nextTick(()=>{
|
||||
this.dateRangeInit=true;
|
||||
this.initChart()
|
||||
this.$refs.dateRangeSelect.init()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user