From f963b265578cf983d4ee53f24bcd7294bcfd16e6 Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期二, 13 六月 2023 14:50:10 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue |   31 +++++++++----------------------
 1 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
index d5f82cb..118ea81 100644
--- a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
+++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
@@ -150,23 +150,13 @@
     },
     nodeClick(data, node, nodeComp){
       if(!this.isMuti) {
-        //涓嶈鐢╳atch鐩戝惉value鍊硷紝浼氭壘涓嶅埌text
-        this.value = data[this.config.valueField];
-        this.text = data[this.config.textField];
-        this.currentNode = data;
-        this.$emit("setValue", {
-          field: this.referConfig.field,
-          showField: this.referConfig.showField,
-          value: this.value,
-          text: this.text,
-          rawData: [this.currentNode]
-        });
+        this.setValue({checkedNodes:[data]})
       }
      },
-    checked:(checkedNode, checkedData)=> {
-      debugger;
-      /*
-      * this鐢ㄦ椂濮嬬粓瑕佹姤閿欙紝鍙兘鍏堟敞閲�
+    checked(checkedNode, checkedData) {
+      this.setValue(checkedData)
+    },
+    setValue:function (checkedData){
       var value = [];
       var text = [];
       const textSep =this.config.textSep;
@@ -185,21 +175,18 @@
         text.push(tempRaw.join(textSep));
       }
       this.value = value.join(',');
-      this.text = text.join(',')*/
-
-      this.value=checkedData.checkedKeys;
+      this.text = text.join(',')
       this.$emit("setValue", {
         field: this.referConfig.field,
         showField: this.referConfig.showField,
         value: this.value,
-        text: this.text,
-        isTreeMuti:true,
+        text: this.text || '',
+        isTreeMuti:this.isMuti,
         rawData: checkedData.checkedNodes
       });
     }
   },
-  watch:{
-  }
+  watch:{}
 }
 </script>
 

--
Gitblit v1.9.3