Squashed commit of the following:
All checks were successful
local-test分支构建发布 / Docker-Build (push) Successful in 1m51s
All checks were successful
local-test分支构建发布 / Docker-Build (push) Successful in 1m51s
commit a2ae99209f
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date: Mon Nov 11 17:48:52 2024 +0800
订阅调整
This commit is contained in:
parent
bdaa3507e9
commit
40e11e0d67
@ -395,7 +395,10 @@ onMounted(() => {
|
|||||||
tableRef.value.requestServerInteraction();
|
tableRef.value.requestServerInteraction();
|
||||||
lineNetStore.alarmInfoListTable = tableRef.value;
|
lineNetStore.alarmInfoListTable = tableRef.value;
|
||||||
destinations.forEach((destination) => {
|
destinations.forEach((destination) => {
|
||||||
socket = webSocketConnect(destination, handler);
|
allSocketsAndDestinations.push({
|
||||||
|
socket: webSocketConnect(destination, handler),
|
||||||
|
destination,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -584,7 +587,10 @@ function openAlarmDialog(row: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let socket: StompMessagingClient | null = null;
|
let allSocketsAndDestinations: {
|
||||||
|
socket: StompMessagingClient;
|
||||||
|
destination: string;
|
||||||
|
}[] = [];
|
||||||
let destinations: string[] = [];
|
let destinations: string[] = [];
|
||||||
function handler(message: Uint8Array) {
|
function handler(message: Uint8Array) {
|
||||||
const storage = alert.NccAlertInfoMessage.deserialize(message);
|
const storage = alert.NccAlertInfoMessage.deserialize(message);
|
||||||
@ -592,8 +598,8 @@ function handler(message: Uint8Array) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
destinations.forEach((destination) => {
|
allSocketsAndDestinations.forEach((info) => {
|
||||||
closeWebSocketConnect(socket, destination);
|
closeWebSocketConnect(info.socket, info.destination);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user