From d433ff02cbc1afc060c480cd36ce694e5ebe746d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 13 May 2022 14:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8E=86=E5=8F=B2=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=96=B0=E5=A2=9E=20=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/views/home/home.vue | 136 ++++++++++++++++++-------------- 1 file changed, 75 insertions(+), 61 deletions(-) diff --git a/manager/src/views/home/home.vue b/manager/src/views/home/home.vue index 3ced090d..a70e9ff4 100644 --- a/manager/src/views/home/home.vue +++ b/manager/src/views/home/home.vue @@ -2,16 +2,14 @@
-

- 基本信息 -

+

基本信息

-
{{homeData.goodsNum ||0}}
+
{{ homeData.goodsNum || 0 }}
商品数量
@@ -20,30 +18,27 @@
-
{{homeData.memberNum ||0}}
+
{{ homeData.memberNum || 0 }}
会员数量
-
-
{{homeData.orderNum ||0}}
+
{{ homeData.orderNum || 0 }}
订单数量
-
-
{{homeData.storeNum ||0}}
+
{{ homeData.storeNum || 0 }}
店铺数量
-
@@ -53,27 +48,29 @@

今日待办

-
{{$store.state.notices.goods || 0}}
+
{{ $store.state.notices.goods || 0 }}
待审核商品
-
{{$store.state.notices.store|| 0}}
+
{{ $store.state.notices.store || 0 }}
待审核店铺
-
{{$store.state.notices.complain|| 0}}
+
{{ $store.state.notices.complain || 0 }}
待审核投诉
-
{{$store.state.notices.refund|| 0}}
+
{{ $store.state.notices.refund || 0 }}
待审核售后
-
{{$store.state.notices.distributionCash|| 0}}
+
+ {{ $store.state.notices.distributionCash || 0 }} +
待审核分销提现
-
{{$store.state.notices.waitPayBill|| 0}}
+
{{ $store.state.notices.waitPayBill || 0 }}
待审核分账
@@ -82,84 +79,75 @@
-
+
当前在线人数
- {{homeData.currentNumberPeopleOnline || 0}} + {{ homeData.currentNumberPeopleOnline || 0 }}
-

- 流量概括 -

+

流量概括

-
- 今日访客数 -
+
今日访客数
- - {{homeData.todayUV || 0}} + {{ homeData.todayUV || 0 }}
-
- 昨日访客数 -
+
昨日访客数
- {{homeData.yesterdayUV || 0}} + {{ homeData.yesterdayUV || 0 }}
-
- 前七日访客数 -
+
前七日访客数
- {{homeData.lastSevenUV || 0}} + {{ homeData.lastSevenUV || 0 }}
-
- 前三十日访客数 -
+
前三十日访客数
- {{homeData.lastThirtyUV || 0}} + {{ homeData.lastThirtyUV || 0 }}
-

今日概括

+

今日概括

今日订单数
- {{homeData.todayOrderNum}} + {{ homeData.todayOrderNum }}
今日交易额
- ¥{{homeData.todayOrderPrice | unitPrice}} + ¥{{ homeData.todayOrderPrice | unitPrice }} ¥0.00
今日新增店铺
- {{homeData.todayStoreNum || 0}} + {{ homeData.todayStoreNum || 0 }}
今日新增会员数
- {{homeData.todayMemberNum || 0}} + {{ homeData.todayMemberNum || 0 }}
今日上架商品数量
- {{homeData.todayGoodsNum || 0}} + {{ homeData.todayGoodsNum || 0 }}
今日新增评论
- {{homeData.todayMemberEvaluation || 0}} + {{ homeData.todayMemberEvaluation || 0 }}
@@ -174,7 +162,7 @@
-
+

流量走势

@@ -188,16 +176,22 @@

热卖商品TOP10

-
+

热卖店铺TOP10

-
- +
-
@@ -217,7 +211,7 @@ export default { // 测试数据 test: { a: "test", - languages:[] + languages: [], }, // 测试数据结束 tophotShopsColumns: [ @@ -418,6 +412,7 @@ export default { let data = [...uv, ...pv]; + console.log("pv", data); this.pvChart.data(data); this.pvChart.scale({ activeQuantity: { @@ -491,13 +486,31 @@ export default { initHistoryMemberChart() { // 默认已经加载 legend-filter 交互 let data = this.chartList; - + let num = []; + let lastNum = []; data.forEach((item) => { - item.title = "历史在线人数"; - item.date = item.date.substring(5); - }); - this.historyMemberChart.data(data); + num.push({ + date: item.date.substring(5), + title: "最近48小时", + num: item.num, + res: item.num, + }); + lastNum.push({ + date: item.date.substring(5), + 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, @@ -505,14 +518,15 @@ export default { this.historyMemberChart .line() - .position("date*num") - .color("title", ["#ffaa71"]) + .position("date*res") + .color("title", ["#ffaa71", "#398AB9"]) + .label("res") .shape("smooth"); - this.historyMemberChart .point() - .position("date*num") - .color("title", ["#ffaa71"]) + .position("date*res") + .color("title", ["#ffaa71", "#398AB9"]) + .label("res") .shape("circle"); this.historyMemberChart.render(); },