fix : 修改为一个文件上传入口, 阶段变更增加变更状态,修复项目实施显示

This commit is contained in:
2024-08-27 22:28:52 +08:00
parent a1a3c0ac9f
commit 50504f4e94
9 changed files with 252 additions and 214 deletions

View File

@@ -259,22 +259,22 @@ const schema = computed(() => {
}
}
arr.push(preProcess)
arr.push({
label: '项目立项附件',
prop: 'singleFile',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => {
let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable>
: <span>--</span>
}
})
// arr.push({
// label: '项目立项附件',
// prop: 'singleFile',
// colProps: {
// span: 24
// },
// labelWidth: 'left',
// component: () => {
// let singleFileArray = [props.formData.singleFile]
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
// tableConfig={editSingleTableConfig}
// data={singleFileArray} isSettingCol={false} pagination={false}>
// </fvTable>
// : <span>--</span>
// }
// })
} else if (props.type == 'execute') {
arr = [{
label: '部门分管领导',
@@ -312,60 +312,60 @@ const schema = computed(() => {
}
}
arr.push(preProcess)
arr.push(
{
label: '项目验收附件',
prop: 'singleFile',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => {
let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable>
: <span>--</span>
}
})
// arr.push(
// {
// label: '项目验收附件',
// prop: 'singleFile',
// colProps: {
// span: 24
// },
// labelWidth: 'left',
// component: () => {
// let singleFileArray = [props.formData.singleFile]
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
// tableConfig={editSingleTableConfig}
// data={singleFileArray} isSettingCol={false} pagination={false}>
// </fvTable>
// : <span>--</span>
// }
// })
} else if (props.type == 'archivist') {
arr = [
{
label: '项目归档附件',
prop: 'singleFile',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => {
let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable>
: <span>--</span>
}
},
// {
// label: '项目归档附件',
// prop: 'singleFile',
// colProps: {
// span: 24
// },
// labelWidth: 'left',
// component: () => {
// let singleFileArray = [props.formData.singleFile]
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
// tableConfig={editSingleTableConfig}
// data={singleFileArray} isSettingCol={false} pagination={false}>
// </fvTable>
// : <span>--</span>
// }
// },
]
} else if (props.type == 'phase') {
arr = [
{
label: '阶段变更附件',
prop: 'singleFile',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => {
let singleFileArray = [props.formData.singleFile]
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
tableConfig={editSingleTableConfig}
data={singleFileArray} isSettingCol={false} pagination={false}>
</fvTable>
: <span>--</span>
}
},
// {
// label: '阶段变更附件',
// prop: 'singleFile',
// colProps: {
// span: 24
// },
// labelWidth: 'left',
// component: () => {
// let singleFileArray = [props.formData.singleFile]
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
// tableConfig={editSingleTableConfig}
// data={singleFileArray} isSettingCol={false} pagination={false}>
// </fvTable>
// : <span>--</span>
// }
// },
]
}
return arr

View File

@@ -1,6 +1,6 @@
<template>
<el-form :label-position="labelAlign">
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
<!-- :style="{width:isOpenPrint?'610px': '100%'}" table-layout="auto" id="printTable"-->
<fvTable style="width:100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"

View File

@@ -491,17 +491,17 @@ const handleSubmit = async () => {
files.push(getFileParam(item))
})
}
if (attachment.value.singleFile == null) {
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))