| | |
| | | </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 |
| | |
| | | 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; |
| | |
| | | }, |
| | | 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(); |
| | | |
| | |
| | | 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) => { |
| | |
| | | visibleItem, |
| | | closeTabsMenu, |
| | | closeTabs, |
| | | stationValue, |
| | | currentMenuId, |
| | | }; |
| | | }, |