CustomerGroupContact.vue
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<script>
import TabContent from '../components/TabContent'
import * as api from '@/api/operateCenter/conversationAnalysis'
export default {
name: '',
components: { TabContent },
data() {
return {
cardData: [],
tabs: [
{
label: '群聊总数',
type: 'groupChatTotalChart',
},
{
label: '群聊消息数',
type: 'groupChatMessageNumChart',
},
{
label: '发送消息群成员数',
type: 'sendMessageGroupMemberChart',
},
],
active: 0,
api,
}
},
computed: {},
watch: {},
created() {
this.getList()
},
mounted() {},
methods: {
getList() {
this.loading = true
api
.getAnalysisGroup()
.then(({ data }) => {
data || (data = {})
this.cardData = [
{
title: '昨日群聊总数',
tips: '企业员工的客户群中有过聊天的数量',
value: data.ydChatTotal,
title1: '较前日',
value1: data.bydChatTotal,
},
{
title: '昨日群聊消息数',
tips: '企业员工的客户群中的消息数量',
value: data.ydMsgTotal,
title1: '较前日',
value1: data.bydMsgTotal,
},
{
title: '昨日发送消息群成员数',
tips: '在客户群中发过消息的群成员的数量,包含企业员工',
value: data.ydMemberHasMsg,
title1: '较前日',
value1: data.bydMemberHasMsg,
},
]
})
.catch((e) => {
console.log(e)
})
.finally(() => {
this.loading = false
})
},
},
}
</script>
<template>
<div>
<CardGroupIndex :data="cardData"></CardGroupIndex>
<div class="g-card">
<div class="g-card-title">数据趋势</div>
<el-tabs v-model="active">
<el-tab-pane v-for="(item, index) of tabs" :key="index" :label="item.label">
<TabContent :type="item.type" :legend="[item.label]" :request="api.getTotalCntGroup"></TabContent>
</el-tab-pane>
</el-tabs>
</div>
<div class="g-card">
<div class="g-card-title">数据报表</div>
<TabContent
type="customerGroupContactTable"
:request="api.getTotalCntGroup"
:requestExport="api.realDataExportGroup"></TabContent>
</div>
</div>
</template>
<style lang="scss" scoped></style>