From 46c3d28c5633baaddad0da441185310b9360a45b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 03 七月 2024 14:56:21 +0800 Subject: [PATCH] 高级表单优化 --- src/views/tigerprojects/system/lowcode/detail/detail.vue | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/detail/detail.vue b/src/views/tigerprojects/system/lowcode/detail/detail.vue index 526315c..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) {}, + EditOperation(data, d, u, item) {}, GetBaseColumns(type: string | undefined) {}, GetSearchForm(type: string | undefined) {}, GetCrudForm(type: string | undefined, ...args) {}, - OthersValues(val, id) {}, + 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