Browse Source

feat: 下拉选择

zhengxy 1 year ago
parent
commit
f09400a92c

+ 126 - 0
project/src/assets/js/staticTypes.js

@@ -14,6 +14,11 @@ export const promotionTypeDesc = {
14 14
   [promotionTypeCode.h5]: 'H5',
15 15
   [promotionTypeCode.mini_program]: '小程序',
16 16
 }
17
+export const promotionType = [
18
+  { key: promotionTypeCode.h5, val: 'H5' },
19
+  { key: promotionTypeCode.mini_program, val: '小程序' },
20
+]
21
+
17 22
 
18 23
 // 收入来源
19 24
 export const incomeSourceCode = {
@@ -24,6 +29,10 @@ export const incomeSourceDesc = {
24 29
   [incomeSourceCode.launch]: '投放推广',
25 30
   [incomeSourceCode.operation]: '运营推广',
26 31
 }
32
+export const incomeSource = [
33
+  { key: incomeSourceCode.launch, val: '投放推广' },
34
+  { key: incomeSourceCode.operation, val: '运营推广' },
35
+]
27 36
 
28 37
 // 投放类型
29 38
 export const launchTypeCode = {
@@ -34,6 +43,10 @@ export const launchTypeDesc = {
34 43
   [launchTypeCode.mp]: 'MP投放',
35 44
   [launchTypeCode.adq]: 'ADQ投放',
36 45
 }
46
+export const launchType = [
47
+  { key: launchTypeCode.mp, val: 'MP投放' },
48
+  { key: launchTypeCode.adq, val: 'ADQ投放' },
49
+]
37 50
 
38 51
 // 页面跳转来源标识
39 52
 export const pageFromType = {
@@ -62,6 +75,10 @@ export const kfActiveStatusMap = new Map([
62 75
   [kfActiveStatusCode.NOT_ACTIVATED, '未激活'],
63 76
   [kfActiveStatusCode.ACTIVATED, '已激活'],
64 77
 ])
78
+export const isActive = [
79
+  { key: kfActiveStatusCode.NOT_ACTIVATED, val: '未激活' },
80
+  { key: kfActiveStatusCode.ACTIVATED, val: '已激活' },
81
+]
65 82
 
66 83
 // 客服状态
67 84
 export const customerStaffStatusCode = {
@@ -74,6 +91,12 @@ export const customerStaffStatusMap = new Map([
74 91
   [customerStaffStatusCode.STOPPED, '已停用'],
75 92
   [customerStaffStatusCode.BANNED, '已封禁'],
76 93
 ])
94
+export const customerStaffStatus = [
95
+  { key: customerStaffStatusCode.USING, val: '运营中' },
96
+  { key: customerStaffStatusCode.STOPPED, val: '已停用' },
97
+  { key: customerStaffStatusCode.BANNED, val: '已封禁' },
98
+]
99
+
77 100
 
78 101
 // 客服状态
79 102
 export const chatGroupStatusCode = {
@@ -110,3 +133,106 @@ export const licenseTaskStatusOptions = [
110 133
   { key: licenseTaskStatusCode.COMPLETED, val: licenseTaskStatusMap.get(licenseTaskStatusCode.COMPLETED) },
111 134
   { key: licenseTaskStatusCode.FAILED, val: licenseTaskStatusMap.get(licenseTaskStatusCode.FAILED) },
112 135
 ]
136
+
137
+export const assignment_status = [
138
+  { key: 1, val: '已转接' },
139
+  { key: 2, val: '客户转接中' },
140
+  { key: 3, val: '客户已拒绝' },
141
+  { key: 4, val: '接替成员客户达到上限' },
142
+  { key: 5, val: '无接替记录' },
143
+  { key: -1, val: '迁移失败' },
144
+]
145
+
146
+export const remove_status = [
147
+  { key: 1, val: '待迁移' },
148
+  { key: 2, val: '迁移中' },
149
+  { key: 3, val: '迁移完成' },
150
+  { key: -1, val: '迁移失败' },
151
+]
152
+
153
+export const remove_type = [
154
+  { key: 1, val: '在职' },
155
+  { key: 2, val: '离职' },
156
+]
157
+
158
+export const chat_group_status = [
159
+  { key: 1, val: '群主已发送' },
160
+  { key: 2, val: '群主未发送' },
161
+  { key: 3, val: '发送失败' },
162
+]
163
+
164
+export const chargePay = [
165
+  { key: 1, val: '已付款' },
166
+  { key: 2, val: '未付款' }
167
+]
168
+
169
+export const orderType = [
170
+  { key: 1, val: '通用充值' },
171
+  { key: 2, val: '充值活动' },
172
+  { key: 3, val: '会员充值' },
173
+  { key: 4, val: '平台会员充值' },
174
+]
175
+
176
+export const paySource = [
177
+  { key: 1, val: '柚子' },
178
+  { key: 2, val: '嘉书' },
179
+  { key: 3, val: '迈步' },
180
+  { key: 4, val: '点众-阳光' },
181
+  // { key: 5, val: '中文在线' },
182
+]
183
+
184
+export const circleType = [
185
+  { key: 2, val: '个人发表' },
186
+  { key: 1, val: '企业发表' }
187
+]
188
+
189
+export const importRecordDetial_addStatus = [
190
+  { key: 0, val: '全部' },
191
+  { key: 1, val: '待添加' },
192
+  { key: 2, val: '待通过' },
193
+  { key: 3, val: '已添加' },
194
+  { key: 4, val: '待分配' },
195
+]
196
+
197
+export const expireDays = [
198
+  { key: 3, val: '3天' },
199
+  { key: 7, val: '7天' },
200
+  { key: 15, val: '15天' },
201
+]
202
+
203
+export const orderPayType = [
204
+  { key: 1, val: '小程序虚拟支付' },
205
+  { key: 2, val: '其他类型支付' },
206
+]
207
+
208
+export const enableStatus = [
209
+  { key: 1, val: '启用' },
210
+  { key: 0, val: '禁用' },
211
+]
212
+
213
+export const adReportType = [
214
+  { key: 1, val: '下单' },
215
+  { key: 2, val: '付费' },
216
+]
217
+
218
+export const groupTransfer = [
219
+  { key: 1, val: '待分配' },
220
+  { key: 2, val: '分配中' },
221
+  { key: 3, val: '分配完成' },
222
+  { key: 4, val: '无目标客户群' },
223
+  { key: 5, val: '分配失败' },
224
+  { key: 0, val: '禁用' },
225
+]
226
+
227
+export const msgSendStatus = [
228
+  { key: 1, val: '待发送' },
229
+  { key: 2, val: '已发送' },
230
+]
231
+
232
+export const msgType = [
233
+  { key: 1, val: '客户群发消息' },
234
+  { key: 2, val: '客户群群发消息' },
235
+  { key: 3, val: '智能群发消息' },
236
+  { key: 4, val: '客户朋友圈消息' },
237
+]
238
+

+ 43 - 115
project/src/components/assembly/screen/channel.vue

@@ -37,12 +37,28 @@
37 37
 </template>
38 38
 <script>
39 39
 import {
40
-  promotionTypeCode,
41
-  incomeSourceCode,
42
-  launchTypeCode,
43
-  customerStaffStatusCode,
44
-  kfActiveStatusCode,
45 40
   licenseTaskStatusOptions,
41
+  assignment_status,
42
+  remove_status,
43
+  remove_type,
44
+  chat_group_status,
45
+  chargePay,
46
+  orderType,
47
+  paySource,
48
+  circleType,
49
+  importRecordDetial_addStatus,
50
+  promotionType,
51
+  incomeSource,
52
+  launchType,
53
+  isActive,
54
+  customerStaffStatus,
55
+  expireDays,
56
+  orderPayType,
57
+  enableStatus,
58
+  adReportType,
59
+  groupTransfer,
60
+  msgSendStatus,
61
+  msgType,
46 62
 } from '@/assets/js/staticTypes'
47 63
 export default {
48 64
   props: {
@@ -104,32 +120,13 @@ export default {
104 120
   },
105 121
   created () {
106 122
     if (this.type == 'assignment_status') {
107
-      this.options = [
108
-        { key: 1, val: '已转接' },
109
-        { key: 2, val: '客户转接中' },
110
-        { key: 3, val: '客户已拒绝' },
111
-        { key: 4, val: '接替成员客户达到上限' },
112
-        { key: 5, val: '无接替记录' },
113
-        { key: -1, val: '迁移失败' },
114
-      ]
123
+      this.options = [...assignment_status]
115 124
     } else if (this.type == 'remove_status') {
116
-      this.options = [
117
-        { key: 1, val: '待迁移' },
118
-        { key: 2, val: '迁移中' },
119
-        { key: 3, val: '迁移完成' },
120
-        { key: -1, val: '迁移失败' },
121
-      ]
125
+      this.options = [...remove_status]
122 126
     } else if (this.type == 'remove_type') {
123
-      this.options = [
124
-        { key: 1, val: '在职' },
125
-        { key: 2, val: '离职' },
126
-      ]
127
+      this.options = [...remove_type]
127 128
     } else if (this.type == 'chat_group_status') {
128
-      this.options = [
129
-        { key: 1, val: '群主已发送' },
130
-        { key: 2, val: '群主未发送' },
131
-        { key: 3, val: '发送失败' },
132
-      ]
129
+      this.options = [...chat_group_status]
133 130
     } else if (this.type == 'thePublic') {//公众号(投放账号)
134 131
       this.placeholderVal = '公众号'
135 132
       this.thePublic_init()
@@ -143,27 +140,13 @@ export default {
143 140
     } else if (this.type == 'pitcher') {//投手列表
144 141
       this.pitcher_init()
145 142
     } else if (this.type == 'chargePay') {//充值订单管理-支付状态
146
-      this.options = [
147
-        { key: 1, val: '已付款' },
148
-        { key: 2, val: '未付款' }
149
-      ]
143
+      this.options = [...chargePay]
150 144
       this.placeholderVal = '支付状态'
151 145
     } else if (this.type == 'orderType') {//充值订单管理-订单类型
152
-      this.options = [
153
-        { key: 1, val: '通用充值' },
154
-        { key: 2, val: '充值活动' },
155
-        { key: 3, val: '会员充值' },
156
-        { key: 4, val: '平台会员充值' },
157
-      ]
146
+      this.options = [...orderType]
158 147
       this.placeholderVal = '订单类型'
159 148
     } else if (this.type == 'paySource') {//充值订单管理-付费来源
160
-      this.options = [
161
-        { key: 1, val: '柚子' },
162
-        { key: 2, val: '嘉书' },
163
-        { key: 3, val: '迈步' },
164
-        { key: 4, val: '点众-阳光' },
165
-        // { key: 5, val: '中文在线' },
166
-      ]
149
+      this.options = [...paySource]
167 150
       this.placeholderVal = '付费来源'
168 151
     } else if (this.type == 'wx_reportRule') {//回传规则
169 152
       this.reportRule_init()
@@ -173,37 +156,19 @@ export default {
173 156
       this.getsysUserList()
174 157
       this.placeholderVal = '选择创建人'
175 158
     } else if (this.type == 'circleType') {//企微朋友圈-朋友圈类型
176
-      this.options = [
177
-        { key: 2, val: '个人发表' },
178
-        { key: 1, val: '企业发表' }
179
-      ]
159
+      this.options = [...circleType]
180 160
       this.placeholderVal = '朋友圈类型'
181 161
     } else if (this.type == 'importRecordDetial_addStatus') {//批量加好友/导入详情/添加状态
182
-      this.options = [
183
-        { key: 0, val: '全部' },
184
-        { key: 1, val: '待添加' },
185
-        { key: 2, val: '待通过' },
186
-        { key: 3, val: '已添加' },
187
-        { key: 4, val: '待分配' },
188
-      ]
162
+      this.options = [...importRecordDetial_addStatus]
189 163
       this.placeholderVal = '添加状态'
190 164
     } else if (this.type == 'promotionType') { // 推广类型
191
-      this.options = [
192
-        { key: promotionTypeCode.h5, val: 'H5' },
193
-        { key: promotionTypeCode.mini_program, val: '小程序' },
194
-      ]
165
+      this.options = [...promotionType]
195 166
       this.placeholderVal = '推广类型'
196 167
     } else if (this.type == 'incomeSource') { // 收入来源
197
-      this.options = [
198
-        { key: incomeSourceCode.launch, val: '投放推广' },
199
-        { key: incomeSourceCode.operation, val: '运营推广' },
200
-      ]
168
+      this.options = [...incomeSource]
201 169
       this.placeholderVal = '收入来源'
202 170
     } else if (this.type == 'launchType') { // 投放类型
203
-      this.options = [
204
-        { key: launchTypeCode.mp, val: 'MP投放' },
205
-        { key: launchTypeCode.adq, val: 'ADQ投放' },
206
-      ]
171
+      this.options = [...launchType]
207 172
       this.placeholderVal = '投放类型'
208 173
     } else if (this.type == 'adqAccount') { // adq 账号选项
209 174
       this.getAdqAccountList()
@@ -218,10 +183,7 @@ export default {
218 183
       this.getMpAccountHSList()
219 184
       this.placeholderVal = '请选择账号'
220 185
     } else if (this.type == 'isActive') { // 成员管理 激活状态
221
-      this.options = [
222
-        { key: kfActiveStatusCode.NOT_ACTIVATED, val: '未激活' },
223
-        { key: kfActiveStatusCode.ACTIVATED, val: '已激活' },
224
-      ]
186
+      this.options = [...isActive]
225 187
       this.placeholderVal = '请选择激活状态'
226 188
     } else if (this.type == 'orderSource') { // 付费来源
227 189
       this.getOrderSource()
@@ -236,67 +198,33 @@ export default {
236 198
       this.getPicturesGroup()
237 199
       this.placeholderVal = '图片组'
238 200
     } else if (this.type == 'customerStaffStatus') { // 客服状态
239
-      this.options = [
240
-        { key: customerStaffStatusCode.USING, val: '运营中' },
241
-        { key: customerStaffStatusCode.STOPPED, val: '已停用' },
242
-        { key: customerStaffStatusCode.BANNED, val: '已封禁' },
243
-      ]
201
+      this.options = [...customerStaffStatus]
244 202
       this.placeholderVal = '请选择'
245 203
     } else if (this.type == 'expireDays') { // 到期时间
246
-      this.options = [
247
-        { key: 3, val: '3天' },
248
-        { key: 7, val: '7天' },
249
-        { key: 15, val: '15天' },
250
-      ]
204
+      this.options = [...expireDays]
251 205
       this.placeholderVal = '请选择'
252 206
     } else if (this.type == 'chatGroupOwner') { // 群主
253 207
       this.getChatGroupOwner()
254 208
       this.placeholderVal = '请选择群主'
255 209
     } else if (this.type == 'orderPayType') { // 支付类型
256
-      this.options = [
257
-        { key: 1, val: '小程序虚拟支付' },
258
-        { key: 2, val: '其他类型支付' },
259
-      ]
210
+      this.options = [...orderPayType]
260 211
       this.placeholderVal = '支付类型'
261 212
     } else if (this.type == 'licenseTaskStatus') { // 客服许可任务状态
262
-      this.options = [
263
-        ...licenseTaskStatusOptions
264
-      ]
213
+      this.options = [...licenseTaskStatusOptions]
265 214
     }  else if (this.type == 'enableStatus') { // 启用 禁用
266
-      this.options = [
267
-        { key: 1, val: '启用' },
268
-        { key: 0, val: '禁用' },
269
-      ]
215
+      this.options = [...enableStatus]
270 216
       this.placeholderVal = '请选择'
271 217
     } else if (this.type == 'adReportType') { // 回传类型
272
-      this.options = [
273
-        { key: 1, val: '下单' },
274
-        { key: 2, val: '付费' },
275
-      ]
218
+      this.options = [...adReportType]
276 219
       this.placeholderVal = '回传类型'
277 220
     } else if (this.type == 'groupTransfer') { // 状态
278
-      this.options = [
279
-        { key: 1, val: '待分配' },
280
-        { key: 2, val: '分配中' },
281
-        { key: 3, val: '分配完成' },
282
-        { key: 4, val: '无目标客户群' },
283
-        { key: 5, val: '分配失败' },
284
-        { key: 0, val: '禁用' },
285
-      ]
221
+      this.options = [...groupTransfer]
286 222
       this.placeholderVal = '请选择'
287 223
     } else if (this.type == 'msgSendStatus') { // 消息提醒-发送状态
288
-      this.options = [
289
-        { key: 1, val: '待发送' },
290
-        { key: 2, val: '已发送' },
291
-      ]
224
+      this.options = [...msgSendStatus]
292 225
       this.placeholderVal = '发送状态'
293 226
     } else if (this.type == 'msgType') { // 消息提醒-消息类型
294
-      this.options = [
295
-        { key: 1, val: '客户群发消息' },
296
-        { key: 2, val: '客户群群发消息' },
297
-        { key: 3, val: '智能群发消息' },
298
-        { key: 4, val: '客户朋友圈消息' },
299
-      ]
227
+      this.options = [...msgType]
300 228
       this.placeholderVal = '消息类型'
301 229
     } else {
302 230
       this.init()

+ 43 - 115
project/src/components/assembly/screen/channelMultiple.vue

@@ -22,12 +22,28 @@
22 22
 </template>
23 23
 <script>
24 24
 import {
25
-  promotionTypeCode,
26
-  incomeSourceCode,
27
-  launchTypeCode,
28
-  customerStaffStatusCode,
29
-  kfActiveStatusCode,
30 25
   licenseTaskStatusOptions,
26
+  assignment_status,
27
+  remove_status,
28
+  remove_type,
29
+  chat_group_status,
30
+  chargePay,
31
+  orderType,
32
+  paySource,
33
+  circleType,
34
+  importRecordDetial_addStatus,
35
+  promotionType,
36
+  incomeSource,
37
+  launchType,
38
+  isActive,
39
+  customerStaffStatus,
40
+  expireDays,
41
+  orderPayType,
42
+  enableStatus,
43
+  adReportType,
44
+  groupTransfer,
45
+  msgSendStatus,
46
+  msgType,
31 47
 } from '@/assets/js/staticTypes'
32 48
 export default {
33 49
   props: {
@@ -87,32 +103,13 @@ export default {
87 103
   },
88 104
   created () {
89 105
     if (this.type == 'assignment_status') {
90
-      this.options = [
91
-        { key: 1, val: '已转接' },
92
-        { key: 2, val: '客户转接中' },
93
-        { key: 3, val: '客户已拒绝' },
94
-        { key: 4, val: '接替成员客户达到上限' },
95
-        { key: 5, val: '无接替记录' },
96
-        { key: -1, val: '迁移失败' },
97
-      ]
106
+      this.options = [...assignment_status]
98 107
     } else if (this.type == 'remove_status') {
99
-      this.options = [
100
-        { key: 1, val: '待迁移' },
101
-        { key: 2, val: '迁移中' },
102
-        { key: 3, val: '迁移完成' },
103
-        { key: -1, val: '迁移失败' },
104
-      ]
108
+      this.options = [...remove_status]
105 109
     } else if (this.type == 'remove_type') {
106
-      this.options = [
107
-        { key: 1, val: '在职' },
108
-        { key: 2, val: '离职' },
109
-      ]
110
+      this.options = [...remove_type]
110 111
     } else if (this.type == 'chat_group_status') {
111
-      this.options = [
112
-        { key: 1, val: '群主已发送' },
113
-        { key: 2, val: '群主未发送' },
114
-        { key: 3, val: '发送失败' },
115
-      ]
112
+      this.options = [...chat_group_status]
116 113
     } else if (this.type == 'thePublic') {//公众号(投放账号)
117 114
       this.placeholderVal = '公众号'
118 115
       this.thePublic_init()
@@ -126,27 +123,13 @@ export default {
126 123
     } else if (this.type == 'pitcher') {//投手列表
127 124
       this.pitcher_init()
128 125
     } else if (this.type == 'chargePay') {//充值订单管理-支付状态
129
-      this.options = [
130
-        { key: 1, val: '已付款' },
131
-        { key: 2, val: '未付款' }
132
-      ]
126
+      this.options = [...chargePay]
133 127
       this.placeholderVal = '支付状态'
134 128
     } else if (this.type == 'orderType') {//充值订单管理-订单类型
135
-      this.options = [
136
-        { key: 1, val: '通用充值' },
137
-        { key: 2, val: '充值活动' },
138
-        { key: 3, val: '会员充值' },
139
-        { key: 4, val: '平台会员充值' },
140
-      ]
129
+      this.options = [...orderType]
141 130
       this.placeholderVal = '订单类型'
142 131
     } else if (this.type == 'paySource') {//充值订单管理-付费来源
143
-      this.options = [
144
-        { key: 1, val: '柚子' },
145
-        { key: 2, val: '嘉书' },
146
-        { key: 3, val: '迈步' },
147
-        { key: 4, val: '点众-阳光' },
148
-        // { key: 5, val: '中文在线' },
149
-      ]
132
+      this.options = [...paySource]
150 133
       this.placeholderVal = '付费来源'
151 134
     } else if (this.type == 'wx_reportRule') {//回传规则
152 135
       this.reportRule_init()
@@ -156,37 +139,19 @@ export default {
156 139
       this.getsysUserList()
157 140
       this.placeholderVal = '选择创建人'
158 141
     } else if (this.type == 'circleType') {//企微朋友圈-朋友圈类型
159
-      this.options = [
160
-        { key: 2, val: '个人发表' },
161
-        { key: 1, val: '企业发表' }
162
-      ]
142
+      this.options = [...circleType]
163 143
       this.placeholderVal = '朋友圈类型'
164 144
     } else if (this.type == 'importRecordDetial_addStatus') {//批量加好友/导入详情/添加状态
165
-      this.options = [
166
-        { key: 0, val: '全部' },
167
-        { key: 1, val: '待添加' },
168
-        { key: 2, val: '待通过' },
169
-        { key: 3, val: '已添加' },
170
-        { key: 4, val: '待分配' },
171
-      ]
145
+      this.options = [...importRecordDetial_addStatus]
172 146
       this.placeholderVal = '添加状态'
173 147
     } else if (this.type == 'promotionType') { // 推广类型
174
-      this.options = [
175
-        { key: promotionTypeCode.h5, val: 'H5' },
176
-        { key: promotionTypeCode.mini_program, val: '小程序' },
177
-      ]
148
+      this.options = [...promotionType]
178 149
       this.placeholderVal = '推广类型'
179 150
     } else if (this.type == 'incomeSource') { // 收入来源
180
-      this.options = [
181
-        { key: incomeSourceCode.launch, val: '投放推广' },
182
-        { key: incomeSourceCode.operation, val: '运营推广' },
183
-      ]
151
+      this.options = [...incomeSource]
184 152
       this.placeholderVal = '收入来源'
185 153
     } else if (this.type == 'launchType') { // 投放类型
186
-      this.options = [
187
-        { key: launchTypeCode.mp, val: 'MP投放' },
188
-        { key: launchTypeCode.adq, val: 'ADQ投放' },
189
-      ]
154
+      this.options = [...launchType]
190 155
       this.placeholderVal = '投放类型'
191 156
     } else if (this.type == 'adqAccount') { // adq 账号选项
192 157
       this.getAdqAccountList()
@@ -201,10 +166,7 @@ export default {
201 166
       this.getMpAccountHSList()
202 167
       this.placeholderVal = '请选择账号'
203 168
     } else if (this.type == 'isActive') { // 成员管理 激活状态
204
-      this.options = [
205
-        { key: kfActiveStatusCode.NOT_ACTIVATED, val: '未激活' },
206
-        { key: kfActiveStatusCode.ACTIVATED, val: '已激活' },
207
-      ]
169
+      this.options = [...isActive]
208 170
       this.placeholderVal = '请选择激活状态'
209 171
     } else if (this.type == 'orderSource') { // 付费来源
210 172
       this.getOrderSource()
@@ -216,67 +178,33 @@ export default {
216 178
       this.getOperatorGroup()
217 179
       this.placeholderVal = '运营组'
218 180
     } else if (this.type == 'customerStaffStatus') { // 客服状态
219
-      this.options = [
220
-        { key: customerStaffStatusCode.USING, val: '运营中' },
221
-        { key: customerStaffStatusCode.STOPPED, val: '已停用' },
222
-        { key: customerStaffStatusCode.BANNED, val: '已封禁' },
223
-      ]
181
+      this.options = [...customerStaffStatus]
224 182
       this.placeholderVal = '请选择'
225 183
     } else if (this.type == 'expireDays') { // 到期时间
226
-      this.options = [
227
-        { key: 3, val: '3天' },
228
-        { key: 7, val: '7天' },
229
-        { key: 15, val: '15天' },
230
-      ]
184
+      this.options = [...expireDays]
231 185
       this.placeholderVal = '请选择'
232 186
     } else if (this.type == 'chatGroupOwner') { // 群主
233 187
       this.getChatGroupOwner()
234 188
       this.placeholderVal = '请选择群主'
235 189
     } else if (this.type == 'orderPayType') { // 支付类型
236
-      this.options = [
237
-        { key: 1, val: '小程序虚拟支付' },
238
-        { key: 2, val: '其他类型支付' },
239
-      ]
190
+      this.options = [...orderPayType]
240 191
       this.placeholderVal = '支付类型'
241 192
     } else if (this.type == 'licenseTaskStatus') { // 客服许可任务状态
242
-      this.options = [
243
-        ...licenseTaskStatusOptions
244
-      ]
193
+      this.options = [...licenseTaskStatusOptions]
245 194
     } else if (this.type == 'enableStatus') { // 启用 禁用
246
-      this.options = [
247
-        { key: 1, val: '启用' },
248
-        { key: 0, val: '禁用' },
249
-      ]
195
+      this.options = [...enableStatus]
250 196
       this.placeholderVal = '请选择'
251 197
     }  else if (this.type == 'adReportType') { // 回传类型
252
-      this.options = [
253
-        { key: 1, val: '下单' },
254
-        { key: 2, val: '付费' },
255
-      ]
198
+      this.options = [...adReportType]
256 199
       this.placeholderVal = '回传类型'
257 200
     } else if (this.type == 'groupTransfer') { // 状态
258
-      this.options = [
259
-        { key: 1, val: '待分配' },
260
-        { key: 2, val: '分配中' },
261
-        { key: 3, val: '分配完成' },
262
-        { key: 4, val: '无目标客户群' },
263
-        { key: 5, val: '分配失败' },
264
-        { key: 0, val: '禁用' },
265
-      ]
201
+      this.options = [...groupTransfer]
266 202
       this.placeholderVal = '请选择'
267 203
     } else if (this.type == 'msgSendStatus') { // 消息提醒-发送状态
268
-      this.options = [
269
-        { key: 1, val: '待发送' },
270
-        { key: 2, val: '已发送' },
271
-      ]
204
+      this.options = [...msgSendStatus]
272 205
       this.placeholderVal = '发送状态'
273 206
     } else if (this.type == 'msgType') { // 消息提醒-消息类型
274
-      this.options = [
275
-        { key: 1, val: '客户群发消息' },
276
-        { key: 2, val: '客户群群发消息' },
277
-        { key: 3, val: '智能群发消息' },
278
-        { key: 4, val: '客户朋友圈消息' },
279
-      ]
207
+      this.options = [...msgType]
280 208
       this.placeholderVal = '消息类型'
281 209
     } else {
282 210
       this.init()

+ 43 - 115
project/src/components/assembly/screen/channelV2.vue

@@ -23,12 +23,28 @@
23 23
 </template>
24 24
 <script>
25 25
 import {
26
-  promotionTypeCode,
27
-  incomeSourceCode,
28
-  launchTypeCode,
29
-  customerStaffStatusCode,
30
-  kfActiveStatusCode,
31 26
   licenseTaskStatusOptions,
27
+  assignment_status,
28
+  remove_status,
29
+  remove_type,
30
+  chat_group_status,
31
+  chargePay,
32
+  orderType,
33
+  paySource,
34
+  circleType,
35
+  importRecordDetial_addStatus,
36
+  promotionType,
37
+  incomeSource,
38
+  launchType,
39
+  isActive,
40
+  customerStaffStatus,
41
+  expireDays,
42
+  orderPayType,
43
+  enableStatus,
44
+  adReportType,
45
+  groupTransfer,
46
+  msgSendStatus,
47
+  msgType,
32 48
 } from '@/assets/js/staticTypes'
33 49
 export default {
34 50
   props: {
@@ -347,32 +363,13 @@ export default {
347 363
     },
348 364
     handleGetOptions() {
349 365
       if (this.type == 'assignment_status') {
350
-        this.options = [
351
-          { key: 1, val: '已转接' },
352
-          { key: 2, val: '客户转接中' },
353
-          { key: 3, val: '客户已拒绝' },
354
-          { key: 4, val: '接替成员客户达到上限' },
355
-          { key: 5, val: '无接替记录' },
356
-          { key: -1, val: '迁移失败' },
357
-        ]
366
+        this.options = [...assignment_status]
358 367
       } else if (this.type == 'remove_status') {
359
-        this.options = [
360
-          { key: 1, val: '待迁移' },
361
-          { key: 2, val: '迁移中' },
362
-          { key: 3, val: '迁移完成' },
363
-          { key: -1, val: '迁移失败' },
364
-        ]
368
+        this.options = [...remove_status]
365 369
       } else if (this.type == 'remove_type') {
366
-        this.options = [
367
-          { key: 1, val: '在职' },
368
-          { key: 2, val: '离职' },
369
-        ]
370
+        this.options = [...remove_type]
370 371
       } else if (this.type == 'chat_group_status') {
371
-        this.options = [
372
-          { key: 1, val: '群主已发送' },
373
-          { key: 2, val: '群主未发送' },
374
-          { key: 3, val: '发送失败' },
375
-        ]
372
+        this.options = [...chat_group_status]
376 373
       } else if (this.type == 'thePublic') {//公众号(投放账号)
377 374
         this.placeholderVal = '公众号'
378 375
         this.thePublic_init()
@@ -386,27 +383,13 @@ export default {
386 383
       } else if (this.type == 'pitcher') {//投手列表
387 384
         this.pitcher_init()
388 385
       } else if (this.type == 'chargePay') {//充值订单管理-支付状态
389
-        this.options = [
390
-          { key: 1, val: '已付款' },
391
-          { key: 2, val: '未付款' }
392
-        ]
386
+        this.options = [...chargePay]
393 387
         this.placeholderVal = '支付状态'
394 388
       } else if (this.type == 'orderType') {//充值订单管理-订单类型
395
-        this.options = [
396
-          { key: 1, val: '通用充值' },
397
-          { key: 2, val: '充值活动' },
398
-          { key: 3, val: '会员充值' },
399
-          { key: 4, val: '平台会员充值' },
400
-        ]
389
+        this.options = [...orderType]
401 390
         this.placeholderVal = '订单类型'
402 391
       } else if (this.type == 'paySource') {//充值订单管理-付费来源
403
-        this.options = [
404
-          { key: 1, val: '柚子' },
405
-          { key: 2, val: '嘉书' },
406
-          { key: 3, val: '迈步' },
407
-          { key: 4, val: '点众-阳光' },
408
-          // { key: 5, val: '中文在线' },
409
-        ]
392
+        this.options = [...paySource]
410 393
         this.placeholderVal = '付费来源'
411 394
       } else if (this.type == 'wx_reportRule') {//回传规则
412 395
         this.reportRule_init()
@@ -416,37 +399,19 @@ export default {
416 399
         this.getsysUserList()
417 400
         this.placeholderVal = '选择创建人'
418 401
       } else if (this.type == 'circleType') {//企微朋友圈-朋友圈类型
419
-        this.options = [
420
-          { key: 2, val: '个人发表' },
421
-          { key: 1, val: '企业发表' }
422
-        ]
402
+        this.options = [...circleType]
423 403
         this.placeholderVal = '朋友圈类型'
424 404
       } else if (this.type == 'importRecordDetial_addStatus') {//批量加好友/导入详情/添加状态
425
-        this.options = [
426
-          { key: 0, val: '全部' },
427
-          { key: 1, val: '待添加' },
428
-          { key: 2, val: '待通过' },
429
-          { key: 3, val: '已添加' },
430
-          { key: 4, val: '待分配' },
431
-        ]
405
+        this.options = [...importRecordDetial_addStatus]
432 406
         this.placeholderVal = '添加状态'
433 407
       } else if (this.type == 'promotionType') { // 推广类型
434
-        this.options = [
435
-          { key: promotionTypeCode.h5, val: 'H5' },
436
-          { key: promotionTypeCode.mini_program, val: '小程序' },
437
-        ]
408
+        this.options = [...promotionType]
438 409
         this.placeholderVal = '推广类型'
439 410
       } else if (this.type == 'incomeSource') { // 收入来源
440
-        this.options = [
441
-          { key: incomeSourceCode.launch, val: '投放推广' },
442
-          { key: incomeSourceCode.operation, val: '运营推广' },
443
-        ]
411
+        this.options = [...incomeSource]
444 412
         this.placeholderVal = '收入来源'
445 413
       } else if (this.type == 'launchType') { // 投放类型
446
-        this.options = [
447
-          { key: launchTypeCode.mp, val: 'MP投放' },
448
-          { key: launchTypeCode.adq, val: 'ADQ投放' },
449
-        ]
414
+        this.options = [...launchType]
450 415
         this.placeholderVal = '投放类型'
451 416
       } else if (this.type == 'adqAccount') { // adq 账号选项
452 417
         this.getAdqAccountList()
@@ -461,10 +426,7 @@ export default {
461 426
         this.getMpAccountHSList()
462 427
         this.placeholderVal = '请选择账号'
463 428
       } else if (this.type == 'isActive') { // 成员管理 激活状态
464
-        this.options = [
465
-          { key: kfActiveStatusCode.NOT_ACTIVATED, val: '未激活' },
466
-          { key: kfActiveStatusCode.ACTIVATED, val: '已激活' },
467
-        ]
429
+        this.options = [...isActive]
468 430
         this.placeholderVal = '请选择激活状态'
469 431
       } else if (this.type == 'orderSource') { // 付费来源
470 432
         this.getOrderSource()
@@ -479,67 +441,33 @@ export default {
479 441
         this.getPicturesGroup()
480 442
         this.placeholderVal = '图片组'
481 443
       } else if (this.type == 'customerStaffStatus') { // 客服状态
482
-        this.options = [
483
-          { key: customerStaffStatusCode.USING, val: '运营中' },
484
-          { key: customerStaffStatusCode.STOPPED, val: '已停用' },
485
-          { key: customerStaffStatusCode.BANNED, val: '已封禁' },
486
-        ]
444
+        this.options = [...customerStaffStatus]
487 445
         this.placeholderVal = '请选择'
488 446
       } else if (this.type == 'expireDays') { // 到期时间
489
-        this.options = [
490
-          { key: 3, val: '3天' },
491
-          { key: 7, val: '7天' },
492
-          { key: 15, val: '15天' },
493
-        ]
447
+        this.options = [...expireDays]
494 448
         this.placeholderVal = '请选择'
495 449
       } else if (this.type == 'chatGroupOwner') { // 群主
496 450
         this.getChatGroupOwner()
497 451
         this.placeholderVal = '请选择群主'
498 452
       } else if (this.type == 'orderPayType') { // 支付类型
499
-        this.options = [
500
-          { key: 1, val: '小程序虚拟支付' },
501
-          { key: 2, val: '其他类型支付' },
502
-        ]
453
+        this.options = [...orderPayType]
503 454
         this.placeholderVal = '支付类型'
504 455
       } else if (this.type == 'licenseTaskStatus') { // 客服许可任务状态
505
-        this.options = [
506
-          ...licenseTaskStatusOptions
507
-        ]
456
+        this.options = [...licenseTaskStatusOptions]
508 457
       } else if (this.type == 'enableStatus') { // 启用 禁用
509
-        this.options = [
510
-          { key: 1, val: '启用' },
511
-          { key: 0, val: '禁用' },
512
-        ]
458
+        this.options = [...enableStatus]
513 459
         this.placeholderVal = '请选择'
514 460
       } else if (this.type == 'adReportType') { // 回传类型
515
-        this.options = [
516
-          { key: 1, val: '下单' },
517
-          { key: 2, val: '付费' },
518
-        ]
461
+        this.options = [...adReportType]
519 462
         this.placeholderVal = '回传类型'
520 463
       } else if (this.type == 'groupTransfer') { // 状态
521
-        this.options = [
522
-          { key: 1, val: '待分配' },
523
-          { key: 2, val: '分配中' },
524
-          { key: 3, val: '分配完成' },
525
-          { key: 4, val: '无目标客户群' },
526
-          { key: 5, val: '分配失败' },
527
-          { key: 0, val: '禁用' },
528
-        ]
464
+        this.options = [...groupTransfer]
529 465
         this.placeholderVal = '请选择'
530 466
       } else if (this.type == 'msgSendStatus') { // 消息提醒-发送状态
531
-        this.options = [
532
-          { key: 1, val: '待发送' },
533
-          { key: 2, val: '已发送' },
534
-        ]
467
+        this.options = [...msgSendStatus]
535 468
         this.placeholderVal = '发送状态'
536 469
       } else if (this.type == 'msgType') { // 消息提醒-消息类型
537
-        this.options = [
538
-          { key: 1, val: '客户群发消息' },
539
-          { key: 2, val: '客户群群发消息' },
540
-          { key: 3, val: '智能群发消息' },
541
-          { key: 4, val: '客户朋友圈消息' },
542
-        ]
470
+        this.options = [...msgType]
543 471
         this.placeholderVal = '消息类型'
544 472
       } else {
545 473
         this.init()