Explorar el Código

一键群发点不了的问题

xw hace 4 días
padre
commit
4f7dc31227
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      src/views/qw/sop/sop.vue

+ 8 - 1
src/views/qw/sop/sop.vue

@@ -759,7 +759,7 @@
             <el-option
               v-for="chatId in sendMsgOpen.row && sendMsgOpen.row.chatId ? sendMsgOpen.row.chatId.split(',') : []"
               :key="chatId"
-              :label="chatList.filter(e => e.chatId == chatId) ? chatList.filter(e => e.chatId == chatId)[0].name : ''"
+              :label="getChatName(chatId)"
               :value="chatId"
             />
           </el-select>
@@ -2227,6 +2227,13 @@ export default {
         content.miniprogramPicUrl = '';
       }
     },
+    /**
+     * 安全获取群聊名称
+     */
+    getChatName(chatId) {
+      const chat = this.chatList.find(e => e.chatId == chatId);
+      return chat ? chat.name : '';
+    },
   }
 };
 </script>