数据统计
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppDataStatistics">
|
<div class="AppDataStatistics">
|
||||||
<AiTopFixed>
|
<AiTopFixed v-if="tabIndex != 1">
|
||||||
<div class="area-content">
|
<div class="area-content">
|
||||||
<!-- <AiAreaPicker v-model="areaId" :name.sync="areaName" :area-id="user.areaId" @select="areaSelect">
|
<!-- <AiAreaPicker v-model="areaId" :name.sync="areaName" :area-id="user.areaId" @select="areaSelect">
|
||||||
<div flex>
|
<div flex>
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="item_name">敏感词累计</div>
|
<div class="item_name">敏感词累计</div>
|
||||||
<div class="item_num">{{ Number(friendsCard.customerTotal).toLocaleString('en-US') }}</div>
|
<div class="item_num">{{ Number(info.recordSum) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="item_name">群聊敏感词</div>
|
<div class="item_name">群聊敏感词</div>
|
||||||
<div class="item_num">{{ Number(friendsCard.addCustomerCount).toLocaleString('en-US') }}
|
<div class="item_num">{{ Number(info.groupRecordSum)}}
|
||||||
<img src="../img/up.png" alt="" class="imgs" v-show="friendsCard.addCustomerCount != 0">
|
<img src="../img/up.png" alt="" class="imgs" v-show="info.groupRecordSum != 0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="item_name">私聊敏感词</div>
|
<div class="item_name">私聊敏感词</div>
|
||||||
<div class="item_num">{{ Number(friendsCard.removeCustomerCount).toLocaleString('en-US') }}
|
<div class="item_num">{{ Number(info.personRecordSum)}}
|
||||||
<img src="../img/down.png" alt="" class="imgs" v-show="friendsCard.removeCustomerCount !=0"></div>
|
<img src="../img/down.png" alt="" class="imgs" v-show="info.personRecordSum !=0"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<span>群聊敏感词统计</span>
|
<span>群聊敏感词统计</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="friends_box">
|
<div class="friends_box">
|
||||||
<div id="friends" v-if="friendsData.length > 0"></div>
|
<div id="group" v-if="groupData.length > 0"></div>
|
||||||
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<span>单聊敏感词统计</span>
|
<span>单聊敏感词统计</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="groups_box">
|
<div class="groups_box">
|
||||||
<div id="groups" v-if="groupsData.length > 0"></div>
|
<div id="user" v-if="userData.length > 0"></div>
|
||||||
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,14 +45,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
friendsCard: {},
|
info: {},
|
||||||
friendsData: [],
|
groupData: [],
|
||||||
friendsMonth: [],
|
userData: []
|
||||||
friendsNumber: [],
|
|
||||||
groupsCard: {},
|
|
||||||
groupsData: [],
|
|
||||||
groupsMonth: [],
|
|
||||||
groupsNumber: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -61,40 +56,32 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
// 居民好友
|
// 居民好友
|
||||||
this.$http.post(`/app/wxgroupstatistic/getCustommerNumber?departmentId=${this.departmentId}`).then(res=> {
|
this.$http.post(`/app/appsessionarchivekeywordrecord/getKeywordRecordStatistic?departmentId=${this.departmentId}`).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
this.friendsCard = res.data.居民统计
|
this.info = {...res.data}
|
||||||
this.friendsData = res.data.居民好友数
|
var groupMonth = res.data.personRecordListMap.map(e=> e.dateDay)
|
||||||
this.friendsMonth = this.friendsData.map(e=> e.month)
|
this.groupData = res.data.personRecordListMap.map(e=> e.cnt)
|
||||||
this.friendsNumber = this.friendsData.map(e=> e.totalNumber)
|
|
||||||
|
var userMonth = res.data.groupRecordListMap.map(e=> e.dateDay)
|
||||||
|
this.userData = res.data.groupRecordListMap.map(e=> e.cnt)
|
||||||
|
console.log(groupMonth, this.groupData)
|
||||||
this.$nextTick(()=> {
|
this.$nextTick(()=> {
|
||||||
this.getFriendsEcharts(this.friendsMonth,this.friendsNumber)
|
this.getGroupEcharts(groupMonth, this.groupData)
|
||||||
})
|
this.getUserEcharts(userMonth, this.userData)
|
||||||
}
|
|
||||||
})
|
|
||||||
// 居民群
|
|
||||||
this.$http.post(`/app/wxgroupstatistic/getGroupNumber?departmentId=${this.departmentId}`).then(res=> {
|
|
||||||
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)
|
|
||||||
this.$nextTick(()=> {
|
|
||||||
this.getGroupsEcharts(this.groupsMonth,this.groupsNumber)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getFriendsEcharts(friendsMonth,friendsNumber) {
|
getGroupEcharts(groupMonth, groupData) {
|
||||||
let friendsDom = document.getElementById('friends');
|
let groupDom = document.getElementById('group');
|
||||||
let myFriendsChart = echarts.init(friendsDom);
|
let groupChart = echarts.init(groupDom);
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: friendsMonth,
|
data: groupMonth,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
}
|
}
|
||||||
@@ -114,7 +101,7 @@ export default {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: friendsNumber,
|
data: groupData,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#3975C6', // 折线线条颜色
|
color: '#3975C6', // 折线线条颜色
|
||||||
@@ -145,18 +132,18 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
option && myFriendsChart.setOption(option);
|
option && groupChart.setOption(option);
|
||||||
},
|
},
|
||||||
getGroupsEcharts(groupsMonth,groupsNumber) {
|
getUserEcharts(userMonth, userData) {
|
||||||
let groupsDom = document.getElementById('groups');
|
let userDom = document.getElementById('user');
|
||||||
let myGroupsChart = echarts.init(groupsDom);
|
let userChart = echarts.init(userDom);
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: groupsMonth,
|
data: userMonth,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
}
|
}
|
||||||
@@ -176,7 +163,7 @@ export default {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: groupsNumber,
|
data: userData,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#3975C6', // 折线线条颜色
|
color: '#3975C6', // 折线线条颜色
|
||||||
@@ -207,7 +194,7 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
option && myGroupsChart.setOption(option);
|
option && userChart.setOption(option);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -267,8 +254,8 @@ export default {
|
|||||||
height: 514px;
|
height: 514px;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
|
|
||||||
#friends,
|
#user,
|
||||||
#groups {
|
#group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user