feat: 岗位

This commit is contained in:
dap
2024-10-05 16:02:02 +08:00
parent abcc08832d
commit a3a1403144
2 changed files with 205 additions and 35 deletions

View File

@@ -1,8 +1,9 @@
import { DictEnum } from '@vben/constants';
import { getPopupContainer } from '@vben/utils';
import { type FormSchemaGetter } from '#/adapter';
import { type FormSchemaGetter, type VxeGridProps } from '#/adapter';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
{
@@ -26,6 +27,46 @@ export const querySchema: FormSchemaGetter = () => [
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '岗位编码',
field: 'postCode',
},
{
title: '类别编码',
field: 'postCategory',
},
{
title: '岗位名称',
field: 'postName',
},
{
title: '排序',
field: 'postSort',
},
{
title: '状态',
field: 'status',
slots: {
default: ({ row }) => {
return renderDict(row.status, DictEnum.SYS_NORMAL_DISABLE);
},
},
},
{
title: '创建时间',
field: 'createTime',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const drawerSchema: FormSchemaGetter = () => [
{
component: 'Input',