index.vue
3.14 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
101
102
103
104
<template>
<div>
<div class="overview_header">
<div class="overView_header_left">
<div style="display: flex; align-items: center">
<div>ID: {{ baseList.id }}</div>
<div class="surveyState">
<div v-if="baseList.surveyState == 0">未发布</div>
<div v-if="baseList.surveyState == 1">收集中</div>
<div v-if="baseList.surveyState == 2">已暂停</div>
<div v-if="baseList.surveyState == 3">已结束</div>
<div v-if="baseList.surveyState == 4">未收集</div>
</div>
</div>
<div style="font-size: 16px; font-weight: 700; margin-top: 10px">
{{ baseList.surveyName }}
</div>
</div>
<div class="overView_header_right">
<div>
开始时间:<span v-if="baseList.timingStart">{{ baseList.timingStart }}</span
><span v-if="!baseList.timingStart">不限</span>
</div>
<div style="margin-top: 10px">
结束时间:<span v-if="baseList.timingEnd">{{ baseList.timingEnd }}</span
><span v-if="!baseList.timingEnd">不限</span>
</div>
</div>
</div>
<el-tabs v-model="activeName">
<el-tab-pane label="统计概览" name="first">
<Overview v-if="activeName === 'first'" />
</el-tab-pane>
<el-tab-pane label="数据统计" name="second">
<DataStatistics :formId="baseList.id" v-if="activeName === 'second'" />
</el-tab-pane>
<el-tab-pane label="用户统计" name="three" show-overflow-tooltip>
<span slot="label">
用户统计
<el-popover width="250" trigger="hover" placement="top-start">
<p>暂时仅支持微信用户</p>
<i slot="reference" class="el-icon-question" style="color: black"></i>
</el-popover>
</span>
<UserStatistics :formId="baseList.id" v-if="activeName === 'three'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { selectInfoToSurvey } from '@/api/drainageCode/smartForms.js'
import Overview from './Overview.vue'
import DataStatistics from './DataStatistics.vue'
import UserStatistics from './UserStatistics.vue'
// import Search from "./search.vue"
export default {
// name: 'customer-service-statistics',
components: {
Overview,
DataStatistics,
UserStatistics,
},
data() {
return {
baseList: {},
activeName: 'first',
}
},
methods: {
selectInfoToSurvey() {
selectInfoToSurvey(this.$route.query.id).then((res) => {
this.baseList = res.data || {}
})
},
},
created() {
this.selectInfoToSurvey()
// this.$store.dispatch(
// 'app/setBusininessDesc',
// `
// <div>渠道场景与客服维度相关数据统计与分析</div>
// `
// )
},
}
</script>
<style lang="scss" scoped>
.overview_header {
margin-bottom: 10px;
display: flex;
justify-content: space-between;
width: 100%;
border-radius: 5px;
background-color: #fff;
padding: 20px;
box-sizing: border-box;
}
.surveyState {
margin-left: 30px;
padding: 5px 10px;
border-radius: 5px;
background-color: #f1f1f1;
}
</style>