ソースを参照

消息提醒添加

liuzhen 5 年 前
コミット
2806f7e2ff
共有3 個のファイルを変更した348 個の追加173 個の削除を含む
  1. 8 0
      CallCenterWeb.UI/src/api/commonAPI.js
  2. 333 165
      CallCenterWeb.UI/src/components/TopNotice/index.vue
  3. 7 8
      CallCenterWeb.UI/src/views/todoManagement/todoList/detail.vue

+ 8 - 0
CallCenterWeb.UI/src/api/commonAPI.js

@@ -111,3 +111,11 @@ export function getMsg() {
111 111
     method: 'get'
112 112
   })
113 113
 }
114
+// 处理消息
115
+export function getReadData(params) {
116
+  return request({
117
+    url: 'api/InternalMessages/updateState',
118
+    method: 'post',
119
+    params
120
+  })
121
+}

+ 333 - 165
CallCenterWeb.UI/src/components/TopNotice/index.vue

@@ -6,18 +6,12 @@
6 6
     <el-scrollbar wrap-class="scrollbar-wrapper">
7 7
       <ul v-if="noticeData.length" class="content">
8 8
         <li v-for="(item, index) in noticeData" :key="index" class="proitem">
9
-          <h5 class="proname">
10
-            标题:{{ item.SMS_Title }}
11
-          </h5>
12
-          <span class="orderendtime">
13
-            内容:{{ item.SMS_Content }}
14
-          </span>
15
-          <el-button class="unread">未读</el-button>
9
+          <h5 class="proname">标题:{{ item.SMS_Title }}</h5>
10
+          <span class="orderendtime">内容:{{ item.SMS_Content }}</span>
11
+          <el-button class="unread" @click="handleChange(item.F_ID)">未读</el-button>
16 12
         </li>
17 13
       </ul>
18
-      <div v-else class="nomsg">
19
-        没有新消息
20
-      </div>
14
+      <div v-else class="nomsg">没有新消息</div>
21 15
     </el-scrollbar>
22 16
     <!-- <div class="footer_menu">
23 17
       <router-link class="inlineBlock" to="/notice/manage">
@@ -25,232 +19,406 @@
25 19
           <i class="el-icon-more"/>更多公告信息
26 20
         </el-dropdown-item>
27 21
       </router-link>
28
-    </div> -->
22
+    </div>-->
29 23
   </div>
30 24
 </template>
31 25
 
32 26
 <script>
33
-
34 27
 // import { getNotice, getSchedule } from '@/api/customer/customerInfoHY'
35
-import { getFileTranserLists } from '@/api/memberManagement/memberList'
36
-import { getMsg } from '@/api/commonAPI'
37
-import router from '@/router'
28
+import { getFileTranserLists } from "@/api/memberManagement/memberList";
29
+import { getMsg, getReadData } from "@/api/commonAPI";
30
+import daibangdetail from "@/views/todoManagement/todoList/detail";
31
+import orderDetail from "@/views/orderManagement/orderList/detail";
32
+import taskDetail from "@/views/taskManagement/taskList/common/detail";
33
+import memberDetail from "@/views/memberManagement/memberList/components/detail";
34
+import router from "@/router";
38 35
 export default {
39
-  name: 'TopNotice',
36
+  name: "TopNotice",
40 37
   data() {
41 38
     return {
42 39
       loading: false,
43 40
       proNoticeDatas: [],
44 41
       proScheduleDatas: [],
45
-      noticeData:[],//消息数据
46
-    }
42
+      noticeData: [], //消息数据
43
+      readId: "",
44
+      timer: "", //定时器
45
+    };
47 46
   },
48 47
   created() {
49
-    this.getList()
48
+    this.getList();
50 49
   },
