Commit a863ef90 authored by 黄奎's avatar 黄奎

首页修改

parent 2cb110e8
...@@ -598,7 +598,6 @@ ...@@ -598,7 +598,6 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.salesData = res.data.data; this.salesData = res.data.data;
this.initMap() this.initMap()
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -649,18 +648,22 @@ ...@@ -649,18 +648,22 @@
//过滤支付订单数 //过滤支付订单数
filterOrder() { filterOrder() {
this.isShowOrder = !this.isShowOrder; this.isShowOrder = !this.isShowOrder;
this.initMap();
}, },
//过滤支付金额 //过滤支付金额
filterMoney() { filterMoney() {
this.isShowMoney = !this.isShowMoney this.isShowMoney = !this.isShowMoney;
this.initMap();
}, },
//过滤支付人数 //过滤支付人数
filterPay() { filterPay() {
this.isShowPay = !this.isShowPay this.isShowPay = !this.isShowPay;
this.initMap();
}, },
//过滤支付件数 //过滤支付件数
filterPayNum() { filterPayNum() {
this.isShowPayNum = !this.isShowPayNum this.isShowPayNum = !this.isShowPayNum;
this.initMap();
}, },
//初始化图标 //初始化图标
initMap() { initMap() {
...@@ -679,6 +682,43 @@ ...@@ -679,6 +682,43 @@
goodArray.push(item.GoodCount); goodArray.push(item.GoodCount);
}); });
} }
var seriesData = [];
if (this.isShowOrder) {
seriesData.push({
name: '支付订单数',
type: 'line',
stack: '总量',
color: '#3399ff',
data: orderArray
});
}
if (this.isShowMoney) {
seriesData.push({
name: '支付金额',
type: 'line',
stack: '总量',
color: 'rgb(255, 163, 96)',
data: orderIncome
});
}
if (this.isShowPay) {
seriesData.push({
name: '支付人数',
type: 'line',
stack: '总量',
color: 'rgb(75, 194, 130)',
data: userArray
})
}
if (this.isShowPayNum) {
seriesData.push({
name: '支付件数',
type: 'line',
stack: '总量',
color: 'rgb(255, 133, 133)',
data: goodArray
});
}
var option = { var option = {
title: { title: {
text: '' text: ''
...@@ -714,35 +754,7 @@ ...@@ -714,35 +754,7 @@
show: true //隐藏或显示 show: true //隐藏或显示
} }
}, },
series: [{ series: seriesData
name: '支付订单数',
type: 'line',
stack: '总量',
color: '#3399ff',
data: orderArray
},
{
name: '支付金额',
type: 'line',
stack: '总量',
color: 'rgb(255, 163, 96)',
data: orderIncome
},
{
name: '支付人数',
type: 'line',
stack: '总量',
color: 'rgb(75, 194, 130)',
data: userArray
},
{
name: '支付件数',
type: 'line',
stack: '总量',
color: 'rgb(255, 133, 133)',
data: goodArray
},
]
}; };
myChart.setOption(option, true); myChart.setOption(option, true);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment