|
@@ -78,14 +78,14 @@ export default {
|
|
str = `-${str}-`;
|
|
str = `-${str}-`;
|
|
const l = list.filter((f) => f.date.includes(str));
|
|
const l = list.filter((f) => f.date.includes(str));
|
|
const month = `${i}月`;
|
|
const month = `${i}月`;
|
|
- const num = l.reduce((p, n) => p + n.money, 0);
|
|
|
|
|
|
+ const num = l.reduce((p, n) => p + n.num, 0);
|
|
xAxisList.push(month);
|
|
xAxisList.push(month);
|
|
seriesList.push(num);
|
|
seriesList.push(num);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
for (const p1 of list) {
|
|
for (const p1 of list) {
|
|
xAxisList.push(p1.date);
|
|
xAxisList.push(p1.date);
|
|
- seriesList.push(p1.money);
|
|
|
|
|
|
+ seriesList.push(p1.num);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.$set(this, 'xAxisList', xAxisList);
|
|
this.$set(this, 'xAxisList', xAxisList);
|
|
@@ -100,14 +100,14 @@ export default {
|
|
var option;
|
|
var option;
|
|
option = {
|
|
option = {
|
|
title: {
|
|
title: {
|
|
- text: '年度换货数',
|
|
|
|
|
|
+ text: '年度换货数/(单)',
|
|
},
|
|
},
|
|
color: '#FFD700',
|
|
color: '#FFD700',
|
|
tooltip: {
|
|
tooltip: {
|
|
- trigger: 'item',
|
|
|
|
- axisPointer: { type: 'shadow' },
|
|
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ // axisPointer: { type: 'shadow' },
|
|
confine: true,
|
|
confine: true,
|
|
- formatter: '{b}:{c}单',
|
|
|
|
|
|
+ // formatter: '{b}</br>收入{c}元', // 格式化数值百分比输出
|
|
},
|
|
},
|
|
xAxis: {
|
|
xAxis: {
|
|
type: 'category',
|
|
type: 'category',
|