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['总人数'] + }) } }) },