import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; import { DictEnum } from '@vben/constants'; import { getPopupContainer } from '@vben/utils'; import { getDictOptions } from '#/utils/dict'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'libName', label: '人员库名称', }, { component: 'Select', componentProps: { getPopupContainer, options: getDictOptions(DictEnum.SIS_LIB_TYPE), }, fieldName: 'libType', label: '库类型', }, ]; // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { title: '人员库编码', field: 'libCode', }, { title: '人员库名称', field: 'libName', }, { title: '人员库描述', field: 'libDesc', }, { title: '库类型', field: 'libType', }, /* { title: '业务类型', field: 'busiType', },*/ { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', width: 180, }, ]; export const modalSchema: FormSchemaGetter = () => [ { label: '人员库名称', fieldName: 'libName', component: 'Input', rules: 'required', }, { label: '人员库描述', fieldName: 'libDesc', component: 'Input', }, { label: '库类型', fieldName: 'libType', component: 'Select', componentProps: { getPopupContainer, options: getDictOptions(DictEnum.SIS_LIB_TYPE), }, }, /* { label: '业务类型', fieldName: 'busiType', component: 'Select', componentProps: {}, },*/ ];