Merge pull request 'fix : 修复项目详情单个文件回显' (#428) from dd into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/428
This commit is contained in:
2024-06-29 14:46:50 +00:00
2 changed files with 15 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition">
<el-row>
<el-col :span="24">
<el-form-item :label="label" prop="attachment" label-width="125">
<el-form-item :label="label" prop="attachment" label-width="110">
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
@@ -25,7 +25,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="其他文件" label-width="125">
<el-form-item label="其他文件" label-width="110">
<file-upload @getFile="getOtherFile"/>
<!-- <el-card style="width: 100%;box-shadow: none">-->
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"

View File

@@ -3,7 +3,7 @@
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
<el-row>
<el-col :span="12">
<el-form-item label="前置流程" :required="preProcessRequired" prop="requestName">
<el-form-item label="前置流程" :required="preProcessRequired" prop="requestName" label-width="110">
<div v-for="item in localFormData.preProcess" :key="item.requestId">
<a :href="item.baseUrl" target="_blank"
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
@@ -17,7 +17,7 @@
</el-form>
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList"
@getAttachment="getAttachment"
@getAttachment="getAttachment" :singleList="singleList" :showSingleTable="showSingleTable"
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/>
<div>
@@ -26,7 +26,7 @@
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
<div v-else></div>
<div class="diagram">
<div class="base-title">流程图</div>
<div class="base-title" style="margin-left: 50px">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
@@ -107,6 +107,8 @@ const router = useRouter()
const route = useRoute()
const changeDiagram = ref(false)
const preProcessTable = ref()
const showSingleTable = ref(false)
const singleList = ref([])
const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({
title: {
@@ -276,8 +278,16 @@ const compositeParam = (item) => {
}
const getAttachment = (val) => {
// console.log('上传文件getAttachment', val)
showSingleTable.value=false
localFormData.value.singleFile = compositeParam(val)
singleList.value.push( compositeParam(val))
nextTick(() => {
showSingleTable.value = true
})
}
watch(() => singleList.value, (newVal) => {
showSingleTable.value = newVal.length !== 0;
}, {deep: true})
const getOtherFile = (val) => {
// console.log('上传文件getOtherFile', val)
showTable.value = false