From 04259fe9c84d819791cab926b959cab8dc6584b6 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 02 七月 2024 13:57:56 +0800 Subject: [PATCH] 高级表单多子表更新 --- src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts | 62 ++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 17 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 daacdf6..c00d7ca 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts @@ -4,28 +4,53 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-22 00:33:55 + * @LastEditTime: 2024-06-28 10:52:45 */ -import { ActionItem } from '/@/components/Table'; +import { ActionItem, BasicColumn } from '/@/components/Table'; function _default() { + const ActionColumn: BasicColumn = { + width: 120, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: 'right', + }; + /** - * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @description: 浜涜嚜瀹氫箟鏂规硶 * @return {*} */ - function ActionItem(params: Recordable<any>, data, ...args): ActionItem[] { - return [ - ...data, - ...[ - { - icon: 'clarity:info-standard-line', - tooltip: '妯℃澘鍙橀噺', - onClick: goDetail.bind(null, args[5], params), - }, - ], - ]; - } + const methods = { + /** + * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� + * @return {*} + */ + CreateAction: (fnName: string) => { + 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), + }, + ], + ]; + }, + }; + + /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */ /** * @description: 璺宠浆鍒拌鎯呴〉闈㈡柟娉� @@ -34,7 +59,9 @@ */ function goDetail(go: Fn, params: Recordable) { const id = { - ID: 'BAS_LABEL_VAR', + ID: params['record'].ID, + CODE: params['record']['LABEL_CODE'], + Name: 'BAS_LABEL_VAR', firstTabName: '鏍囩妯℃澘鍙橀噺', secondTabName: '', //'鏍囩杩囩▼鍙橀噺', firstTitle: '妯℃澘鍙橀噺', @@ -47,7 +74,8 @@ }; go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify(id))}`); } - return [ActionItem]; + + return [methods, ActionColumn]; } export default _default; -- Gitblit v1.9.3