group.vue
6.27 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<div class="head-container-title color-3 font-20">人群名称</div>
<div class="head-container-content color-6 font-14">{{ describe }}</div>
<div class="reminder font-14 color-3">企业标签 | 自动更新</div>
<div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div>
<div class="main-container">
<div class="main-container-head flex-between">
<div class="main-container-head-title color-3 font-20">
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<div class="export font-14 color-6" @click="handleExport()">导出</div>
</div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="customerNickName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerNickName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerNickName }}</span>
</el-tooltip>
<span :class="[scope.scope.type == 1 ? 'pure-blue-text' : '', scope.scope.type == 2 ? 'pure-yello-text' : '']">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="魔方导入结果">详情</GLButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import { getCustomerList, customerClusterListExport } from '@/api/modules/clientDataOverview'
export default {
name: 'group',
data() {
return {
getListApi: getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {},
id: this.$route.params.id ? this.$route.params.id : '',
totalCount: 0,
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户姓名',
prop: 'customerName',
minWidth: 100
},
{
label: '昵称',
prop: 'customerNickName',
minWidth: 100,
addHtml: 'customerNickName'
},
{
label: '手机号',
prop: 'customerPhone',
minWidth: 110
},
{
label: '车牌号',
prop: 'carNumber',
width: 100
},
{
label: '车架号(后6位)',
prop: 'carVin',
// addHtml: 'standNo',
minWidth: 120
},
{
label: '车系',
prop: 'audi',
width: 160,
line: 2
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 120
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 100
},
{
label: '添加时间',
prop: 'addTime',
width: 98
}
]
},
describeData: ['潜在意向客户', '潜在意向客户,且已加企微客户', '潜在意向客户,且未加企微客户', '基盘客户', '基盘客户,且已加企微客户', '基盘客户,且未加企微客户', '新车客户', '新车待续保客户', '新车待首保客户', '沉默客户']
}
},
created() {
let { id } = this
this.init(id)
},
computed: {
describe() {
let id = this.id - 1
return this.describeData[id]
}
},
methods: {
init(id) {
this.tableSearchForm = {
crowdId: id
}
this.getTotalCount()
},
//获取全部客户数
getTotalCount() {
getCustomerList({
...this.tableSearchForm,
pageSize: 10,
pageNum: 1
}).then(res => {
// console.log('res', res)
this.totalCount = res.count
})
},
//导出
handleExport() {
var params = {
tagLists: [{ groupId: `${this.id}` }],
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
goBack() {
this.$router.replace({ path: '/clientDataOverview/index' })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.scrm-sub-client-container {
.head-container {
position: relative;
margin-bottom: 10px;
width: 100%;
height: 112px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 10px;
}
&-content {
font-weight: 400;
line-height: 20px;
width: calc(100% - 156px);
}
.reminder {
position: absolute;
font-weight: 400;
line-height: 20px;
right: 20px;
top: 20px;
}
.back {
font-weight: 400;
line-height: 22px;
padding: 5px 16px;
border-radius: 4px;
border: 1px solid $btnBlue;
position: absolute;
right: 20px;
bottom: 20px;
color: $btnBlue;
}
}
.main-container {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
.main-container-head {
margin-bottom: 20px;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
}
&-number {
color: $btnBlue;
margin-left: 6px;
font-weight: 400;
line-height: 20px;
}
.export {
font-weight: 400;
padding: 6px 23px;
line-height: 20px;
background: #ffffff;
border-radius: 4px;
border: 1px solid rgba(105, 105, 105, 0.3);
}
}
}
.pure-blue-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
}
</style>