fix : 修复需求汇总重新提交专项资金参数回传
This commit is contained in:
@@ -336,7 +336,15 @@ const getIsFund = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const getFundName = (id) => {
|
||||||
|
let label=''
|
||||||
|
specialFundOption.value.forEach(item => {
|
||||||
|
if(item.value==id){
|
||||||
|
label=item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return label
|
||||||
|
}
|
||||||
const compositeParam = (item, type) => {
|
const compositeParam = (item, type) => {
|
||||||
let tag = ''
|
let tag = ''
|
||||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||||
@@ -354,11 +362,11 @@ const compositeParam = (item, type) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
console.log('上传文件getAttachment', val)
|
// console.log('上传文件getAttachment', val)
|
||||||
formData.value.singleFile = compositeParam(val)
|
formData.value.singleFile = compositeParam(val)
|
||||||
}
|
}
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
console.log('上传文件getOtherFile', val)
|
// console.log('上传文件getOtherFile', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
let fileObj = compositeParam(val)
|
let fileObj = compositeParam(val)
|
||||||
otherFileList.value.push(fileObj)
|
otherFileList.value.push(fileObj)
|
||||||
@@ -367,7 +375,6 @@ const getOtherFile = (val) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getFileParam = (item) => {
|
const getFileParam = (item) => {
|
||||||
console.log('item', item)
|
|
||||||
if (item === undefined) return;
|
if (item === undefined) return;
|
||||||
return {
|
return {
|
||||||
fileId: item.fileId,
|
fileId: item.fileId,
|
||||||
@@ -397,7 +404,7 @@ const handleSubmit = debounce(async (instance) => {
|
|||||||
fileList: otherFiles,
|
fileList: otherFiles,
|
||||||
requirementId: route.query.id ? route.query.id : '-1'
|
requirementId: route.query.id ? route.query.id : '-1'
|
||||||
}
|
}
|
||||||
console.log('params', params)
|
// console.log('params', params)
|
||||||
if (!attachment.value.isSingleFile) {
|
if (!attachment.value.isSingleFile) {
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -441,13 +448,16 @@ const handleResubmit = debounce(() => {
|
|||||||
} else {
|
} else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
if (formData.value.isSpecialFund&&formData.value.specialFund === null) {
|
||||||
|
formData.value.specialFund=getFundName(formData.value.specialFundId)
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
fileList: otherFiles,
|
fileList: otherFiles,
|
||||||
requirementId: route.query.id ? route.query.id : '-1'
|
requirementId: route.query.id ? route.query.id : '-1'
|
||||||
}
|
}
|
||||||
console.log('重新提交params', params)
|
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
|
||||||
resubmitReported(params).then(res => {
|
resubmitReported(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -487,12 +497,12 @@ const init = async () => {
|
|||||||
specialFundOption.value = resFund.data
|
specialFundOption.value = resFund.data
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
await processInfo()
|
await processInfo()
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
const processInfo = () => {
|
const processInfo = () => {
|
||||||
processStore.setDesign(null)
|
processStore.setDesign(null)
|
||||||
processDiagramViewer.value=false
|
processDiagramViewer.value = false
|
||||||
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
|
|||||||
Reference in New Issue
Block a user