From dad957f2d33ba871beeba251e7c51c1e7bb2b1ab Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期四, 02 六月 2022 10:46:33 +0800
Subject: [PATCH] 'lct;

---
 src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue |   47 ++++++++++++++++++-----------------------------
 1 files changed, 18 insertions(+), 29 deletions(-)

diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
index 9a16baa..95b83e9 100644
--- a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
+++ b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
@@ -83,6 +83,9 @@
                             <el-table-column label="上报说明" prop="info" align="center">
                             </el-table-column>
                             <el-table-column label="上报照片" prop="img" align="center">
+                                <template slot-scope="scope">
+                                    <el-button type="text" @click="downloadFile(scope.row)">下载</el-button>
+                                </template>
                             </el-table-column>
                             <el-table-column label="状态" prop="status" align="center">
                                 <template slot-scope="scope">
@@ -140,33 +143,7 @@
             />
             <br>
         </div>
-        <el-dialog :title="title" :visible.sync="inspectionRecordVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px">
-            <el-form ref="inspectionRecordForm"  :model="inspectionRecordForm" label-position="right" label-width="165px">
-                <el-form-item label="责任部门" prop="hazardDep">
-                    <el-select v-model="inspectionRecordForm.hazardDep" class="analyseUnit_input">
-                        <el-option
-                            v-for="item in departmentList"
-                            :key="item.id"
-                            :value="item.department"
-                            :label="item.department"
-                        ></el-option>
-                    </el-select>
-                </el-form-item>
-                <el-form-item label="责任人" prop="hazardLiablePerson">
-                    <el-input v-model="inspectionRecordForm.hazardLiablePerson" class="analyseUnit_input"></el-input>
-                </el-form-item>
-                <el-form-item label="安全风险分析对象编码" prop="hazardCode">
-                    <el-input v-model="inspectionRecordForm.hazardCode" class="analyseUnit_input"></el-input>
-                </el-form-item>
-                <el-form-item label="安全风险分析单元名称" prop="riskUnitName">
-                    <el-input v-model="inspectionRecordForm.riskUnitName" class="analyseUnit_input"></el-input>
-                </el-form-item>
-            </el-form>
-            <div  align="right">
-                <el-button @click="unitFormVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-        <detail ref="detail"></detail>
+        <detail ref="detail" @getList="getInspectionRecordData"></detail>
     </div>
 </template>
 
@@ -239,7 +216,6 @@
                 title:'',
                 company:'',
                 code:'',
-                inspectionRecordVisible:false,
                 inspectionRecordForm:{
 
                 },
@@ -306,7 +282,7 @@
                 this.$refs.detail.showInspectionRecordForm(value)
             },
             showInspectionRecordDetailForm(value,type) {
-                this.$refs.detail.showInspectionRecordDetailForm(value,type,this.userList)
+                this.$refs.detail.showInspectionRecordDetailForm(value,type,this.userList,this.departmentList)
             },
             async submitInspectionRecordForm(value){
                 if(value.unitList.find(item => item.status === 1) === undefined){
@@ -319,6 +295,7 @@
                         taskId: value.id
                     })
                     if(res.data.code === '200'){
+                        this.getInspectionRecordData()
                         this.$message({
                             type:'success',
                             message:'提交成功',
@@ -338,6 +315,18 @@
                     })
                 }
             },
+            downloadFile(value){
+                if(value.problem.imageInfoList === null){
+                    this.$message({
+                        type:'warning',
+                        message:'无文件可下载'
+                    })
+                }else{
+                    for(let i in value.problem.imageInfoList){
+                        window.open(process.env.IMG_API + value.problem.imageInfoList[i].imgPath, '_blank')
+                    }
+                }
+            },
             refreshHandle(){
                 this.getInspectionRecordData()
             },

--
Gitblit v1.9.2