feat: 通知公告

This commit is contained in:
dap
2024-10-05 16:06:20 +08:00
parent a3a1403144
commit 8f66be32c1
3 changed files with 185 additions and 38 deletions

View File

@@ -1,9 +1,10 @@
import type { FormSchemaGetter } from '#/adapter';
import type { FormSchemaGetter, VxeGridProps } from '#/adapter';
import { DictEnum } from '@vben/constants';
import { getPopupContainer } from '@vben/utils';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
{
@@ -27,6 +28,50 @@ export const querySchema: FormSchemaGetter = () => [
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '公告标题',
field: 'noticeTitle',
},
{
title: '公告类型',
field: 'noticeType',
width: 120,
slots: {
default: ({ row }) => {
return renderDict(row.noticeType, DictEnum.SYS_NOTICE_TYPE);
},
},
},
{
title: '状态',
field: 'status',
width: 120,
slots: {
default: ({ row }) => {
return renderDict(row.status, DictEnum.SYS_NOTICE_STATUS);
},
},
},
{
title: '创建人',
field: 'createByName',
width: 150,
},
{
title: '创建时间',
field: 'createTime',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
component: 'Input',