51 50
   methods: {
52
-    // 项目到期的消息
51
+    // 项目的消息
53 52
     getList() {
54
-      this.loading = true
55
-      const params = {
56
-        daykind: 0 // 传值0时获取到期前一月的客户信息,传值1获取当天到期的客户信息
57
-      }
53
+      this.loading = true;
58 54
       //转移消息提醒
59
-      getFileTranserLists().then(res=>{
60
-        if (res.state.toLowerCase() === 'success') {
61
-          if(res.rows.Rows && res.rows.Rows.length){
62
-            window.localStorage.setItem('num',res.rows.Rows.length)
63
-          }
64
-        }
65
-      })
66
-      // getMsg(params).then(res => {
67
-      //   this.loading = false
68
-      //   if (res.state.toLowerCase() === 'success') {
69
-      //     if (res.rows && res.rows.length) {
70
-      //       this.noticeData = []
71
-      //       res.rows.forEach(item => {
72
-      //         this.noticeData.unshift({
73
-      //           SMS_Title: item.SMS_Title,
74
-      //           SMS_Content: item.SMS_Content
75
-      //         })
76
-      //         if(item.SMS_Type==1){
77
-      //           this.$notify({
78
-      //             title: '消息提醒',
79
-      //             dangerouslyUseHTMLString: true,
80
-      //             message: `<strong>内容 <a @click="ceshi">${item.SMS_Content}</a> </strong>`,
81
-      //             type: 'warning',
82
-      //             duration: 0,
83
-      //             position: 'bottom-right'
84
-      //           })
85
-      //         }
86
-      //       })
55
+      // getFileTranserLists().then((res) => {
56
+      //   if (res.state.toLowerCase() === "success") {
57
+      //     if (res.rows.Rows && res.rows.Rows.length) {
58
+      //       window.localStorage.setItem("num", res.rows.Rows.length);
87 59
       //     }
88 60
       //   }
89
-      // })
61
+      // });
90 62
       // 消息提醒
91
-      getMsg().then(response=>{
92
-        if(response.state=='success'){
93
-          const res=response.rows
94
-          if(res&&res.length>0){
95
-            this.noticeData=[]
96
-            res.map(item=>{
63
+      getMsg().then((response) => {
64
+        if (response.state == "success") {
65
+          const res = response.rows;
66
+          if (res) {
67
+            res.map((item) => {
97 68
               this.noticeData.unshift({
98
-                SMS_Title:item.SMS_Title,
99
-                SMS_Content:item.SMS_Content,
100
-              })
101
-              if(item.SMS_Type==1){
102
-                 const h = this.$createElement;
103
-                this.$msgbox({
104
-                  title: '消息',
105
-                  message: h('p', null, [
106
-                    h('span', null, '内容是 '),
107
-                    h('a', null,item.SMS_Content)
108
-                  ]),
109
-                  closeOnClickModal:false,
110
-                  showCancelButton: true,
111
-                  confirmButtonText: '确定',
112
-                  cancelButtonText: '取消',
113
-                }).then(action => {
114
-                  console.log('确定了')
115
-                  this.getList()
116
-                }).catch(result=>{
117
-                  console.log('取消了')
118
-                });
119
-              }
120
-            })
69
+                SMS_Title: item.SMS_Title,
70
+                SMS_Content: item.SMS_Content,
71
+                F_ID: item.F_ID,
72
+              });
73
+            });
121 74
           }
122
-          
123 75
         }
76
+      });
77
+    },
78
+    //已读处理
79
+    getRead() {
80
+      this.$confirm("确定已读吗?", "提示", {
81
+        confirmButtonText: "确定",
82
+        cancelButtonText: "取消",
83
+        type: "warning",
124 84
       })
125
-      // getNotice(params).then(res => {
126
-      //   this.loading = false
127
-      //   if (res.state.toLowerCase() === 'success') {
128
-      //     if (res.data.rows && res.data.rows.length) {
129
-      //       this.proNoticeDatas = []
130
-      //       res.data.rows.forEach(item => {
131
-      //         this.proNoticeDatas.unshift({
132
-      //           project_name: item.title,
133
-      //           orderendtime: item.createon
134
-      //         })
135
-      //       })
136
-      //       this.$notify({
137
-      //         title: '公告消息提醒',
138
-      //         message: `您有${this.proNoticeDatas.length}个公告消息!`,
139
-      //         type: 'warning',
140
-      //         duration: 0,
141
-      //         position: 'bottom-right'
142
-      //       })
143
-      //       // 修改父组件的值
144
-      //       this.$emit('getTopNoticeNums', {
145
-      //         num: this.proNoticeDatas.length > 99 ? '99+' : this.proNoticeDatas.length // 顶部消息数量
146
-      //       })
147
-      //     }
148
-      //   }
149
-      // })
85
+        .then(() => {
86
+          this.getReadataList;
87
+          this.$message({
88
+            type: "success",
89
+            message: "处理成功!",
90
+          });
91
+        })
92
+        .catch(() => {
93
+          this.$message({
94
+            type: "info",
95
+            message: "已取消处理",
96
+          });
97
+        });
98
+    },
99
+    handleChange(val) {
100
+      if (val) {
101
+        this.readId = val;
102
+        this.getRead();
103
+      }
150 104
     },
105
+    getReadataList(){
106
+      const params = {
107
+            ids: this.readId,
108
+            state: 1,
109
+          };
110
+      getReadData(params)
111
+            .then((response) => {
112
+              if (response.state == "success") {
113
+                this.getList();
114
+              }
115
+            })
116
+            .catch((result) => {
117
+              console.log("处理失败");
118
+            });
119
+    }
151 120
   },
152 121
   mounted() {
153
-    this.timer=setInterval(()=>{
154
-      // //获取转移新消息
155
-      // getFileTranserLists().then(res=>{
156
-      //   if(res.rows.Rows && res.rows.Rows.length){
157
-      //     var a =window.localStorage.getItem('num')
158
-      //     if(res.rows.Rows.length > a){
159
-      //       window.localStorage.setItem('num',res.rows.Rows.length)
160
-      //       this.transerLists = []
161
-      //       res.rows.Rows.slice(-(res.rows.Rows.length - a)).forEach(item=>{
162
-      //         this.transerLists.unshift({
163
-      //           id:item.F_ID,
164
-      //           content:item.F_Notice
165
-      //         })
166
-      //       })
167
-      //       this.$notify({
168
-      //         title:'转移消息提醒',
169
-      //         message:`您有${this.transerLists.length}个转移消息`,
170
-      //         type:'warning',
171
-      //         duration:0,
172
-      //         position:'bottom-right'
173
-      //       })
174
-      //     }
175
-      //     }
176
-      // })
177
-    },1000000)
122
+    this.timer = setInterval(() => {
123
+      getMsg().then((response) => {
124
+        if (response.state == "success") {
125
+          const res = response.rows;
126
+          if (res && res.length) {
127
+            this.noticeData = [];
128
+            res.map((item) => {
129
+              this.noticeData.unshift({
130
+                SMS_Title: item.SMS_Title,
131
+                SMS_Content: item.SMS_Content,
132
+                F_ID: item.F_ID,
133
+              });
134
+            });
135
+             const infoData = res[0];
136
+            var a = window.localStorage.getItem("num");
137
+            if (a != infoData.F_ID) {
138
+              window.localStorage.setItem('num',infoData.F_ID)
139
+              if (infoData.SMS_Type == 3) {
140
+                this.readId = infoData.F_ID;
141
+                const h = this.$createElement;
142
+                this.$msgbox({
143
+                  title: "待办消息",
144
+                  message: h("p", null, [
145
+                    h("span", null, "内容是 "),
146
+                    h("span", null, infoData.SMS_Content),
147
+                  ]),
148
+                  customClass: "messageBox",
149
+                  closeOnClickModal: false,
150
+                  showCancelButton: true,
151
+                  confirmButtonText: "详情",
152
+                  cancelButtonText: "关闭",
153
+                })
154
+                  .then((action) => {
155
+                    this.$layer.iframe({
156
+                      content: {
157
+                        content: daibangdetail, // 传递的组件对象
158
+                        parent: this, // 当前的vue对象
159
+                        data: { rowid: infoData.F_ID.toString() }, // props
160
+                      },
161
+                      area: ["80%", "90%"],
162
+                      title: "详情",
163
+                    });
164
+                    this.getReadataList();
165
+                  })
166
+                  .catch((result) => {
167
+                    console.log("取消了");
168
+                  });
169
+              }else if(infoData.SMS_Type == 0){
170
+                this.readId = infoData.F_ID;
171
+                const h = this.$createElement;
172
+                this.$msgbox({
173
+                  title: "订单消息",
174
+                  message: h("p", null, [
175
+                    h("span", null, "内容是 "),
176
+                    h("span", null, infoData.SMS_Content),
177
+                  ]),
178
+                  customClass: "messageBox",
179
+                  closeOnClickModal: false,
180
+                  showCancelButton: true,
181
+                  confirmButtonText: "详情",
182
+                  cancelButtonText: "关闭",
183
+                })
184
+                  .then((action) => {
185
+                    this.$layer.iframe({
186
+                      content: {
187
+                        content: orderDetail, // 传递的组件对象
188
+                        parent: this, // 当前的vue对象
189
+                        data: { rowid: infoData.F_ID.toString() }, // props
190
+                      },
191
+                      area: ["80%", "90%"],
192
+                      title: "详情",
193
+                    });
194
+                    this.getReadataList();
195
+                  })
196
+                  .catch((result) => {
197
+                    console.log("取消了");
198
+                  });
199
+              }else if(infoData.SMS_Type == 1){
200
+                this.readId = infoData.F_ID;
201
+                const h = this.$createElement;
202
+                this.$msgbox({
203
+                  title: "媒体消息",
204
+                  message: h("p", null, [
205
+                    h("span", null, "内容是 "),
206
+                    h("span", null, infoData.SMS_Content),
207
+                  ]),
208
+                  customClass: "messageBox",
209
+                  closeOnClickModal: false,
210
+                  showCancelButton: true,
211
+                  confirmButtonText: "详情",
212
+                  cancelButtonText: "关闭",
213
+                })
214
+                  .then((action) => {
215
+                    router.push({name:'mediaInformation'})
216
+                    this.getReadataList();
217
+                  })
218
+                  .catch((result) => {
219
+                    console.log("取消了");
220
+                  });
221
+              }else if(infoData.SMS_Type == 2){
222
+                this.readId = infoData.F_ID;
223
+                const h = this.$createElement;
224
+                this.$msgbox({
225
+                  title: "任务消息",
226
+                  message: h("p", null, [
227
+                    h("span", null, "内容是 "),
228
+                    h("span", null, infoData.SMS_Content),
229
+                  ]),
230
+                  customClass: "messageBox",
231
+                  closeOnClickModal: false,
232
+                  showCancelButton: true,
233
+                  confirmButtonText: "详情",
234
+                  cancelButtonText: "关闭",
235
+                })
236
+                  .then((action) => {
237
+                    this.$layer.iframe({
238
+                      content: {
239
+                        content: taskDetail, // 传递的组件对象
240
+                        parent: this, // 当前的vue对象
241
+                        data: { rowid: infoData.F_ID.toString() }, // props
242
+                      },
243
+                      area: ["80%", "90%"],
244
+                      title: "详情",
245
+                    });
246
+                    this.getReadataList();
247
+                  })
248
+                  .catch((result) => {
249
+                    console.log("取消了");
250
+                  });
251
+              }else if(infoData.SMS_Type == 4){
252
+                this.readId = infoData.F_ID;
253
+                const h = this.$createElement;
254
+                this.$msgbox({
255
+                  title: "质检消息",
256
+                  message: h("p", null, [
257
+                    h("span", null, "内容是 "),
258
+                    h("span", null, infoData.SMS_Content),
259
+                  ]),
260
+                  customClass: "messageBox",
261
+                  closeOnClickModal: false,
262
+                  showCancelButton: true,
263
+                  confirmButtonText: "详情",
264
+                  cancelButtonText: "关闭",
265
+                })
266
+                  .then((action) => {
267
+                    this.$layer.iframe({
268
+                      content: {
269
+                        content: daibangdetail, // 传递的组件对象
270
+                        parent: this, // 当前的vue对象
271
+                        data: { rowid: infoData.F_ID.toString() }, // props
272
+                      },
273
+                      area: ["80%", "90%"],
274
+                      title: "详情",
275
+                    });
276
+                    this.getReadataList();
277
+                  })
278
+                  .catch((result) => {
279
+                    console.log("取消了");
280
+                  });
281
+              }else if(infoData.SMS_Type == 5){
282
+                this.readId = infoData.F_ID;
283
+                const h = this.$createElement;
284
+                this.$msgbox({
285
+                  title: "绩效消息",
286
+                  message: h("p", null, [
287
+                    h("span", null, "内容是 "),
288
+                    h("span", null, infoData.SMS_Content),
289
+                  ]),
290
+                  customClass: "messageBox",
291
+                  closeOnClickModal: false,
292
+                  showCancelButton: true,
293
+                  confirmButtonText: "详情",
294
+                  cancelButtonText: "关闭",
295
+                })
296
+                  .then((action) => {
297
+                    this.$layer.iframe({
298
+                      content: {
299
+                        content: daibangdetail, // 传递的组件对象
300
+                        parent: this, // 当前的vue对象
301
+                        data: { rowid: infoData.F_ID.toString() }, // props
302
+                      },
303
+                      area: ["80%", "90%"],
304
+                      title: "详情",
305
+                    });
306
+                    this.getReadataList();
307
+                  })
308
+                  .catch((result) => {
309
+                    console.log("取消了");
310
+                  });
311
+              }else if(infoData.SMS_Type == 6){
312
+                this.readId = infoData.F_ID;
313
+                const h = this.$createElement;
314
+                this.$msgbox({
315
+                  title: "转移消息",
316
+                  message: h("p", null, [
317
+                    h("span", null, "内容是 "),
318
+                    h("span", null, infoData.SMS_Content),
319
+                  ]),
320
+                  customClass: "messageBox",
321
+                  closeOnClickModal: false,
322
+                  showCancelButton: true,
323
+                  confirmButtonText: "详情",
324
+                  cancelButtonText: "关闭",
325
+                })
326
+                  .then((action) => {
327
+                    this.$layer.iframe({
328
+                      content: {
329
+                        content: memberDetail, // 传递的组件对象
330
+                        parent: this, // 当前的vue对象
331
+                        data: { rowid: infoData.F_ID.toString() }, // props
332
+                      },
333
+                      area: ["80%", "90%"],
334
+                      title: "详情",
335
+                    });
336
+                    this.getReadataList();
337
+                  })
338
+                  .catch((result) => {
339
+                    console.log("取消了");
340
+                  });
341
+              }
342
+            }
343
+          }
344
+        }
345
+      });
346
+    }, 120000);
178 347
   },
179
-}
348
+};
180 349
 </script>
