From 9fd72bc9710ec094f7001c8a64fb3d1a882dc02a Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 23 十二月 2025 10:15:59 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEA_WMSClient/src/views/Index.vue | 33 ++++++++++++++++++++-------------
1 files changed, 20 insertions(+), 13 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..eaa6fba 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();
@@ -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