[问题修复](hyx_门口门禁):

- 流程bug修复
hyx_门口门禁
huangyuxuan 2025-01-14 11:10:35 +08:00
parent 2e35e8f5ca
commit 7b2e382dd4
2 changed files with 40 additions and 21 deletions

View File

@ -5,7 +5,7 @@
<!-- 动态生成表单项 -->
<el-row v-for="(item, index) in uploadConfig" :key="index">
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" :label="`已上传${item.label}`">
<el-form-item v-if="dialogType !== 'savePhoto' && form[item.prop]" :label="`已上传${item.label}`">
<div>
<img :src="config.fileUrl + form[item.prop]" width="100" height="100">
</div>
@ -16,7 +16,7 @@
:file-list="form[item.prop]"
:multiple="false"
:limit="1"
:class="{hide: item.hideUpload}"
:class="{hide: form[item.prop] && form[item.prop].length > 0}"
:auto-upload="false"
:on-remove="(file, fileList) => handleRemove(file, fileList, item.prop)"
:on-change="(file, fileList) => handleChange(file, fileList, item.prop)"
@ -87,7 +87,8 @@ export default {
{label: '营业执照', prop: 'LICENSE_FILE', hideUpload: false},
{label: '道路运输经营许可证', prop: 'TRANSPORT_PERMIT_FILE', hideUpload: false},
{label: '危险化学品经营许可证', prop: 'HAZARDOUS_CHEMICALS_FILE', hideUpload: false}
]
],
urlfromdsfe:{}
}
},
async created() {
@ -157,25 +158,34 @@ export default {
},
getUploadedFiles() {
try {
const response = requestFN('/mkmj/management/getUploadedFiles', {
MOTORCADE_ID: this.form.MOTORCADE_ID
});
this.listLoading = true
requestFN(
'/mkmj/management/getUploadedFiles',{
MOTORCADE_ID :this.form.MOTORCADE_ID
}
).then((data) => {
console.log(data)
console.info(data)
this.urlfromdsfe = data.corpFilingApplicationEntity
console.info(this.urlfromdsfe)
if (this.urlfromdsfe) {
this.uploadConfig.forEach(item => {
if (this.urlfromdsfe[item.prop]) {
this.form[item.prop] = [{
url: this.config.fileUrl + this.urlfromdsfe[item.prop],
name: this.urlfromdsfe[item.prop].split('/').pop()
}];
}
});
}
this.listLoading = false;
}).catch((e) => {
this.listLoading = false
})
//
if (response && response.result === "success" && response.corpFilingApplicationEntity) {
const uploadedFiles = response.corpFilingApplicationEntity;
// uploadConfig
this.uploadConfig.forEach(item => {
if (uploadedFiles[item.prop]) {
// form
this.form[item.prop] = [{
url: this.config.fileUrl + uploadedFiles[item.prop], // URL
name: uploadedFiles[item.prop] //
}];
}
});
}
} catch (error) {
console.error('获取已上传文件失败', error);
}

View File

@ -49,7 +49,7 @@
</el-table-column>
<el-table-column label="操作" align="left" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="apply(row)"></el-button>
<el-button v-if="getButton(row)" type="primary" icon="el-icon-edit" size="mini" @click="apply(row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -206,6 +206,15 @@ export default{
this.getList()
},
methods: {
getButton(row){
if (row.IS_DANGEROUS_CAR === '0' && row.IS_AUDIT === '1'){
return true
}else if (row.IS_DANGEROUS_CAR === '1' && row.IS_AUDIT === '0'){
return true
}else {
return false
}
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()