|
@ -11,14 +11,16 @@ const debugStore = useDebugStore() |
|
|
let currentCommandId = '' |
|
|
let currentCommandId = '' |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
socket.init(receiveMessage, 'notification') |
|
|
|
|
|
|
|
|
socket.init(receiveMessage, 'cmd_debug') |
|
|
|
|
|
socket.init(receiveMessage, 'cmd_response') |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
onUnmounted(() => { |
|
|
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) |
|
|
data.commandId === currentCommandId && systemStore.pushSystemList(data) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|