From 1c703617885275090d69c697e82e61f4940c0bdc Mon Sep 17 00:00:00 2001 From: yyt <306727702@qq.com> Date: 星期二, 28 五月 2024 14:20:29 +0800 Subject: [PATCH] 380新产品,优化 --- jcdm-ui/src/views/main/kb/engineCheck/index.vue | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/engineCheck/index.vue b/jcdm-ui/src/views/main/kb/engineCheck/index.vue index 28dc346..198a131 100644 --- a/jcdm-ui/src/views/main/kb/engineCheck/index.vue +++ b/jcdm-ui/src/views/main/kb/engineCheck/index.vue @@ -74,7 +74,7 @@ </template> <script> -import { listOrderScheduling, forceUploadMethod, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; +import { listOrderScheduling, forceUploadMethod, getUrl, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection"; import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; import WebSocketReconnect from "@/utils/WebsocketTool"; @@ -119,6 +119,7 @@ props: [], data() { return { + websocketUrl: '', websocket: null, result: {}, transEngineNo: '', @@ -166,11 +167,22 @@ // immediate:true // } }, - created() {}, + created() { + + }, mounted() { - this.initWebSocket() + this.getWebUrl() + }, methods: { + getWebUrl(){ + console.log("1111") + getUrl().then(res=>{ + console.log("res",res) + this.websocketUrl = res+"OP120" + this.initWebSocket() + }) + }, forceUpload() { console.log('0000', this.form.engineNo) if (this.form.engineNo !== null) { @@ -189,7 +201,8 @@ //鍒ゆ柇褰撳墠娴忚鍣ㄦ槸鍚︽敮鎸乄ebSocket if ('WebSocket' in window) { //杩炴帴WebSocket鑺傜偣 - this.websocket = new WebSocketReconnect('ws://127.0.0.1:8086/websocket/111122') + console.log("9999",this.websocketUrl) + this.websocket = new WebSocketReconnect(this.websocketUrl) //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶 this.websocket.socket.onmessage = (event) => { -- Gitblit v1.9.3