From b033a8c21b9c8614cb5406fdd09a2da42d855e0d Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Wed, 21 Dec 2022 10:25:39 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDataStatistics/components/message.vue | 170 +++++++++++++++++- 1 file changed, 169 insertions(+), 1 deletion(-) diff --git a/src/project/saas/AppDataStatistics/components/message.vue b/src/project/saas/AppDataStatistics/components/message.vue index 96e27981..136cd589 100644 --- a/src/project/saas/AppDataStatistics/components/message.vue +++ b/src/project/saas/AppDataStatistics/components/message.vue @@ -4,7 +4,11 @@ 消息回复率 - +
+
+
+
+
单聊统计 @@ -61,10 +65,157 @@ export default { } }, mounted() { + this.getEcharts1() + this.getEcharts2() + this.getEcharts3() this.getPrivateChat() this.getGroupChat() }, methods: { + getEcharts1() { + let echarts1 = document.getElementById('echarts1'); + let myChart = echarts.init(echarts1); + let option = { + tooltip: { + trigger: 'item', + }, + title: { + zlevel: 0, + text: ['{name|昨日}\n{value|12}'], + top: 'center', + left: '46%', + textAlign: 'center', + textStyle: { + rich: { + name: { + color: '#999999', + fontSize: 13, + lineHeight: 15 + }, + value: { + color: '#333333', + fontSize: 13, + lineHeight: 16 + } + }, + }, + }, + color: ['#3975C6','#F0F2F5'], + series: [ + { + name: '昨天', + type: 'pie', + radius: ['50%', '70%'], + avoidLabelOverlap: false, + hoverAnimation: false, + labelLine: { + show: false, + }, + data: [ + { value: 580, name: '男' }, + { value: 484, name: '女' }, + ] + } + ] + }; + option && myChart.setOption(option); + }, + getEcharts2() { + let echarts2 = document.getElementById('echarts2'); + let myChart = echarts.init(echarts2); + let option = { + tooltip: { + trigger: "item", + }, + title: { + zlevel: 0, + text: ['{name|近7天}\n{value|12}'], + top: 'center', + left: '46%', + textAlign: 'center', + textStyle: { + rich: { + name: { + color: '#999999', + fontSize: 13, + lineHeight: 15 + }, + value: { + color: '#333333', + fontSize: 13, + lineHeight: 16 + } + }, + }, + }, + color: ['#3975C6','#F0F2F5'], + series: [ + { + name: '近7天', + type: 'pie', + radius: ['50%', '70%'], + avoidLabelOverlap: false, + hoverAnimation: false, + labelLine: { + show: false, + }, + data: [ + { value: 580, name: '男' }, + { value: 484, name: '女' }, + ] + } + ] + }; + option && myChart.setOption(option); + }, + getEcharts3() { + let echarts3 = document.getElementById('echarts3'); + let myChart = echarts.init(echarts3); + let option = { + tooltip: { + trigger: "item", + }, + title: { + zlevel: 0, + text: ['{name|近30天}\n{value|12}'], + top: 'center', + left: '46%', + textAlign: 'center', + textStyle: { + rich: { + name: { + color: '#999999', + fontSize: 13, + lineHeight: 15 + }, + value: { + color: '#333333', + fontSize: 13, + lineHeight: 16 + } + }, + }, + }, + color: ['#3975C6','#F0F2F5'], + series: [ + { + name: '近30天', + type: 'pie', + radius: ['50%', '70%'], + avoidLabelOverlap: false, + hoverAnimation: false, + labelLine: { + show: false, + }, + data: [ + { value: 580, name: '男' }, + { value: 484, name: '女' }, + ] + } + ] + }; + option && myChart.setOption(option); + }, getPrivateChat() { let privateDom = document.getElementById('privateChat'); let myChart = echarts.init(privateDom); @@ -241,5 +392,22 @@ export default { height: 100%; } } + + .echarts_list { + width: 100%; + height: 256px; + background: #FFF; + border-radius: 8px; + margin-top: 24px; + display: flex; + + #echarts1, + #echarts2, + #echarts3 { + flex: 1; + width: 100%; + height: 100%; + } + } } \ No newline at end of file From 80bd8f8281a338cb171b3037c39c491a251d834f Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Wed, 21 Dec 2022 14:08:31 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=9C=B0=E5=8C=BA=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDataStatistics/AppDataStatistics.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/project/saas/AppDataStatistics/AppDataStatistics.vue b/src/project/saas/AppDataStatistics/AppDataStatistics.vue index 16dbb9eb..16ecf6e2 100644 --- a/src/project/saas/AppDataStatistics/AppDataStatistics.vue +++ b/src/project/saas/AppDataStatistics/AppDataStatistics.vue @@ -2,7 +2,7 @@
- +
@@ -13,7 +13,7 @@
{{ item.text }}
- +
@@ -22,6 +22,7 @@ import resident from './components/resident.vue' import update from './components/update' import wechat from './components/wechat' import message from './components/message' +import { mapState } from 'vuex' export default { name: "AppDataStatistics", @@ -51,11 +52,25 @@ export default { areaName: '', } }, + computed: { + ...mapState(['user']) + }, components: {resident, update, wechat, message}, methods: { tabClick(index) { this.tabIndex = index }, + areaSelect(e) { + this.areaId = e + this.refreshList() + }, + refreshList() { + // this.$nextTick(() => this.$refs.list.getData()) + } + }, + onLoad() { + this.areaId = this.user.areaId + this.areaName = this.user.areaName }, onShow() { document.title = "数据统计" From e365c83803e45ba42044abd7716345578d66620d Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 22 Dec 2022 11:49:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E4=BA=BA=E7=BE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDataStatistics/AppDataStatistics.vue | 4 +- .../AppDataStatistics/components/resident.vue | 56 ++++++++++++------- .../AppDataStatistics/components/update.vue | 12 ++-- 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/project/saas/AppDataStatistics/AppDataStatistics.vue b/src/project/saas/AppDataStatistics/AppDataStatistics.vue index 16ecf6e2..714523a4 100644 --- a/src/project/saas/AppDataStatistics/AppDataStatistics.vue +++ b/src/project/saas/AppDataStatistics/AppDataStatistics.vue @@ -13,7 +13,7 @@
{{ item.text }}
- +
@@ -65,7 +65,7 @@ export default { this.refreshList() }, refreshList() { - // this.$nextTick(() => this.$refs.list.getData()) + this.$nextTick(() => this.$refs.list.getData()) } }, onLoad() { diff --git a/src/project/saas/AppDataStatistics/components/resident.vue b/src/project/saas/AppDataStatistics/components/resident.vue index 278af156..340942f9 100644 --- a/src/project/saas/AppDataStatistics/components/resident.vue +++ b/src/project/saas/AppDataStatistics/components/resident.vue @@ -1,17 +1,9 @@ From 71f1da9717e16e8eef64488cd54fab23f065f595 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 22 Dec 2022 13:43:56 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDataStatistics/components/update.vue | 69 +++++++------------ 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/src/project/saas/AppDataStatistics/components/update.vue b/src/project/saas/AppDataStatistics/components/update.vue index dadc2744..f72b5fa1 100644 --- a/src/project/saas/AppDataStatistics/components/update.vue +++ b/src/project/saas/AppDataStatistics/components/update.vue @@ -2,36 +2,12 @@

更新统计

- +
-
-
新增居民档案
-
234
-
-
-
居民档案更新
-
234
-
-
-
新增网格员
-
234
-
-
-
减少网格员
-
234
-
-
-
新增积分事件
-
234
-
-
-
新增积分
-
234
-
-
-
新增走访记录
-
234
+
+
{{ item }}
+
{{ Number(data[item]).toLocaleString('en-US') }}
@@ -41,32 +17,39 @@