import { ApiClientFactory } from '../core/api.client.factory'; import { IVideoSurveillance, IListCameras } from '../model/videoSurveillance.model'; export class VideoSurveillanceService { constructor(private factory: ApiClientFactory) {} // 获取视频组件信息 async loadVideoSurveillance(projectId: string, widgetTag: string) { const url = `/api/web/projects/${projectId}/device/video/widget/get/${widgetTag}`; const result = await this.factory.entity.get(url); return result; } // 获取摄像设备列表 async loadListCameras(projectId: string) { const url = `/api/web/projects/${projectId}/device/video/widget/listCameras`; const result = await this.factory.entity.get(url); return result; } // 保存视频组件信息 async saveVideoSurveillance(projectId: string, widgetTag: string, data: any) { const url = `/api/web/projects/${projectId}/device/video/widget/save/${widgetTag}`; const result = await this.factory.entity.post(url, data); return result; } }