From 725da078afc3398f49f1efdc25bc82b9ec1dac35 Mon Sep 17 00:00:00 2001 From: DYL0109 <dn18191638832@163.com> Date: 星期三, 16 四月 2025 19:27:30 +0800 Subject: [PATCH] Merge pull request #64 from zhitan-cloud/develop1.0 --- zhitan-vue/src/layout/index.vue | 70 +++++++++++----------------------- 1 files changed, 23 insertions(+), 47 deletions(-) diff --git a/zhitan-vue/src/layout/index.vue b/zhitan-vue/src/layout/index.vue index cc29ec7..90aaa04 100644 --- a/zhitan-vue/src/layout/index.vue +++ b/zhitan-vue/src/layout/index.vue @@ -9,7 +9,7 @@ <img v-if="sideTheme === 'theme-dark'" :src="systemInfo.leftLogo" class="sidebar-logo" /> <img v-else :src="systemInfo.leftLogo" class="sidebar-logo" /> </div> - <div class="name" v-if="sidebar.opened" :style="{ color: '#fff' }"> + <div class="name" v-if="sidebar.opened" :style="{ color: sideTheme === 'theme-dark' ? '#fff' : '#333' }"> {{ title }} </div> </div> @@ -86,13 +86,13 @@ // 璺宠浆鍒版姤璀﹂〉闈� function goToAlarm() { - router.push('/alarm/list') + router.push('/alarmmanage/measuremen?modelCode=BJGL') } // 鎵撳紑AI澶фā鍨嬪璇濇 function openAIModel() { - // 杩欓噷鍙互瀹炵幇鎵撳紑AI瀵硅瘽妗嗙殑閫昏緫 - console.log('鎵撳紑AI澶фā鍨嬪璇濇') + // 璺宠浆鍒版寚瀹氱殑URL + window.open('https://deepseek.tan-zhonghe.com/chat', '_blank') } const classObj = computed(() => ({ @@ -119,21 +119,26 @@ // 鐩戝惉璺敱鍙樺寲锛屽鐞嗛椤电殑渚ц竟鏍忔樉绀� watchEffect(() => { - // 妫�鏌ユ槸鍚︽槸棣栭〉璺敱 - if (route.path === '/index' || route.path === '/') { + // 妫�鏌ユ槸鍚︽槸棣栭〉璺敱锛屼絾鎺掗櫎/index/index瀛愯矾鐢� + if ((route.path === '/index' || route.path === '/') && route.path !== '/index/index') { // 棣栭〉璺敱锛岀‘淇濅晶杈规爮涓嶉殣钘忥紝浣嗙姸鎬佹槸鎶樺彔鐨� - appStore.showCollapsedSidebar() + appStore.toggleSideBarHide(false) // 鏀逛负涓嶉殣钘忎晶杈规爮 } else if (route.meta && route.meta.showSidebar === false) { // 濡傛灉璺敱鏄庣‘鎸囧畾闅愯棌渚ц竟鏍� appStore.toggleSideBarHide(true) + } else { + // 鍏朵粬璺敱锛岀‘淇濅晶杈规爮鍙 + appStore.toggleSideBarHide(false) } }) // 缁勪欢鎸傝浇鏃讹紝纭繚棣栭〉渚ц竟鏍忕姸鎬佹纭� onMounted(() => { - // 濡傛灉褰撳墠鏄椤碉紝纭繚渚ц竟鏍忔槸鎶樺彔鐨勮�屼笉鏄殣钘忕殑 - if (route.path === '/index' || route.path === '/') { - appStore.showCollapsedSidebar() + // 濡傛灉褰撳墠鏄椤靛瓙椤甸潰锛屽彧纭繚渚ц竟鏍忎笉琚殣钘忥紝浣嗕繚鎸佹姌鍙�/灞曞紑鐘舵�佷笉鍙� + if (route.path === '/index/index') { + // 鍙缃笉闅愯棌渚ц竟鏍忥紝浣嗕笉鏀瑰彉鍏跺睍寮�/鎶樺彔鐘舵�� + appStore.toggleSideBarHide(false) + // 涓嶅啀寮哄埗璁剧疆opened涓簍rue锛屼繚鎸佺敤鎴蜂箣鍓嶇殑璁剧疆 } }) @@ -306,13 +311,19 @@ top: 60px; right: 0; z-index: 9; - width: 100%; + width: calc(100% - #{$base-sidebar-width}); transition: width 0.28s; display: flex; flex-direction: column; + box-sizing: border-box; + padding: 0; } .hideSidebar .fixed-header { + width: calc(100% - 54px); +} + +.sidebarHide .fixed-header { width: 100%; } @@ -351,47 +362,12 @@ } .themeDark { - .navbar-container { - background: #1a235d; - border-bottom: 2px solid #110f2e; - } - .navbar { - background: transparent !important; + background: #002866 !important; } .sidebar-container { background-color: #002866 !important; - } -} - -.themeLight { - .navbar-container { - background: #3883FA; - } - - .navbar { - background: transparent !important; - - .left { - .sidebar-logo-container { - .name { - color: #fff !important; - } - } - } - - .right { - .right-menu { - .right-menu-item { - color: #fff; - - .right-menu-icon { - color: #fff; - } - } - } - } } } </style> \ No newline at end of file -- Gitblit v1.9.3