diff --git a/apps/web-antd/src/api/aiot/device/index.ts b/apps/web-antd/src/api/aiot/device/index.ts index 6dd952945..f82f868ea 100644 --- a/apps/web-antd/src/api/aiot/device/index.ts +++ b/apps/web-antd/src/api/aiot/device/index.ts @@ -49,9 +49,18 @@ export namespace AiotDeviceApi { /** 摄像头(拉流代理) */ export interface Camera { id?: number; + type?: string; // default | ffmpeg app?: string; stream?: string; srcUrl?: string; + timeout?: number; + rtspType?: string; // 0=TCP, 1=UDP, 2=Multicast + enable?: boolean; + enableAudio?: boolean; + enableMp4?: boolean; + enableDisableNoneReader?: boolean; + relatesMediaServerId?: string; + ffmpegCmdKey?: string; pulling?: boolean; mediaServerId?: string; } @@ -79,6 +88,23 @@ export function stopCamera(id: number) { return wvpRequestClient.get('/aiot/device/proxy/stop', { params: { id } }); } +/** 保存摄像头(新增/编辑) */ +export function saveCamera(data: Partial) { + return wvpRequestClient.post('/aiot/device/proxy/save', data); +} + +/** 删除摄像头 */ +export function deleteCamera(id: number) { + return wvpRequestClient.delete('/aiot/device/proxy/delete', { + params: { id }, + }); +} + +/** 获取在线媒体服务器列表 */ +export function getMediaServerList() { + return wvpRequestClient.get('/aiot/device/server/online/list'); +} + // ==================== ROI 区域管理 API ==================== /** 获取 ROI 列表(分页) */ diff --git a/apps/web-antd/src/views/aiot/device/camera/index.vue b/apps/web-antd/src/views/aiot/device/camera/index.vue index cd930010a..230ff7bad 100644 --- a/apps/web-antd/src/views/aiot/device/camera/index.vue +++ b/apps/web-antd/src/views/aiot/device/camera/index.vue @@ -1,7 +1,7 @@