211 lines
4.6 KiB
JavaScript
211 lines
4.6 KiB
JavaScript
import request from '@/utils/request';
|
||
|
||
/** 获取发布地图管理分页*/
|
||
export function getPublishMapList(params) {
|
||
return request({
|
||
url: '/api/map',
|
||
method: 'get',
|
||
params: params
|
||
});
|
||
}
|
||
/** 获取所有可用地图列表*/
|
||
export function getPublishMapListOnline() {
|
||
return request({
|
||
url: '/api/map/listOnline',
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 根据皮肤获取发布地图列表*/
|
||
export function getPublishMapListByLineCode(lineCode) {
|
||
return request({
|
||
url: `/api/map/${lineCode}/list`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 根据地图id获取地图版本信息*/
|
||
export function getPublishMapVersionById(id) {
|
||
return request({
|
||
url: `/api/map/${id}/version`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 根据地图id获取发布地图详细内容*/
|
||
export function getPublishMapDetailById(id) {
|
||
return request({
|
||
url: `/api/map/${id}/details`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 获取发布地图列表(不包含项目线路)*/
|
||
export function listPublishMap(params) {
|
||
return request({
|
||
url: `/api/map/list`,
|
||
method: 'get',
|
||
params
|
||
});
|
||
}
|
||
|
||
/** 根据地图id获取地图信息*/
|
||
export function getPublishMapInfo(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 发布地图数据导出*/
|
||
export function getPublishMapExport(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}/export`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 删除发布地图*/
|
||
export function delPublishMap(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}`,
|
||
method: 'DELETE'
|
||
});
|
||
}
|
||
|
||
/** 发布地图上架*/
|
||
export function putMapOnLine(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}/onLine`,
|
||
method: 'put'
|
||
});
|
||
}
|
||
|
||
/** 发布地图下架*/
|
||
export function putMapOffLine(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}/offLine`,
|
||
method: 'put'
|
||
});
|
||
}
|
||
|
||
// /** 修改发布地图名称*/
|
||
// export function updatePublishMapName(data) {
|
||
// return request({
|
||
// url: `/api/map/${data.mapId}/updateName`,
|
||
// method: 'put',
|
||
// data: data
|
||
// });
|
||
// }
|
||
|
||
// 检测地图名称唯一性
|
||
export function checkMapName(name) {
|
||
return request({
|
||
url: `/api/map/exist?name=${name}`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 获取发布地图详情*/
|
||
export function getPublishMapDetailList(params, code) {
|
||
return request({
|
||
url: `/api/map/${code}/versions`,
|
||
method: 'get',
|
||
params: params
|
||
});
|
||
}
|
||
|
||
/** 获取有屏蔽门的站台列表*/
|
||
export function hasDoorStationList(mapId) {
|
||
return request({
|
||
url: `/api/map/${mapId}/stand/hasDoor`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
// /** 修改发布地图城市*/
|
||
// export function updatePublishMapCity(data) {
|
||
// return request({
|
||
// url: `/api/map/${data.mapId}/city`,
|
||
// method: 'put',
|
||
// data: data
|
||
// });
|
||
// }
|
||
|
||
// 修改地图基本信息
|
||
export function updatePublishMapInfo(data) {
|
||
return request({
|
||
url: `/api/map/${data.mapId}/info`,
|
||
method: 'put',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 设置归属项目 */
|
||
export function setMapProject(data) {
|
||
return request({
|
||
url: `/api/map/${data.id}/project`,
|
||
method: 'put',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 根据定制项目编号查询地图列表 */
|
||
export function getMapListByProjectCode(projectCode) {
|
||
return request({
|
||
url: `/api/map/project/${projectCode}/list`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
|
||
/** 复制地图线路数据 */
|
||
export function copyMapAs(mapId, data) {
|
||
return request({
|
||
url: `/api/map/copy/${mapId}`,
|
||
method: 'post',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 检测仿真数据是否存在错误 */
|
||
export function simulationCheck(id) {
|
||
return request({
|
||
url: `/api/map/${id}/simulationCheck`,
|
||
method: 'get'
|
||
});
|
||
}
|
||
/** 地图排序 */
|
||
export function toSortMap(data) {
|
||
return request({
|
||
url: `/api/map/sort`,
|
||
method: 'put',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 导出本地需要相关地图数据 */
|
||
export function localExportMap(data) {
|
||
return request({
|
||
url: '/api/map/local/export',
|
||
method: 'post',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 导入本地需要相关地图数据 */
|
||
export function localImportMap(data) {
|
||
return request({
|
||
url: '/api/map/local/import',
|
||
method: 'post',
|
||
data: data
|
||
});
|
||
}
|
||
|
||
/** 根据group获取排序的车站列表(包含车辆段/停车场) */
|
||
export function getByGroupStationList(group) {
|
||
return request({
|
||
url: `/simulation/${group}/stationWithDepot`,
|
||
method: 'get'
|
||
});
|
||
}
|