fix(aiot): 修复摄像头保存失败 + 标题改为摄像头管理系统

- saveCamera 拆分为 addCamera/updateCamera 匹配WVP实际接口
- .env 标题改为"摄像头管理系统"
- 告警列表字段适配新三表结构
- preferences 配置调整

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 15:22:31 +08:00
parent 4b54a50d8c
commit 777e52986e
5 changed files with 17 additions and 7 deletions

View File

@@ -107,9 +107,19 @@ export function getCameraList(params: {
);
}
/** 新增摄像头 */
export function addCamera(data: Partial<AiotDeviceApi.Camera>) {
return wvpRequestClient.post('/aiot/device/proxy/add', data);
}
/** 编辑摄像头 */
export function updateCamera(data: Partial<AiotDeviceApi.Camera>) {
return wvpRequestClient.post('/aiot/device/proxy/update', data);
}
/** 保存摄像头(新增/编辑,有 id 为编辑) */
export function saveCamera(data: Partial<AiotDeviceApi.Camera>) {
return wvpRequestClient.post('/aiot/device/proxy/save', data);
return data.id ? updateCamera(data) : addCamera(data);
}
/** 删除摄像头 */