fix : 修复附件校验问题
This commit is contained in:
@@ -193,12 +193,12 @@ const deleteAttachment = (val) => {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
isSingleFile.value = false
|
isSingleFile.value = false
|
||||||
singleFile.value={}
|
singleFile.value=null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const deleteSingleFile = (row, type) => {
|
const deleteSingleFile = (row, type) => {
|
||||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的文件吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -212,7 +212,7 @@ const deleteSingleFile = (row, type) => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
isSingleFile.value=false
|
isSingleFile.value=false
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
singleFile.value = {}
|
singleFile.value = null
|
||||||
} else {
|
} else {
|
||||||
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
|
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="process">
|
<div class="process">
|
||||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
:state="data.state"/>
|
:state="data.state"/>
|
||||||
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
|
<process-diagram-viewer v-if="processViewer" :id-name="idName?idName:type"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,6 +67,10 @@ const props = defineProps({
|
|||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
idName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const form = ref()
|
const form = ref()
|
||||||
@@ -224,7 +228,7 @@ const handleDownload = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
Object.keys(props.formData).length && (form.value.setValues(props.formData))
|
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => props.loading, (newVal) => {
|
watch(() => props.loading, (newVal) => {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6" v-if="route.query.id&&formData.specialFund">
|
||||||
<el-form-item label="专项资金" prop="specialFundId" v-if="route.query.id&&formData.specialFund">
|
<el-form-item label="专项资金" prop="specialFundId">
|
||||||
<span>{{ formData.specialFund }}</span>
|
<span>{{ formData.specialFund }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -433,14 +433,7 @@ const handleResubmit = debounce(() => {
|
|||||||
otherFiles.push(getFileParam(item))
|
otherFiles.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let params = {
|
if (attachment.value.singleFile==null) {
|
||||||
...formData.value,
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
fileList: otherFiles,
|
|
||||||
requirementId: route.query.id ? route.query.id : '-1'
|
|
||||||
}
|
|
||||||
console.log('重新提交params', params)
|
|
||||||
if (!attachment.value.isSingleFile || !formData.value.singleFile) {
|
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -448,9 +441,16 @@ const handleResubmit = debounce(() => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else {
|
} else{
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
fileList: otherFiles,
|
||||||
|
requirementId: route.query.id ? route.query.id : '-1'
|
||||||
|
}
|
||||||
|
console.log('重新提交params', params)
|
||||||
resubmitReported(params).then(res => {
|
resubmitReported(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
@@ -174,14 +174,7 @@ const handleResubmit = () => {
|
|||||||
otherFiles.push(getFileParam(item))
|
otherFiles.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let params = {
|
if (attachment.value.singleFile==null) {
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
requirementId: route.query.id,
|
|
||||||
fileList: otherFiles,
|
|
||||||
singleFile: formData.value.singleFile,
|
|
||||||
projectId: route.query.projectId,
|
|
||||||
}
|
|
||||||
if (!attachment.value.isSingleFile || !formData.value.singleFile) {
|
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -189,9 +182,16 @@ const handleResubmit = () => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else {
|
} else{
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: attachment.value.singleFile,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
}
|
||||||
console.log('重新提交params', params)
|
console.log('重新提交params', params)
|
||||||
resubmitConclusion(params).then(res => {
|
resubmitConclusion(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -135,15 +135,7 @@ const handleResubmit = (instance) => {
|
|||||||
otherFiles.push(getFileParam(item))
|
otherFiles.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (attachment.value.singleFile==null) {
|
||||||
let params = {
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
requirementId: route.query.id,
|
|
||||||
fileList: otherFiles,
|
|
||||||
singleFile: formData.value.singleFile,
|
|
||||||
projectId: route.query.projectId,
|
|
||||||
}
|
|
||||||
if (!attachment.value.isSingleFile || !formData.value.singleFile) {
|
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -151,9 +143,16 @@ const handleResubmit = (instance) => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else {
|
} else{
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: attachment.value.singleFile,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
}
|
||||||
console.log('重新提交params', params)
|
console.log('重新提交params', params)
|
||||||
resubmitCheck(params).then(res => {
|
resubmitCheck(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -181,16 +181,7 @@ const handleResubmit = async () => {
|
|||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (attachment.value.singleFile==null) {
|
||||||
let params = {
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
requirementId: route.query.id,
|
|
||||||
fileList: files,
|
|
||||||
singleFile: formData.value.singleFile,
|
|
||||||
projectId: route.query.projectId,
|
|
||||||
}
|
|
||||||
console.log('params', params, attachment.value.isSingleFile)
|
|
||||||
if (!attachment.value.isSingleFile || !formData.value.singleFile) {
|
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -198,9 +189,17 @@ const handleResubmit = async () => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
} else {
|
} else{
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: attachment.value.singleFile,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
}
|
||||||
|
console.log('params', params, attachment.value.isSingleFile)
|
||||||
let res = await resubmitApply(params)
|
let res = await resubmitApply(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user