From 9a3d20252450a23beaccf82c28285d1288b4cc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Wed, 15 Jun 2022 18:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9F=E8=AE=A1=E5=9B=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/Search.vue | 2 +- manager/src/views/home/home.vue | 30 ++++++++++++------------ manager/src/views/statistics/member.vue | 13 ++++++---- manager/src/views/statistics/order.vue | 2 ++ manager/src/views/statistics/traffic.vue | 1 + 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index 1ac92403..e3c5fd54 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -143,7 +143,7 @@ export default { position: absolute; left: -360px; top: -9px; - width: 150px; + max-width: 150px; cursor: pointer; } .store-search{ diff --git a/manager/src/views/home/home.vue b/manager/src/views/home/home.vue index a70e9ff4..971d4f6c 100644 --- a/manager/src/views/home/home.vue +++ b/manager/src/views/home/home.vue @@ -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(); }, // 初始化信息 diff --git a/manager/src/views/statistics/member.vue b/manager/src/views/statistics/member.vue index 4ff721c7..48c49fea 100644 --- a/manager/src/views/statistics/member.vue +++ b/manager/src/views/statistics/member.vue @@ -8,7 +8,7 @@
-

客户增长趋势

+

客户增长趋势

@@ -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(); }, diff --git a/manager/src/views/statistics/order.vue b/manager/src/views/statistics/order.vue index ce415e64..e7356627 100644 --- a/manager/src/views/statistics/order.vue +++ b/manager/src/views/statistics/order.vue @@ -563,6 +563,8 @@ export default { stroke: "#fff", lineWidth: 1, }); + this.orderChart.area().position("createTime*price").color("title").shape("smooth"); + this.orderChart.render(); }, diff --git a/manager/src/views/statistics/traffic.vue b/manager/src/views/statistics/traffic.vue index 19512867..1d58204d 100644 --- a/manager/src/views/statistics/traffic.vue +++ b/manager/src/views/statistics/traffic.vue @@ -173,6 +173,7 @@ export default { stroke: "#fff", lineWidth: 1, }); + this.orderChart.area().position("date*pv").color("title").shape("smooth"); this.orderChart.render(); },