From 812298acce619ca50642b69a4910ab5626f279c1 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 9 Jun 2024 19:00:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E6=98=AF=E5=90=A6=E4=B8=93=E9=A1=B9=E8=B5=84?= =?UTF-8?q?=E9=87=91=E6=B5=81=E7=A8=8B=E5=9B=BE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailComponent/SummaryDetail.vue | 2 +- src/views/project-demand/summary/add.vue | 30 ++++++++++++------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/DetailComponent/SummaryDetail.vue b/src/components/DetailComponent/SummaryDetail.vue index da790e8..8ded615 100644 --- a/src/components/DetailComponent/SummaryDetail.vue +++ b/src/components/DetailComponent/SummaryDetail.vue @@ -9,7 +9,7 @@ - {{localFormData.specialFund }} + {{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }} diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue index 57ada02..1aaf3bc 100644 --- a/src/views/project-demand/summary/add.vue +++ b/src/views/project-demand/summary/add.vue @@ -10,18 +10,18 @@ - + - + {{ formData.specialFund }} - + { const getIsFund = async () => { if (!route.query.id) return; - loading.value = true + // loading.value = true await getFormInfo(route.query.id).then(res => { if (res.code === 1000) { - loading.value = false + // loading.value = false formData.value.isSpecialFund = res.data.isSpecialFund if (res.data.isSpecialFund) { res.data.specialFundId = getSpecialFundId(res.data.specialFund) @@ -428,7 +428,7 @@ const handleResubmit = debounce(() => { otherFiles.push(getFileParam(item)) }) } - if (attachment.value.singleFile==null) { + if (attachment.value.singleFile == null) { attachment.value.validate() ElNotification({ title: '提示', @@ -436,7 +436,7 @@ const handleResubmit = debounce(() => { type: 'error' }) return; - } else{ + } else { attachment.value.clearValidate() } let params = { @@ -475,17 +475,26 @@ const getDetailInfo = async () => { } }) } +const specialFundChange = () => { + processInfo() +} const init = async () => { + await getIsFund() loading.value = true const resFund = await getFundOption() specialFundOption.value = resFund.data const res = await getSubCompOpt() companyOption.value = res.data + await processInfo() + loading.value = false +} +const processInfo = () => { + processStore.setDesign(null) + processDiagramViewer.value=false getProcessInfo(formData.value.isSpecialFund).then(res => { if (res.code === 1000) { let data = res.data deploymentId.value = data.deploymentId - loading.value = false processStore.setDesign(data) processStore.runningList.value = data.runningList; processStore.endList.value = data.endList; @@ -495,7 +504,6 @@ const init = async () => { nextTick(() => { processDiagramViewer.value = true }) - getIsFund() } else { ElNotification({ title: '提示', @@ -506,10 +514,10 @@ const init = async () => { }) } onMounted(async () => { - await init() if (route.query.projectId) { await getDetailInfo() } + await init() }) const staging = async () => { }