Browse Source

feat: 系统消息

zhengxy 1 year ago
parent
commit
0b45fe7b7a

+ 7 - 7
project/src/components/customOperate/chatGroup/createMsg.vue

@@ -159,7 +159,7 @@
159 159
         </div>
160 160
       </div> -->
161 161
       <!-- E 群发方式 - 群聊 -->
162
-      <div class="button_box">
162
+      <div v-if="!sysMsgCorpid" class="button_box">
163 163
         <button class="button" v-if="editFlag" @click="massMsg_set">通知成员发送</button>
164 164
       </div>
165 165
     </div>
@@ -185,7 +185,7 @@ export default {
185 185
     chatGroupOptions,
186 186
     customerServiceCorpV2,
187 187
   },
188
-  props: ['title', 'rule_id', 'is_copy'],//is_copy是否是复制
188
+  props: ['title', 'rule_id', 'is_copy', 'sysMsgCorpid'],//is_copy是否是复制 //sysMsgCorpid是否来自“系统消息” 系统消息查看详情不可编辑
189 189
   data () {
190 190
     return {
191 191
       pickerOptions: {
@@ -252,11 +252,11 @@ export default {
252 252
   methods: {
253 253
     detail () {//详情
254 254
       this.loading = true
255
-      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_ruleDetail, {
256
-        params: {
257
-          rule_id: this.rule_id
258
-        }
259
-      }).then((res) => {
255
+      const params = {
256
+        rule_id: this.rule_id
257
+      }
258
+      if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
259
+      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_ruleDetail, { params }).then((res) => {
260 260
         var res = res.data
261 261
         this.loading = false
262 262
         if (res && res.errno == 0) {

+ 16 - 16
project/src/components/customOperate/chatGroup/createMsgDetail.vue

@@ -216,7 +216,7 @@ export default {
216 216
     phonePreview,
217 217
     groupOwnDialog,
218 218
   },
219
-  props: ['title', 'rule_id'],
219
+  props: ['title', 'rule_id', 'sysMsgCorpid'],
220 220
   data () {
221 221
     return {
222 222
       detialFlag: false,
@@ -249,11 +249,11 @@ export default {
249 249
     },
250 250
     detail () {//详情
251 251
       this.loading = true
252
-      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_ruleDetail, {
253
-        params: {
254
-          rule_id: this.rule_id
255
-        }
256
-      }).then((res) => {
252
+      const params = {
253
+        rule_id: this.rule_id
254
+      }
255
+      if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
256
+      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_ruleDetail, { params }).then((res) => {
257 257
         var res = res.data
258 258
         this.loading = false
259 259
         if (res && res.errno == 0) {
@@ -282,16 +282,16 @@ export default {
282 282
         }
283 283
       }
284 284
       this.listLoading = true
285
-      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_chatGroupReceiveDetail, {
286
-        params: {
287
-          rule_id: this.rule_id,
288
-          page: type == 'export' ? 1 : this.page,
289
-          page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
290
-          chat_group_name: this.input_keyword,
291
-          sender_list: this.user_id_list,
292
-          status: this.send_status
293
-        }
294
-      }).then((res) => {
285
+      const params = {
286
+        rule_id: this.rule_id,
287
+        page: type == 'export' ? 1 : this.page,
288
+        page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
289
+        chat_group_name: this.input_keyword,
290
+        sender_list: this.user_id_list,
291
+        status: this.send_status
292
+      }
293
+      if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
294
+      this.$axios.get(this.URL.BASEURL + this.URL.chatGroupMassMsg_chatGroupReceiveDetail, { params }).then((res) => {
295 295
         var res = res.data
296 296
         this.listLoading = false
297 297
         if (res && res.errno == 0) {

+ 7 - 7
project/src/components/customOperate/createMassMsg.vue

@@ -178,7 +178,7 @@
178 178
           <img v-if="processFlag" src="@/assets/img/exterprise-mass-send.png" class="img" alt="">
179 179
         </div>
180 180
       </div>
181
-      <div class="button_box">
181
+      <div v-if="!sysMsgCorpid" class="button_box">
182 182
         <button class="button" v-if="editFlag" @click="massMsg_set">通知成员发送</button>
183 183
       </div>
184 184
     </div>
@@ -206,7 +206,7 @@ export default {
206 206
     selfChannel,
207 207
     customerServiceCorpV2,
208 208
   },
209
-  props: ['title', 'rule_id', 'is_copy'],//is_copy是否是复制
209
+  props: ['title', 'rule_id', 'is_copy', 'sysMsgCorpid'],//is_copy是否是复制 //sysMsgCorpid是否来自“系统消息” 系统消息查看详情不可编辑
210 210
   data () {
211 211
     return {
212 212
       pickerOptions: {
@@ -298,11 +298,11 @@ export default {
298 298
     },
299 299
     detail () {//详情
300 300
       this.loading = true
301
-      this.$axios.get(this.URL.BASEURL + this.URL.massMsg_detail, {
302
-        params: {
303
-          rule_id: this.rule_id
304
-        }
305
-      }).then((res) => {
301
+      const params = {
302
+        rule_id: this.rule_id
303
+      }
304
+      if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
305
+      this.$axios.get(this.URL.BASEURL + this.URL.massMsg_detail, { params }).then((res) => {
306 306
         var res = res.data
307 307
         this.loading = false
308 308
         if (res && res.errno == 0) {

+ 9 - 7
project/src/components/customOperate/massMsgDetail/index.vue

@@ -133,7 +133,7 @@ const tagScreenTypeOptions = {
133 133
 
134 134
 export default {
135 135
   components: { phonePreview, dataTranslate, userDetail },
136
-  props: ['title', 'rule_id'],
136
+  props: ['title', 'rule_id', 'sysMsgCorpid'],
137 137
   data () {
138 138
     return {
139 139
       loading: false,
@@ -153,11 +153,11 @@ export default {
153 153
   methods: {
154 154
     detail () {//详情
155 155
       this.loading = true
156
-      this.$axios.get(this.URL.BASEURL + this.URL.massMsg_detail, {
157
-        params: {
158
-          rule_id: this.rule_id
159
-        }
160
-      }).then(async (res) => {
156
+      const params = {
157
+        rule_id: this.rule_id
158
+      }
159
+      if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
160
+      this.$axios.get(this.URL.BASEURL + this.URL.massMsg_detail, { params }).then(async (res) => {
161 161
         var res = res.data
162 162
         this.loading = false
163 163
         if (res && res.errno == 0) {
@@ -235,7 +235,9 @@ export default {
235 235
     },
236 236
     handleGetTagOptions() {
237 237
       return new Promise((resolve, reject) => {
238
-        this.$axios.get(this.URL.BASEURL + this.URL.tagList, {}).then((res) => {
238
+        const params = {}
239
+        if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
240
+        this.$axios.get(this.URL.BASEURL + this.URL.tagList, { params }).then((res) => {
239 241
           var res = res.data
240 242
           if (res && res.errno == 0) {
241 243
             resolve(res.rst)

+ 52 - 6
project/src/components/manage/systemMsg.vue

@@ -45,14 +45,22 @@
45 45
       </div>
46 46
 
47 47
       <!-- S 详情 - 客户群群发 -->
48
-      <!-- <el-drawer size="1200px" :visible.sync="massMsgFlag" :with-header="false">
49
-        <createMsg v-if="massMsgFlag" :is_copy='false' title="群发详情" :rule_id='detail_rule_id' @close="detailClose" />
48
+      <el-drawer size="1200px" :visible.sync="isShowRuleKHQQF" :with-header="false">
49
+        <detailRuleKHQQF v-if="isShowRuleKHQQF" :is_copy='false' title="群发详情" :rule_id='currentRuleId' :sysMsgCorpid="currentCorpid" @close="detailClose" />
50
+      </el-drawer>
51
+      <el-drawer size="1200px" :visible.sync="isShowDetailKHQQF" :with-header="false">
52
+        <detailKHQQF v-if="isShowDetailKHQQF" title="群发详情" :rule_id='currentRuleId' :sysMsgCorpid="currentCorpid" @close="detailClose" />
50 53
       </el-drawer>
51
-      <el-drawer size="1200px" :visible.sync="detialFlag" :with-header="false">
52
-        <detail v-if="detialFlag" title="群发详情" :rule_id='detail_rule_id' @close="detailClose" />
53
-      </el-drawer> -->
54 54
       <!-- E 详情 - 客户群群发 -->
55 55
 
56
+      <!-- S 详情 - 客户群发 -->
57
+      <el-drawer size="1200px" :visible.sync="isShowRuleKHQF" :with-header="false">
58
+        <detailRuleKHQF v-if="isShowRuleKHQF" :is_copy='false' title="群发详情" :rule_id='currentRuleId' :sysMsgCorpid="currentCorpid" @close="detailClose" />
59
+      </el-drawer>
60
+      <el-drawer size="1200px" :visible.sync="isShowDetailKHQF" :with-header="false">
61
+        <detailKHQF v-if="isShowDetailKHQF" title="群发详情" :rule_id='currentRuleId' :sysMsgCorpid="currentCorpid" @close="detailClose" />
62
+      </el-drawer>
63
+      <!-- E 详情 - 客户群发 -->
56 64
     </div>
57 65
     <!-- E 明细表 detailsTable -->
58 66
   </div>
@@ -64,12 +72,22 @@ import selfSelectCorp from '@/components/assembly/screen/selectCorp.vue'
64 72
 import datePicker from '@/components/assembly/screen/datePicker.vue'
65 73
 import selfChannelV2 from '@/components/assembly/screen/channelV2.vue'
66 74
 
75
+import detailRuleKHQQF from '@/components/customOperate/chatGroup/createMsg.vue' // 客户群群发-规则详情
76
+import detailKHQQF from '@/components/customOperate/chatGroup/createMsgDetail.vue' // 客户群群发 - 群发详情
77
+
78
+import detailRuleKHQF from '@/components/customOperate/createMassMsg.vue' // 客户群发-规则详情
79
+import detailKHQF from '@/components/customOperate/massMsgDetail/index.vue' // 客户群发 - 群发详情
80
+
67 81
 export default {
68 82
   components: {
69 83
     selfInputV2,
70 84
     selfSelectCorp,
71 85
     datePicker,
72 86
     selfChannelV2,
87
+    detailRuleKHQQF,
88
+    detailKHQQF,
89
+    detailRuleKHQF,
90
+    detailKHQF,
73 91
   },
74 92
   data() {
75 93
     const DEFAULT_TIME = [this.$getDay(-30, false), this.$getDay(0, false)]
@@ -103,6 +121,13 @@ export default {
103 121
         send_status: 1,
104 122
         msg_type: '',
105 123
       },
124
+
125
+      currentCorpid: '',
126
+      currentRuleId: '',
127
+      isShowRuleKHQQF: false,
128
+      isShowDetailKHQQF: false,
129
+      isShowRuleKHQF: false,
130
+      isShowDetailKHQF: false,
106 131
     }
107 132
   },
108 133
   created() {
@@ -213,9 +238,11 @@ export default {
213 238
       this.height = document.documentElement.clientHeight - 240 > 400 ? document.documentElement.clientHeight - 240 : 400
214 239
     },
215 240
 
216
-    onClickDetail({ send_status, msg_type }) {
241
+    onClickDetail({ send_status, msg_type, rule_id, corpid }) {
217 242
       console.log('onClickDetail => send_status ', send_status)
218 243
       console.log('onClickDetail => msg_type ', msg_type)
244
+      this.currentRuleId = rule_id
245
+      this.currentCorpid = corpid
219 246
       // 客户群发详情
220 247
       if (msg_type == 1) this.handleShowKHQF(send_status)
221 248
       // 客户群群发
@@ -226,15 +253,34 @@ export default {
226 253
     // 客户群发详情
227 254
     handleShowKHQF(send_status) {
228 255
       console.log('handleShowKHQF => ', send_status)
256
+      if (send_status == 1) { // 待发送
257
+        this.isShowRuleKHQF = true
258
+      } else { // 已发送
259
+        this.isShowDetailKHQF = true
260
+      }
229 261
     },
230 262
     // 客户群群发
231 263
     handleShowKHQQF(send_status) {
232 264
       console.log('handleShowKHQQF => ', send_status)
265
+      if (send_status == 1) { // 待发送
266
+        this.isShowRuleKHQQF = true
267
+      } else { // 已发送
268
+        this.isShowDetailKHQQF = true
269
+      }
233 270
     },
234 271
     // 智能群发
235 272
     handleShowZNQF(send_status) {
236 273
       console.log('handleShowZNQF => ', send_status)
237 274
     },
275
+
276
+    detailClose() {
277
+      this.currentCorpid = ''
278
+      this.currentRuleId = ''
279
+      this.isShowRuleKHQQF = false
280
+      this.isShowDetailKHQQF = false
281
+      this.isShowRuleKHQF = false
282
+      this.isShowDetailKHQF = false
283
+    },
238 284
   },
239 285
 }
240 286
 </script>