import { ApiClientFactory } from '../core/api.client.factory'; import { IOuterWallItem, DeviceItem, DeviceRuleModel, IOuterWallData, DeviceParams, IPointInfoItem, IPointAlarmStatiParams, IpointAlarmStatiItem, IScaffoldPointList, IPointLastRecords, } from '../model/outerWallFrame.model'; export class OuterWallFrameService { constructor(private factory: ApiClientFactory) {} // 外墙架监测-倾斜-水平位移监测 async getComponentData(projectId: string, params: any) { const res = await this.factory.entity.get(`/api/web/projects/${projectId}/scaffold/rawRecords`, params); return res; } // 查询外墙监测设备报警阀值列表 async getOuterWallList(projectId: string): Promise { const url = `/api/web/projects/${projectId}/scaffold/list`; const result = await this.factory.entity.get(url); return result; } // 查询外墙设备列表信息 async getDeviceList(projectId: string, params: DeviceParams): Promise { const url = `/api/web/projects/${projectId}/scaffold/deviceInfos`; const result = await this.factory.entity.get(url, params); return result; } // 新增/修改外墙监测设备报警阀值 async editDevice(projectId: string, params: DeviceRuleModel) { const url = `/api/web/projects/${projectId}/scaffold/save`; const result = await this.factory.entity.post(url, params); return result; } // 删除外墙监测设备报警阀值 async deleteDevice(projectId: string, id: string) { const url = `/api/web/projects/${projectId}/scaffold/delete/${id}`; const result = await this.factory.entity.delete(url); return result; } // 获取外墙架设备列表 async getOuterWallDeviceInfos(projectId: string): Promise { const url = `/api/web/projects/${projectId}/scaffold/pointsLocation`; const result = await this.factory.entity.get(url); return result; } // 保存外墙架地图 programType: scaffold async saveOuterWallMap(projectId: string, params: any, programType: string = 'scaffold'): Promise { const url = `/api/web/projects/${projectId}/program/maps/programType/${programType}`; const result = await this.factory.entity.post(url, params); return result; } // 监测点位 async getPointInfo(projectId: string): Promise { const url = `/api/web/projects/${projectId}/scaffold/pointInfo`; const result = await this.factory.entity.get(url); return result; } // 异常次数分析 async getPointAlarmStati(projectId: string, params: IPointAlarmStatiParams): Promise { const url = `/api/web/projects/${projectId}/scaffold/pointAlarmStati`; const result = await this.factory.entity.get(url, params); return result; } // 组件 - 监测点分布图 async getScaffoldPointList(projectId: string): Promise { const url = `/api/web/projects/${projectId}/scaffold/pointList`; const result = await this.factory.entity.get(url); return result; } // 组件 - 监测点分布图 - 表格 async getPointLastRecords(projectId: string): Promise { const url = `/api/web/projects/${projectId}/scaffold/pointLastRecords`; const result = await this.factory.entity.get(url); return result; } }