From 64c13167e17fd04aec02a93c2bc1803050a097d1 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 28 十一月 2024 03:04:52 +0800 Subject: [PATCH] 改用mounted --- src/views/projectEngineering/projectLibrary/component/investmentFunds.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue index f8caabf..9896aa8 100644 --- a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue +++ b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue @@ -269,16 +269,19 @@ } }, }, - created() { + mounted() { this.investmentFundsForm.id = this.$route.query.projectId; const investmentFundsForm = Cookies.get("investmentFundsForm"); const projectForm = Cookies.get("projectForm"); const parsedInvestmentForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; - - this.investmentFundsForm = parsedInvestmentForm || {}; - this.projectForm = parsedProjectForm || {}; + if (parsedInvestmentForm) { + this.investmentFundsForm = parsedInvestmentForm + } + if (parsedProjectForm){ + this.projectForm = parsedProjectForm + } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api if (this.investmentFundsForm.projectId && !parsedInvestmentForm) { this.getInvestmentFunds(); -- Gitblit v1.8.0