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 | 86 +++++++++++++++++++++++++++---------------- 1 files changed, 54 insertions(+), 32 deletions(-) diff --git a/src/layout/component/header/Header.vue b/src/layout/component/header/Header.vue index adfe5f8..c9c0332 100644 --- a/src/layout/component/header/Header.vue +++ b/src/layout/component/header/Header.vue @@ -2,17 +2,9 @@ <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> - 鏅鸿兘鍔╂墜 - </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绯荤粺 + {{ item.label }} </router-link> </div> </div> @@ -33,28 +25,10 @@ </p> </template> </el-dialog> - </div> - <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> - <div class="notice_box notice_box_show" v-show="state.isShowAnnouncement" ref="noticeRef"> - <div class="notice_box_header"> - <span>鏈�鏂板叕鍛�</span> - </div> - <div class="notice_box_body"> - <div class="notice_item" v-for="item in state.announcementList" :key="item.notify_id" @click="announcementContentClick(item)"> - <div class="flex items-center"> - <p class="set-circle"></p> - <p>{{ item.notify_message }}</p> - </div> - <p class="text-right mr-[19px]"> - <span>{{ item.notify_time }}</span> - </p> - </div> - </div> - </div> + <el-tooltip content="鏈�灏忓寲" placement="bottom"> + <span class="cursor-pointer ywifont ywicon-tuichuquanping" size="15px" @click="smallScreenClick" /> + </el-tooltip> </div> </template> @@ -65,8 +39,18 @@ import { systemNotifyList } from '/@/api/ai/chat'; import router from '/@/router'; import pinia from '/@/stores'; -import { activeChatRoom, activeRoomId, isSharePage, newChatRoomClick } from '/@/stores/chatRoom'; +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'; @@ -79,6 +63,44 @@ announcementContent: '', 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$/, ''); + window.location.href = basePath || '/'; + ParentRegister.notify?.({ + type: 'fullScreen', + value: false, + }); +}; const firstToPath = computed(() => { if (!activeChatRoom.value) return { -- Gitblit v1.9.3