import { ApiClientFactory } from '../core/api.client.factory'; import { MapList, UploadMapFile } from '../model/mapManagement.model'; export class MapManagementService { constructor(private factory: ApiClientFactory) {} // 获取地图列表 async loadMapList(projectId: string, modelType: string) { const url = `/api/web/projects/${projectId}/maps/list/${modelType}`; const result = await this.factory.entity.get(url); return result; } // 地图URL上传到服务器 async loadUpDateMap(projectId: string, modelType: string, data: UploadMapFile) { const url = `/api/web/projects/${projectId}/maps/save/${modelType}`; const result = await this.factory.entity.post(url, data); return result; } // 选择地图 async loadConfigMap(projectId: string, modelType: string, id: string) { const url = `/api/web/projects/${projectId}/maps/choice/${modelType}/${id}`; const result = await this.factory.entity.put(url); return result; } // 删除地图 async loadDeleteMap(projectId: string, id: string) { const url = `/api/web/projects/${projectId}/maps/delete/${id}`; const result = await this.factory.entity.delete(url); return result; } // 获取BIM浏览token async loadViewToken(projectId: string, fileId: string) { const url = `/api/web/projects/${projectId}/maps/getViewToken/${fileId}`; const result = await this.factory.entity.get(url); return result; } // 宽屏 - 查询中央模型组件配置 async loadCentreModelInfo(projectId: string) { const url = `/api/web/projects/${projectId}/subgroupConfig/centreModel/info?subgroupType=2`; const result = await this.factory.entity.get(url); return result; } // 宽屏 - 保存中央模型组件配置 async loadCentreModelSave(projectId: string, params: any) { const url = `/api/web/projects/${projectId}/subgroupConfig/centreModel/save`; const result = await this.factory.entity.post(url, params); return result; } // 宽屏 - 查询中央图片组件配置 async getCentrePictureConfig(projectId: string) { const url = `/api/web/projects/${projectId}/subgroupConfig/centrePicture/info?subgroupType=8`; const result = await this.factory.entity.get(url); return result; } // 宽屏 - 保存中央图片配置 async loadCentrePictureSave(projectId: string, params: any) { const url = `/api/web/projects/${projectId}/subgroupConfig/centrePicture/save`; const result = await this.factory.entity.post(url, params); return result; } }