import { ApiClientFactory } from '../core/api.client.factory'; import { DevicesList, ThermalImagingWarnList } from '../model/ThermalImaging.model'; import { Pageable } from '../'; export class ThermalImagingService { constructor(private factory: ApiClientFactory) {} /** * @function loadDevicesList 获取热成像设备列表 * @param projectId 项目ID */ async loadDevicesList(projectId: string): Promise { const result = await this.factory.surveillance.get(`devices/groups/thermalImaging`, { projectId }); return result; } /** * @function loadWarnCount 获取热成像预警次数 * @param projectId 项目ID */ async loadWarnCount(projectId: string): Promise { const result = await this.factory.surveillance.get(`v2/events/warnCount`, { projectId }); return result; } /** * @function loadrealtimeWarnList 获取热成像预警信息列表 * @param */ async loadrealtimeWarnList( objectType: string, objectId: string, deviceIds: string, size: number, eventTypes: string ): Promise { const result = await this.factory.surveillance.get(`v2/events/realtime`, { objectType, objectId, deviceIds, size, eventTypes, }); return result; } /** * @function loadWarnHistoryList 获取热成像预警历史列表 * @param */ async loadWarnHistoryList( objectType: string, objectId: string, deviceIds: string, pageSize: number, fromTime: string, toTime: string, pageNo: number, eventTypes: string = 'tempDetect', sortType: string ): Promise> { const result = await this.factory.surveillance.get>(`v2/events/query/history`, { objectType, objectId, deviceIds, pageSize, pageNo, fromTime, toTime, eventTypes, sortType, }); return result; } }