From 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 27 一月 2026 19:06:32 +0800
Subject: [PATCH] 代码优化

---
 项目代码/WIDESEA_WMSClient/src/views/Index.vue |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Index.vue"
index a087196..66a38ce 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Index.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Index.vue"
@@ -24,7 +24,7 @@
     </div>
     <div class="vol-container" :style="{ left: menuWidth - 1 + 'px' }">
       <div class="vol-header">
-        <div class="project-name">WMS</div>
+        <div class="project-name">WMS      {{ stationValue.replace('-1','') }}绔欏彴</div>
         <div class="header-text">
           <div class="h-link">
             <a
@@ -203,6 +203,7 @@
 import VolMenu from "@/components/basic/VolElementMenu.vue";
 import Message from "./index/Message.vue";
 import MessageConfig from "./index/MessageConfig.js";
+import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager";
 var imgUrl = require("@/assets/imgs/wms_x.png");
 var $this;
 var $interval;
@@ -241,7 +242,12 @@
   },
   setup(props, context) {
     let client = ref(null);
-
+    const stationValue = ref("");
+     const savedStation = stationManager.getStation();
+     console.log("Saved Station:", savedStation); 
+      if (savedStation) {
+        stationValue.value = savedStation;
+      } 
     // 鑾峰彇鍏ㄥ眬灞炴�у拰鏂规硶
     const { proxy } = getCurrentInstance();
 
@@ -264,7 +270,7 @@
       { name: "white", color: "#fff" },
     ]);
     const links = ref([
-      { text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
+      // { text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
       {
         text: "瀹夊叏閫�鍑�",
         path: "/login",
@@ -327,20 +333,20 @@
     const createSocket = (url) => {
       // 鍒涘缓WebSocket杩炴帴
       //"ws://127.0.0.1:9295/admin"
-      client = new WebSocket(url);
+      // client = new WebSocket(url);
 
-      client.onopen = function () {
-        client.onmessage = handleMessage;
-        store.commit("setWebsocket", client);
-        console.log("WebSocket 杩炴帴鎴愬姛");
-      };
+      // client.onopen = function () {
+      //   client.onmessage = handleMessage;
+      //   store.commit("setWebsocket", client);
+      //   console.log("WebSocket 杩炴帴鎴愬姛");
+      // };
 
-      client.onclose = function () {
-        console.log("WebSocket 杩炴帴鍏抽棴");
-        setTimeout(createSocket, 10000);
-      };
+      // client.onclose = function () {
+      //   console.log("WebSocket 杩炴帴鍏抽棴");
+      //   setTimeout(createSocket, 10000);
+      // };
 
-      client.onerror = function () {};
+      // client.onerror = function () {};
     };
 
     const changeTheme = (name) => {
@@ -686,6 +692,7 @@
       visibleItem,
       closeTabsMenu,
       closeTabs,
+      stationValue,
       currentMenuId,
     };
   },

--
Gitblit v1.9.3