| | |
| | | }); |
| | | 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(); |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | entityName: props.entityName, |
| | | formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`), |
| | | crudColSlots: colSlots.value, |
| | | others: others.value, |
| | | keyFieldValues: keyFieldValues.value, |
| | | isExistSql: isExistSql, |
| | | }); |
| | | } |