Sfoglia il codice sorgente

fix: 客服异常预警 - 添加预警组 - 客服号非必填

zhengxy 2 anni fa
parent
commit
2c5b82673e
1 ha cambiato i file con 17 aggiunte e 13 eliminazioni
  1. 17 13
      project/src/components/warningManage/warnList.vue

+ 17 - 13
project/src/components/warningManage/warnList.vue

@@ -30,7 +30,7 @@
30 30
       </el-table-column>
31 31
       <el-table-column label="客服号" align="center">
32 32
         <template slot-scope="scope">
33
-          <div class="customerServiceTagBox biaoqian" v-if="scope.row.djuser_list">
33
+          <div class="customerServiceTagBox biaoqian" v-if="scope.row.djuser_list && scope.row.djuser_list.length">
34 34
             <div class="customerServiceTag" v-for="(item,index) in scope.row.djuser_list" :key="index+'user'">
35 35
               {{ item.djuser_name }}
36 36
             </div>
@@ -69,12 +69,12 @@
69 69
           </div>
70 70
         </div>
71 71
         <div class="itemBox" style="margin-bottom:20px">
72
-          <div class="name"><em>*</em>客服号:</div>
72
+          <div class="name">&nbsp;&nbsp;客服号:</div>
73 73
           <div class="ipt">
74 74
             <customerServiceCorp title=''
75 75
                                  :afferent_users='afferent_users'
76 76
                                  :icon_arrow_bg='false' width="370px"
77
-                                 style="margin:0;width:100%" @customerDefine="(val)=>{get_djuser_list=val}"></customerServiceCorp>
77
+                                 style="margin:0;width:370px;" @customerDefine="(val)=>{get_djuser_list=val}"></customerServiceCorp>
78 78
           </div>
79 79
         </div>
80 80
       </div>
@@ -198,9 +198,13 @@ export default {
198 198
             return v.user_id
199 199
           })
200 200
           this.groupDetail = res.rst;
201
-          this.afferent_users = res.rst.djuser_list.map((v) => {
202
-            return { user_id: v.djuser_id, corpid: v.djcorp_id }
203
-          })
201
+
202
+          if (res.rst.djuser_list && Array.isArray(res.rst.djuser_list)) {
203
+            this.afferent_users = res.rst.djuser_list.map((v) => {
204
+              return { user_id: v.djuser_id, corpid: v.djcorp_id }
205
+            })
206
+          }
207
+
204 208
           this.get_djuser_list = this.afferent_users
205 209
           this.groupName = res.rst.name;
206 210
           this.dialogTitleName = '编辑预警组'
@@ -234,13 +238,13 @@ export default {
234 238
         return
235 239
       }
236 240
 
237
-      if (!this.get_djuser_list || this.get_djuser_list.length == 0) {
238
-        this.$message({
239
-          message: '请选择客服号',
240
-          type: "warning"
241
-        })
242
-        return
243
-      }
241
+      // if (!this.get_djuser_list || this.get_djuser_list.length == 0) {
242
+      //   this.$message({
243
+      //     message: '请选择客服号',
244
+      //     type: "warning"
245
+      //   })
246
+      //   return
247
+      // }
244 248
       let djuser_list = this.get_djuser_list.map((v) => {
245 249
         return { user_id: v.user_id, corpid: v.corpid }
246 250
       })