Browse Source

fix: 智能推送 - 回显bug修复

zhengxy 1 year ago
parent
commit
b843027007
1 changed files with 22 additions and 20 deletions
  1. 22 20
      project/src/components/smartPushV3/createMassMsg.vue

+ 22 - 20
project/src/components/smartPushV3/createMassMsg.vue

@@ -275,6 +275,28 @@ export default {
275 275
           this.detailFromApi = Object.freeze(_lodash.cloneDeep(res.rst))
276 276
 
277 277
           // 数据回显
278
+
279
+          this.operate_type = res.rst.operate_type ? res.rst.operate_type : 1
280
+          this.is_operation = (res.rst.is_operation || res.rst.is_operation === 0) ? res.rst.is_operation : 1
281
+          this.operator_group_id = res.rst.operator_group_id ? res.rst.operator_group_id : ''
282
+
283
+          if (this.operate_type == 2 && this.is_operation == 0 && Array.isArray(JSON.parse(res.rst.multiple_senders))) {
284
+            const multiple_senders = JSON.parse(res.rst.multiple_senders)
285
+            this.multiple_senders = [...multiple_senders]
286
+            const arr = []
287
+            multiple_senders.forEach(corp => {
288
+              if (corp && corp.user_list && Array.isArray(corp.user_list)) {
289
+                corp.user_list.forEach(userId => {
290
+                  arr.push({
291
+                    user_id: userId,
292
+                    corpid: corp.corpid,
293
+                  })
294
+                })
295
+              }
296
+            })
297
+            this.afferent_multiple_senders = [...arr]
298
+          }
299
+
278 300
           if (this.operate_type == 1) {
279 301
             this.user_id_list = (res.rst.senders && !isJSON(res.rst.senders)) ? res.rst.senders.split(',') : [];
280 302
             if (res.rst.senders && res.rst.senders.length > 0) {//有值代表部分员工
@@ -297,26 +319,6 @@ export default {
297 319
             tag_type: this.afferent_tag_obj.tag
298 320
           }
299 321
 
300
-          this.operate_type = res.rst.operate_type ? res.rst.operate_type : 1
301
-          this.is_operation = (res.rst.is_operation || res.rst.is_operation === 0) ? res.rst.is_operation : 1
302
-          this.operator_group_id = res.rst.operator_group_id ? res.rst.operator_group_id : ''
303
-          if (this.operate_type == 2 && this.is_operation == 0 && Array.isArray(JSON.parse(res.rst.multiple_senders))) {
304
-            const multiple_senders = JSON.parse(res.rst.multiple_senders)
305
-            this.multiple_senders = [...multiple_senders]
306
-            const arr = []
307
-            multiple_senders.forEach(corp => {
308
-              if (corp && corp.user_list && Array.isArray(corp.user_list)) {
309
-                corp.user_list.forEach(userId => {
310
-                  arr.push({
311
-                    user_id: userId,
312
-                    corpid: corp.corpid,
313
-                  })
314
-                })
315
-              }
316
-            })
317
-            this.afferent_multiple_senders = [...arr]
318
-          }
319
-
320 322
           if (res.rst.send_conf) {
321 323
             this.send_conf = res.rst.send_conf.map(s => ({
322 324
               ...s,