2025-06-24 23:55:59 +08:00
|
|
|
import type { FormSchemaGetter } from '#/adapter/form';
|
|
|
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
|
|
|
2025-06-26 22:02:40 +08:00
|
|
|
import { DictEnum } from '@vben/constants';
|
|
|
|
import { getPopupContainer } from '@vben/utils';
|
|
|
|
|
|
|
|
import { getDictOptions } from '#/utils/dict';
|
|
|
|
|
2025-06-24 23:55:59 +08:00
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'libName',
|
|
|
|
label: '人员库名称',
|
|
|
|
},
|
2025-06-26 22:02:40 +08:00
|
|
|
|
2025-06-24 23:55:59 +08:00
|
|
|
{
|
|
|
|
component: 'Select',
|
2025-06-26 22:02:40 +08:00
|
|
|
componentProps: {
|
|
|
|
getPopupContainer,
|
|
|
|
options: getDictOptions(DictEnum.SIS_LIB_TYPE),
|
|
|
|
},
|
2025-06-24 23:55:59 +08:00
|
|
|
fieldName: 'libType',
|
2025-06-25 00:37:48 +08:00
|
|
|
label: '库类型',
|
2025-06-24 23:55:59 +08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
|
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
{ type: 'checkbox', width: 60 },
|
2025-06-26 22:02:40 +08:00
|
|
|
|
2025-06-24 23:55:59 +08:00
|
|
|
{
|
|
|
|
title: '人员库编码',
|
|
|
|
field: 'libCode',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '人员库名称',
|
|
|
|
field: 'libName',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '人员库描述',
|
|
|
|
field: 'libDesc',
|
|
|
|
},
|
|
|
|
{
|
2025-06-26 22:02:40 +08:00
|
|
|
title: '库类型',
|
2025-06-24 23:55:59 +08:00
|
|
|
field: 'libType',
|
|
|
|
},
|
2025-06-26 22:02:40 +08:00
|
|
|
/* {
|
|
|
|
title: '业务类型',
|
2025-06-24 23:55:59 +08:00
|
|
|
field: 'busiType',
|
2025-06-26 22:02:40 +08:00
|
|
|
},*/
|
2025-06-24 23:55:59 +08:00
|
|
|
{
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
{
|
2025-06-25 00:37:48 +08:00
|
|
|
label: '库类型',
|
2025-06-24 23:55:59 +08:00
|
|
|
fieldName: 'libType',
|
|
|
|
component: 'Select',
|
2025-06-26 22:02:40 +08:00
|
|
|
componentProps: {
|
|
|
|
getPopupContainer,
|
|
|
|
options: getDictOptions(DictEnum.SIS_LIB_TYPE),
|
|
|
|
},
|
2025-06-24 23:55:59 +08:00
|
|
|
},
|
2025-06-26 22:02:40 +08:00
|
|
|
/* {
|
2025-06-25 00:37:48 +08:00
|
|
|
label: '业务类型',
|
2025-06-24 23:55:59 +08:00
|
|
|
fieldName: 'busiType',
|
|
|
|
component: 'Select',
|
2025-06-25 00:37:48 +08:00
|
|
|
componentProps: {},
|
2025-06-26 22:02:40 +08:00
|
|
|
},*/
|
2025-06-24 23:55:59 +08:00
|
|
|
];
|