647556386
2026-01-27 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f
ÏîÄ¿´úÂë/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,
    };
  },