From 943954bdcb3b672b89cfa097e53d2ac17a36a101 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期日, 30 六月 2024 13:13:25 +0800
Subject: [PATCH] 产品工艺路线路由节点选择功能更新

---
 src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts |   59 ++++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts
index 09da874..54b82a0 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts
@@ -4,34 +4,17 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-06-22 23:33:08
+ * @LastEditTime: 2024-06-25 18:32:20
  */
 
 import { ActionItem, BasicColumn } from '/@/components/Table';
 import { buildUUID } from '/@/utils/uuid';
 import { useI18n } from '/@/hooks/web/useI18n';
+import { isNullOrUnDef } from '/@/utils/is';
 
 const { t } = useI18n();
 
 function _default() {
-  /**
-   * @description: 鑷畾涔夌紪杈戞柟娉曪紝璺宠浆鍒伴珮绾ч〉闈�
-   * @param {Fn} args
-   * @param {*} params
-   * @return {*}
-   */
-  function rsnGrpEdit(args: Fn[], params: {}) {
-    const param = {
-      CODE: params['record']['RSNG_CODE'],
-      ID: params['record']['ID'],
-      Name: 'BAS_REASON',
-      Title: `缂栬緫涓嶈壇鍘熷洜缁勶細${params['record']['RSNG_CODE']}`,
-      pCode: 'RSNG_CODE',
-      IsID: false,
-    };
-    args[5](`/BAS_REASON/High/${encodeURI(JSON.stringify(param))}`);
-  }
-
   const ActionColumn: BasicColumn = {
     width: 180,
     title: '鎿嶄綔',
@@ -40,12 +23,16 @@
     fixed: undefined,
   };
 
+  /**
+   * @description: 涓�浜涜嚜瀹氫箟鏂规硶
+   * @return {*}
+   */  
   const methods = {
     /**
      * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
      * @return {*}
      */
-    CreateAction: () => {
+    CreateAction: (fnName: string) => {
       return {
         action: 'go', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
         url: 'BAS_REASON/High',
@@ -60,11 +47,13 @@
       };
     },
     /**
-     * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽�
+     * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽�
      * @return {*}
      */
     ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
-      data[0].onClick = rsnGrpEdit.bind(null, args, params); //鏇挎崲涓婚〉闈㈢紪杈戞寜閽柟娉曞彉涓鸿烦杞埌楂樼骇椤甸潰
+      if (!isNullOrUnDef(data[0])) {
+        data[0].onClick = rsnGrpEdit.bind(null, args, params); //鏇挎崲涓婚〉闈㈢紪杈戞寜閽柟娉曞彉涓鸿烦杞埌楂樼骇椤甸潰
+      }
       return data;
     },
     GetSelectSuccess: (d, u) => {
@@ -72,7 +61,7 @@
         RSNG_CODE: d.values['val'],
       };
     },
-    OpenSelectItem:(openItemModal: Fn) => {
+    OpenSelectItem: (openItemModal: Fn, ...args) => {
       openItemModal(true, {
         title: '涓嶈壇鍘熷洜缁勫垪琛�',
         schemas: [
@@ -103,11 +92,31 @@
         ],
         tableName: 'BAS_REASON_GRP',
         rowKey: 'RSNG_CODE',
-        searchInfo: {TABLE_NAME: 'BAS_REASON_GRP'}
+        searchInfo: { TABLE_NAME: 'BAS_REASON_GRP' },
       });
-    }
+    },
   };
 
+  /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */
+
+  /**
+   * @description: 鑷畾涔夌紪杈戞柟娉曪紝璺宠浆鍒伴珮绾ч〉闈�
+   * @param {Fn} args
+   * @param {*} params
+   * @return {*}
+   */
+  function rsnGrpEdit(args: Fn[], params: {}) {
+    const param = {
+      CODE: params['record']['RSNG_CODE'],
+      ID: params['record']['ID'],
+      Name: 'BAS_REASON',
+      Title: `缂栬緫涓嶈壇鍘熷洜缁勶細${params['record']['RSNG_CODE']}`,
+      pCode: 'RSNG_CODE',
+      IsID: false,
+    };
+    args[5](`/BAS_REASON/High/${encodeURI(JSON.stringify(param))}`);
+  }
+
   return [methods, ActionColumn];
 }
 

--
Gitblit v1.9.3