This commit is contained in:
熊成强 2020-11-18 17:14:34 +08:00
parent 740915131e
commit c722721a8e

View File

@ -227,6 +227,7 @@ export default {
},
beforeMount () { },
async mounted () {
this.defaultId = Number(this.$route.query.id)
await this.handleChartDataReq()
await this.handleStartsReq()
},
@ -285,11 +286,17 @@ export default {
},
//
handleChange (val) {
this.$router.replace({
name: 'reportHome',
query: {
id: val[1]
}
})
this.startId = val
this.handleChartDataReq(val[1])
},
//
async handleChartDataReq (startId) {
async handleChartDataReq (startId = this.defaultId) {
let params = {
startId: startId
}
@ -301,7 +308,8 @@ export default {
if (val.type === 0) {
//
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) {
//
this.tableData = val.statisticals