Browse Source

feat: 客户群详情 - 新增筛选

zhengxy 11 months ago
parent
commit
1aa8e357c9

+ 5 - 0
project/src/assets/js/staticTypes.js

@@ -237,3 +237,8 @@ export const msgType = [
237 237
   { key: 4, val: '客户朋友圈消息' },
238 238
 ]
239 239
 
240
+export const groupUserStatus = [
241
+  { key: 1, val: '正常' },
242
+  { key: 2, val: '退群' },
243
+]
244
+

+ 4 - 0
project/src/components/assembly/screen/channel.vue

@@ -59,6 +59,7 @@ import {
59 59
   groupTransfer,
60 60
   msgSendStatus,
61 61
   msgType,
62
+  groupUserStatus,
62 63
 } from '@/assets/js/staticTypes'
63 64
 export default {
64 65
   props: {
@@ -226,6 +227,9 @@ export default {
226 227
     } else if (this.type == 'msgType') { // 消息提醒-消息类型
227 228
       this.options = [...msgType]
228 229
       this.placeholderVal = '消息类型'
230
+    } else if (this.type == 'groupUserStatus') { // 客户群详情-客户状态
231
+      this.options = [...groupUserStatus]
232
+      this.placeholderVal = '客户状态'
229 233
     } else {
230 234
       this.init()
231 235
     }

+ 4 - 0
project/src/components/assembly/screen/channelMultiple.vue

@@ -44,6 +44,7 @@ import {
44 44
   groupTransfer,
45 45
   msgSendStatus,
46 46
   msgType,
47
+  groupUserStatus,
47 48
 } from '@/assets/js/staticTypes'
48 49
 export default {
49 50
   props: {
@@ -206,6 +207,9 @@ export default {
206 207
     } else if (this.type == 'msgType') { // 消息提醒-消息类型
207 208
       this.options = [...msgType]
208 209
       this.placeholderVal = '消息类型'
210
+    } else if (this.type == 'groupUserStatus') { // 客户群详情-客户状态
211
+      this.options = [...groupUserStatus]
212
+      this.placeholderVal = '客户状态'
209 213
     } else {
210 214
       this.init()
211 215
     }

+ 4 - 0
project/src/components/assembly/screen/channelV2.vue

@@ -45,6 +45,7 @@ import {
45 45
   groupTransfer,
46 46
   msgSendStatus,
47 47
   msgType,
48
+  groupUserStatus,
48 49
 } from '@/assets/js/staticTypes'
49 50
 export default {
50 51
   props: {
@@ -469,6 +470,9 @@ export default {
469 470
       } else if (this.type == 'msgType') { // 消息提醒-消息类型
470 471
         this.options = [...msgType]
471 472
         this.placeholderVal = '消息类型'
473
+      } else if (this.type == 'groupUserStatus') { // 客户群详情-客户状态
474
+        this.options = [...groupUserStatus]
475
+        this.placeholderVal = '客户状态'
472 476
       } else {
473 477
         this.init()
474 478
       }

+ 1 - 1
project/src/components/customManage/manage.vue

@@ -23,7 +23,7 @@
23 23
       <!-- 充值时间 -->
24 24
       <date-picker :reset='resetFlag' title="充值时间" @changeTime="onChangePayTime" />
25 25
       <!-- 流失时间 -->
26
-      <date-picker :reset='resetFlag' title="流失时间" timeFlag :defaultTime="['00:00:00', '23:59:59']" @changeTime="onChangeLossTime" />
26
+      <date-picker :reset='resetFlag' title="流失时间" timeFlag :pickerOptions="{}" :defaultTime="['00:00:00', '23:59:59']" @changeTime="onChangeLossTime" />
27 27
       <div class="reset" @click="resetEvent">重置</div>
28 28
     </div>
29 29
     <div class="tableInfo">

+ 64 - 7
project/src/components/customOperate/chatGroup/chatGroupDetail.vue

@@ -62,6 +62,16 @@
62 62
       <h3 class="bigTitle flex">群成员列表
63 63
         <el-button type="primary" plain size="mini" @click="init(1, 'export')">导出Excel</el-button>
64 64
       </h3>
65
+      <div class="screenBox">
66
+        <div class="flex-align-center" style="flex-wrap: wrap;">
67
+          <!-- 群成员 -->
68
+          <selfInputV2 v-model="keyword" label_name="群成员" placeholder="请输入" @change="onChangeKeyword" />
69
+          <!-- 成员状态 -->
70
+          <selfChannelV2 v-model="status" title="成员状态" type="groupUserStatus" @change="onChangeStatus" />
71
+          <!-- 入群时间 -->
72
+          <datePicker title="入群时间" timeFlag :pickerOptions="{}" :defaultTime="['00:00:00', '23:59:59']" @changeTime="onChangeJoinTime" />
73
+        </div>
74
+      </div>
65 75
       <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%;margin-top:15px;"
66 76
         :header-cell-style="() => { return { backgroundColor: '#f9f9f9 !important' } }">
67 77
         <el-table-column prop="name" label="群成员" show-overflow-tooltip align="center">
@@ -89,6 +99,13 @@
89 99
             <div v-if="scope.row.join_scene == 3">通过扫描群二维码入群</div>
90 100
           </template>
91 101
         </el-table-column>
102
+        <el-table-column prop="status" label="客户状态" width="110" align="center">
103
+          <template slot-scope="{ row }">
104
+            <span v-if="row.status == 1" class="c-00B38A">正常</span>
105
+            <span v-else-if="row.status == 2" class="c-F03F5C">退群</span>
106
+            <span v-else> - </span>
107
+          </template>
108
+        </el-table-column>
92 109
         <el-table-column label="操作" align="center">
93 110
           <template slot-scope="scope">
94 111
             <div class="c-00B38A pointer table_button" @click="detailEvent(scope.row)" v-if="scope.row.avatar">客户详情
@@ -120,22 +137,33 @@
120 137
 <script>
121 138
 import userDetail from '@/components/manage/userDetail/index.vue'
122 139
 import detial from '@/components/detials/index.vue'
140
+import selfInputV2 from '@/components/assembly/screen/inputV2.vue'
141
+import selfChannelV2 from '@/components/assembly/screen/channelV2.vue'
142
+import datePicker from '@/components/assembly/screen/datePicker.vue'
143
+
123 144
 export default {
124 145
   props: ['title', 'chat_id'],
125
-  components: { detial, userDetail },
146
+  components: {
147
+    detial,
148
+    userDetail,
149
+    selfInputV2,
150
+    selfChannelV2,
151
+    datePicker,
152
+  },
126 153
   data () {
127 154
     return {
128 155
       loading: false,
129 156
       dataInfo: {},
130
-      input_keyword: '',
131 157
       page: 1,
132 158
       pages: 0,
133 159
       total: 0,
134 160
       page_size: 20,
161
+      keyword: '',
162
+      status: '',
163
+      join_time_start: '',
164
+      join_time_end: '',
135 165
       listLoading: false,
136 166
       tableData: [],
137
-      user_id_list: [],
138
-      send_status: '',
139 167
       drawerSize: '60%',
140 168
       userDetailFlag: false,
141 169
       detialDrawer: false,
@@ -207,6 +235,10 @@ export default {
207 235
       this.$axios.get(this.URL.BASEURL + this.URL.chatGroup_memberList, {
208 236
         params: {
209 237
           chat_id: this.chat_id,
238
+          keyword: this.keyword,
239
+          status: this.status,
240
+          join_time_start: this.join_time_start,
241
+          join_time_end: this.join_time_end,
210 242
           page: type == 'export' ? 1 : this.page,
211 243
           page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
212 244
         }
@@ -236,11 +268,12 @@ export default {
236 268
     },
237 269
     exportEvent (data) {
238 270
       let list = data;
239
-      let tHeader = ['群成员', '成员类型', '在群里的昵称', '入群时间', '入群方式']
240
-      let filterVal = ['name', 'self_type', 'group_nickname', 'join_time', 'self_join_scene']
271
+      let tHeader = ['群成员', '成员类型', '在群里的昵称', '入群时间', '入群方式', '客户状态']
272
+      let filterVal = ['name', 'self_type', 'group_nickname', 'join_time', 'self_join_scene', 'status_desc']
241 273
       list.forEach((item) => {
242 274
         item.self_type = item.type == 1 ? '企业成员' : item.type == 2 ? '外部联系人' : '';
243 275
         item.self_join_scene = item.join_scene == 1 ? '由群成员邀请入群(直接邀请入群)' : item.join_scene == 2 ? '由群成员邀请入群(通过邀请链接入群)' : item.join_scene == 3 ? '通过扫描群二维码入群' : '';
276
+        item.status_desc = item.status == 1 ? '正常' : (item.status == 2 ? '退群' : '')
244 277
       })
245 278
       let excelDatas = [
246 279
         {
@@ -251,13 +284,37 @@ export default {
251 284
         }
252 285
       ]
253 286
       this.$exportOrder({ excelDatas, name: `客户群详情(导出时间:${this.$getDay(0)})` })
254
-    }
287
+    },
288
+
289
+    onChangeKeyword(val) {
290
+      this.keyword = val
291
+      this.init(1)
292
+    },
293
+    onChangeStatus(val) {
294
+      this.status = val
295
+      this.init(1)
296
+    },
297
+    onChangeJoinTime(time) {
298
+      if (!time || time && time.length == 0) {
299
+        this.join_time_start = '';
300
+        this.join_time_end = '';
301
+      } else {
302
+        this.join_time_start = time[0]
303
+        this.join_time_end = time[1]
304
+      }
305
+      this.init(1)
306
+    },
255 307
   }
256 308
 }
257 309
 </script>
258 310
 <style lang="scss" scoped>
259 311
 @import "../create.scss";
260 312
 @import "@/style/list.scss";
313
+.screenBox {
314
+  .common-screen-item {
315
+    width: auto;
316
+  }
317
+}
261 318
 
262 319
 .modular {
263 320
   padding: 20px;