fix : 修复上传两个文件之后删除一个文件报错问题,分摊研发人员clearable, 修复表格更新项目时间展示问题

This commit is contained in:
2024-09-08 20:51:11 +08:00
parent 09cef9de33
commit 3c6a8bedc2
4 changed files with 29 additions and 22 deletions

View File

@@ -370,8 +370,12 @@ const handleDelete = (row, type) => {
_singleFileValue.value.splice(_singleFileValue.value.findIndex((item) => item.fileId === row.fileId), 1);
isSingleFile.value = false
} else {
isHaveOneFile.value=false
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
if(allFileList.value&&allFileList.value?.length==0){
isHaveOneFile.value=false
}else{
isHaveOneFile.value=true
}
}
}
});

View File

@@ -480,7 +480,6 @@ const getFileParam = (item) => {
}
}
const handleSubmit = async () => {
console.log(' projectPersonUserList.value', projectPersonUserList.value)
let files = []
if (props.mode === 'resubmit') {
attachment.value.allFileList.forEach(item => {
@@ -491,6 +490,7 @@ const handleSubmit = async () => {
files.push(getFileParam(item))
})
}
// console.info("🚀 ~method:handleSubmit -----", files,attachment.value.isHaveOneFile)
if (!attachment.value.isHaveOneFile) {
attachment.value.validate()
ElNotification({
@@ -510,7 +510,7 @@ const handleSubmit = async () => {
deploymentId: deploymentId.value,
requirementId: route.query.id,
fileList: files,
singleFile: attachment.value.singleFile,
// singleFile: attachment.value.singleFile,
projectId: projectId.value,
preProcess: JSON.stringify(localFormData.value.preProcess)
}