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.ts | 99 ++++++++++++++++++++++++++++--------------------- 1 files changed, 57 insertions(+), 42 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts index 39a3456..756df30 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts @@ -1,56 +1,21 @@ /* - * @Description: file content + * @Description: 涓嶈壇鍘熷洜鐩稿叧 * @Author: Ben Lin * @version: * @Date: 2024-06-22 00:58:43 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-23 18:28:55 + * @LastEditTime: 2024-06-26 03:13:26 */ -/* - * @Description: 涓嶈壇鍘熷洜鐩稿叧 - * @Author: Ben Lin - * @version: - * @Date: 2024-06-19 20:34:27 - * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-23 18:12:40 - */ - import { Ref, h } from 'vue'; import { DeleteEntity, getEntity } from '/@/api/tigerapi/system'; import { ActionItem, BasicColumn } from '/@/components/Table'; -import { isNullOrEmpty } from '/@/utils/is'; +import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; import { buildUUID } from '/@/utils/uuid'; import { useUserStore } from '/@/store/modules/user'; import { formatToDateTime } from '/@/utils/dateUtil'; import { Tag } from 'ant-design-vue'; function _default() { - /** - * @description: 鑷畾涔夊垹闄ゆ柟娉� - * @param {Fn} args - * @param {*} params - * @return {*} - */ - function rsnGrpDel(args: Fn[], params: {}) { - if (!isNullOrEmpty(params['data'])) { - var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']); - params['data'].value = _data; - args[6]({ - dataSource: [], - }); - args[6]({ - dataSource: params['data'], - }); - args[1](); - } else { - DeleteEntity(params['record'], params['entityName']).then((action) => { - if (action.IsSuccessed) { - args[1](); - } - }); - } - } - const ActionColumn: BasicColumn = { width: 80, title: '鎿嶄綔', @@ -59,22 +24,28 @@ fixed: undefined, }; + /** + * @description: 涓�浜涜嚜瀹氫箟鏂规硶 + * @return {*} + */ const methods = { /** * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� * @return {*} */ - CreateAction: () => { + CreateAction: (fnName: string) => { return { action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) }; }, /** - * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽� * @return {*} */ ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { - data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params); + if (!isNullOrUnDef(data[1])) { + data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params); + } return data; }, /** @@ -84,7 +55,7 @@ * @param {*} u * @return {*} */ - EditeOperation: (data: Ref<any[]>, d, u) => { + EditOperation: (data: Ref<any[]>, d, u) => { if (u.isUpdate) { //鏇存柊 var _data = data.value.map((item) => { @@ -115,6 +86,10 @@ data.value = _data2; } }, + /** + * @description: 楂樼骇琛ㄥ崟鍜岃鎯呴〉闈㈣繑鍥炰富椤甸潰鐨剈rl + * @return {*} + */ GetHomeUrl: () => { return `/BAS_REASON_GRP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_REASON_GRP', colSlots: [], crudColSlots: [] }))}`; }, @@ -320,8 +295,48 @@ OthersValues: (val: string, id: string) => { return { RSNG_CODE: val }; }, + /** + * @description: 鑾峰彇鏍囬淇℃伅 + * @param {string} type + * @return {*} + */ + GetTitle: () => { + return { + pageTitle: '涓嶈壇鍘熷洜缁勭鐞�', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹師鍥犵粍鍜屼笉鑹唬鐮併��', + baseTableTitle: '涓嶈壇鍘熷洜绠$悊', + }; + }, }; + /* 浠ヤ笅鏄唴閮ㄦ柟娉曪紝涓峞xport锛屼緵涓婇潰鐨勬柟娉曡皟鐢� */ + + /** + * @description: 鑷畾涔夊垹闄ゆ柟娉� + * @param {Fn} args + * @param {*} params + * @return {*} + */ + function rsnGrpDel(args: Fn[], params: {}) { + if (!isNullOrEmpty(params['data'])) { + var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']); + params['data'].value = _data; + args[6]({ + dataSource: [], + }); + args[6]({ + dataSource: params['data'], + }); + args[1](); + } else { + DeleteEntity(params['record'], params['entityName']).then((action) => { + if (action.IsSuccessed) { + args[1](); + } + }); + } + } + return [methods, ActionColumn]; } -- Gitblit v1.9.3