Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui into dev-gl

master
paulGao 2022-06-16 09:21:29 +08:00
commit 274ac3f155
5 changed files with 27 additions and 21 deletions

View File

@ -143,7 +143,7 @@ export default {
position: absolute;
left: -360px;
top: -9px;
width: 150px;
max-width: 150px;
cursor: pointer;
}
.store-search{

View File

@ -387,6 +387,8 @@ export default {
stroke: "#fff",
lineWidth: 1,
});
this.orderChart.area().position("createTime*price").color("title").shape("smooth");
this.orderChart.render();
},
@ -414,12 +416,7 @@ export default {
console.log("pv", data);
this.pvChart.data(data);
this.pvChart.scale({
activeQuantity: {
range: [0, 1],
nice: true,
},
});
this.pvChart.tooltip({
showCrosshairs: true,
shared: true,
@ -442,6 +439,7 @@ export default {
stroke: "#fff",
lineWidth: 1,
});
this.pvChart.area().position("date*pv").color("title").shape("smooth");
this.pvChart.render();
},
@ -498,19 +496,14 @@ export default {
lastNum.push({
date: item.date.substring(5),
title: "历史记录",
title: "上周记录",
lastNum: item.lastNum || 0,
res: item.lastNum || 0,
});
});
let params = [...num, ...lastNum];
this.historyMemberChart.data(params);
this.historyMemberChart.scale({
activeQuantity: {
range: [0, 1],
nice: true,
},
});
this.historyMemberChart.tooltip({
showCrosshairs: true,
shared: true,
@ -519,15 +512,22 @@ export default {
this.historyMemberChart
.line()
.position("date*res")
.color("title", ["#ffaa71", "#398AB9"])
.color("title")
.label("res")
.shape("smooth");
this.historyMemberChart
.point()
.position("date*res")
.color("title", ["#ffaa71", "#398AB9"])
.color("title")
.label("res")
.shape("circle");
this.historyMemberChart
.area()
.position("date*res")
.color("title")
.shape("smooth");
this.historyMemberChart.render();
},
//

View File

@ -8,7 +8,7 @@
<Card class="card">
<div>
<h4>客户增长趋势</h4>
<h4>客户增长趋势 <Button style="margin-left:10px" @click="()=>{enableShowMemberCount = !enableShowMemberCount; initMemberChart()}" size="small">{{enableShowMemberCount ? '关闭' : '显示'}}用户总人数</Button></h4>
<div id="orderChart"></div>
</div>
</Card>
@ -84,6 +84,7 @@ export default {
},
data: [], //
enableShowMemberCount:false
};
},
watch: {
@ -111,21 +112,21 @@ export default {
let actives = [];
this.data.forEach((item) => {
if (item.memberCount!="" || item.memberCount!=null) {
if (this.enableShowMemberCount && (item.memberCount!="" || item.memberCount!=null)) {
count.push({
createDate: item.createDate,
memberCount: item.memberCount,
memberCount:item.memberCount,
title: "当前会员数量",
});
}
if (item.newlyAdded!="" || item.newlyAdded!=null) {
if (!this.enableShowMemberCount && (item.newlyAdded!="" || item.newlyAdded!=null)) {
newly.push({
createDate: item.createDate,
memberCount: item.newlyAdded,
title: "新增会员数量",
});
}
if (item.activeQuantity!="" || item.activeQuantity!=null) {
if (!this.enableShowMemberCount && (item.activeQuantity!="" || item.activeQuantity!=null)) {
actives.push({
createDate: item.createDate,
memberCount: item.activeQuantity,
@ -165,6 +166,8 @@ export default {
stroke: "#fff",
lineWidth: 1,
});
this.orderChart.area().position("createDate*memberCount").color("title").shape("smooth");
this.orderChart.render();
},

View File

@ -563,6 +563,8 @@ export default {
stroke: "#fff",
lineWidth: 1,
});
this.orderChart.area().position("createTime*price").color("title").shape("smooth");
this.orderChart.render();
},

View File

@ -173,6 +173,7 @@ export default {
stroke: "#fff",
lineWidth: 1,
});
this.orderChart.area().position("date*pv").color("title").shape("smooth");
this.orderChart.render();
},