|
@@ -39,8 +39,14 @@
|
39
|
39
|
</div>
|
40
|
40
|
<div class="screeningCustomers" v-show="customer_filter == 1">
|
41
|
41
|
<div class="screeningItem">
|
42
|
|
- <label>快捷筛选:</label>
|
43
|
|
- <div class="add-days-wrap">
|
|
42
|
+ <label>筛选方式:</label>
|
|
43
|
+ <div class="filter-type-wrap">
|
|
44
|
+ <el-radio v-model="filter_type" :disabled="!editFlag" :label="1">快捷筛选</el-radio>
|
|
45
|
+ <el-radio v-model="filter_type" :disabled="!editFlag" :label="2">客户添加起止时间</el-radio>
|
|
46
|
+ </div>
|
|
47
|
+ </div>
|
|
48
|
+ <div v-show="filter_type == 1" class="screeningItem">
|
|
49
|
+ <div class="add-days-wrap ml-80">
|
44
|
50
|
<span>添加客服</span>
|
45
|
51
|
<el-input
|
46
|
52
|
v-model.trim="add_time_later"
|
|
@@ -52,6 +58,11 @@
|
52
|
58
|
<span>小时后</span>
|
53
|
59
|
</div>
|
54
|
60
|
</div>
|
|
61
|
+ <div v-show="filter_type == 2" class="screeningItem">
|
|
62
|
+ <div class="add-days-wrap ml-80">
|
|
63
|
+ <datePicker title="" width="355px" :disabled="!editFlag" :timeFlag="true" :afferent_time="add_times" :pickerOptions="{}" @changeTime="changeTime" :defaultTime="['00:00:00', '23:59:59']" />
|
|
64
|
+ </div>
|
|
65
|
+ </div>
|
55
|
66
|
</div>
|
56
|
67
|
</div>
|
57
|
68
|
</div>
|
|
@@ -160,9 +171,14 @@ import _lodash from 'lodash'
|
160
|
171
|
import Sortable from 'sortablejs'
|
161
|
172
|
import { getIntegerNumber, isJSON } from '@/assets/js/common'
|
162
|
173
|
import chatGroupOptions from './chatGroupOptions.vue'
|
|
174
|
+import datePicker from '@/components/assembly/screen/datePicker.vue'
|
163
|
175
|
|
164
|
176
|
export default {
|
165
|
|
- components: { selfCustomerservice,chatGroupOptions },
|
|
177
|
+ components: {
|
|
178
|
+ selfCustomerservice,
|
|
179
|
+ chatGroupOptions,
|
|
180
|
+ datePicker,
|
|
181
|
+ },
|
166
|
182
|
props: ['title', 'rule_id'],
|
167
|
183
|
data () {
|
168
|
184
|
return {
|
|
@@ -182,6 +198,9 @@ export default {
|
182
|
198
|
add_time_later: '', // 快捷筛选
|
183
|
199
|
invite_type: 1, // 邀请类型
|
184
|
200
|
invite_time_list: [''], // 邀请时间点
|
|
201
|
+
|
|
202
|
+ filter_type: 1, // 筛选用户方式 1客户添加N小时后拉群 2按指定添加起止时间筛选
|
|
203
|
+ add_times: [],
|
185
|
204
|
}
|
186
|
205
|
},
|
187
|
206
|
created () {
|
|
@@ -306,7 +325,9 @@ export default {
|
306
|
325
|
|
307
|
326
|
// 筛选客户
|
308
|
327
|
this.customer_filter = res.rst.customer_filter || 0
|
309
|
|
- this.add_time_later = res.rst.customer_filter ? res.rst.add_time_later : ''
|
|
328
|
+ this.filter_type = res.rst.filter_type || 1
|
|
329
|
+ this.add_time_later = (res.rst.customer_filter && res.rst.filter_type == 1) ? res.rst.add_time_later : ''
|
|
330
|
+ this.add_times = (res.rst.customer_filter && res.rst.filter_type == 2) ? [res.rst.add_time_st || '', res.rst.add_time_et || ''] : []
|
310
|
331
|
// 邀请类型
|
311
|
332
|
this.invite_type = res.rst.invite_type || 1
|
312
|
333
|
// 邀请时间点
|
|
@@ -351,11 +372,16 @@ export default {
|
351
|
372
|
return
|
352
|
373
|
}
|
353
|
374
|
|
354
|
|
- if (this.customer_filter == 1 && !this.add_time_later) {
|
|
375
|
+ if (this.customer_filter == 1 && this.filter_type == 1 && !this.add_time_later) {
|
355
|
376
|
this.$message.warning('请输入快捷筛选-添加客服时间')
|
356
|
377
|
return
|
357
|
378
|
}
|
358
|
379
|
|
|
380
|
+ if (this.customer_filter == 1 && this.filter_type == 2 && !this.add_times.length) {
|
|
381
|
+ this.$message.warning('请输入客户添加起止时间')
|
|
382
|
+ return
|
|
383
|
+ }
|
|
384
|
+
|
359
|
385
|
if (this.name == '') {
|
360
|
386
|
this.$message({
|
361
|
387
|
message: '请输入标题!',
|
|
@@ -388,9 +414,13 @@ export default {
|
388
|
414
|
users:this.user_id_list&&this.user_id_list.length>0 ? this.user_id_list.join(',') : '',
|
389
|
415
|
invite_config:JSON.stringify(this.main_msg_data.chat_group_config),
|
390
|
416
|
join_type:this.main_msg_data.join_type,
|
391
|
|
-
|
392
|
417
|
customer_filter: this.customer_filter,
|
393
|
|
- add_time_later: this.customer_filter == 1 ? this.add_time_later : '',
|
|
418
|
+ // S 自定义筛选参数
|
|
419
|
+ filter_type: this.customer_filter == 1 ? this.filter_type : '',
|
|
420
|
+ add_time_later: (this.customer_filter == 1 && this.filter_type == 1) ? this.add_time_later : '',
|
|
421
|
+ add_time_st: (this.customer_filter == 1 && this.filter_type == 2) ? this.add_times[0] : '',
|
|
422
|
+ add_time_et: (this.customer_filter == 1 && this.filter_type == 2) ? this.add_times[1] : '',
|
|
423
|
+ // E 自定义筛选参数
|
394
|
424
|
invite_type: this.invite_type,
|
395
|
425
|
invite_time: this.invite_type == 2 ? JSON.stringify(this.invite_time_list) : '',
|
396
|
426
|
}
|
|
@@ -426,6 +456,14 @@ export default {
|
426
|
456
|
onClickDelInviteTime(idx) {
|
427
|
457
|
this.invite_time_list.splice(idx, 1)
|
428
|
458
|
},
|
|
459
|
+
|
|
460
|
+ changeTime(time) {
|
|
461
|
+ if (!time || time && time.length == 0) {
|
|
462
|
+ this.add_times = [];
|
|
463
|
+ } else {
|
|
464
|
+ this.add_times = time;
|
|
465
|
+ }
|
|
466
|
+ },
|
429
|
467
|
}
|
430
|
468
|
}
|
431
|
469
|
</script>
|
|
@@ -498,7 +536,7 @@ export default {
|
498
|
536
|
margin-bottom: 20px;
|
499
|
537
|
|
500
|
538
|
label {
|
501
|
|
- width: 100px;
|
|
539
|
+ width: 80px;
|
502
|
540
|
color: #666666;
|
503
|
541
|
font-size: 14px;
|
504
|
542
|
line-height: 20px;
|
|
@@ -654,4 +692,7 @@ export default {
|
654
|
692
|
}
|
655
|
693
|
}
|
656
|
694
|
}
|
|
695
|
+.ml-80 {
|
|
696
|
+ margin-left: 80px;
|
|
697
|
+}
|
657
|
698
|
</style>
|