diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 981d0038..68aaacd5 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -44,6 +44,7 @@ "@vueuse/core": "catalog:", "ant-design-vue": "catalog:", "dayjs": "catalog:", + "markdown-it": "^14.1.0", "pinia": "catalog:", "vue": "catalog:", "vue-router": "catalog:" diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index d2837e24..06ffb8a3 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -91,11 +91,11 @@ const getNoticeList = async () => { color: typeColors[item.type], isRead: item.status })); + } else { + notifications.value = []; } - } catch (error) { console.error('获取消息列表失败:', error); - } finally { } }; getNoticeList(); diff --git a/apps/web-antd/src/views/notice/api/index.ts b/apps/web-antd/src/views/notice/api/index.ts index b1b8229c..bf746698 100644 --- a/apps/web-antd/src/views/notice/api/index.ts +++ b/apps/web-antd/src/views/notice/api/index.ts @@ -8,6 +8,12 @@ const prefix = 'notice/'; export async function getNoticeListApi(data: any) { return requestClient.get(`${prefix}list`, { params: data }); } +/** + * 获取接受消息用户下拉列表 + */ +export async function getUserOptionApi() { + return requestClient.get(`${prefix}user-option`); +} /** * 查询通知详情 * @param id @@ -46,3 +52,12 @@ export async function readAllApi() { ); return result; } + + +/** + * 群发消息 + * @param data + */ +export async function sendNoticeApi(data: any) { + return requestClient.post(`${prefix}send`, data); +} diff --git a/apps/web-antd/src/views/notice/compoents/detail-o.vue b/apps/web-antd/src/views/notice/compoents/detail-o.vue new file mode 100644 index 00000000..fda129be --- /dev/null +++ b/apps/web-antd/src/views/notice/compoents/detail-o.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/apps/web-antd/src/views/notice/compoents/detail.vue b/apps/web-antd/src/views/notice/compoents/detail.vue index 8e33d12b..6878884c 100644 --- a/apps/web-antd/src/views/notice/compoents/detail.vue +++ b/apps/web-antd/src/views/notice/compoents/detail.vue @@ -1,108 +1,128 @@ diff --git a/apps/web-antd/src/views/notice/compoents/send.vue b/apps/web-antd/src/views/notice/compoents/send.vue new file mode 100644 index 00000000..dbf0a49e --- /dev/null +++ b/apps/web-antd/src/views/notice/compoents/send.vue @@ -0,0 +1,456 @@ + + +