From 3ad537052477fe31f45bd2e16045d58b35713bdc Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期六, 24 五月 2025 09:19:59 +0800
Subject: [PATCH] refactor(env): 更新环境配置并优化代码

---
 zhitan-vue/src/layout/index.vue |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/zhitan-vue/src/layout/index.vue b/zhitan-vue/src/layout/index.vue
index 96903b5..3df028a 100644
--- a/zhitan-vue/src/layout/index.vue
+++ b/zhitan-vue/src/layout/index.vue
@@ -33,10 +33,10 @@
             </div>
             
             <!-- 澶фā鍨嬫寜閽� -->
-            <div class="right-menu-item ai-btn" @click="openAIModel">
-              <svg-icon icon-class="ai" class="right-menu-icon" />
-              <span class="right-menu-text">鏅鸿兘鍔╂墜</span>
-            </div>
+<!--            <div class="right-menu-item ai-btn" @click="openAIModel">-->
+<!--              <svg-icon icon-class="ai" class="right-menu-icon" />-->
+<!--              <span class="right-menu-text">鏅鸿兘鍔╂墜</span>-->
+<!--            </div>-->
           </div>
         </div>
       </div>
@@ -86,7 +86,7 @@
 
 // 璺宠浆鍒版姤璀﹂〉闈�
 function goToAlarm() {
-  router.push('/alarm/list')
+  router.push('/alarmmanage/measuremen?modelCode=LBJT')
 }
 
 // 鎵撳紑AI澶фā鍨嬪璇濇
@@ -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%;
 }
 

--
Gitblit v1.9.3