diff --git a/src/project/saas/AppDataStatistics/components/message.vue b/src/project/saas/AppDataStatistics/components/message.vue
index 801e0cb3..8b655e48 100644
--- a/src/project/saas/AppDataStatistics/components/message.vue
+++ b/src/project/saas/AppDataStatistics/components/message.vue
@@ -28,7 +28,7 @@
@@ -55,7 +55,7 @@
@@ -84,10 +84,6 @@ export default {
created() {
this.getData()
},
- mounted() {
- this.getPrivateChat()
- this.getGroupChat()
- },
methods: {
getData() {
// 回复率
@@ -114,6 +110,9 @@ export default {
} else if(this.privateCurrent == 1) {
this.privateMsg = this.privateData?.map(v=> v.messageCnt)
}
+ this.$nextTick(()=> {
+ this.getPrivateChat(this.privateDate,this.privateMsg)
+ })
}
})
},
@@ -131,6 +130,9 @@ export default {
} else if(this.groupCurrent == 2) {
this.groupMsg = this.groupData?.map(v=>v.msgTotal)
}
+ this.$nextTick(()=> {
+ this.getGroupChat(this.groupDate,this.groupMsg)
+ })
}
})
},
@@ -278,7 +280,7 @@ export default {
};
option && myChart3.setOption(option);
},
- getPrivateChat() {
+ getPrivateChat(privateDate,privateMsg) {
let privateDom = document.getElementById('privateChat');
let myChartPrivate = echarts.init(privateDom);
let option = {
@@ -287,7 +289,7 @@ export default {
},
xAxis: {
type: 'category',
- data: this.privateDate,
+ data: privateDate,
axisTick: {
show: false,
}
@@ -303,7 +305,7 @@ export default {
},
series: [
{
- data: this.privateMsg,
+ data: privateMsg,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
@@ -336,7 +338,7 @@ export default {
};
option && myChartPrivate.setOption(option);
},
- getGroupChat() {
+ getGroupChat(groupDate,groupMsg) {
let groupDom = document.getElementById('groupChat');
let myChartGroup = echarts.init(groupDom);
let option = {
@@ -345,7 +347,7 @@ export default {
},
xAxis: {
type: 'category',
- data: this.groupDate,
+ data: groupDate,
axisTick: {
show: false,
}
@@ -361,7 +363,7 @@ export default {
},
series: [
{
- data: this.groupMsg,
+ data: groupMsg,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
diff --git a/src/project/saas/AppDataStatistics/components/wechat.vue b/src/project/saas/AppDataStatistics/components/wechat.vue
index 1e4a6b4f..61c3da22 100644
--- a/src/project/saas/AppDataStatistics/components/wechat.vue
+++ b/src/project/saas/AppDataStatistics/components/wechat.vue
@@ -87,7 +87,9 @@ export default {
this.friendsData = res.data.居民好友数
this.friendsMonth = this.friendsData.map(e=> e.month)
this.friendsNumber = this.friendsData.map(e=> e.totalNumber)
- this.getFriendsEcharts(this.friendsMonth,this.friendsNumber)
+ this.$nextTick(()=> {
+ this.getFriendsEcharts(this.friendsMonth,this.friendsNumber)
+ })
}
})
// 居民群
@@ -96,10 +98,10 @@ export default {
this.groupsCard = res.data.居民群统计
this.groupsData = res.data.群成员数
this.groupsMonth = this.groupsData.map(e=> e.month)
- // this.groupsMonth = ['2022-09','2022-10','2022-12','2023-01']
this.groupsNumber = this.groupsData.map(e=> e.totalNumber)
- // this.groupsNumber = ['6','6','7','7']
- this.getGroupsEcharts(this.groupsMonth,this.groupsNumber)
+ this.$nextTick(()=> {
+ this.getGroupsEcharts(this.groupsMonth,this.groupsNumber)
+ })
}
})
},
@@ -126,6 +128,10 @@ export default {
show: false,
}
},
+ grid:{
+ x:50,
+ y:50,
+ },
series: [
{
data: friendsNumber,
@@ -184,6 +190,10 @@ export default {
show: false,
}
},
+ grid:{
+ x:50,
+ y:50,
+ },
series: [
{
data: groupsNumber,