fix : 完善信息提示框
This commit is contained in:
@@ -94,7 +94,7 @@ const searchConfig = reactive([
|
|||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
clearable: true,
|
clearable: true,
|
||||||
type: 'datetimerange',
|
type: 'daterange',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
|||||||
@@ -88,7 +88,13 @@ const getFileParam = (item) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
@@ -132,7 +138,13 @@ const handleSubmit = (instance) => {
|
|||||||
const handleResubmit = (instance) => {
|
const handleResubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
if (name.value === 'Implementation/edit') {
|
if (name.value === 'Implementation/edit') {
|
||||||
attachment.value.allFileList?.forEach(item => {
|
attachment.value.allFileList?.forEach(item => {
|
||||||
|
|||||||
@@ -168,7 +168,13 @@ const getFile = (val) => {
|
|||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
fileList: fileList.value,
|
fileList: fileList.value,
|
||||||
projectId: route.query.id,
|
projectId: route.query.id,
|
||||||
|
|||||||
@@ -158,7 +158,13 @@ const handleDelete = (index) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
instance.clearValidate()
|
instance.clearValidate()
|
||||||
tableForm.tableData.forEach(item=>{
|
tableForm.tableData.forEach(item=>{
|
||||||
item.projectName=projectName.value
|
item.projectName=projectName.value
|
||||||
|
|||||||
@@ -137,7 +137,13 @@ const getFileParam = (item) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
|
|||||||
@@ -187,7 +187,13 @@ const submitParam = (item) => {
|
|||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
const {msg, code} = await addFund(submitParam(formData.value))
|
const {msg, code} = await addFund(submitParam(formData.value))
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user