From c702199e8b384ea25d4f1778a297d309d392b9f3 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 20 一月 2025 23:41:48 +0800
Subject: [PATCH] 首页新增静态内容

---
 src/views/projectEngineering/projectLibrary/projectDetails.vue |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
index 46e1b6b..9332ed8 100644
--- a/src/views/projectEngineering/projectLibrary/projectDetails.vue
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -20,6 +20,12 @@
       :disabled="disabled"
       @toNext="changeTable"
       @updateIsShow="updateIsShow"
+      @basicInfoForm="basicInfoForm"
+      @investInfoForm="investInfoForm"
+      @investmentFundsForm="investmentFundsForm"
+      @legalPersonForm="legalPersonForm"
+      @policyInfoForm="policyInfoForm"
+      @documentsInfoForm="documentsInfoForm"
       :isShow="isShow"
       class="full-width custom-height"
     />
@@ -28,12 +34,13 @@
         v-if="componentName.name == 'BasicInfo'"
         class="save-button"
         type="primary"
-        @click="submit(0)"
+        @click="saveProject(0)"
         >鑽夌</el-button
       >
-      <el-button class="save-button" type="primary" @click="submit(1)"
-        >淇濆瓨</el-button
-      >
+<!--      <el-button class="save-button" type="primary" @click="submit(1)"-->
+<!--        >淇濆瓨</el-button>-->
+      <el-button class="save-button" type="primary" @click="saveProject(1)"
+      >淇濆瓨</el-button>
       <el-button class="reset-button" @click="reset">閲嶇疆</el-button>
       <!-- <el-button v-else class="cancel-button" @click="cancel">鍙栨秷</el-button> -->
     </div>
@@ -47,6 +54,7 @@
 import LegalPerson from "@/views/projectEngineering/projectLibrary/component/legalPerson";
 import PolicyInfo from "@/views/projectEngineering/projectLibrary/component/PolicyInfo";
 import DocumentsInfo from "@/views/projectEngineering/projectLibrary/component/DocumentsInfo";
+import { editProject } from "@/api/projectEngineering/projectInfo";
 
 export default {
   name: "ProjectDetails",
@@ -57,6 +65,7 @@
       disabled: false,
       projectForm: {},
       componentName: BasicInfo,
+      projectId: null,
       TABS_DATA: [
         {
           label: "椤圭洰绠$悊鍩虹淇℃伅",
@@ -96,13 +105,37 @@
     updateIsShow(newValue) {
       this.isShow = newValue;
     },
+    basicInfoForm(data) {
+      this.projectForm.projectInfoForm = data;
+      this.projectId = data.id;
+    },
+    investInfoForm(data) {
+      this.projectForm.projectInvestmentInfoForm = data;
+      this.projectForm.projectInvestmentInfoForm.projectId = this.projectId;
+    },
+    investmentFundsForm(data) {
+      this.projectForm.projectInvestmentFundingForm = data;
+      this.projectForm.projectInvestmentFundingForm.projectId = this.projectId;
+    },
+    documentsInfoForm(data){
+      this.projectForm.documentInfoForm = data;
+      this.projectForm.documentInfoForm.projectId = this.projectId;
+    },
+    legalPersonForm(data) {
+      this.projectForm.projectUnitRegistrationInfoForm = data;
+      this.projectForm.projectUnitRegistrationInfoForm.projectId = this.projectId;
+    },
+    policyInfoForm(data) {
+      this.projectForm.projectInvestmentPolicyComplianceForm = data;
+      this.projectForm.projectInvestmentPolicyComplianceForm.projectId = this.projectId;
+    },
     handleClick(tabTarget) {
       this.componentName = this.TABS_DATA[tabTarget.index].componentName;
-      
     },
     changeTable(index) {
       this.componentName = this.TABS_DATA[index].componentName;
       this.currentTab = this.TABS_DATA[index].value;
+
     },
     submit(usedStatus) {
       this.$refs.childRef.submit(usedStatus);
@@ -110,6 +143,13 @@
     reset() {
       this.$refs.childRef.reset();
     },
+    saveProject(num) {
+      this.projectForm.projectInfoForm.usedStatus = num;
+      editProject(this.projectForm).then((res) => {
+        this.$message.success("淇濆瓨鎴愬姛");
+      })
+      this.$router.push('/projectEngineering/project/projectLibrary')
+    }
   },
   mounted() {
     if (this.$route.query.disabled) {

--
Gitblit v1.8.0