rt-sim-training-client/src/api/trainingPlatform.js

79 lines
1.8 KiB
JavaScript
Raw Normal View History

2019-09-26 15:08:53 +08:00
import request from '@/utils/request';
2020-10-28 10:22:46 +08:00
/** 根据cityCode后去对应地图及其子系统 */
export function getTrainingSystemList(cityCode, params) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/city/${cityCode}`,
method: 'get',
params
});
2019-09-26 15:08:53 +08:00
}
2020-10-28 10:22:46 +08:00
/** 根据mapId生成地图子系统 */
2019-10-17 17:11:15 +08:00
export function generateMapSystem(mapId) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/generate/${mapId}`,
method: 'post'
});
2019-10-17 17:11:15 +08:00
}
2021-04-23 09:01:12 +08:00
/** 生成指定子系统 */
export function generateAppointMapSystem(mapId, prdType) {
return request({
url: `/api/mapSystem/generate/${mapId}/${prdType}`,
method: 'post'
});
}
2020-10-28 10:22:46 +08:00
/** 查询子系统信息 */
2019-10-18 17:15:04 +08:00
export function getSubSystemInfo(id) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/${id}`,
method: 'get'
});
2019-10-18 17:15:04 +08:00
}
2020-10-28 10:22:46 +08:00
/** 查询子系统详情*/
2019-10-18 17:15:04 +08:00
export function getSubSystemDetail(id) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/${id}/detail`,
method: 'get'
});
2019-10-18 17:15:04 +08:00
}
2020-10-28 10:22:46 +08:00
/** 分页查询地图系统 */
export function getMapSystemPageList(params) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem`,
method: 'get',
params
});
}
2020-10-28 10:22:46 +08:00
/** 创建地图系统 */
export function createMapSubSystem(data) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem`,
method: 'post',
data: data
});
}
2020-10-28 10:22:46 +08:00
/** 查询子系统信息 */
export function updateSubSystem(id, data) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/${id}`,
method: 'put',
data: data
});
}
2020-10-28 10:22:46 +08:00
/** 删除地图系统 */
export function deleteSubSystem(id) {
2019-10-29 15:40:47 +08:00
return request({
url: `/api/mapSystem/${id}`,
method: 'delete'
});
}
2020-10-28 10:22:46 +08:00
/** 根据项目编号查询地图子系统 */
2020-07-09 10:25:04 +08:00
export function getSubSystemByProjectCode() {
2019-10-29 15:40:47 +08:00
return request({
2020-07-09 10:25:04 +08:00
url: `/api/mapSystem/project`,
2019-10-29 15:40:47 +08:00
method: 'get'
});
2019-10-29 14:14:14 +08:00
}