import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'libCode', label: '人员库编码', }, { component: 'Input', fieldName: 'libName', label: '人员库名称', }, { component: 'Input', fieldName: 'libDesc', label: '人员库描述', }, { component: 'Select', componentProps: {}, fieldName: 'libType', label: '库类型', }, { component: 'Select', componentProps: {}, fieldName: 'busiType', label: '业务类型', }, ]; // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { title: '主键id', field: 'id', }, { title: '人员库编码', field: 'libCode', }, { title: '人员库名称', field: 'libName', }, { title: '人员库描述', field: 'libDesc', }, { title: '库类型,1:人员库,2:工服库', field: 'libType', }, { title: '库的业务类型 1: 门禁库,2: 黑名单库', field: 'busiType', }, { title: '创建人id', field: 'createById', }, { title: '更新人id', field: 'updateById', }, { title: '搜索值', field: 'searchValue', }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', width: 180, }, ]; export const modalSchema: FormSchemaGetter = () => [ { label: '主键id', fieldName: 'id', component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, }, { label: '人员库编码', fieldName: 'libCode', component: 'Input', rules: 'required', }, { label: '人员库名称', fieldName: 'libName', component: 'Input', rules: 'required', }, { label: '人员库描述', fieldName: 'libDesc', component: 'Input', }, { label: '库类型', fieldName: 'libType', component: 'Select', componentProps: {}, }, { label: '业务类型', fieldName: 'busiType', component: 'Select', componentProps: {}, }, ];