From 8f2882516242419c623016454c24e3a30d0539ee Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Sat, 8 Mar 2025 10:47:19 +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/views/machine/controlSource/index.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/machine/controlSource/index.vue b/frontend/src/views/machine/controlSource/index.vue index 027ca9b..39e1fd3 100644 --- a/frontend/src/views/machine/controlSource/index.vue +++ b/frontend/src/views/machine/controlSource/index.vue @@ -139,15 +139,15 @@ onMounted(async () => { watch(webMsgSend, function (newValue, oldValue) { console.log('webMsgSend:', newValue) - if (newValue.requestId.includes('formal_real&&' && newValue.operateCode === 'OPER_GATHER')) { + if (newValue.requestId.includes('formal_real&&') && newValue.operateCode === 'OPER_GATHER') { if (newValue.code === 10200) { ElMessage.success('启动成功') - } else { + }else if(newValue.code !== 10201){ ElMessage.error('启动失败') console.log('错误信息:',webMsgSend) } } - if (newValue.requestId.includes('close_source' && newValue.operateCode === 'CLOSE_GATHER')) { + if (newValue.requestId.includes('close_source') && newValue.operateCode === 'CLOSE_GATHER') { if (newValue.code === 10200) { ElMessage.success('停止成功') } else { @@ -161,13 +161,11 @@ watch(webMsgSend, function (newValue, oldValue) { case 'INIT_GATHER': if (newValue.code == 10200) { ElMessage.success('源初始化成功') - } else { + } else if(newValue.code !== 10201) { ElMessage.error('源服务端连接失败') console.log('错误信息:',webMsgSend) } break; - - } break; case 'connect':