feat(src/views/reagent/envrecord): 给环境监控图添加loading效果

duizhaopin_ui
duan 2 years ago
parent 8841443c35
commit ede8408dd3

@ -28,7 +28,11 @@
</el-radio-group>
</div>
</div>
<div id="line" />
<div
id="line"
v-loading="loadingLine"
element-loading-text="拼命加载中"
/>
<div />
</div>
<div class="line-charts">
@ -154,12 +158,12 @@ export default {
headerStyle: { 'background': '#E6E6E6' },
//
tableData: [],
loading: false,
loading: true,
daily_client_id: undefined,
value: '',
//
dialogVisible: false,
recordLoading: false,
recordLoading: true,
record_client_id: undefined,
recordData: [],
record_page: 1,
@ -168,7 +172,8 @@ export default {
record_value: '',
record_day: undefined,
start_time: undefined,
end_time: undefined
end_time: undefined,
loadingLine: true
}
},
created() {
@ -179,8 +184,9 @@ export default {
this.daily_client_id = this.client_id
this.getMonitoringData()
this.getDailyData()
this.initCharts()
}
).then(() => this.initCharts())
)
},
beforeDestroy() {
window.removeEventListener('resize', () => {
@ -212,11 +218,12 @@ export default {
time_type: this.client_date,
obj_type: this.radio1
}
this.loadingLine = true
get_monitoring_info(stringify(data)).then(
res => {
this.linechartData = res.data
}
)
).finally(() => { this.loadingLine = false })
},
initCharts() {
this.lineCharts()

Loading…
Cancel
Save