From c17dba9251df86e0fe23afe87ef540c493fae219 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 25 二月 2025 16:08:40 +0800
Subject: [PATCH] treeselect禁用设置

---
 src/views/projectEngineering/projectLibrary/projectDetails.vue |   90 +++++++++++++++++++++++++++++++++-----------
 1 files changed, 67 insertions(+), 23 deletions(-)

diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
index 1dc8685..0cec26a 100644
--- a/src/views/projectEngineering/projectLibrary/projectDetails.vue
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -1,4 +1,5 @@
 <template>
+  <div>
   <el-card class="card-container">
     <div class="flex-container mb-4">
       <el-tabs v-model="currentTab" @tab-click="handleClick" v-show="isShow">
@@ -29,22 +30,46 @@
       :isShow="isShow"
       class="full-width custom-height"
     />
-    <div v-if="!disabled" class="button-container">
+    <div v-if="audit" class="button-container">
       <el-button
-        v-if="componentName.name == 'BasicInfo'"
         class="save-button"
         type="primary"
-        @click="submit(0)"
+        @click="saveProject(2)"
+      >閫氳繃</el-button>
+      <el-button
+        class="save-button"
+        type="danger"
+        @click="showDialog"
+      >椹冲洖</el-button>
+    </div>
+
+    <div v-if="!disabled" class="button-container">
+      <el-button
+        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"
+      <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>
   </el-card>
+    <el-dialog :visible.sync="remarkShow" width="1000px" title="椹冲洖淇℃伅" append-to-body>
+      <el-form ref="form" label-width="80px">
+        <el-form-item label="椹冲洖鍘熷洜">
+          <el-input type="textarea" v-model="remark"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelAuditing">鍙� 娑�</el-button>
+        <el-button type="primary" @click="submitAuditing">纭� 瀹�</el-button>
+      </div>
+    </el-dialog>
+</div>
 </template>
 
 <script>
@@ -63,6 +88,9 @@
       isShow: false,
       currentTab: "椤圭洰绠$悊鍩虹淇℃伅",
       disabled: false,
+      remarkShow: false,
+      audit: false,
+      remark: '',
       projectForm: {},
       componentName: BasicInfo,
       projectId: null,
@@ -72,11 +100,11 @@
           value: "椤圭洰绠$悊鍩虹淇℃伅",
           componentName: BasicInfo,
         },
-        {
-          label: "鎶曡祫绠$悊鍩虹淇℃伅",
-          value: "鎶曡祫绠$悊鍩虹淇℃伅",
-          componentName: InvestInfo,
-        },
+        // {
+        //   label: "鎶曡祫绠$悊鍩虹淇℃伅",
+        //   value: "鎶曡祫绠$悊鍩虹淇℃伅",
+        //   componentName: InvestInfo,
+        // },
         {
           label: "椤圭洰鎶曡祫鍙婅祫閲戞潵婧�",
           value: "椤圭洰鎶曡祫鍙婅祫閲戞潵婧�",
@@ -87,27 +115,42 @@
           value: "椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅",
           componentName: LegalPerson,
         },
-        {
-          label: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
-          value: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
-          componentName: PolicyInfo,
-        },
-        {
-          label: "鐩稿叧鏂囦功",
-          value: "鐩稿叧鏂囦功",
-          componentName: DocumentsInfo,
-        },
+        // {
+        //   label: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
+        //   value: "鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌",
+        //   componentName: PolicyInfo,
+        // },
+        // {
+        //   label: "鐩稿叧鏂囦功",
+        //   value: "鐩稿叧鏂囦功",
+        //   componentName: DocumentsInfo,
+        // },
       ],
       childRef: null,
     };
   },
   methods: {
+    showDialog(){
+      this.remark = null;
+      this.remarkShow = true;
+    },
+    cancelAuditing(){
+      this.remark = null;
+      this.remarkShow = false;
+    },
+    submitAuditing(){
+      this.projectForm.projectInfoForm.remark = this.remark
+      this.saveProject(3)
+      this.remark = null
+      this.remarkShow = false;
+    },
     updateIsShow(newValue) {
       this.isShow = newValue;
     },
     basicInfoForm(data) {
       this.projectForm.projectInfoForm = data;
       this.projectId = data.id;
+      this.audit = this.$route.query.audit == 1 && this.projectForm.projectInfoForm.auditRole;
     },
     investInfoForm(data) {
       this.projectForm.projectInvestmentInfoForm = data;
@@ -131,12 +174,10 @@
     },
     handleClick(tabTarget) {
       this.componentName = this.TABS_DATA[tabTarget.index].componentName;
-      console.log(this.projectForm);
     },
     changeTable(index) {
       this.componentName = this.TABS_DATA[index].componentName;
       this.currentTab = this.TABS_DATA[index].value;
-
     },
     submit(usedStatus) {
       this.$refs.childRef.submit(usedStatus);
@@ -144,11 +185,14 @@
     reset() {
       this.$refs.childRef.reset();
     },
-    saveProject() {
+    saveProject(num) {
+      this.projectForm.projectInfoForm.usedStatus = num;
       editProject(this.projectForm).then((res) => {
         this.$message.success("淇濆瓨鎴愬姛");
+        this.$store.dispatch("tagsView/delView", this.$route);
+        this.$router.push('/projectEngineering/project/projectLibrary')
       })
-      this.$router.push('/projectEngineering/project/projectLibrary')
+
     }
   },
   mounted() {

--
Gitblit v1.8.0