From 2323946ce2147893be5f47b31b4a439690af8b2d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 12 Mar 2023 18:22:21 +0800 Subject: [PATCH] =?UTF-8?q?notice=20=E9=87=8D=E6=9E=84=E8=A1=A5=E5=85=85?= =?UTF-8?q?=EF=BC=9A=201.=20=E7=A7=BB=E9=99=A4=20API=20=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=9A=84=E5=90=8E=E7=BC=80=202.=20=E5=85=AC=E5=91=8A=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=BD=BF=E7=94=A8=20Editor=20=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=203.=20=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E7=8A=B6=E6=80=81=E6=A3=80=E7=B4=A2=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/notice/index.ts | 15 +-- src/views/system/notice/form.vue | 10 +- src/views/system/notice/index.vue | 35 ++---- src/views/system/notice/indexd.vue | 148 ------------------------- src/views/system/notice/indexh.vue | 103 ----------------- src/views/system/notice/notice.data.ts | 59 ---------- 6 files changed, 22 insertions(+), 348 deletions(-) delete mode 100644 src/views/system/notice/indexd.vue delete mode 100644 src/views/system/notice/indexh.vue delete mode 100644 src/views/system/notice/notice.data.ts diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index cd420a29..62bf5259 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -11,32 +11,27 @@ export interface NoticeVO { createTime: Date } -export interface NoticePageReqVO extends PageParam { - title?: string - status?: number -} - // 查询公告列表 -export const getNoticePageApi = (params: NoticePageReqVO) => { +export const getNoticePage = (params: PageParam) => { return request.get({ url: '/system/notice/page', params }) } // 查询公告详情 -export const getNoticeApi = (id: number) => { +export const getNotice = (id: number) => { return request.get({ url: '/system/notice/get?id=' + id }) } // 新增公告 -export const createNoticeApi = (data: NoticeVO) => { +export const createNotice = (data: NoticeVO) => { return request.post({ url: '/system/notice/create', data }) } // 修改公告 -export const updateNoticeApi = (data: NoticeVO) => { +export const updateNotice = (data: NoticeVO) => { return request.put({ url: '/system/notice/update', data }) } // 删除公告 -export const deleteNoticeApi = (id: number) => { +export const deleteNotice = (id: number) => { return request.delete({ url: '/system/notice/delete?id=' + id }) } diff --git a/src/views/system/notice/form.vue b/src/views/system/notice/form.vue index 0f928a7b..b8a49586 100644 --- a/src/views/system/notice/form.vue +++ b/src/views/system/notice/form.vue @@ -1,5 +1,5 @@ diff --git a/src/views/system/notice/indexh.vue b/src/views/system/notice/indexh.vue deleted file mode 100644 index 2879a1c4..00000000 --- a/src/views/system/notice/indexh.vue +++ /dev/null @@ -1,103 +0,0 @@ - - diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts deleted file mode 100644 index 7a72a723..00000000 --- a/src/views/system/notice/notice.data.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - title: [required], - type: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'seq', - action: true, - columns: [ - { - title: '公告标题', - field: 'title', - isSearch: true - }, - { - title: '公告类型', - field: 'type', - dictType: DICT_TYPE.SYSTEM_NOTICE_TYPE, - dictClass: 'number' - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '公告内容', - field: 'content', - table: { - type: 'html' - }, - form: { - component: 'Editor', - colProps: { - span: 24 - }, - componentProps: { - valueHtml: '' - } - }, - isTable: false - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas)