From 41a73f66d30a9bdd854d3998f8975bb3685feeab Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期四, 28 十一月 2024 21:04:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/projectEngineering/projectLibrary/component/investmentFunds.vue | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue index f8caabf..6149bb8 100644 --- a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue +++ b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue @@ -243,7 +243,7 @@ }, methods: { getInvestmentFunds() { - getProjectInvestmentFundingById(this.investmentForm.projectId ).then(res => { + getProjectInvestmentFundingById(this.investmentFundsForm.projectId ).then(res => { this.investmentFundsForm = res.data; }); }, @@ -269,18 +269,21 @@ } }, }, - created() { - this.investmentFundsForm.id = this.$route.query.projectId; + mounted() { + this.investmentFundsForm.projectId = this.$route.query.projectId; const investmentFundsForm = Cookies.get("investmentFundsForm"); const projectForm = Cookies.get("projectForm"); - const parsedInvestmentForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; + const parsedInvestmentFundsForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; - - this.investmentFundsForm = parsedInvestmentForm || {}; - this.projectForm = parsedProjectForm || {}; + if (parsedInvestmentFundsForm) { + this.investmentFundsForm = parsedInvestmentFundsForm + } + if (parsedProjectForm){ + this.projectForm = parsedProjectForm + } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.investmentFundsForm.projectId && !parsedInvestmentForm) { + if (this.investmentFundsForm.projectId && !parsedInvestmentFundsForm) { this.getInvestmentFunds(); } }, -- Gitblit v1.8.0