feat(aiot-device): 摄像头管理增加增删改功能
- Camera 接口扩展完整字段(type、timeout、rtspType、enable 等) - 新增 saveCamera、deleteCamera、getMediaServerList API - 摄像头管理页面增加添加/编辑弹窗(表单含代理类型、拉流地址、RTSP方式等) - 增加删除确认对话框 - Vite 代理增加媒体服务器 API 转发规则 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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<AiotDeviceApi.Camera>) {
|
||||
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<any>('/aiot/device/server/online/list');
|
||||
}
|
||||
|
||||
// ==================== ROI 区域管理 API ====================
|
||||
|
||||
/** 获取 ROI 列表(分页) */
|
||||
|
||||
Reference in New Issue
Block a user