import { ApiClientFactory } from '../core/api.client.factory'; import { EngineeringList, EngineeringImg, MapsImgs, UpdateEngineering } from '../model/engineering.model'; export class EngineeringService { constructor(private factory: ApiClientFactory) {} // 查询工区列表 async loadEngineeringList(projectId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/workPoint/associate` ); return result; } // 取工区总图 async loadEngineeringImg(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/maps/overview`); return result; } // 取分组图片信息 async loadMapsImgs(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/maps/group`); return result; } async createEngineering(projectId: string, param: UpdateEngineering): Promise { const result = await this.factory.entity.post(`/api/web/projects/${projectId}/workPoint/associate`, param); return result; } // 删除工区 async deleteEngineering(projectId: string, id: string): Promise { const result = await this.factory.entity.delete(`/api/web/projects/${projectId}/workPoint/associate/${id}`); return result; } async deleteMapsTag(projectId: string, id: string): Promise { const result = await this.factory.entity.delete( `/api/web/projects/${projectId}/workPoint/location/associate/${id}` ); return result; } // 查询项目是否创建工区 async hasCreateEngineering(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/workPoint/hasAssociate`); return result; } // 合成器拖动位置接口(原有) 新的需要增加 "workAreaId":"5c457ce0f25e98a5d85525b1" }