From 1b419ccf217dbcace15987f1c0fe26b9e15d1d4b Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 16 十月 2024 10:26:56 +0800
Subject: [PATCH] 工艺绑定优化

---
 src/views/tigerprojects/system/lowcode/composition/Config.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/composition/Config.vue b/src/views/tigerprojects/system/lowcode/composition/Config.vue
index 4860523..77d33d0 100644
--- a/src/views/tigerprojects/system/lowcode/composition/Config.vue
+++ b/src/views/tigerprojects/system/lowcode/composition/Config.vue
@@ -4,7 +4,7 @@
  * @version: 
  * @Date: 2024-06-24 23:44:31
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-09-23 01:57:00
+ * @LastEditTime: 2024-09-29 16:23:30
 -->
 <template>
   <Card :title="GetTitle(configType)['configTitle']">
@@ -275,7 +275,9 @@
           setTimeout(() => {
             useTables.value[item][1].reload();
             useForms.value[configType.value as string][1].resetFields();
-            useForms.value[configType.value as string][1].setFieldsValue(data.value[configType.value as string][0]);
+            useForms.value[configType.value as string][1].setFieldsValue(
+              data.value[configType.value as string][0],
+            );
           }, 10);
         }
       });
@@ -290,7 +292,13 @@
    */
   function SelectItemInForm(item) {
     const record = useForms.value[configType.value][1].getFieldsValue();
-    OpenSelectItem(useModalData.value[item][1].openModal, item, useModalsCrudInForm.value[item][1].openModal, record, objParams.value['CODE']);
+    OpenSelectItem(
+      useModalData.value[item][1].openModal,
+      item,
+      useModalsCrudInForm.value[item][1].openModal,
+      record,
+      objParams.value['CODE'],
+    );
   }
 
   /**
@@ -303,11 +311,13 @@
   function SelectInFormSuccess(d, u, item) {
     GetSelectSuccess(d, u, item).then((result) => {
       useForms.value[configType.value][1].setFieldsValue(result['value']);
-      data.value[configType.value as string].map((x) => {
-        Object.getOwnPropertyNames(result['value']).forEach((key) => {
-          x[key] = result['value'][key];
+      if (!isNullOrUnDef(data.value[configType.value as string])) {
+        data.value[configType.value as string].map((x) => {
+          Object.getOwnPropertyNames(result['value']).forEach((key) => {
+            x[key] = result['value'][key];
+          });
         });
-      });
+      }
       showOtherTable.value = result['isShow'];
       data.value[result.name] = result['data'];
       /* 閲嶆柊useTable锛屽惁鍒欐暟鎹笉鍒锋柊 */

--
Gitblit v1.9.3