From 76fb875dc5aa7ded6d5737c3223951cd11ded366 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 28 十一月 2024 02:48:00 +0800 Subject: [PATCH] 投资金额 --- src/views/projectEngineering/projectLibrary/component/InvestInfo.vue | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue b/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue index d792807..0e7abec 100644 --- a/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue @@ -11,7 +11,7 @@ style="width: 100%" > <el-option v-for="item in dict.type.sys_cross_domain" :key="item.value" :label="item.label" - :value="item.value"/> + :value="parseInt(item.value)"/> </el-select> </el-form-item> </el-col> @@ -46,7 +46,7 @@ style="width: 100%" > <el-option v-for="item in dict.type.sys_whether_project" :key="item.value" :label="item.label" - :value="item.value"/> + :value="parseInt(item.value)"/> </el-select> </el-form-item> </el-col> @@ -137,7 +137,7 @@ style="width: 100%" > <el-option v-for="item in dict.type.sys_whether_project" :key="item.value" :label="item.label" - :value="item.value"/> + :value="parseInt(item.value)"/> </el-select> </el-form-item> </el-col> @@ -200,7 +200,7 @@ useEarth: '', contentScale: '', code: '', - projectId: '' + projectId: '', }, plannedStartDate: '', expectedCompletionDate: '', @@ -212,7 +212,8 @@ sys_administrative_divisions: [] }; }, - mounted() { + created() { + this.investmentForm.projectId = this.$route.query.projectId // 浠嶤ookies涓幏鍙栫紦瀛樻暟鎹� const investmentForm = Cookies.get("investmentForm"); const projectForm = Cookies.get("projectForm"); @@ -222,11 +223,11 @@ const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; // 璁剧疆investment鍜宲rojectForm瀵硅薄 - this.investmentForm = parsedInvestmentForm || {}; - this.projectForm = parsedProjectForm || {}; + if(parsedInvestmentForm) this.investmentForm = parsedInvestmentForm; + if(parsedProjectForm) this.projectForm = parsedProjectForm; - // 濡傛灉projectForm瀛樺湪id涓旀病鏈夌紦瀛橈紝鍒欒皟鐢╝pi - if (this.projectForm.id && !investmentForm) { + // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛橈紝瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api + if (this.investmentForm.projectId && !investmentForm) { this.getInvestment(); } this.investmentForm.constructionLocation = this.projectForm.area; @@ -239,7 +240,7 @@ }, methods: { getInvestment() { - getProjectInvestmentInfoById(this.investmentForm.id).then(res => { + getProjectInvestmentInfoById(this.investmentForm.projectId ).then(res => { this.investmentForm = res.data; }); }, -- Gitblit v1.8.0