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

88 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/utils/request';
export function getTrainingSystemList(cityCode, params) {
/** 根据cityCode后去对应地图及其子系统 */
return request({
url: `/api/mapSystem/city/${cityCode}`,
method: 'get',
params
});
}
export function querySystemByTypeAndPrdCode(params, prodCode) {
/** 根据系统类型和地图产品code查询系统的内容课程、章节、考试*/
return request({
url: `/api/mapSystem/queryByTypeAndPrdCode/${prodCode}`,
method: 'get',
params
});
}
export function getTrainingSystemListByMapId(mapId) {
/** 根据mapId去获取其子系统 */
return request({
url: `/api/mapSystem/${mapId}`,
method: 'get'
});
}
export function generateMapSystem(mapId) {
/** 根据mapId生成地图子系统 */
return request({
url: `/api/mapSystem/generate/${mapId}`,
method: 'post'
});
}
export function getSubSystemInfo(id) {
/** 查询子系统信息 */
return request({
url: `/api/mapSystem/${id}`,
method: 'get'
});
}
export function getSubSystemDetail(id) {
/** 查询子系统详情*/
return request({
url: `/api/mapSystem/${id}/detail`,
method: 'get'
});
}
export function getMapSystemPageList(params) {
/** 分页查询地图系统 */
return request({
url: `/api/mapSystem`,
method: 'get',
params
});
}
export function createMapSubSystem(data) {
/** 创建地图系统 */
return request({
url: `/api/mapSystem`,
method: 'post',
data: data
});
}
export function updateSubSystem(id, data) {
/** 查询子系统信息 */
return request({
url: `/api/mapSystem/${id}`,
method: 'put',
data: data
});
}
export function deleteSubSystem(id) {
/** 删除地图系统 */
return request({
url: `/api/mapSystem/${id}`,
method: 'delete'
});
}