From c7a73739b5498101fc4ad0a2d8a065dcf4acd66c Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Mon, 23 May 2022 14:43:07 +0800
Subject: [PATCH] '巡检记录'
---
src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue b/src/views/doublePreventAction/hiddenDanger/inspectionRecord/index.vue
index e40c8bd..9f03856 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,7 +143,7 @@
/>
<br>
</div>
- <detail ref="detail"></detail>
+ <detail ref="detail" @getList="getInspectionRecordData"></detail>
</div>
</template>
@@ -292,6 +295,7 @@
taskId: value.id
})
if(res.data.code === '200'){
+ this.getInspectionRecordData()
this.$message({
type:'success',
message:'提交成功',
@@ -311,6 +315,19 @@
})
}
},
+ downloadFile(value){
+ debugger
+ 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