From 57ffebab5fded6f5236bd1b40c4b4e7a6d4ae07f Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期三, 31 七月 2024 09:50:09 +0800
Subject: [PATCH] 驱动下载

---
 src/views/Admin/callRecord.vue |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/views/Admin/callRecord.vue b/src/views/Admin/callRecord.vue
index 7615f63..72ea456 100644
--- a/src/views/Admin/callRecord.vue
+++ b/src/views/Admin/callRecord.vue
@@ -26,8 +26,8 @@
                 style="width: 100%"
             />
           </a-col>
-          <a-col :span="4">
-            <a-button type="primary" @click="getData">查询</a-button>
+          <a-col :span="6">
+            <a-button type="primary" @click="searchData">查询</a-button>
             <a-button style="margin-left: 12px" @click="resetSearch">重置</a-button>
           </a-col>
         </a-row>
@@ -36,7 +36,7 @@
 
     <!-- 表格实体部分-->
     <div class="table-cont">
-      <a-table :columns="columns" :data-source="data" bordered :pagination="pagination">
+      <a-table :columns="columns" :data-source="data" bordered :pagination="pagination" :rowKey="record=>record.id">
         <template #index="text,record,index">
           {{ index + 1 }}
         </template>
@@ -53,18 +53,18 @@
           </a-tag>
         </template >
         <template #operation="text, record, index">
-<!--          <a-button type="primary">叫应列表</a-button>-->
-          <a-button type="link" @click="openMod('view',record)">查看详情</a-button>
+          <a-button type="link" @click="openDetails(record.warnInfoId)">查看详情</a-button>
         </template>
       </a-table>
-      <msg-edit-mod ref="msgEdit" @refresh="getData"></msg-edit-mod>
+      <msg-detail-mod ref="msgDetail"></msg-detail-mod>
     </div>
   </div>
 </template>
 <script>
 import {getHistoryRecord, getMsgRecord, getPublishRecord, getResponseRecord} from "@/api/list";
-import msgEditMod from "@/views/Admin/components/msgEditMod";
-import {getReviewDetailByWorker} from "@/api/review";
+import msgDetailMod from "@/views/Admin/components/msgDetailMod";
+import {getUserInfo} from "@/util/storage";
+
 const columns = [{
   title: '序号',
   dataIndex: 'index',
@@ -104,10 +104,10 @@
   },
   {
     title: '接收人',
-    dataIndex: 'recipienterName',
+    dataIndex: 'responseRealName',
     width: '20%',
     scopedSlots: {
-      customRender: 'recipienterName'
+      customRender: 'responseRealName'
     }
   },
   {
@@ -128,7 +128,7 @@
 ];
 export default {
   name: 'release',
-  components: { msgEditMod },
+  components: { msgDetailMod },
   data() {
     return {
       search:{
@@ -156,9 +156,8 @@
       },
       riskOptions: [
         {name: '地震',value: 1},
-        {name: '洪涝',value: 2},
         {name: '气象',value: 3},
-        {name: '泥石流',value: 4},
+        {name: '地质灾害',value: 4},
         {name: '水旱',value: 5},
         {name: '森林草原火灾',value: 6}
       ],
@@ -168,6 +167,11 @@
         {name: '黄色预警',value: 3},
         {name: '蓝色预警',value: 4}
       ]
+    }
+  },
+  mounted() {
+    if(getUserInfo().role.id == 1){
+      this.columns = this.columns.filter(i=>i.dataIndex !== 'operation')
     }
   },
   created() {
@@ -186,19 +190,10 @@
       }
     },
 
-    openMod(type,data){
+    openDetails(id){
       const t = this
-      getReviewDetailByWorker(data.warnInfoId).then(res=>{
-        if(res.data.code == 100){
-          if(res.data.data){
-            t.$refs.msgEdit.openMod(type,res.data.data)
-          }else{
-            t.$message.error('查询信息详情失败')
-          }
-        }else{
-          this.$message.error(res.data.msg)
-        }
-      })
+      t.$refs.msgDetail.getDetails(id)
+      t.$refs.msgDetail.visible = true
     },
 
     onPageChange(page, pageSize) {
@@ -220,6 +215,11 @@
       console.log('onOk: ', value);
     },
 
+    searchData(){
+      this.search.pageIndex = 1
+      this.getData()
+    },
+
     resetSearch(){
       const t = this
       t.search = {

--
Gitblit v1.9.2