From be40cd4ba098c596882e294013bb4099fad8440a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?=
=?UTF-8?q?=E9=98=B4?= <185154740@qq.com>
Date: Wed, 22 Dec 2021 14:12:47 +0800
Subject: [PATCH] =?UTF-8?q?=E7=B4=AF=E5=8A=A0bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppResidentFile/AppResidentFile.vue | 26 +++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/apps/AppResidentFile/AppResidentFile.vue b/src/apps/AppResidentFile/AppResidentFile.vue
index 2fafd02c..6b5f9bf2 100644
--- a/src/apps/AppResidentFile/AppResidentFile.vue
+++ b/src/apps/AppResidentFile/AppResidentFile.vue
@@ -14,17 +14,17 @@
- {{ chartsList.total }}
+ {{ counts }}
群成员总数
- {{ chartsList.increase }}
+ {{ todayList.increase }}
今日入群
- {{ chartsList.decrease }}
+ {{ todayList.decrease }}
今日退群
@@ -183,14 +183,14 @@ export default {
current: 1,
keyword: '',
data: [],
-
page: { current: 1, size: 10, total: 0 },
search: { name: '' },
list: [],
+ weekList: [],
groupSum: '',
- chartsList: [],
- datass: [],
+ todayList: [],
nums: '',
+ counts: '',
}
},
computed: {
@@ -259,23 +259,27 @@ export default {
// 居民群统计
getEchart1() {
- console.log(1)
this.$http.post(`/app/wxcp/wxgroup/groupStatistic`).then((res) => {
if (res.code === 0) {
this.initEcharts1(res.data.list)
+ this.weekList = res.data.list
this.groupSum = res.data.groupSum
- this.chartsList = res.data.today
+ this.todayList = res.data.today
+ this.counts = Object.values(this.weekList)
+ .filter((item) => item.total)
+ .reduce((v, item) => (v += item.total * 1), 0)
}
})
},
- // 居民群统计
+ // 居民统计
getEchart2() {
- console.log(2)
this.$http.post(`/app/appresident/queryCustInfoByAreaId?areaId=${this.user.areaId}`).then((res) => {
if (res.code === 0) {
this.initEcharts2(res.data['年龄层次'])
- this.nums = res.data['总人数']
+ this.$nextTick(() => {
+ this.nums = res.data['总人数']
+ })
}
})
},