From 6d02f73d44ed8bc52388f1da27b5768a5fb8e0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Mon, 16 Nov 2020 09:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kpi/report/home/index.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/kpi/report/home/index.vue b/src/views/kpi/report/home/index.vue index 9f0819b..566aea1 100644 --- a/src/views/kpi/report/home/index.vue +++ b/src/views/kpi/report/home/index.vue @@ -88,6 +88,7 @@ require('echarts/lib/component/title') export default { data () { return { + defaultId: '', // 当前选择的月份 pickerTime: '', // 当前的绩效id @@ -204,8 +205,8 @@ export default { }, beforeMount () { }, async mounted () { + await this.handleChartDataReq() await this.handleStartsReq() - this.handleChartDataReq() }, methods: { handleJump (item) { @@ -271,6 +272,7 @@ export default { let params = { startId: startId } + console.log('params: ', params) try { this.$loadingStart() const result = await getChartData(params) @@ -279,6 +281,7 @@ export default { if (val.type === 0) { // 头部数据 this.statisticals = val.statisticals + this.defaultId = val.defaultId } else if (val.type === 1) { // 等级分布数据 this.tableData = val.statisticals @@ -313,9 +316,8 @@ export default { this.key += 10 this.timeOptions[i].children = res.list.map((m, mindex) => { console.log('timeOptions: ', typeof i) - - if (i === '0' && mindex === 0) { - this.startId = [0, m.startId] + if (m.startId === this.defaultId) { + this.startId = [this.timeOptions[i].startId, this.defaultId] } return m })