From 8dc4e1d85048d25a08279b9deaf8661a600e63ec Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 22 Dec 2022 15:41:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDataStatistics/components/resident.vue | 4 ++-- .../saas/AppDataStatistics/components/wechat.vue | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/project/saas/AppDataStatistics/components/resident.vue b/src/project/saas/AppDataStatistics/components/resident.vue index 8b6a6cb8..525dce5b 100644 --- a/src/project/saas/AppDataStatistics/components/resident.vue +++ b/src/project/saas/AppDataStatistics/components/resident.vue @@ -243,8 +243,8 @@ export default { maxSurfaceAngle: 80 }, data: [ - { value: 1048, name: '男' }, - { value: 735, name: '女' }, + { value: this.sexArray[1].v2, name: '男' }, + { value: this.sexArray[0].v2, name: '女' }, ] } ] diff --git a/src/project/saas/AppDataStatistics/components/wechat.vue b/src/project/saas/AppDataStatistics/components/wechat.vue index 8e10499b..66421598 100644 --- a/src/project/saas/AppDataStatistics/components/wechat.vue +++ b/src/project/saas/AppDataStatistics/components/wechat.vue @@ -67,8 +67,12 @@ export default { return { friendsCard: {}, friendsData: [], + friendsMonth: [], + friendsNumber: [], groupsCard: {}, groupsData: [], + groupsMonth: [], + groupsNumber: [] } }, created() { @@ -85,6 +89,8 @@ export default { if(res?.data) { this.friendsCard = res.data.居民统计 this.friendsData = res.data.居民好友数 + this.friendsMonth = this.friendsData.map(e=> e.month) + this.friendsNumber = this.friendsData.map(e=> e.totalNumber) } }) // 居民群 @@ -92,6 +98,8 @@ export default { if(res?.data) { this.groupsCard = res.data.居民群统计 this.groupsData = res.data.群成员数 + this.groupsMonth = this.groupsData.map(e=> e.month) + this.groupsNumber = this.groupsData.map(e=> e.totalNumber) } }) }, @@ -104,7 +112,7 @@ export default { }, xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月'], + data: this.friendsMonth, axisTick: { show: false, } @@ -120,7 +128,7 @@ export default { }, series: [ { - data: [350, 230, 224, 218, 135], + data: this.friendsNumber, type: 'line', lineStyle: { color: '#3975C6', // 折线线条颜色 @@ -162,7 +170,7 @@ export default { }, xAxis: { type: 'category', - data: ['1月', '2月', '3月', '4月', '5月'], + data: this.groupsMonth, axisTick: { show: false, } @@ -178,7 +186,7 @@ export default { }, series: [ { - data: [350, 230, 224, 218, 135], + data: this.groupsNumber, type: 'line', lineStyle: { color: '#3975C6', // 折线线条颜色