admin-vben5/apps/web-antd/src/views/sis/personLib/data.ts

158 lines
3.0 KiB
TypeScript
Raw Normal View History

2025-06-24 23:55:59 +08:00
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: '库类型1人员库2工服库',
},
{
component: 'Select',
componentProps: {
},
fieldName: 'busiType',
label: '库的业务类型 1: 门禁库2: 黑名单库',
},
{
component: 'Input',
fieldName: 'createById',
label: '创建人id',
},
{
component: 'Input',
fieldName: 'updateById',
label: '更新人id',
},
{
component: 'Input',
fieldName: 'searchValue',
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: '库类型1人员库2工服库',
fieldName: 'libType',
component: 'Select',
componentProps: {
},
},
{
label: '库的业务类型 1: 门禁库2: 黑名单库',
fieldName: 'busiType',
component: 'Select',
componentProps: {
},
},
{
label: '创建人id',
fieldName: 'createById',
component: 'Input',
},
{
label: '更新人id',
fieldName: 'updateById',
component: 'Input',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
];