fix : 详情修改为一个文件上传入口及测试校验,同步移动端详情展示
This commit is contained in:
@@ -491,17 +491,17 @@ const handleSubmit = async () => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let projectPersonIds = []
|
||||
for (const item of projectPersonUserList.value) {
|
||||
projectPersonIds.push(parseInt(item.id))
|
||||
@@ -616,6 +616,7 @@ const init = async () => {
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
|
||||
if (props.formData.projectChargePerson == null) {
|
||||
projectChargePersonUserList.value = []
|
||||
} else {
|
||||
@@ -628,9 +629,9 @@ watchEffect(() => {
|
||||
}
|
||||
projectPersonUserList.value = props.formData.projectPersonList ? props.formData.projectPersonList : []
|
||||
let flag = Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
if (props.formData.projectChargePerson != null) {
|
||||
localFormData.value.projectChargePerson = props.formData.projectChargePerson.id
|
||||
}
|
||||
// if (props.formData.projectChargePerson != null) {
|
||||
// localFormData.value.projectChargePerson = props.formData.projectChargePerson.id
|
||||
// }
|
||||
|
||||
if (localStorage.getItem('preProcess')) {
|
||||
let param = JSON.parse(localStorage.getItem('preProcess'))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-row style="padding-bottom: 20px">
|
||||
<el-col :span="24">
|
||||
<baseTitle :title="'项目附件'"></baseTitle>
|
||||
</el-col>
|
||||
@@ -16,9 +16,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<el-button v-if="uploadState&&isLineBtn" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-col :span="24" style="margin-bottom: 8px;margin-left: 15px">
|
||||
<el-col v-if="!isLineBtn" :span="24" style="margin-bottom: 8px;margin-left: 15px">
|
||||
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-col>
|
||||
<fvTable style="width: 100%;min-height:311px;max-height: 311px" v-if="showAttachmentTable" height="311"
|
||||
@@ -44,6 +45,17 @@ const attachmentParam = reactive({
|
||||
const uploadState = ref(false)
|
||||
const tagsOption = ref([])
|
||||
const showAttachmentTable = ref(true)
|
||||
|
||||
const props = defineProps({
|
||||
fileNameTableWidth: {
|
||||
type: String,
|
||||
default: '400'
|
||||
},
|
||||
isLineBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const executeTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -57,6 +69,7 @@ const executeTableConfig = reactive({
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
width: props.fileNameTableWidth,
|
||||
currentRender: ({row, index}) => (
|
||||
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
|
||||
},
|
||||
|
||||
@@ -56,19 +56,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<baseTitle title="需求上报申请书" style="margin-bottom: 10px">></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -15px;">
|
||||
<el-col :span="24">
|
||||
<single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/>
|
||||
<!-- <el-form-item>-->
|
||||
<!-- {{localFormData.singleFile}}-->
|
||||
<!-- <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">-->
|
||||
<!-- {{ localFormData.singleFile?.originalFileName }}-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>
|
||||
<baseTitle title="需求上报申请书" style="margin-bottom: -3px;"></baseTitle>
|
||||
<!-- <el-row gutter="20" style="margin-bottom: -15px;">-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/>-->
|
||||
<!-- <!– <el-form-item>–>-->
|
||||
<!-- <!– {{localFormData.singleFile}}–>-->
|
||||
<!-- <!– <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">–>-->
|
||||
<!-- <!– {{ localFormData.singleFile?.originalFileName }}–>-->
|
||||
<!-- <!– </el-button>–>-->
|
||||
<!-- <!– </el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!--/* <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>*/-->
|
||||
<el-row gutter="20" style="margin-bottom: -18px;">
|
||||
<el-col :span="24">
|
||||
<file-component tag="需求上报"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div style="padding: 0 30px" id="printBox">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<el-button v-print="print" ref color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button>
|
||||
<el-button v-print="print" color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button>
|
||||
</div>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<div class="steps-box">
|
||||
@@ -559,16 +559,7 @@ const getBaseInfo = async () => {
|
||||
if (data.procedure.indexOf('40') == -1) {
|
||||
data.procedure.push('40')
|
||||
}
|
||||
}
|
||||
// else if (route.query.step === '10'||route.query.step === '20') {
|
||||
// if (data.procedure.indexOf('40') != -1||data.procedure.indexOf('50') != -1) {
|
||||
// data.procedure.push('30')
|
||||
// }
|
||||
// }
|
||||
else if (route.query.step === '50') {
|
||||
// if (data.procedure.indexOf('30') == -1) {
|
||||
// data.procedure.push('30')
|
||||
// }
|
||||
} else if (route.query.step === '50') {
|
||||
if (data.procedure.indexOf('50') == -1) {
|
||||
data.procedure.push('50')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user