From ee4f3231149c58ebbaa0ff5881806855df8e2659 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 11 七月 2023 11:40:15 +0800
Subject: [PATCH] fjl

---
 Source/UBCS-WEB/src/components/Tree/classifyTrees.vue         |   14 ++++++++++++--
 Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue |    8 +++-----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
index f797efb..2b2f7de 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -302,10 +302,7 @@
     },
     async treeNodeClick(data, first) {
       if (this.type === "batchApplyCode") {
-        if (
-          first === true ||
-          this.localCodeClassifyOid === data.codeClassifyOid
-        ) {
+        if (first === true) {
           this.codeRuleOid = data.codeRuleOid;
           // 绗竴娆℃墦寮�鐩存帴璧嬪�间笉鏍¢獙
           this.batchApplyCodeTableData[data.codeRuleOid] = {
@@ -316,6 +313,8 @@
             codeRuleOid: data.codeRuleOid,
           };
           // 涓嶆槸绗竴娆℃墦寮�闇�瑕佷紭鍏堟牎楠�
+        } else if (this.localCodeClassifyOid === data.codeClassifyOid) {
+          console.log("閲嶅鐐瑰嚮");
         } else {
           if (this.$refs.CodeApply) {
             if (!(await this.$refs.CodeApply.validate())) {
@@ -326,7 +325,6 @@
             }
           }
         }
-        // 绗竴娆℃墦寮�鐩存帴璧嬪�间笉鏍¢獙
         if (!this.batchApplyCodeTableData[data.codeRuleOid]) {
           this.batchApplyCodeTableData[data.codeRuleOid] = {
             name: data.name,
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 9512d4b..23167e8 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -57,8 +57,8 @@
         <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                    :option="Treeoption"
                    style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"
-                   @node-click=" nodeClick"
-                   @check-change="checkChange"
+                   @node-click="nodeClick"
+                   class="classifyTree"
         >
         </avue-tree>
         </div>
@@ -628,6 +628,13 @@
   mounted() {
     this.type = this.tabOption.column[0];
     this.getAttr();
+    const treeEle = this.$refs.tree.$el
+    treeEle.addEventListener('click', (e) => {
+      if (e.target.nodeName !== 'SPAN') {
+        this.$refs.tree.setCurrentKey(null)
+        this.nodeClickList = {}
+      }
+    }, true)
   },
   computed:{
     crudTreeOption(){
@@ -1145,6 +1152,9 @@
         this.$message.error(error)
       }
     },
+    treeClick(e) {
+      console.log(e);
+    },
     //鍏嬮殕妯℃澘鏍戠殑鐐瑰嚮鍒囨崲鏁版嵁
     async ClonenodeClick(data){
       this.ClonenodeClickList=data;

--
Gitblit v1.9.3