From 30e36368e54581fcc0c581a004f1f68873c1e819 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期二, 10 五月 2022 08:37:34 +0800
Subject: [PATCH] 地图

---
 src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue |   64 ++++++++++++++++++++++++--------
 1 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
index 4c61f8c..34e3041 100644
--- a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
+++ b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
@@ -91,15 +91,18 @@
                             </el-table-column>
                             <el-table-column label="隐患排查内容" prop="content" align="center">
                             </el-table-column>
-                            <el-table-column label="巡检内容" prop="info" align="center">
+                            <el-table-column label="上报说明" prop="info" align="center">
                             </el-table-column>
-                            <el-table-column label="巡检照片" prop="img" align="center">
+                            <el-table-column label="上报照片" prop="img" align="center">
                             </el-table-column>
                             <el-table-column label="状态" prop="status" align="center">
+                                <template slot-scope="scope">
+                                     {{ scope.row.status | parseStatusList}}
+                                </template>
                             </el-table-column>
                             <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                                 <template slot-scope="scope">
-                                    <el-button type="text" @click="showMeasureDetail(scope.row)">详情</el-button>
+                                    <el-button type="text" @click="showInspectionRecordDetailForm(scope.row)">详情</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -116,6 +119,12 @@
                 </el-table-column>
                 <el-table-column label="巡检人" prop="execUname" align="center">
                 </el-table-column>
+                <el-table-column label="巡检开始时间" prop="execUname" align="center">
+                </el-table-column>
+                <el-table-column label="巡检结束时间" prop="execUname" align="center">
+                </el-table-column>
+                <el-table-column label="巡检提交时间" prop="execUname" align="center">
+                </el-table-column>
                 <el-table-column label="任务状态" prop="status" align="center">
                      <template slot-scope="scope">
                         {{ scope.row.status | parseStatus}}
@@ -123,7 +132,7 @@
                 </el-table-column>
                 <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                     <template slot-scope="scope">
-                        <el-button type="text" @click="showInspectionRecordForm(scope.row,'编辑')">查看</el-button>
+                        <el-button type="text" @click="showInspectionRecordDetailForm(scope.row,'编辑')">查看</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -168,15 +177,19 @@
                 <el-button @click="unitFormVisible = false">取消</el-button>
             </div>
         </el-dialog>
+        <detail ref="detail"></detail>
     </div>
 </template>
 
 <script>
+    import detail from './components/detail.vue'
     import { mapGetters } from 'vuex'
     import { computePageCount } from '@/utils'
     import { getInspectionRecord } from '@/api/inspectionTask'
     import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage";
+    import {safetyInspectionItemName} from "../../../../api/safetySelfInspection";
     export default {
+  components: { detail },
         name: 'index',
         filters: {
             parseType(type){
@@ -193,6 +206,19 @@
                     return "任务关闭"
                 }
             },
+            parseStatusList(status) {
+                if(status === 1){
+                    return "待巡检"
+                }else if(status === 2) {
+                    return "巡检中"
+                }else if(status === 3) {
+                    return "已完成"
+                }else if(status === 4) {
+                    return "超时未巡检"
+                }else{
+                    return "已取消"
+                }
+            }
         },
         computed: {
             ...mapGetters([
@@ -234,9 +260,13 @@
                 },
             }
         },
+        components: {
+            detail
+        },
         created() {
             this.getInspectionRecordData()
             this.getDepartment()
+            this.getUser()
         },
         methods: {
             async getInspectionRecordData(){
@@ -264,21 +294,23 @@
                     })
                 }
             },
-            showAnalyseUnitForm(value,type){
-                this.inspectionRecordVisible = true
-                this.$nextTick(() =>{
-                    this.$refs["analyseUnitForm"].clearValidate()
-                })
-                if(type === '新增'){
-                    this.title = '新增'
-                    this.inspectionRecordData = {
-            
-                    }
+            async getUser(){
+                let res = await safetyInspectionItemName()
+                if(res.data.code === '200'){
+                    this.userList = res.data.result
                 }else{
-                    this.title = '修改'
-                    this.inspectionRecordData = value
+                    this.$message({
+                        message:res.data.message,
+                        type:'warning'
+                    })
                 }
             },
+            showInspectionRecordForm(value){
+                this.$refs.detail.showInspectionRecordForm(value)
+            },
+            showInspectionRecordDetailForm(value) {
+                this.$refs.detail.showInspectionRecordDetailForm(value)
+            },
             refreshHandle(){
                 this.getInspectionRecordData()
             },

--
Gitblit v1.9.2