From bb8fba76d8c69f6957c606c2f3bb501af952b533 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 04 七月 2024 23:11:17 +0800 Subject: [PATCH] 班制更新 --- src/views/tigerprojects/system/lowcode/data.ts | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/data.ts b/src/views/tigerprojects/system/lowcode/data.ts index 80cde58..87e7d94 100644 --- a/src/views/tigerprojects/system/lowcode/data.ts +++ b/src/views/tigerprojects/system/lowcode/data.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-02 17:52:35 * @LastEditors: Ben Lin - * @LastEditTime: 2024-07-02 19:40:27 + * @LastEditTime: 2024-07-04 11:19:18 */ import { ActionItem, FormSchema } from '/@/components/Table'; @@ -17,6 +17,7 @@ import { buildUUID } from '/@/utils/uuid'; import { useUserStore } from '/@/store/modules/user'; import { formatToDateTime } from '/@/utils/dateUtil'; +import { DeleteEntity } from '/@/api/tigerapi/system'; const { t } = useI18n(); /** @@ -30,7 +31,7 @@ * 5. 鍒濆鍖栬〃鏍� GetBasicColumnAndInit * 6. 璁剧疆杩斿洖 getHomeUrl * 7. 璁剧疆鏍囬 getTitle - * 8. 璁剧疆鏂板鏃跺氨榛樿鐨勫�� getOthersValues + * 8. 璁剧疆鏂板鏃跺氨榛樿鐨勫�� getKeyFieldValues * 9. 鏇挎崲鍒犻櫎鏂规硶 GetActionsData * @param {*} params * @param {array} args @@ -174,6 +175,8 @@ routeData.value.nodes.push(act.node); }); unref(lf).render(routeData.value); + // lf.graphModel.translateCenter(); + // lf.graphModel.fitView(); } } @@ -220,4 +223,32 @@ } } +/** + * @description: 鑷畾涔夊垹闄ゆ柟娉� + * @param {Fn} args + * @param {*} params + * @return {*} + */ +export function custDel(args: Fn[], params: {}) { + const name = params['name']; + const useTables = args[1]; + if (!isNullOrEmpty(params['data'])) { + var _data = params['data'].value[name].filter((item) => item['ID'] != params['record']['ID']); + params['data'].value[name] = _data; + useTables[name][1].setProps({ + dataSource: [], + }); + useTables[name][1].setProps({ + dataSource: params['data'].value[name], + }); + useTables[name][1].reload(); + } else { + DeleteEntity(params['record'], params['entityName']).then((action) => { + if (action.IsSuccessed) { + useTables[name][1].reload(); + } + }); + } +} + /* 楂樼骇琛ㄥ崟鍏敤鏂规硶 *********************************End */ -- Gitblit v1.9.3