改造: 全局参数配置页面支持按设备查看和修改 ROI 绑定参数

This commit is contained in:
2026-04-10 12:51:49 +08:00
parent 6eea4e81cd
commit e0983a693a
2 changed files with 100 additions and 16 deletions

View File

@@ -232,9 +232,10 @@ export async function getSnapUrl(cameraCode: string, force = false): Promise<str
// ==================== 算法管理 ====================
/** 算法列表 */
export function getAlgorithmList() {
export function getAlgorithmList(deviceId?: string) {
return wvpRequestClient.get<AiotDeviceApi.Algorithm[]>(
'/aiot/device/algorithm/list',
{ params: deviceId ? { deviceId } : {} },
);
}
@@ -246,6 +247,14 @@ export function saveAlgoGlobalParams(algoCode: string, globalParams: string) {
);
}
/** 批量更新设备算法参数 */
export function updateDeviceAlgoParams(deviceId: string, algoCode: string, params: string) {
return wvpRequestClient.post(
`/aiot/device/algorithm/device-binds/${deviceId}/${algoCode}`,
{ params },
);
}
// ==================== 算法绑定 ====================
/** 绑定算法到 ROI */