From 876d9cfa00dc97db585b9dd5d22afc7bea9d3a61 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Sat, 8 Mar 2025 10:48:25 +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 --- .../src/views/machine/controlSource/index.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/machine/controlSource/index.vue b/frontend/src/views/machine/controlSource/index.vue index ffec1f2..f0a854d 100644 --- a/frontend/src/views/machine/controlSource/index.vue +++ b/frontend/src/views/machine/controlSource/index.vue @@ -138,15 +138,15 @@ onMounted(async () => { }) watch(webMsgSend, function (newValue, oldValue) { - 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 { @@ -160,23 +160,20 @@ 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': switch (newValue.operateCode) { case "Source": - ElMessage.error('源服务端连接失败') + ElMessage.error('源服务端连接失败') } break; } - }) // 获取树字典 const treeInfo = async (currentMode: string) => {