socket调整
This commit is contained in:
parent
64569f9b3c
commit
8d926b37cd
@ -20,8 +20,9 @@ export function webSocketConnect(
|
||||
socket?.subscribe(destination, handler);
|
||||
});
|
||||
socket.on('disconnected', () => {
|
||||
console.log(6666);
|
||||
console.log('disconnected');
|
||||
});
|
||||
return socket;
|
||||
}
|
||||
|
||||
export function closeWebSocketConnect(
|
||||
|
@ -165,7 +165,7 @@ onMounted(() => {
|
||||
}
|
||||
document.addEventListener('click', watchInteract);
|
||||
document.addEventListener('keydown', watchInteract);
|
||||
webSocketConnect(socket, destination, handler);
|
||||
socket = webSocketConnect(socket, destination, handler);
|
||||
});
|
||||
|
||||
//模拟报警
|
||||
|
@ -372,7 +372,7 @@ onMounted(() => {
|
||||
setTimeout(() => {
|
||||
tableRef.value.requestServerInteraction();
|
||||
lineNetStore.alarmInfoListTable = tableRef.value;
|
||||
webSocketConnect(socket, destination, handler);
|
||||
socket = webSocketConnect(socket, destination, handler);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user