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:
2026-02-11 09:57:29 +08:00
parent 777e52986e
commit e54fcf1f8c
6 changed files with 94 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ import {
getCameraList,
getMediaServerList,
getRoiByCameraId,
pushAllConfig,
saveCamera,
startCamera,
stopCamera,
@@ -278,6 +279,24 @@ async function handleExport(row: AiotDeviceApi.Camera) {
}
}
// ==================== 同步全局配置 ====================
const syncing = ref(false);
async function handleSyncAll() {
syncing.value = true;
try {
const res = await pushAllConfig();
message.success(
`同步完成ROI ${res.rois ?? 0} 条,算法绑定 ${res.binds ?? 0}`,
);
} catch {
message.error('同步全局配置失败');
} finally {
syncing.value = false;
}
}
// ==================== 分页 ====================
function handlePageChange(p: number, size: number) {
@@ -326,7 +345,12 @@ onMounted(() => {
/>
<Button type="primary" @click="loadData">查询</Button>
</div>
<Button type="primary" @click="handleAdd">添加摄像头</Button>
<Space>
<Button type="primary" :loading="syncing" @click="handleSyncAll">
同步全局配置
</Button>
<Button type="primary" @click="handleAdd">添加摄像头</Button>
</Space>
</div>
<!-- 表格 -->