diff --git a/backend/src/api/oaNotice.js b/backend/src/api/oaNotice.js new file mode 100644 index 0000000..1edb5a6 --- /dev/null +++ b/backend/src/api/oaNotice.js @@ -0,0 +1,67 @@ +import request from '@/utils/request' + +// OA 通知公告 +// 响应拦截器只返回 {code, data, msg} 包装,调用方需自行取 res.data + +export function getNoticeList(params) { + return request({ + url: '/backend/oa/notice/list', + method: 'get', + params + }) +} + +// 工作台/仪表盘用:已发布公告,置顶优先 +export function getNoticePortal(params) { + return request({ + url: '/backend/oa/notice/portal', + method: 'get', + params + }) +} + +export function getNoticeDetail(id) { + return request({ + url: `/backend/oa/notice/detail/${id}`, + method: 'get' + }) +} + +export function createNotice(data) { + return request({ + url: '/backend/oa/notice/create', + method: 'post', + data + }) +} + +export function updateNotice(id, data) { + return request({ + url: `/backend/oa/notice/update/${id}`, + method: 'post', + data + }) +} + +export function deleteNotice(id) { + return request({ + url: `/backend/oa/notice/delete/${id}`, + method: 'delete' + }) +} + +// 发布 / 下架切换 +export function publishNotice(id) { + return request({ + url: `/backend/oa/notice/publish/${id}`, + method: 'post' + }) +} + +// 置顶 / 取消置顶切换 +export function topNotice(id) { + return request({ + url: `/backend/oa/notice/top/${id}`, + method: 'post' + }) +} diff --git a/backend/src/views/apps/oa/dashboard/index.vue b/backend/src/views/apps/oa/dashboard/index.vue index ff8eae4..47f0b57 100644 --- a/backend/src/views/apps/oa/dashboard/index.vue +++ b/backend/src/views/apps/oa/dashboard/index.vue @@ -93,8 +93,42 @@ - +
发布与管理租户内的通知、公告与活动
+