Browse Source

fix: 客服异常预警 - 预警规则 - 添加人数支持输入0人&文案

zhengxy 2 years ago
parent
commit
d972b5204a

+ 11 - 10
project/src/components/customerAlerts/dialog/warnDialog.vue

4
     :before-close="handleCancel"
4
     :before-close="handleCancel"
5
     class="warn-dialog"
5
     class="warn-dialog"
6
     :title="title"
6
     :title="title"
7
-    width="560px"
7
+    width="590px"
8
     :close-on-click-modal="false"
8
     :close-on-click-modal="false"
9
   >
9
   >
10
     <div class="form-wrap" v-loading="loading">
10
     <div class="form-wrap" v-loading="loading">
14
           <customerServiceCorp
14
           <customerServiceCorp
15
             title=""
15
             title=""
16
             :icon_arrow_bg="false"
16
             :icon_arrow_bg="false"
17
-            width="410px"
17
+            width="430px"
18
             style="margin:0;"
18
             style="margin:0;"
19
             :afferent_users="form.afferent_djuser_list"
19
             :afferent_users="form.afferent_djuser_list"
20
             @customerDefine="onChangeDjuserList"
20
             @customerDefine="onChangeDjuserList"
221
     handleFormValidate() {
221
     handleFormValidate() {
222
       return new Promise((resolve, reject) => {
222
       return new Promise((resolve, reject) => {
223
         const { monitor_user_list, notice_type, warnUserList, warnGroup, rules } = this.form
223
         const { monitor_user_list, notice_type, warnUserList, warnGroup, rules } = this.form
224
-        const isHasNullRules = rules.some(rule => !rule.minute || !rule.num)
224
+        const isHasNullRules = rules.some(rule => !rule.minute || rule.num === '')
225
 
225
 
226
         if (!monitor_user_list || !monitor_user_list.length) {
226
         if (!monitor_user_list || !monitor_user_list.length) {
227
           this.$message.warning('请选择预警客服')
227
           this.$message.warning('请选择预警客服')
330
       this.form.rules[idx].num = getIntegerNumber(inputVal)
330
       this.form.rules[idx].num = getIntegerNumber(inputVal)
331
     },
331
     },
332
     onChangeNum(inputVal, idx) {
332
     onChangeNum(inputVal, idx) {
333
-      if (inputVal !== '' && Number(inputVal) === 0) {
334
-        this.form.rules[idx].num = ''
335
-        this.$message.warning('人数不能为0')
336
-      }
333
+      // if (inputVal !== '' && Number(inputVal) === 0) {
334
+      //   this.form.rules[idx].num = ''
335
+      //   this.$message.warning('人数不能为0')
336
+      // }
337
     },
337
     },
338
     // 监听点击“添加规则”
338
     // 监听点击“添加规则”
339
     onClickAddRules() {
339
     onClickAddRules() {
393
         }
393
         }
394
       }
394
       }
395
       .el-select {
395
       .el-select {
396
-        width: 100%;
396
+        width: 430px;
397
       }
397
       }
398
       .rules-wrap {
398
       .rules-wrap {
399
+        box-sizing: border-box;
399
         background-color: #F2F2F2;
400
         background-color: #F2F2F2;
400
         padding: 14px;
401
         padding: 14px;
401
-        flex: 1;
402
+        width: 430px;
402
         .rules-item {
403
         .rules-item {
403
           display: flex;
404
           display: flex;
404
           align-items: center;
405
           align-items: center;
412
             }
413
             }
413
           }
414
           }
414
           .el-select {
415
           .el-select {
415
-            width: 70px;
416
+            width: 100px;
416
             margin-right: 6px;
417
             margin-right: 6px;
417
           }
418
           }
418
           .text {
419
           .text {

+ 2 - 2
project/src/components/customerAlerts/staticTools.js

1
 const contrastOptions = [
1
 const contrastOptions = [
2
-  { label: '于', value: 1 },
3
-  { label: '于', value: 2 },
2
+  { label: '小于等于', value: 1 },
3
+  { label: '大于等于', value: 2 },
4
 ]
4
 ]
5
 
5
 
6
 const noticeTypes = { // 预警类型
6
 const noticeTypes = { // 预警类型