From e4cae92058c54ef69dd940ae39516452a77ba808 Mon Sep 17 00:00:00 2001 From: xs Date: Tue, 16 Sep 2025 11:28:05 +0800 Subject: [PATCH] =?UTF-8?q?1.5.5=E5=89=8D=E7=AB=AF=20AI=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E5=A1=AB=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 32 +- src/layout/components/TopBar/aiAssistant.vue | 766 +++++++++++++++++++ 2 files changed, 791 insertions(+), 7 deletions(-) create mode 100644 src/layout/components/TopBar/aiAssistant.vue diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c2ed0b6..24224c7 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -62,6 +62,14 @@ + + + +
+ +
+
+
@@ -98,6 +106,7 @@ import { getTenantList } from '@/api/login'; import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; +import AiAssistant from './TopBar/aiAssistant.vue'; const appStore = useAppStore(); const userStore = useUserStore(); @@ -182,14 +191,23 @@ const handleCommand = (command: string) => { commandMap[command](); } }; + + +const aiAssistantRef = ref>(); + +const openAiAssistantMenu = () => { + aiAssistantRef.value?.openSearch(); +}; + + //用深度监听 消息 -watch( - () => noticeStore.state.value.notices, - (newVal) => { - newNotice.value = newVal.filter((item: any) => !item.read).length; - }, - { deep: true } -); +// watch( +// () => noticeStore.state.value.notices, +// (newVal) => { +// newNotice.value = newVal.filter((item: any) => !item.read).length; +// }, +// { deep: true } +// ); +