From e563871312e934fedf153c4b83ca5ba3b147c36c Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 17 一月 2025 11:47:42 +0800
Subject: [PATCH] 流程推进详情,办理按钮的权限判断完善,转办传递项目id、流程实例id

---
 src/views/projectEngineering/projectLibrary/projectDetails.vue |  123 ++++++++++++++++++++++++++++------------
 1 files changed, 86 insertions(+), 37 deletions(-)

diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
index 6494775..9332ed8 100644
--- a/src/views/projectEngineering/projectLibrary/projectDetails.vue
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -1,5 +1,5 @@
 <template>
-  <el-card class="card-container" >
+  <el-card class="card-container">
     <div class="flex-container mb-4">
       <el-tabs v-model="currentTab" @tab-click="handleClick" v-show="isShow">
         <el-tab-pane
@@ -20,11 +20,27 @@
       :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"
     />
     <div v-if="!disabled" class="button-container">
-      <el-button class="save-button" type="primary" @click="submit">淇濆瓨</el-button>
+      <el-button
+        v-if="componentName.name == 'BasicInfo'"
+        class="save-button"
+        type="primary"
+        @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="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>
@@ -32,53 +48,55 @@
 </template>
 
 <script>
-import BasicInfo from '@/views/projectEngineering/projectLibrary/component/BasicInfo';
-import InvestInfo from '@/views/projectEngineering/projectLibrary/component/InvestInfo';
-import InvestmentFunds from '@/views/projectEngineering/projectLibrary/component/investmentFunds';
-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 BasicInfo from "@/views/projectEngineering/projectLibrary/component/BasicInfo";
+import InvestInfo from "@/views/projectEngineering/projectLibrary/component/InvestInfo";
+import InvestmentFunds from "@/views/projectEngineering/projectLibrary/component/investmentFunds";
+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',
+  name: "ProjectDetails",
   data() {
     return {
       isShow: false,
-      currentTab: '椤圭洰绠$悊鍩虹淇℃伅',
+      currentTab: "椤圭洰绠$悊鍩虹淇℃伅",
       disabled: false,
-      projectForm:{},
+      projectForm: {},
       componentName: BasicInfo,
+      projectId: null,
       TABS_DATA: [
         {
-          label: '椤圭洰绠$悊鍩虹淇℃伅',
-          value: '椤圭洰绠$悊鍩虹淇℃伅',
-          componentName: BasicInfo
+          label: "椤圭洰绠$悊鍩虹淇℃伅",
+          value: "椤圭洰绠$悊鍩虹淇℃伅",
+          componentName: BasicInfo,
         },
         {
-          label: '鎶曡祫绠$悊鍩虹淇℃伅',
-          value: '鎶曡祫绠$悊鍩虹淇℃伅',
-          componentName: InvestInfo
+          label: "鎶曡祫绠$悊鍩虹淇℃伅",
+          value: "鎶曡祫绠$悊鍩虹淇℃伅",
+          componentName: InvestInfo,
         },
         {
-          label: '椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
-          value: '椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
-          componentName: InvestmentFunds
+          label: "椤圭洰鎶曡祫鍙婅祫閲戞潵婧�",
+          value: "椤圭洰鎶曡祫鍙婅祫閲戞潵婧�",
+          componentName: InvestmentFunds,
         },
         {
-          label: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
-          value: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
-          componentName: LegalPerson
+          label: "椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅",
+          value: "椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅",
+          componentName: LegalPerson,
         },
         {
-          label: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
-          value: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
-          componentName: PolicyInfo
+          label: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
+          value: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
+          componentName: PolicyInfo,
         },
         {
-          label: '鐩稿叧鏂囦功',
-          value: '鐩稿叧鏂囦功',
-          componentName: DocumentsInfo
-        }
+          label: "鐩稿叧鏂囦功",
+          value: "鐩稿叧鏂囦功",
+          componentName: DocumentsInfo,
+        },
       ],
       childRef: null,
     };
@@ -87,30 +105,61 @@
     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;
+      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() {
-      this.$refs.childRef.submit();
+    submit(usedStatus) {
+      this.$refs.childRef.submit(usedStatus);
     },
     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){
-      this.disabled = true
+    if (this.$route.query.disabled) {
+      this.disabled = true;
     }
-  }
+  },
 };
 </script>
 
 <style scoped>
-
 ::v-deep .el-tabs__nav-wrap::after {
   background-color: rgba(0, 0, 0, 0) !important;
 }

--
Gitblit v1.8.0