import { Pageable } from '../'; import { ApiClientFactory } from '../core/api.client.factory'; import { TripartiteVideoList, TrilateralDeviceDetail, TrilateralVendorList, TrilateralCategoryList } from '../model/TrilateralConfig.model'; export class TripartiteConfigService { constructor(private factory: ApiClientFactory) {} /** * 获取萤石NVR列表 * @param projectId 项目ID * @param type */ async loadTrilateralVideoList(projectId: string, type: string, params?: any): Promise { const result = await this.factory.surveillance.get( `/config/partner/projects/${projectId}/devices?type=${type}`, params ); return result; } /** * 删除视频相关设备 * @param projectId 项目ID * @param id 数据ID */ async deleteVideoDevice(projectId: string, id: string): Promise { return await this.factory.surveillance.delete(`/config/partner/projects/${projectId}/devices/${id}`); } /** * @function loadVendorList 获取vendor厂家信息列表 */ async loadVendorList(): Promise { const result = await this.factory.surveillance.get(`/system/dict/vendors`); return result; } /** * @function loadCategoryList 获取Category信息列表 */ async loadCategoryList(): Promise { const result = await this.factory.surveillance.get(`/system/dict/cameraTypes`); return result; } /** * @function loadDeviceDetail 获取设备详情信息 * @param projectId 项目ID * @param deviceId 设备ID */ async loadDeviceDetail(projectId: string, deviceId: string): Promise { const result = await this.factory.surveillance.get( `/config/partner/projects/${projectId}/devices/${deviceId}` ); return result; } /** * @function 监控全部 */ async addAllMonitor(projectId: string) { return await this.factory.surveillance.put(`/config/partner/projects/${projectId}/devices/monitor`); } /** * @function 取消监控全部 */ async cancelAllMonitor(projectId: string) { return await this.factory.surveillance.put(`/config/partner/projects/${projectId}/devices/cancelMonitor`); } /** * @function 加入监控 */ async addMonitor(projectId: string, deviceId: string) { return await this.factory.surveillance.put( `config/partner/projects/${projectId}/devices/${deviceId}/monitor` ); } /** * @function 取消监控 */ async cancelMonitor(projectId: string, deviceId: string) { return await this.factory.surveillance.put( `config/partner/projects/${projectId}/devices/${deviceId}/cancelMonitor` ); } /** * @function 同步摄像头 */ async syncDeviceImage(projectId: string) { return await this.factory.surveillance.put(`config/partner/projects/${projectId}/devices/syncDeviceImage`); } /** * @function 修改信息 */ async updateCamera(projectId: string,params:object) { return await this.factory.surveillance.put(`/config/partner/projects/${projectId}/devices/ipc`,params); } }