首页 价格
This commit is contained in:
parent
0474b8fd4f
commit
5f413ed0d9
@ -119,7 +119,11 @@ export default {
|
|||||||
res.data.forEach((e) => {
|
res.data.forEach((e) => {
|
||||||
timedata.push(e.clickDate);
|
timedata.push(e.clickDate);
|
||||||
});
|
});
|
||||||
var numberdata = [];
|
var totalPricedata = [];
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
totalPricedata.push(e.totalPrice);
|
||||||
|
});
|
||||||
|
var numberdata = [];
|
||||||
res.data.forEach((e) => {
|
res.data.forEach((e) => {
|
||||||
numberdata.push(e.count);
|
numberdata.push(e.count);
|
||||||
});
|
});
|
||||||
@ -235,13 +239,53 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "订单金额",
|
||||||
|
type: "line",
|
||||||
|
smooth: true,
|
||||||
|
showSymbol: false,
|
||||||
|
symbol: "circle",
|
||||||
|
symbolSize: 6,
|
||||||
|
data: totalPricedata,
|
||||||
|
areaStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "#d6e3fd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "#d6e3fd",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
false
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: "#6194f9",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
normal: {
|
||||||
|
width: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
option && myChart.setOption(option);
|
option && myChart.setOption(option);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getWeekGoodsTradeTrend().then((res) => {
|
getWeekGoodsTradeTrend ().then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
var timedata = [];
|
var timedata = [];
|
||||||
res.data.forEach((e) => {
|
res.data.forEach((e) => {
|
||||||
@ -250,6 +294,10 @@ export default {
|
|||||||
var numberdata = [];
|
var numberdata = [];
|
||||||
res.data.forEach((e) => {
|
res.data.forEach((e) => {
|
||||||
numberdata.push(e.count);
|
numberdata.push(e.count);
|
||||||
|
});
|
||||||
|
var totalPricedata = [];
|
||||||
|
res.data.forEach((e) => {
|
||||||
|
totalPricedata.push(e.totalPrice);
|
||||||
});
|
});
|
||||||
var chartDom = document.getElementById("main");
|
var chartDom = document.getElementById("main");
|
||||||
var myChart = echarts.init(chartDom);
|
var myChart = echarts.init(chartDom);
|
||||||
@ -363,6 +411,46 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "订单金额",
|
||||||
|
type: "line",
|
||||||
|
smooth: true,
|
||||||
|
showSymbol: false,
|
||||||
|
symbol: "circle",
|
||||||
|
symbolSize: 6,
|
||||||
|
data: totalPricedata,
|
||||||
|
areaStyle: {
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: "rgba(216, 244, 247,1)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: "rgba(216, 244, 247,1)",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
false
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: "#58c8da",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lineStyle: {
|
||||||
|
normal: {
|
||||||
|
width: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
option && myChart.setOption(option);
|
option && myChart.setOption(option);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user