From 25f128f26f0330b5431e5513c16ea035ce46099a Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期日, 21 七月 2024 21:00:41 +0800
Subject: [PATCH] 工单更新

---
 src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts |   88 ++++++++++++++++++++++++-------------------
 1 files changed, 49 insertions(+), 39 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
index 02f4089..3eb8691 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
@@ -4,12 +4,54 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-06-23 23:53:41
+ * @LastEditTime: 2024-07-20 22:14:50
  */
 
 import { ActionItem, BasicColumn } from '/@/components/Table';
 
 function _default() {
+  const ActionColumn: BasicColumn = {
+    width: 120,
+    title: '鎿嶄綔',
+    dataIndex: 'action',
+    slots: { customRender: 'action' },
+    fixed: 'right',
+  };
+
+  /**
+   * @description: 浜涜嚜瀹氫箟鏂规硶
+   * @return {*}
+   */
+  const methods = {
+    /**
+     * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
+     * @return {*}
+     */
+    CreateAction: (fnName: string) => {
+      return {
+        action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
+      };
+    },
+    /**
+     * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽�
+     * @return {*}
+     */
+    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
+      data.map((x) => {
+        if (x.name == 'goDetail') {
+          x.onClick = goDetail.bind(null, args[5], params);
+          x.tooltip = '妯℃澘鍙橀噺';
+        }
+      });
+      return data;
+    },
+    GetUseForm: () => {
+      return {};
+    },
+  };
+
+  /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */
+
   /**
    * @description: 璺宠浆鍒拌鎯呴〉闈㈡柟娉�
    * @param {Fn} go
@@ -27,47 +69,15 @@
       pageTitle: '鏍囩妯℃澘鍙橀噺', //璇︽儏椤甸潰鏍囬
       contentStr: '杩欓噷鏄爣绛炬ā鏉垮彉閲忕鐞嗛〉闈紝鍙互绠$悊鏍囩鐨勬ā鏉垮彉閲忔垨鑰呮墦鍗拌繃绋嬩腑鐨勫彉閲�',
       detailName: `妯℃澘[${params['record'].LABEL_NAME}]`,
-      others: { LABEL_ID: params['record'].ID },
+      keyFieldValues: { LABEL_ID: params['record'].ID },
       colSlots: ['BAS_LABEL_PV1add'],
+      SessionName: 'BAS_LABEL_VAR_update',
     };
-    go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify(id))}`);
+    // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage
+    sessionStorage.removeItem(`${id.SessionName}_params`);
+    sessionStorage.setItem(`${id.SessionName}_params`, encodeURI(JSON.stringify(id)));
+    go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify({ sName: id.SessionName, Name: id.Name }))}`);
   }
-
-  const ActionColumn: BasicColumn = {
-    width: 120,
-    title: '鎿嶄綔',
-    dataIndex: 'action',
-    slots: { customRender: 'action' },
-    fixed: 'right',
-  };
-
-  const methods = {
-    /**
-     * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓�
-     * @return {*}
-     */
-    CreateAction: () => {
-      return {
-        action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�)
-      };
-    },
-    /**
-     * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽�
-     * @return {*}
-     */
-    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
-      return [
-        ...data,
-        ...[
-          {
-            icon: 'clarity:info-standard-line',
-            tooltip: '妯℃澘鍙橀噺',
-            onClick: goDetail.bind(null, args[5], params),
-          },
-        ],
-      ];
-    },
-  };
 
   return [methods, ActionColumn];
 }

--
Gitblit v1.9.3