diff --git a/src/components/Notice/index.vue b/src/components/Notice/index.vue index 7247e5d4..a4ba322c 100644 --- a/src/components/Notice/index.vue +++ b/src/components/Notice/index.vue @@ -40,7 +40,7 @@
- + 查看更多 @@ -66,10 +66,11 @@ import { MessageTypeEnum, MessageTypeLabels } from "@/enums/MessageTypeEnum"; import NoticeAPI from "@/api/notice"; import socket from "@/api/socket"; import NoticeModal from "@/components/NoticeModal/index.vue"; +import router from "@/router"; const activeTab = ref(MessageTypeEnum.MESSAGE); const messages = ref([]); -const noticeModalRef = ref(null); +const noticeModalRef = ref(NoticeModal); const offset = ref([-15, 15]); const getFilteredMessages = (type: MessageTypeEnum) => { @@ -131,6 +132,14 @@ function readNotice(id: number) { noticeModalRef.value?.open(id); // 调用 open 方法,传入 ID } +/** + * 查看更多 + */ +function more() { + //跳转到我的消息页面 + router.push({ path: "notice/notice" }); +} + /** * 全部已读 */ diff --git a/src/layout/components/Sidebar/components/SidebarMenuItem.vue b/src/layout/components/Sidebar/components/SidebarMenuItem.vue index e45ec8d1..b742eadf 100644 --- a/src/layout/components/Sidebar/components/SidebarMenuItem.vue +++ b/src/layout/components/Sidebar/components/SidebarMenuItem.vue @@ -55,7 +55,7 @@ defineOptions({ }); import path from "path-browserify"; -import { isExternal } from "@/utils/index"; +import { isExternal } from "@/utils"; import { RouteRecordRaw } from "vue-router"; const props = defineProps({ diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index bfa301c1..f7d1ce1f 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -391,7 +391,6 @@ const getNoticeLevelTag = (type: number) => { function connectWebSocket() { WebSocketManager.getWebSocketClient("/topic/onlineUserCount", (message) => { - console.log("收到消息:", message); onlineUserCount.value = JSON.parse(message); }); } diff --git a/src/views/notice/index.vue b/src/views/notice/index.vue index 5957d303..f6c68d5e 100644 --- a/src/views/notice/index.vue +++ b/src/views/notice/index.vue @@ -29,8 +29,8 @@ v-loading="loading" :data="pageData" highlight-current-row - @selection-change="handleSelectionChange" > + @@ -95,20 +95,19 @@ @pagination="handleQuery()" /> +