import request from '@/utils/request'; /** 获取地图树形类表*/ export function getMapTree() { return request({ url: '/api/mapBuild/tree', method: 'get' }); } /** 草稿地图列表*/ export function listMap(params) { return request({ url: '/api/mapBuild/list', method: 'get', params: params }); } /** 获取草稿地图详细内容*/ export function getMapDetail(id) { return request({ url: `/api/mapBuild/${id}/mapDataDetail`, method: 'get' }); } /** 新建草稿地图*/ export function newMap(data) { return request({ url: '/api/mapBuild/create', method: 'post', data: data }); } /** 更新草稿地图*/ export function updateMap(data) { return request({ url: `/api/mapBuild/${data.id}`, method: 'put', data: data }); } /** 删除草稿地图*/ export function deleteMap(data) { return request({ url: `/api/mapBuild/delete/${data}`, method: 'delete' }); } /** 保存草稿地图*/ export function saveMap(data) { return request({ url: `/api/mapBuild/${data.mapId}/saveElements`, method: 'post', data: data }); } // 保存新草稿地图 // export function saveNewMap(data) { // return request({ // url: `/api/mapBuild/${data.mapId}/saveNewElements`, // method: 'post', // data: data // }); // } /** 草稿地图另存为*/ export function saveAsMap(data) { return request({ url: `/api/mapBuild/${data.id}/saveAs`, method: 'post', data: { name: data.name } }); } /** 使用发布地图新建草稿地图*/ export function newUsePublishMap(data) { return request({ url: '/api/mapBuild/createFrom', method: 'post', data: data }); } /** 发布地图*/ export function publishMap(data) { return request({ url: `/api/mapBuild/${data.id}/publish`, method: 'post', data: data }); } export function publishMap3d(data) { return request({ url: `/api/mapBuild/${data.id}/publish/3d`, method: 'post', data: data }); } /** 草稿地图数据导入*/ export function postBuildMapImport(data) { return request({ url: `/api/mapBuild/import`, method: 'post', data: data, time: 60000 }); } /** 查询进路列表*/ export function listRouteRoute(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/route`, method: 'get', params: params }); } /** 查询进路地图列表*/ export function listRouteMapRoute(mapId) { return request({ url: `/api/mapBuild/${mapId}/route/all`, method: 'get' }); } /** 查询进路明细*/ export function queryRouteRouteDetail(data) { return request({ url: `/api/mapBuild/route/${data.id}`, method: 'get' }); } /** 创建进路*/ export function createRouteRoute(data) { return request({ url: `/api/mapBuild/route`, method: 'post', data: data }); } /** 删除进路*/ export function deleteRouteRoute(id) { return request({ url: `/api/mapBuild/route/${id}`, method: 'delete' }); } /** 更新进路*/ export function updateRouteRoute(data) { return request({ url: `/api/mapBuild/route/${data.id}`, method: 'put', data: data }); } /** 创建联动道岔*/ export function createLinkageSwitch(data) { return request({ url: `/api/mapBuild/switchCoupled`, method: 'post', data: data }); } /** 删除联动道岔*/ export function deleteLinkageSwitch(coupleId) { return request({ url: `/api/mapBuild/switchCoupled/${coupleId}`, method: 'delete' }); } /** get联动道岔列表*/ export function listLinkageSwitch(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/switchCoupled`, method: 'get', params: params }); } /** 草稿地图数据校验*/ export function verifyMap(id) { return request({ url: `/api/mapBuild/${id}/checkData`, method: 'get' }); } /** 分页查询交路数据*/ export function listRouting(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/routing`, method: 'get', params: params }); } /** 创建交路*/ export function addRouting(data) { return request({ url: `/api/mapBuild/routing`, method: 'post', data: data }); } /** 删除交路*/ export function deleteRouting(routingId) { return request({ url: `/api/mapBuild/routing/${routingId}`, method: 'delete' }); } /** 获取交路详情*/ export function getRouting(routingId) { return request({ url: `/api/mapBuild/routing/${routingId}`, method: 'get' }); } /** 更新交路*/ export function updateRouting(data) { return request({ url: `/api/mapBuild/routing/${data.id}`, method: 'put', data: data }); } // 创建自动信号 old(旧数据) export function postAutoSignal(data) { return request({ url: `/api/mapBuild/autoSignal`, method: 'post', data: data }); } // 删除自动信号 old(旧数据) export function delAutoSignal(autoSignalId) { return request({ url: `/api/mapBuild/autoSignal/${autoSignalId}`, method: 'delete' }); } // 分页获取自动信号列表 old(旧数据) export function getAutoSignalList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/autoSignal`, method: 'get', params }); } // 获取自动信号详情 old(旧数据) export function getAutoSignalDetail(autoSignalId) { return request({ url: `/api/mapBuild/autoSignal/${autoSignalId}`, method: 'get' }); } // 更新自动信号 old(旧数据) export function putAutoSignal(data) { return request({ url: `/api/mapBuild/autoSignal/${data.autoSignalId}`, method: 'put', data: data }); } // 分页获取自动信号列表 new(新数据) export function getAutoSignalListNew(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/autoSignalNew`, method: 'get', params }); } // 删除自动信号 new(新数据) export function delAutoSignalNew(autoSignalId) { return request({ url: `/api/mapBuild/autoSignalNew/${autoSignalId}`, method: 'delete' }); } // 获取自动信号详情 new(新数据) export function getAutoSignalDetailNew(autoSignalId) { return request({ url: `/api/mapBuild/autoSignalNew/${autoSignalId}`, method: 'get' }); } // 创建自动信号 new(新数据) export function postAutoSignalNew(data) { return request({ url: `/api/mapBuild/autoSignalNew`, method: 'post', data: data }); } // 更新自动信号 new(新数据) export function putAutoSignalNew(data) { return request({ url: `/api/mapBuild/autoSignalNew/${data.autoSignalId}`, method: 'put', data: data }); } export function getListByCityCode(cityCode) { return request({ url: `/api/mapBuild/${cityCode}/list`, method: 'get' }); } // 创建信号机接近区段 export function postApproachSection(data) { return request({ url: `/api/mapBuild/approachSection`, method: 'post', data: data }); } // 删除信号机接近区段 export function deleteApproachSection(id) { return request({ url: `/api/mapBuild/approachSection/${id}`, method: 'delete' }); } // 根据id查询信号机接近区段 export function getApproachSectionDetail(id) { return request({ url: `/api/mapBuild/approachSection/${id}`, method: 'get' }); } // 更新信号机接近区段 export function putApproachSection(data) { return request({ url: `/api/mapBuild/approachSection/${data.id}`, method: 'put', data: data }); } // 分页查询信号机接近区段列表 export function getApproachSectionList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/approachSection/paging`, method: 'get', params }); } // 延续保护相关接口 创建,修改,删除,根据id查询, 分页查询 export function postContinueProtect(data) { return request({ url: `/api/mapBuild/overlap`, method: 'post', data: data }); } export function putContinueProtect(data) { return request({ url: `/api/mapBuild/overlap/${data.id}`, method: 'put', data: data }); } export function delContinueProtect(id) { return request({ url: `/api/mapBuild/overlap/${id}`, method: 'delete' }); } export function getContinueProtectById(id) { return request({ url: `/api/mapBuild/overlap/${id}`, method: 'get' }); } export function getContinueProtectList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/overlap/paging`, method: 'get', params }); } // 自动折返相关接口 创建,修改,删除,根据id查询, export function postAutoReentry(data) { return request({ url: `/api/mapBuild/autoReentry`, method: 'post', data:data }); } export function putAutoReentry(data) { return request({ url: `/api/mapBuild/autoReentry/${data.id}`, method: 'put', data:data }); } export function delAutoReentry(id) { return request({ url: `/api/mapBuild/autoReentry/${id}`, method: 'delete' }); } export function getAutoReentryById(id) { return request({ url: `/api/mapBuild/autoReentry/${id}`, method: 'get' }); } export function getAutoReentryList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/autoReentry/paging`, method: 'get', params }); } // 新版地图进路相关接口 创建,修改,删除,根据id查询, export function postRouteNew(data) { return request({ url: `/api/mapBuild/routeNew`, method: 'post', data:data }); } export function putRouteNew(data) { return request({ url: `/api/mapBuild/routeNew/${data.id}`, method: 'put', data:data }); } export function delRouteNew(id) { return request({ url: `/api/mapBuild/routeNew/${id}`, method: 'delete' }); } export function getRouteNewById(id) { return request({ url: `/api/mapBuild/routeNew/${id}`, method: 'get' }); } export function getRouteNewList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/routeNew`, method: 'get', params }); } // 获取自动折返分组列表 export function getAutoReentryGroupList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/autoReentry/group/reentryTrack`, method: 'get', params }); }