告警大屏完成

This commit is contained in:
龚皓
2024-11-11 15:37:46 +08:00
parent f456cdaa8c
commit a2234922c8
30 changed files with 5551 additions and 440 deletions

View File

@@ -320,7 +320,8 @@ class BoxApi {
timeBefore: string | null = null,
timeAfter: string | null = null,
types: string | null = null,
camera_id: number | null = null
camera_id: number | null = null,
status?: 'pending' | 'closed' | null
): Promise<any> {
// 计算 offset
const offset = (currentPage - 1) * pageSize;
@@ -340,6 +341,9 @@ class BoxApi {
if(camera_id){
url += `&camera_id=${camera_id}`;
}
if (status) {
url += `&status=${encodeURIComponent(status)}`;
}
try {
// 发送 GET 请求

View File

@@ -9,7 +9,7 @@ const rememberedAddress = localStorage.getItem('rememberedAddress') || '127.0.0.
// 连接 WebSocket
const connectWebSocket = () => {
websocket.value = new WebSocket(`ws://${rememberedAddress}:8080/event/ws`);
websocket.value = new WebSocket(`ws://${rememberedAddress}:8080/ws/event`);
websocket.value.onopen = () => {
ElMessage.success('全局 WebSocket 连接成功');
isWebSocketConnected.value = true;