rt-sim-training-client/src/api/jmap/map.js

125 lines
2.4 KiB
JavaScript
Raw Normal View History

2019-07-25 10:30:30 +08:00
import request from '@/utils/request';
/** 获取发布地图管理分页*/
export function getPublishMapList(params) {
2019-08-08 14:32:32 +08:00
return request({
url: '/api/map',
method: 'get',
params: params
});
2019-07-25 10:30:30 +08:00
}
/** 根据皮肤获取发布地图列表*/
2019-08-29 17:16:33 +08:00
export function getPublishMapListBySkinCode(skinCode) {
2019-08-08 14:32:32 +08:00
return request({
2019-08-29 17:16:33 +08:00
url: `/api/map/${skinCode}/list`,
2019-08-08 14:32:32 +08:00
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 根据皮肤获取地图版本信息*/
2019-08-29 17:16:33 +08:00
export function getPublishMapVersion(skinCode) {
2019-08-08 14:32:32 +08:00
return request({
2019-08-29 17:16:33 +08:00
url: `/api/map/skin/${skinCode}/version`,
2019-08-08 14:32:32 +08:00
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 根据皮肤获取发布地图详细内容*/
2019-08-29 17:16:33 +08:00
export function getPublishMapDetail(skinCode) {
2019-08-08 14:32:32 +08:00
return request({
2019-08-29 17:16:33 +08:00
url: `/api/map/skin/${skinCode}/details`,
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`,
2019-08-08 14:32:32 +08:00
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 获取发布地图列车列表*/
2019-08-29 17:16:33 +08:00
export function getPublishTrainList(skinCode) {
2019-08-08 14:32:32 +08:00
return request({
2019-08-29 17:16:33 +08:00
url: `/api/map/${skinCode}/train`,
2019-08-08 14:32:32 +08:00
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 获取发布地图列表*/
export function listPublishMap() {
2019-08-08 14:32:32 +08:00
return request({
url: '/api/map/list',
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 根据地图id获取地图信息*/
export function getPublishMapInfo(mapId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${mapId}`,
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 发布地图数据导出*/
export function getPublishMapExport(mapId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${mapId}/export`,
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 删除发布地图*/
export function delPublishMap(mapId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${mapId}`,
method: 'DELETE'
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 发布地图上架*/
2019-07-25 10:30:30 +08:00
export function putMapOnLine(mapId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${mapId}/onLine`,
method: 'put'
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 发布地图下架*/
2019-07-25 10:30:30 +08:00
export function putMapOffLine(mapId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${mapId}/offLine`,
method: 'put'
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 修改发布地图名称*/
2019-07-25 10:30:30 +08:00
export function updatePublishMapName(data) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/map/${data.mapId}/updateName`,
method: 'put',
data: data
});
}
2019-08-29 17:16:33 +08:00
/** 修改发布地图名称*/
export function getPublishMapDetailList(params, code) {
return request({
url: `/api/map/${code}/versions`,
method: 'get',
params: params
});
}