From f7bfde01356c6f50817c447a43e5766f496f9acd Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Mon, 9 Feb 2026 09:51:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(aiot-device):=20=E6=91=84=E5=83=8F?= =?UTF-8?q?=E5=A4=B4=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E5=A2=9E=E5=88=A0?= =?UTF-8?q?=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Camera 接口扩展完整字段(type、timeout、rtspType、enable 等) - 新增 saveCamera、deleteCamera、getMediaServerList API - 摄像头管理页面增加添加/编辑弹窗(表单含代理类型、拉流地址、RTSP方式等) - 增加删除确认对话框 - Vite 代理增加媒体服务器 API 转发规则 Co-Authored-By: Claude Opus 4.6 --- apps/web-antd/src/api/aiot/device/index.ts | 26 ++ .../src/views/aiot/device/camera/index.vue | 276 ++++++++++++++++-- apps/web-antd/vite.config.mts | 7 + 3 files changed, 286 insertions(+), 23 deletions(-) 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 @@