fix(src/views/reagent/mainoverview/): 修复数据加载顺序问题

duizhaopin_ui
duan 2 years ago
parent c63a5c7e80
commit 0ed61d79a0

@ -369,15 +369,10 @@ export default {
linechartData: []
}
},
created() {
async created() {
this.loading = true
client_list().then(
res => {
this.clientOptions = res.data.data_list
this.client_id = this.clientOptions[0].client_id
}
)
this.getMonitoringData()
await this.initClientData()
home_info().then(res => {
this.initDataFunc(res.data)
this.initAllCharts()
@ -391,6 +386,17 @@ export default {
})
},
methods: {
initClientData() {
return new Promise((resolve, reject) => {
client_list().then(
res => {
this.clientOptions = res.data.data_list
this.client_id = this.clientOptions[0].client_id
resolve()
}
)
})
},
valueChange(t, value) {
this.getMonitoringData()
this.lineCharts(t)
@ -497,10 +503,6 @@ export default {
return item
})
const option = {
// legend: {
// orient: 'vertical',
// left: 'left'
// },
series: [
{
name: 'Nightingale Chart',

Loading…
Cancel
Save