duwendi il y a 1 an
Parent
commit
a778f3c272
1 fichiers modifiés avec 43 ajouts et 19 suppressions
  1. 43 19
      src/pages/index/components/message_management.vue

+ 43 - 19
src/pages/index/components/message_management.vue

@@ -199,17 +199,29 @@ export default {
199 199
       },
200 200
       columns1: [
201 201
         {
202
-          label: '报警信息',
203
-          key: 'alarmMessage'
202
+          label: '消息类型',
203
+          key: 'xxlx'
204 204
         },
205 205
         {
206
-          label: '车牌号',
207
-          key: 'plateNo'
206
+          label: '消息标题',
207
+          key: 'title'
208 208
         },
209 209
         {
210
-          label: '报警时间',
210
+          label: '摘要',
211 211
           key: 'alarmTime'
212 212
         },
213
+        {
214
+          label: '发布时间',
215
+          key: 'create_time'
216
+        },
217
+        {
218
+          label: '发布人',
219
+          key: 'create_user_name'
220
+        },
221
+        {
222
+          label: '消息状态',
223
+          key: 'alarmTime'
224
+        }
213 225
       ],
214 226
       tableData1: [],
215 227
       total1: 0,
@@ -220,16 +232,24 @@ export default {
220 232
       },
221 233
       columns2: [
222 234
         {
223
-          label: '报警信息',
224
-          key: 'alarmMessage'
235
+          label: '审批编号',
236
+          key: 'business_id'
225 237
         },
226 238
         {
227
-          label: '车牌号',
228
-          key: 'plateNo'
239
+          label: '摘要',
240
+          key: 'msg_content'
229 241
         },
230 242
         {
231
-          label: '报警时间',
232
-          key: 'alarmTime'
243
+          label: '发送人',
244
+          key: 'create_user_name'
245
+        },
246
+        {
247
+          label: '接收时间',
248
+          key: 'create_time'
249
+        },
250
+        {
251
+          label: '消息状态',
252
+          key: 'read_status'
233 253
         },
234 254
       ],
235 255
       tableData2: [],
@@ -317,7 +337,7 @@ export default {
317 337
     }
318 338
   },
319 339
   mounted() {
320
-    // this.getTableData1()
340
+    this.getTableData1()
321 341
     this.getTableData2()
322 342
     this.getTableData3()
323 343
     this.getTableData4()
@@ -340,6 +360,10 @@ export default {
340 360
         }
341 361
       })
342 362
     },
363
+    onSubmit1() {
364
+      this.pageNum1 = 1
365
+      this.getTableData1()
366
+    },
343 367
     onSubmit2() {
344 368
       this.pageNum2 = 1
345 369
       this.getTableData2()
@@ -465,11 +489,11 @@ export default {
465 489
       this.getTableData1()
466 490
     },
467 491
     getTableData1() {
468
-      this.loading2 = true
492
+      this.loading1 = true
469 493
       const { pageNum1, pageSize1 } = this
470
-      api_l.systemInfoByPage({ cur_page: pageNum1, page_size: pageSize1, ...this.formInline1, push_type: '1' }).then(res => {
471
-        this.tableData1 = res.data.data || []
472
-        this.total1 = res.data.total_count
494
+      api_l.systemInfoByPage({ cur_page: pageNum1, page_size: pageSize1, ...this.formInline1, push_type: '1', push_id: 1610 }).then(res => {
495
+        this.tableData1 = res.data || []
496
+        this.total1 = res.total_count
473 497
         this.loading1 = false
474 498
       })
475 499
     },
@@ -479,9 +503,9 @@ export default {
479 503
     getTableData2() {
480 504
       this.loading2 = true
481 505
       const { pageNum2, pageSize2 } = this
482
-      api_l.gjListByPage({ cur_page: pageNum2, page_size: pageSize2, ...this.formInline2, push_type: '2' }).then(res => {
483
-        this.tableData2 = res.data.data || []
484
-        this.total2 = res.data.total_count
506
+      api_l.gjListByPage({ cur_page: pageNum2, page_size: pageSize2, ...this.formInline2, push_type: '2', push_id: 1610 }).then(res => {
507
+        this.tableData2 = res.data.map(item => ({...item, read_status: item.read_status === '1' ? '已读' : '未读'})) || []
508
+        this.total2 = res.total_count
485 509
         this.loading2 = false
486 510
       })
487 511
     },