diff --git a/apps/web-antd/src/api/system/notice/index.ts b/apps/web-antd/src/api/system/notice/index.ts index 6a8e2d15..82877943 100644 --- a/apps/web-antd/src/api/system/notice/index.ts +++ b/apps/web-antd/src/api/system/notice/index.ts @@ -26,7 +26,5 @@ export function noticeUpdate(data: any) { } export function noticeRemove(noticeIds: IDS) { - return requestClient.deleteWithMsg( - `${Api.root}/${noticeIds.join(',')}`, - ); + return requestClient.deleteWithMsg(`${Api.root}/${noticeIds}`); } diff --git a/apps/web-antd/src/views/system/notice/data.ts b/apps/web-antd/src/views/system/notice/data.ts index 2ac4aae5..07ae5b21 100644 --- a/apps/web-antd/src/views/system/notice/data.ts +++ b/apps/web-antd/src/views/system/notice/data.ts @@ -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', diff --git a/apps/web-antd/src/views/system/notice/index.vue b/apps/web-antd/src/views/system/notice/index.vue index e8b6af1d..50ba542b 100644 --- a/apps/web-antd/src/views/system/notice/index.vue +++ b/apps/web-antd/src/views/system/notice/index.vue @@ -1,54 +1,158 @@