Browse Source

fix dashboard.vue 默认数据

old
wangqing 5 years ago
parent
commit
73bb751e28
  1. 4
      src/views/home/dashboard.vue

4
src/views/home/dashboard.vue

@ -340,6 +340,7 @@ export default {
},
getProjectSubmitSource() {
this.$api.get('/user/project/report/source', {params: {projectKey: this.activeProjectKey}}).then(res => {
if (res.data && res.data.length) {
this.barChartOptionData.yAxis.data = res.data.map(item => {
return item.browserName ? item.browserName : '其他'
})
@ -353,13 +354,16 @@ export default {
})
}
]
}
})
},
getProjectSubmitDevice() {
this.$api.get('/user/project/report/device', {params: {projectKey: this.activeProjectKey}}).then(res => {
if (res.data && res.data.length) {
this.pieChartOptionData.series[0].data = res.data.map(item => {
return {value: item.count, name: item.osName ? item.osName : '其他'}
})
}
})
}
}

Loading…
Cancel
Save