From 226ad601bb8326814c3e94efd6f476014f6a9e66 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 27 六月 2024 23:06:47 +0800 Subject: [PATCH] 产品工艺路线工序配置更新 --- src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts | 98 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 86 insertions(+), 12 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 aa25374..35571ce 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts @@ -4,21 +4,17 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-22 01:02:52 + * @LastEditTime: 2024-06-25 18:32:20 */ -import { ActionItem } from '/@/components/Table'; +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: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽� - * @return {*} - */ - function ActionItem(params: Recordable<any>, data, ...args): ActionItem[] { - data[0].onClick = rsnGrpEdit.bind(null, args, params); //鏇挎崲涓婚〉闈㈢紪杈戞寜閽柟娉曞彉涓鸿烦杞埌楂樼骇椤甸潰 - return data; - } - /** * @description: 鑷畾涔夌紪杈戞柟娉曪紝璺宠浆鍒伴珮绾ч〉闈� * @param {Fn} args @@ -37,7 +33,85 @@ args[5](`/BAS_REASON/High/${encodeURI(JSON.stringify(param))}`); } - return [ActionItem]; + const ActionColumn: BasicColumn = { + width: 180, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: undefined, + }; + + const methods = { + /** + * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� + * @return {*} + */ + CreateAction: (fnName: string) => { + return { + action: 'go', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) + url: 'BAS_REASON/High', + params: { + CODE: '0', + ID: buildUUID(), + Name: 'BAS_REASON', + Title: '鏂板涓嶈壇鍘熷洜缁�', + pCode: 'RSNG_CODE', + IsID: false, + }, + }; + }, + /** + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @return {*} + */ + ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { + if (!isNullOrUnDef(data[0])) { + data[0].onClick = rsnGrpEdit.bind(null, args, params); //鏇挎崲涓婚〉闈㈢紪杈戞寜閽柟娉曞彉涓鸿烦杞埌楂樼骇椤甸潰 + } + return data; + }, + GetSelectSuccess: (d, u) => { + return { + RSNG_CODE: d.values['val'], + }; + }, + OpenSelectItem:(openItemModal: Fn, ...args) => { + openItemModal(true, { + title: '涓嶈壇鍘熷洜缁勫垪琛�', + schemas: [ + { + field: 'RSNG_CODE', + component: 'Input', + label: '涓嶈壇鍘熷洜缁勪唬鐮�', + colProps: { + span: 12, + }, + }, + ], + ItemColumns: [ + { + title: t('涓嶈壇鍘熷洜缁勪唬鐮�'), + dataIndex: 'RSNG_CODE', + resizable: true, + sorter: true, + width: 200, + }, + { + title: t('涓嶈壇鍘熷洜缁勫悕绉�'), + dataIndex: 'RSNG_NAME', + resizable: true, + sorter: true, + width: 180, + }, + ], + tableName: 'BAS_REASON_GRP', + rowKey: 'RSNG_CODE', + searchInfo: {TABLE_NAME: 'BAS_REASON_GRP'} + }); + } + }; + + return [methods, ActionColumn]; } export default _default; -- Gitblit v1.9.3