import { ApiClientFactory } from '../core/api.client.factory'; import { IGasContentMonitoringList, IGasContentMonitoringModal } from '../model/sewageMonitor.model'; export class GasContentService { constructor(private factory: ApiClientFactory) {} // 气体监测-查询规则配置信息 jc 2020年07月21日17:33:52 async getsaveSewageMonitorList(projectId: string, type: any): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/harmfulgas/${type}/getConfigs`); return result; } // 气体监测-保存规则配置信息 async saveSewageMonitorInfo(projectId: string, type: any, data: any): Promise { const result = await this.factory.entity.post( `/api/web/projects/${projectId}/harmfulgas/${type}/config`, data ); return result; } // 气体监测-删除配置信息 async deletesaveSewageMonitorInfo(projectId: string, type: any, id: string): Promise { const result = await this.factory.entity.delete( `/api/web/projects/${projectId}/harmfulgas/${type}/delete?id=${id}` ); return result; } // 通过气体查询实时报警值 async getAlarmValueWhithGasType(projectId: string, type: any, data: any): Promise { const result = await this.factory.entity.post( `/api/web/projects/${projectId}/harmfulgas/${type}/getAlarmValue`, data ); return result; } // /api/web/projects/{projectId}/harmfulgas/{type}/getAlarmValue // 获取污水监测 数字工地 数据接口 async getSewageInfo(projectId: string, deviceId: any): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/sewage/lastInfo?deviceId=${deviceId}` ); return result; } // 获取气体监测 消息通知 async getNoticeInfo(projectId: string, data: any): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/harmfulgas/view/getAlarmDataPage`, data ); return result; } // 获取气体监测 饼图 统计 async getPieChartInfo(projectId: string, data: any): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/harmfulgas/view/getAlarmStatistics`, data ); return result; } // 获取气体监测 饼图 统计 --二级弹窗详情 async getPieChartDetailData(projectId: string, data: any): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/harmfulgas/view/getAlarmStatistiDetails`, data ); return result; } // 气体含量监测 async loadGasContentMonitoring(projectId: string, monitorType: number): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/harmfulgas/todayinfo/survey`, { monitorType, } ); return result; } // 气体含量监测 async loadGasContentMonitoringModal(projectId: string, deviceId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/harmfulgas/device/${deviceId}/info` ); return result; } }