list.vue
1.69 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
<template>
<div>
<el-tabs :value="active">
<el-tab-pane label="活码欢迎语" name="1">
<Tab ref="tab1" type="1" @total="totalChange"></Tab>
</el-tab-pane>
<el-tab-pane label="员工欢迎语" name="2">
<Tab ref="tab2" type="2" @total="totalChange"></Tab>
</el-tab-pane>
<el-tab-pane label="入群欢迎语" name="3">
<Tab ref="tab3" type="3" @total="totalChange"></Tab>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Tab from './components/Tab'
export default {
name: 'Welcome',
components: { Tab },
props: {},
data () {
return {
active: '1',
total1: 0,
total2: 0,
total3: 0
}
},
watch: {},
computed: {},
created () {
if (this.$route.query.type) {
this.active = this.$route.query.type
}
},
mounted () {
this.$store.dispatch(
'app/setBusininessDesc',
`
<div>活码欢迎语:客户通过员工活码添加员工时,系统自动回复欢迎语;新建活码时也可以从活码欢迎语模板中选择。</div>
<div>员工欢迎语:客户通过搜索手机号等非员工活码方式添加员工时,系统自动回复欢迎语。</div>
<div>入群欢迎语:客户加入群聊时,系统自动回复欢迎语。</div>
`
)
},
// beforeRouteLeave(to, from, next) {
// // this.$store.dispatch(('app/setBusininessDesc', ''))
// this.$store.state.app.busininessDesc = ''
// next()
// },
methods: {
totalChange ([type, total]) {
this['total' + type] = total
}
}
}
</script>
<style lang="scss" scoped></style>