Browse Source

feat: 客户群群发 - 新增发送失败提示

zhengxy 1 year ago
parent
commit
8949d89093
1 changed files with 31 additions and 9 deletions
  1. 31 9
      project/src/components/customOperate/chatGroup/index.vue

+ 31 - 9
project/src/components/customOperate/chatGroup/index.vue

@@ -83,15 +83,26 @@
83 83
       <el-table-column prop="send_user_fail" label="未发送群主" show-overflow-tooltip align="center" min-width="100" />
84 84
       <el-table-column prop="send_chat_success" label="送达群聊" show-overflow-tooltip align="center" min-width="100" />
85 85
       <el-table-column prop="send_chat_fail" label="未送达群聊" show-overflow-tooltip align="center" min-width="100" />
86
-      <el-table-column label="发送状态" show-overflow-tooltip align="center" min-width="100">
87
-        <template slot-scope="scope">
88
-          <span v-if="scope.row.enable == -2" class="c-F03F5C">已删除</span>
89
-          <span v-if="scope.row.enable == -1" class="c-666">发送失败</span>
90
-          <span v-if="scope.row.enable == 0" class="c-F03F5C">禁用</span>
91
-          <span v-if="scope.row.enable == 1" class="c-FFB055">待发送</span>
92
-          <span v-if="scope.row.enable == 2" class="c-448AFF">正在发送中</span>
93
-          <span v-if="scope.row.enable == 3" class="c-58BCA6">待客服确认</span>
94
-          <span v-if="scope.row.enable == 4" class="c-58BCA6">发送完成</span>
86
+      <el-table-column label="发送状态" align="center" min-width="140">
87
+        <template slot-scope="{ row }">
88
+          <div class="status-wrap" >
89
+            <span v-if="row.enable == -2" class="c-F03F5C">已删除</span>
90
+            <span v-else-if="row.enable == -1" :class="[(row.err_msg && row.err_msg.length) ? 'c-F03F5C' : 'c-666']">发送失败</span>
91
+            <span v-else-if="row.enable == 0" class="c-F03F5C">禁用</span>
92
+            <span v-else-if="row.enable == 1" class="c-FFB055">待发送</span>
93
+            <span v-else-if="row.enable == 2" class="c-448AFF">正在发送中</span>
94
+            <span v-else-if="row.enable == 3" class="c-58BCA6" :class="[(row.err_msg && row.err_msg.length) ? 'c-F03F5C' : 'c-58BCA6']">待客服确认</span>
95
+            <span v-else-if="row.enable == 4" class="c-58BCA6" :class="[(row.err_msg && row.err_msg.length) ? 'c-F03F5C' : 'c-58BCA6']">发送完成</span>
96
+
97
+            <template v-if="row.err_msg && row.err_msg.length">
98
+              <template v-for="err in row.err_msg">
99
+                <el-tooltip v-if="err.length > 9" class="item" effect="dark" placement="left" :content="err">
100
+                  <div class="c-666 reason">{{ err }}</div>
101
+                </el-tooltip>
102
+                <div v-else class="c-666" :title="err">{{ err }}</div>
103
+              </template>
104
+            </template>
105
+          </div>
95 106
         </template>
96 107
       </el-table-column>
97 108
       <el-table-column min-width="150" label="操作" align="center" fixed="right">
@@ -424,4 +435,15 @@ export default {
424 435
   margin: 0 4px;
425 436
   min-width: 26px;
426 437
 }
438
+
439
+.status-wrap {
440
+  width: 100%;
441
+  .reason {
442
+    width: 100%;
443
+    overflow:hidden;
444
+    white-space: nowrap;
445
+    text-overflow: ellipsis;
446
+    -o-text-overflow:ellipsis;
447
+  }
448
+}
427 449
 </style>