fix : 修复首页查看跳转问题及简化代码
This commit is contained in:
@@ -128,12 +128,6 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
// if (JSON.stringify(file.value) === "{}") {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
@@ -180,12 +174,6 @@ const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
|
||||
@@ -82,13 +82,6 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
@@ -149,12 +142,6 @@ const handleResubmit = (instance) => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
// if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
|
||||
@@ -126,17 +126,6 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
@@ -186,12 +175,6 @@ const handleResubmit = async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
|
||||
Reference in New Issue
Block a user