报废图片上传

This commit is contained in:
zhouzy062 2024-03-15 18:33:30 +08:00
parent beb33397a8
commit 5844b8845a
2 changed files with 42 additions and 3 deletions

View File

@ -32,4 +32,14 @@ export function getScrapRecord(query) {
method: 'get',
params: query
})
}
// 获取报废图片
export function getFileUrl(query) {
return request({
url: '/material/scrap/getFileUrl',
method: 'get',
params: query
})
}

View File

@ -466,12 +466,18 @@
<span v-if="scope.row.scrapType=='1'">任务报废</span>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/> -->
>
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="checkImages(scope.row)">
查看图片
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -567,11 +573,16 @@
<el-button @click="returnSubmit(2)">不通过</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<div style="width: 100%;height: 500px;">
<img v-for="(item,index) in imagesList" :key="index" width="50%" height="200px" :src="uploadUrl+item" alt="">
</div>
</el-dialog>
</div>
</template>
<script>
import { getQuestListApi, getRepairAuditListApi, addDetailsAuditApi,getScrapRecord } from "@/api/repairTest/brokenExamine";
import { getQuestListApi, getRepairAuditListApi, addDetailsAuditApi,getScrapRecord,getFileUrl } from "@/api/repairTest/brokenExamine";
import { getProjectList } from "@/api/claimAndRefund/receive";
import {
getUnitInfoSelectApi, getProjectSelectApi, getDicSelectApi, listPartTypeApi, getMaTypeSelectApi
@ -655,6 +666,9 @@ export default {
pageSize: 10,
},
scrapRecordTotal: 0,
imagesList:[],
dialogVisible:false,
uploadUrl: process.env.VUE_APP_BASE_API + "/system", //
};
},
created() {
@ -722,7 +736,22 @@ export default {
this.title = '报废明细'
}).catch(() => { })
},
checkImages(row){
// console.log(row)
let param = {
fileIds:row.fileIds
}
getFileUrl(param).then(res => {
this.imagesList = res.data;
this.dialogVisible = true
// this.imagesList.forEach(item => {
// item.imgUrl = this.uploadUrl+item
// })
console.log(this.imagesList)
}).catch(() => { })
},
checkClick() {
this.title = '审批';
this.openFour = true