From a4ad932fb8ae0d2bc469c87b195bd1303bd062b3 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Wed, 7 May 2025 14:09:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E8=AF=95socket=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E5=8F=82=E6=95=B0=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/FTStream/index.vue | 4 +--- src/views/debug/index.vue | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/common/FTStream/index.vue b/src/components/common/FTStream/index.vue index 88c3067..dafd571 100644 --- a/src/components/common/FTStream/index.vue +++ b/src/components/common/FTStream/index.vue @@ -20,9 +20,7 @@ const maskRef = ref(null) const maskHeaderRef = ref(null) const statusMap = { - info: 'info', error: 'danger', - warn: 'warning', success: 'success', finish: 'primary', SEND: 'primary', @@ -112,7 +110,7 @@ const handleMouseUp = () => { v-for="item in systemStore.systemList" :key="item" :timestamp="JSON.stringify(item.content)" > - + {{ item.title }} diff --git a/src/views/debug/index.vue b/src/views/debug/index.vue index bbe3859..73d98fc 100644 --- a/src/views/debug/index.vue +++ b/src/views/debug/index.vue @@ -11,14 +11,16 @@ const debugStore = useDebugStore() let currentCommandId = '' onMounted(() => { - socket.init(receiveMessage, 'notification') + socket.init(receiveMessage, 'cmd_debug') + socket.init(receiveMessage, 'cmd_response') }) onUnmounted(() => { - socket.unregisterCallback(receiveMessage, 'notification') + socket.unregisterCallback(receiveMessage, 'cmd_debug') + socket.unregisterCallback(receiveMessage, 'cmd_response') }) -const receiveMessage = (data: Socket.NotificationData) => { +const receiveMessage = (data: Socket.cmdData) => { data.commandId === currentCommandId && systemStore.pushSystemList(data) }