diff --git a/web/src/components/TreeTable.vue b/web/src/components/TreeTable.vue index dbc4a82..be54e18 100644 --- a/web/src/components/TreeTable.vue +++ b/web/src/components/TreeTable.vue @@ -2,6 +2,7 @@
{ - this.$nextTick(() => { - this.getStatCharts() - }) - } - ) + Promise.all([ + this.getStationList(), + this.getEchartsListForActiveKey(), + this.getTableListForActiveKey() + ]).then(() => { + this.$nextTick(() => { + this.getStatCharts() + }) + }) }, immediate: true // 添加立即执行 } @@ -593,7 +560,7 @@ export default { } try { - const res = await getReq('/queryStatDayList', query) + const res = await getReq('/queryStatDetailList', query) if (res.errcode === 0) { this.tableList[this.activeKey].tableData = res.data.list || res.data this.tableList[this.activeKey].pageOption.count = res.data.count || 0 @@ -660,7 +627,6 @@ export default { this.getStatCharts() }, - async getStatCharts() { const currentInfo = this.echartsInfo[this.activeKey] const query = { @@ -684,8 +650,6 @@ export default { } } } - - } }