diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue index 0915da5..d3734c6 100644 --- a/src/views/project-demand/summary/add.vue +++ b/src/views/project-demand/summary/add.vue @@ -388,7 +388,7 @@ import {useCacheStore} from '@/stores/cache.js' import {useProcessStore} from '@/stores/processStore.js'; import {getSubCompOpt} from "@/api/user/user"; import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'; -import {getFormInfo} from "@/api/project-demand"; +import {getFormInfo, getInfo} from "@/api/project-demand"; import {getFundOption} from "@/api/special-fund"; import UserPicker from "@/views/workflow/process/common/UserPicker.vue"; @@ -474,18 +474,17 @@ if (name.value === 'Summary/edit') { } } const changeRequirement=async ()=>{ - console.log('formData.requirementId',formData.requirementId) - // await getFormInfo(route.query.id).then(res => { - // if (res.code === 1000) { - // formData.value.requirementDefaultName = res.data.requirementName - // // loading.value = false - // formData.value.isSpecialFund = res.data.isSpecialFund - // if (res.data.isSpecialFund) { - // formData.value.specialFundId = res.data.specialFundId - // formData.value.specialFund = res.data.specialFund - // } - // } - // }) + await getInfo(formData.value.requirementId).then(res => { + if (res.code === 1000) { + + console.log('formData.requirementId',formData.value.requirementId,res) + formData.value.isSpecialFund = res.data.formData.isSpecialFund + if ( res.data.formData.isSpecialFund) { + formData.value.specialFundId = res.data.formData.specialFundId + formData.value.specialFund = res.data.formData.specialFund + } + } + }) } const changeCollectData = () => { if (name.value === 'Summary/edit') {