feat(aiot): 告警截图展示 + 全局配置同步 + API兼容修复
- 告警列表新增截图缩略图列,支持预览大图 - 告警详情显示截图 URL 链接 - 摄像头管理页新增「同步全局配置」按钮 - 告警 API 路径修正: camera-summary → device-summary - 告警 ID 兼容 alarmId 字符串格式 - Vite 代理新增 /uploads、/captures、/aiot/storage 路由 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,8 @@ import { requestClient } from '#/api/request';
|
||||
export namespace AiotAlarmApi {
|
||||
/** AI 告警 VO */
|
||||
export interface Alert {
|
||||
id?: number;
|
||||
id?: number | string;
|
||||
alarmId?: string;
|
||||
alertNo?: string;
|
||||
cameraId?: string;
|
||||
cameraName?: string;
|
||||
@@ -81,21 +82,25 @@ export function getAlertPage(params: PageParam) {
|
||||
}
|
||||
|
||||
/** 获取告警详情 */
|
||||
export function getAlert(id: number) {
|
||||
export function getAlert(id: number | string) {
|
||||
return requestClient.get<AiotAlarmApi.Alert>(
|
||||
`/aiot/alarm/alert/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 处理告警 */
|
||||
export function handleAlert(id: number, status: string, remark?: string) {
|
||||
export function handleAlert(
|
||||
id: number | string,
|
||||
status: string,
|
||||
remark?: string,
|
||||
) {
|
||||
return requestClient.put('/aiot/alarm/alert/handle', null, {
|
||||
params: { id, status, remark },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除告警 */
|
||||
export function deleteAlert(id: number) {
|
||||
export function deleteAlert(id: number | string) {
|
||||
return requestClient.delete(`/aiot/alarm/alert/delete?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -112,7 +117,7 @@ export function getAlertStatistics(startTime?: string, endTime?: string) {
|
||||
/** 以摄像头维度获取告警汇总 */
|
||||
export function getCameraAlertSummary(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiotAlarmApi.CameraAlertSummary>>(
|
||||
'/aiot/alarm/camera-summary/page',
|
||||
'/aiot/alarm/device-summary/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -244,6 +244,13 @@ export function pushConfig(cameraId: string) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 一次性推送全部配置到本地Edge */
|
||||
export function pushAllConfig() {
|
||||
return wvpRequestClient.post<Record<string, any>>(
|
||||
'/aiot/device/config/push-all',
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出摄像头配置 JSON */
|
||||
export function exportConfig(cameraId: string) {
|
||||
return wvpRequestClient.get<Record<string, any>>(
|
||||
|
||||
Reference in New Issue
Block a user