wujingjing
2025-04-03 446e503a51c904c9330fbd60043468e02a2e6b57
src/layout/component/header/Header.vue
@@ -1,8 +1,8 @@
<template>
   <div class="top_text flex justify-between px-6 items-center" :class="sidebarIsShow ? 'px-6' : 'pl-[unset] pr-6'">
      <div class="flex-items-center">
   <div class="top_text flex justify-between px-6 items-center pl-[unset] pr-6">
      <div class="flex-items-center h-full">
         <div class="nav-menu">
            <router-link :to="{ path: '/ask_answer', query: { id: activeRoomId } }" class="nav-item" active-class="active">
            <router-link :to="firstToPath" class="nav-item" active-class="active">
               <i class="icon-park-outline-robot"></i>
               智能助手
            </router-link>
@@ -34,7 +34,7 @@
         </template>
      </el-dialog>
   </div>
   <div class="notice" v-if="!isSharePage">
   <div class="notice " v-if="!isSharePage">
      <el-badge :value="`${state.announcementList.length}`" :hidden="announcementIsRead || state.announcementList?.length === 0">
         <el-button link size="small" icon="ele-Message" class="set-notice" @click="handleAnnouncementClick">系统公告</el-button>
      </el-badge>
@@ -65,7 +65,7 @@
import { systemNotifyList } from '/@/api/ai/chat';
import router from '/@/router';
import pinia from '/@/stores';
import { activeRoomId, isSharePage, newChatRoomClick } from '/@/stores/chatRoom';
import { activeChatRoom, activeRoomId, isSharePage, newChatRoomClick } from '/@/stores/chatRoom';
import { useThemeConfig } from '/@/stores/themeConfig';
import emitter from '/@/utils/mitt';
import { userInfoKey } from '/@/utils/request';
@@ -79,8 +79,25 @@
   announcementContent: '',
   announcementTime: '',
});
const firstToPath = computed(() => {
   if (!activeChatRoom.value)
      return {
         path: '/home',
      };
   const result = activeChatRoom.value.isInitial
      ? {
            path: '/home',
            query: {
               id: activeChatRoom.value.id,
            },
        }
      : {
            path: '/ask_answer',
            query: { id: activeChatRoom.value.id },
        };
   return result;
});
//#region ====================== 公告是否看过 ======================
const userInfo = ref(Local.get(userInfoKey));
@@ -172,7 +189,7 @@
.notice {
   position: fixed;
   top: 18px;
   top: 12px;
   right: 30px;
   z-index: 1;
   .set-notice {