fix : 完善信息提示框

This commit is contained in:
2024-06-29 17:13:42 +08:00
parent e075eeb0d5
commit d25c285ad6
6 changed files with 43 additions and 7 deletions

View File

@@ -88,7 +88,13 @@ const getFileParam = (item) => {
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if (!valid) {
return ElNotification({
title: '提示',
message: '请完善数据,再提交!',
type: 'error'
})
}
let files = []
otherFileList.value.forEach(item => {
files.push(getFileParam(item))
@@ -132,7 +138,13 @@ const handleSubmit = (instance) => {
const handleResubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if (!valid) {
return ElNotification({
title: '提示',
message: '请完善数据,再提交!',
type: 'error'
})
}
let otherFiles = []
if (name.value === 'Implementation/edit') {
attachment.value.allFileList?.forEach(item => {

View File

@@ -168,7 +168,13 @@ const getFile = (val) => {
const handleSubmit = async (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if (!valid) {
return ElNotification({
title: '提示',
message: '请完善数据,再提交!',
type: 'error'
})
}
let params = {
fileList: fileList.value,
projectId: route.query.id,

View File

@@ -158,7 +158,13 @@ const handleDelete = (index) => {
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if (!valid) {
return ElNotification({
title: '提示',
message: '请完善数据,再提交!',
type: 'error'
})
}
instance.clearValidate()
tableForm.tableData.forEach(item=>{
item.projectName=projectName.value