From f94372d20bc4fa87a897abfb785b1fe1bbe2fdd3 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 11 Mar 2025 16:13:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/webSocketClient.ts | 2 +- frontend/src/views/machine/controlSource/index.vue | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/webSocketClient.ts b/frontend/src/utils/webSocketClient.ts index d88b557..d78013a 100644 --- a/frontend/src/utils/webSocketClient.ts +++ b/frontend/src/utils/webSocketClient.ts @@ -37,7 +37,7 @@ export default class SocketService { // let token = '4E6EF539AAF119D82AC4C2BC84FBA21F'; - const url = 'ws://192.168.1.124:7777/hello?name=cdf' + const url = 'ws://127.0.0.1:7777/hello?name=cdf' this.ws = new WebSocket(url); // 连接成功的事件 this.ws.onopen = () => { diff --git a/frontend/src/views/machine/controlSource/index.vue b/frontend/src/views/machine/controlSource/index.vue index 422abf1..02b8479 100644 --- a/frontend/src/views/machine/controlSource/index.vue +++ b/frontend/src/views/machine/controlSource/index.vue @@ -238,6 +238,10 @@ watch(webMsgSend, function (newValue, oldValue) { switch (newValue.operateCode) { case "Source": ElMessage.error('源连接失败!') + connectDisabeld.value = false + startDisabeld.value = true + pauseDisabled.value = true + break; } break; case 'server_error':