|
@@ -373,7 +373,11 @@ export default {
|
|
|
}
|
|
|
getDeliveryTop(params).then(res => {
|
|
|
console.log(res)
|
|
|
- if (res.status == 200) {
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
+ // res.data.deliveryWeight.forEach(item => {
|
|
|
+ // item = Math.round(item / 1000)
|
|
|
+ // })
|
|
|
+ console.log(res.data, 'res.data')
|
|
|
this.initChart3(res.data)
|
|
|
}
|
|
|
})
|
|
@@ -645,6 +649,10 @@ export default {
|
|
|
initChart3 (res) {
|
|
|
const con4 = document.getElementById('con4')
|
|
|
const chart4 = echarts.init(con4)
|
|
|
+ const seriesData = res.deliveryWeight.map(item => {
|
|
|
+ return Math.round(Number(item) / 1000)
|
|
|
+ })
|
|
|
+ // console.log(seriesData, 'seriesData')
|
|
|
const option4 = {
|
|
|
title: {
|
|
|
text: '网点投递量排名',
|
|
@@ -674,7 +682,7 @@ export default {
|
|
|
type: 'value'
|
|
|
},
|
|
|
series: [{
|
|
|
- data: res.deliveryWeight,
|
|
|
+ data: seriesData,
|
|
|
type: 'bar',
|
|
|
barWidth: 30,
|
|
|
label: {
|