181 350
 
182
-<style rel="stylesheet/scss" lang="scss">
183
-  .topNoticePop{
184
-    padding: 0;
185
-    .topNotice{
186
-      .scrollbar-wrapper {
187
-        max-height: 488px;
188
-      }
189
-      .footer_menu{
190
-        .el-dropdown-menu__item{
191
-          padding: 20px;
192
-          line-height: 20px;
193
-        }
351
+<style rel="stylesheet/scss" lang="scss" >
352
+.topNoticePop {
353
+  padding: 0;
354
+  .topNotice {
355
+    .scrollbar-wrapper {
356
+      max-height: 488px;
357
+    }
358
+    .footer_menu {
359
+      .el-dropdown-menu__item {
360
+        padding: 20px;
361
+        line-height: 20px;
194 362
       }
195 363
     }
196 364
   }
197
-  // .el-message-box{
198
-  //   position: absolute !important;
199
-  //   bottom: 0 !important;
200
-  //   right: 0 !important;
201
-  // }
365
+}
366
+.messageBox {
367
+  position: absolute !important;
368
+  bottom: 0 !important;
369
+  right: 0 !important;
370
+}
202 371
 </style>
203 372
 
204 373
 <style rel="stylesheet/scss" lang="scss" scoped>
205
-.topNoticePop{
206
-  .topNotice{
207
-    .header{
374
+.topNoticePop {
375
+  .topNotice {
376
+    .header {
208 377
       padding: 20px;
209 378
       background-color: #fff;
210 379
       border-bottom: 1px solid #e4eaec;
211
-      .title{
380
+      .title {
212 381
         margin: 0;
213 382
         color: #37474f;
214 383
         font-weight: 400;
215 384
         font-size: 1em;
216
-        text-shadow: rgba(0,0,0,.05) 0 0 1px;
385
+        text-shadow: rgba(0, 0, 0, 0.05) 0 0 1px;
217 386
       }
218 387
     }
219
-    .content{
388
+    .content {
220 389
       list-style: none;
221 390
       padding: 0 20px;
222 391
       margin: 0;
223
-      .proitem{
392
+      .proitem {
224 393
         border-bottom: 1px solid #e4eaec;
225
-        &:last-child{
394
+        &:last-child {
226 395
           border-bottom: none;
227 396
         }
228 397
         padding: 10px 0;
229
-        .proname{
398
+        .proname {
230 399
           margin: 0;
231 400
           padding: 0;
232 401
           font-weight: 400;
233 402
           font-size: 14px;
234 403
         }
235
-        .orderendtime{
404
+        .orderendtime {
236 405
           font-size: 12px;
237 406
         }
238 407
       }
239 408
     }
240
-    .nomsg{
409
+    .nomsg {
241 410
       min-height: 270px;
242 411
       display: flex;
243 412
       align-items: center;
244 413
       justify-content: center;
245 414
     }
246
-    .footer_menu{
415
+    .footer_menu {
247 416
       background-color: #f3f7f9;
248 417
       border-top: 1px solid #e4eaec;
249 418
     }
250 419
   }
251 420
 }
252
-.unread{
421
+.unread {
253 422
   float: right;
254 423
 }
255
-
256 424
 </style>

+ 7 - 8
CallCenterWeb.UI/src/views/todoManagement/todoList/detail.vue

@@ -75,15 +75,14 @@ export default {
75 75
   data() {
76 76
     return {
77 77
         activeName:0,
78
-        name:'',
79
-        taskName:'',
80
-        targetAmount:'',
81
-        taskProgress:'',
82
-        startTime:'',
83
-        endTime:'',
84
-        content:'',
85
-        state:'',
86 78
         type:'',
79
+        state:'',
80
+        isRemind:'',
81
+        remindDate:'',
82
+        title:'',
83
+        content:'',
84
+        name:'',
85
+        phone:'',
87 86
     }
88 87
   },
89 88
   computed: {