From dac9088c332ddfb6c9076e85fa1986d83b192141 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 05 六月 2023 16:56:55 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/transfer/index.vue |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/transfer/index.vue b/Source/UBCS-WEB/src/components/transfer/index.vue
index f8af0ec..99639fd 100644
--- a/Source/UBCS-WEB/src/components/transfer/index.vue
+++ b/Source/UBCS-WEB/src/components/transfer/index.vue
@@ -123,13 +123,16 @@
         },
 
         sourceData() {
-            return this.data.filter(item => this.value.indexOf(item[this.props.key]) === -1);
+            return this.data.filter(item => this.value.indexOf(item) === -1);
         },
 
         targetData() {
             if (this.targetOrder === 'original') {
-                return this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1);
+                console.log('11111')
+                return this.data.filter(item =>  this.value.indexOf(item) > -1
+                );
             } else {
+                console.log('22222')
                 return this.value.reduce((arr, cur) => {
                     const val = this.dataObj[cur];
                     if (val) {
@@ -198,15 +201,13 @@
                     this.leftChecked.indexOf(itemKey) > -1 &&
                     this.value.indexOf(itemKey) === -1
                 ) {
-                    // itemsToBeMoved.push(itemKey)
-                    itemsToBeMoved = [itemKey]
+                    // itemsToBeMoved = [itemKey]
+                    itemsToBeMoved = [item]
                     console.log(itemsToBeMoved)
                 }
             });
-            // currentValue = this.targetOrder === 'unshift'
-            //     ? itemsToBeMoved.concat(currentValue)
-            //     : currentValue.concat(itemsToBeMoved);
-            currentValue = itemsToBeMoved
+            // currentValue = itemsToBeMoved
+             currentValue = itemsToBeMoved
             this.$emit('input', currentValue);
             this.$emit('change', currentValue, 'right', this.leftChecked);
         },

--
Gitblit v1.9.3