优化
This commit is contained in:
parent
b64976ee1a
commit
6d02f73d44
@ -88,6 +88,7 @@ require('echarts/lib/component/title')
|
|||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
defaultId: '',
|
||||||
// 当前选择的月份
|
// 当前选择的月份
|
||||||
pickerTime: '',
|
pickerTime: '',
|
||||||
// 当前的绩效id
|
// 当前的绩效id
|
||||||
@ -204,8 +205,8 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeMount () { },
|
beforeMount () { },
|
||||||
async mounted () {
|
async mounted () {
|
||||||
|
await this.handleChartDataReq()
|
||||||
await this.handleStartsReq()
|
await this.handleStartsReq()
|
||||||
this.handleChartDataReq()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleJump (item) {
|
handleJump (item) {
|
||||||
@ -271,6 +272,7 @@ export default {
|
|||||||
let params = {
|
let params = {
|
||||||
startId: startId
|
startId: startId
|
||||||
}
|
}
|
||||||
|
console.log('params: ', params)
|
||||||
try {
|
try {
|
||||||
this.$loadingStart()
|
this.$loadingStart()
|
||||||
const result = await getChartData(params)
|
const result = await getChartData(params)
|
||||||
@ -279,6 +281,7 @@ export default {
|
|||||||
if (val.type === 0) {
|
if (val.type === 0) {
|
||||||
// 头部数据
|
// 头部数据
|
||||||
this.statisticals = val.statisticals
|
this.statisticals = val.statisticals
|
||||||
|
this.defaultId = val.defaultId
|
||||||
} else if (val.type === 1) {
|
} else if (val.type === 1) {
|
||||||
// 等级分布数据
|
// 等级分布数据
|
||||||
this.tableData = val.statisticals
|
this.tableData = val.statisticals
|
||||||
@ -313,9 +316,8 @@ export default {
|
|||||||
this.key += 10
|
this.key += 10
|
||||||
this.timeOptions[i].children = res.list.map((m, mindex) => {
|
this.timeOptions[i].children = res.list.map((m, mindex) => {
|
||||||
console.log('timeOptions: ', typeof i)
|
console.log('timeOptions: ', typeof i)
|
||||||
|
if (m.startId === this.defaultId) {
|
||||||
if (i === '0' && mindex === 0) {
|
this.startId = [this.timeOptions[i].startId, this.defaultId]
|
||||||
this.startId = [0, m.startId]
|
|
||||||
}
|
}
|
||||||
return m
|
return m
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user