From e23fdf87e6c3bc6d42198b9309617195f2efd6c0 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期六, 06 七月 2024 23:40:08 +0800 Subject: [PATCH] 高级表单优化 --- src/views/tigerprojects/system/lowcode/detail/detail.vue | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/detail/detail.vue b/src/views/tigerprojects/system/lowcode/detail/detail.vue index 608ff90..38b9a5c 100644 --- a/src/views/tigerprojects/system/lowcode/detail/detail.vue +++ b/src/views/tigerprojects/system/lowcode/detail/detail.vue @@ -47,7 +47,7 @@ }); const objParams = inject('objParams') as Ref<any>; const data = inject('data') as Ref<Recordable[]>; - const others = inject('others') as Ref<Recordable[]>; + const keyFieldValues = inject('keyFieldValues') as Ref<Recordable[]>; const go = useGo(); const [registerDrawer, { openDrawer }] = useDrawer(); const [registerItemAdd, { openModal: openItemModal }] = useModal(); @@ -60,11 +60,11 @@ const EntityCustFunction = ref([ { ActionItem(params, data, ...args) {}, - EditOperation(data, d, u) {}, - GetBaseColumns() {}, - GetSearchForm() {}, - GetCrudForm() {}, - OthersValues(val, id) {}, + EditOperation(data, d, u, item) {}, + GetBaseColumns(type: string | undefined) {}, + GetSearchForm(type: string | undefined) {}, + GetCrudForm(type: string | undefined, ...args) {}, + KeyFieldValues(val, id) {}, GetSelectSuccess(d, u, ...args) {}, OpenSelectItem(openItemModal: Fn, ...args) {}, } as EntityCustFunctionType, @@ -80,18 +80,18 @@ GetBaseColumns, GetSearchForm, GetCrudForm, - OthersValues, + KeyFieldValues, GetSelectSuccess, OpenSelectItem, }, ] = isNullOrUnDef(custImport.value['default']) ? EntityCustFunction.value : custImport.value['default'](); - others.value = OthersValues(objParams['CODE'], objParams['ID']); + keyFieldValues.value = KeyFieldValues(objParams['CODE'], objParams['ID']); const [registerTable, { getForm, reload, setProps }] = useTable({ title: `${objParams['firstTitle']}鍒楄〃`, api: getListByPage, - searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['others'] }, + searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['keyFieldValues'] }, columns: GetBaseColumns(), formConfig: { labelWidth: 140, @@ -203,7 +203,7 @@ entityName: props.entityName, formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`), crudColSlots: colSlots.value, - others: others.value, + keyFieldValues: keyFieldValues.value, isExistSql: isExistSql, }); } -- Gitblit v1.9.3