From 8aa7ffddc511138d61d64029157c11cfccc5431d Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 10 四月 2025 13:30:25 +0800 Subject: [PATCH] VITE_OUTPUT_DIR --- src/layout/component/header/Header.vue | 54 +++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/layout/component/header/Header.vue b/src/layout/component/header/Header.vue index c10cbd8..c9c0332 100644 --- a/src/layout/component/header/Header.vue +++ b/src/layout/component/header/Header.vue @@ -2,19 +2,10 @@ <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="firstToPath" class="nav-item" active-class="active"> + <router-link v-for="item in menuList" :to="item.path" :key="item.label" class="nav-item" active-class="active"> <i class="icon-park-outline-robot"></i> - 鏅鸿兘鍔╂墜 + {{ item.label }} </router-link> - <!-- <router-link to="/workspace/situation" class="nav-item" active-class="active"> - <i class="icon-park-outline-workbench"></i> - 涓汉宸ヤ綔鍙� - </router-link> - - <!-- <router-link to="/gis/situation" class="nav-item" active-class="active"> - <i class="icon-park-outline-system"></i> - GIS绯荤粺 - </router-link> --> </div> </div> <el-dialog @@ -48,9 +39,18 @@ import { systemNotifyList } from '/@/api/ai/chat'; import router from '/@/router'; import pinia from '/@/stores'; -import { activeChatRoom, newChatRoomClick, sidebarIsShow } from '/@/stores/chatRoom'; -import { ParentRegister } from '/@/stores/global'; +import { + activeChatRoom, + activeRoomId, + activeTopMenuStyle, + isSharePage, + newChatRoomClick, + TopMenuStyle, + sidebarIsShow, +} from '/@/stores/chatRoom'; import { useThemeConfig } from '/@/stores/themeConfig'; +import { ParentRegister } from '/@/stores/global'; + import emitter from '/@/utils/mitt'; import { userInfoKey } from '/@/utils/request'; import { Local } from '/@/utils/storage'; @@ -64,6 +64,34 @@ announcementTime: '', }); +const menuList = computed(() => { + const smartAssistant = { + path: firstToPath.value, + label: '鏅鸿兘鍔╂墜', + }; + + const personalWorkbench = { + path: '/workspace/situation', + label: '涓汉宸ヤ綔鍙�', + }; + const gis = { + path: '/gis/situation', + label: 'GIS绯荤粺', + }; + + return [smartAssistant]; + + switch (activeTopMenuStyle.value) { + case TopMenuStyle.Normal: + return [smartAssistant, personalWorkbench]; + case TopMenuStyle.Gis: + return [smartAssistant, gis]; + + default: + return [smartAssistant]; + } +}); + const smallScreenClick = () => { const pathname = window.location.pathname; const basePath = pathname.replace(/\/web\/index\.html$/, ''); -- Gitblit v1.9.3