fix : 详情修改为一个文件上传入口及测试校验,同步移动端详情展示

This commit is contained in:
2024-08-28 14:18:55 +08:00
parent 50504f4e94
commit d59c9d8cca
12 changed files with 380 additions and 388 deletions

View File

@@ -424,17 +424,17 @@ const handleSubmit = async () => {
userIds: userIds,
changeState:formData.value.changeState
}
// 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()
}
console.log('params', params)
let res = await submitPhaseChange(params)
ElNotification({
@@ -449,7 +449,7 @@ const handleSubmit = async () => {
})
}
}
const handleResubmit = (instance) => {
const handleResubmit = () => {
let otherFiles = []
if (name.value === 'Phase/edit') {
attachment.value.allFileList?.forEach(item => {
@@ -462,17 +462,17 @@ const handleResubmit = (instance) => {
return item.id
})
}
// 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 params = {
deploymentId: deploymentId.value,
requirementId: route.query.id,