import { ApiClientFactory } from '../core/api.client.factory'; export class HeatMapService { constructor(private api: ApiClientFactory) {} /** * 添加配置 * @param configuration */ addConfig(configuration: any) { return this.api.surveillance.post(`/projects/devices/heatmap/config`, configuration); } /** * 配置列表 */ configList(projectId: string) { return this.api.surveillance.get(`/projects/devices/heatmap/config`, { projectId }); } /** * source列表 */ sourceList() { return this.api.surveillance.get<{ id: string; name: string }[]>(`/projects/devices/heatmap/config/sources`); } /** * 下发 */ issue(id: string) { return this.api.surveillance.put(`/projects/devices/heatmap/config/issue/${id}`); } /** * 删除 */ delete(id: string) { return this.api.surveillance.delete(`/projects/devices/heatmap/config/${id}`); } /** * 热力图展示 */ heatMapData( projectId: string, params: { fromTime: string; toTime: string; deviceId?: string; } ) { return this.api.surveillance.get(`/projects/devices/heatmap`, { projectId, ...params }); } }