From fc0b29bd62b0aa5d024834eefe2f6862d1306009 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 一月 2024 13:53:33 +0800
Subject: [PATCH] 集团属性映射配置targetAttrKey修改

---
 Source/UBCS-WEB/src/views/integration/integrationIndex.vue    |    9 ++++++---
 Source/UBCS-WEB/src/views/integration/integrationTransfer.vue |    5 +++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
index ed218ad..6b902af 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
@@ -272,7 +272,8 @@
       const response = await listCodeAttributeByClassId({codeClassifyId: oid})
       if (response.status === 200) {
         const data = response.data.data
-        this.transferData = data
+        this.transferData = data;
+        // console.log(data)
       }
     },
     // 鎺ュ彛鑾峰彇闆嗗洟鍒嗙被鏍�
@@ -330,6 +331,7 @@
       }
     },
     handelTransferSave(event) {
+      // console.log(event)
       let that = this
       const transferValue = event.value
       if (Object.keys(that.mappingForm).length == 0) {
@@ -339,8 +341,9 @@
         });
       } else {
         const findRow = that.mappingData.findIndex(item => item.metaListId === that.mappingForm.metaListId)
-        that.mappingData[findRow].targetAttrName = transferValue[0].name
-        that.mappingData[findRow].targetAttrId = transferValue[0].oid
+        that.mappingData[findRow].targetAttrName = transferValue[0].name;
+        that.mappingData[findRow].targetAttrId = transferValue[0].oid;
+        that.mappingData[findRow].targetAttrKey = transferValue[0].id;
         this.dialogPush = false;
       }
 
diff --git a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
index ef55872..25df711 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
@@ -86,7 +86,7 @@
       let name = this.props.label;
       let key = this.props.key;
 
-      if (this.data) {
+      if (Array.isArray(this.data)) {
         let data = this.data.map(item => {
           let objitem = {disabled: false, ...item};
           if (this.disabledData.length !== 0) {
@@ -104,7 +104,8 @@
             renPing: renPing,
             [name]: item[this.props.label],
             [key]: item[this.props.key],
-            disabled: item.disabled
+            disabled: item.disabled,
+            id:item.id
           };
           return obj;
         });

--
Gitblit v1.9.3