优化
This commit is contained in:
parent
740915131e
commit
c722721a8e
@ -227,6 +227,7 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeMount () { },
|
beforeMount () { },
|
||||||
async mounted () {
|
async mounted () {
|
||||||
|
this.defaultId = Number(this.$route.query.id)
|
||||||
await this.handleChartDataReq()
|
await this.handleChartDataReq()
|
||||||
await this.handleStartsReq()
|
await this.handleStartsReq()
|
||||||
},
|
},
|
||||||
@ -285,11 +286,17 @@ export default {
|
|||||||
},
|
},
|
||||||
//
|
//
|
||||||
handleChange (val) {
|
handleChange (val) {
|
||||||
|
this.$router.replace({
|
||||||
|
name: 'reportHome',
|
||||||
|
query: {
|
||||||
|
id: val[1]
|
||||||
|
}
|
||||||
|
})
|
||||||
this.startId = val
|
this.startId = val
|
||||||
this.handleChartDataReq(val[1])
|
this.handleChartDataReq(val[1])
|
||||||
},
|
},
|
||||||
// 获取报表内容
|
// 获取报表内容
|
||||||
async handleChartDataReq (startId) {
|
async handleChartDataReq (startId = this.defaultId) {
|
||||||
let params = {
|
let params = {
|
||||||
startId: startId
|
startId: startId
|
||||||
}
|
}
|
||||||
@ -301,7 +308,8 @@ export default {
|
|||||||
if (val.type === 0) {
|
if (val.type === 0) {
|
||||||
// 头部数据
|
// 头部数据
|
||||||
this.statisticals = val.statisticals
|
this.statisticals = val.statisticals
|
||||||
this.defaultId = val.defaultId
|
if (!this.defaultId) this.defaultId = val.defaultId
|
||||||
|
console.log('this.defaultId : ', this.defaultId)
|
||||||
} else if (val.type === 1) {
|
} else if (val.type === 1) {
|
||||||
// 等级分布数据
|
// 等级分布数据
|
||||||
this.tableData = val.statisticals
|
this.tableData = val.statisticals
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user