2019-09-29 14:27:58 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
export function getDraftLesson(params, mapId) {
|
|
|
|
/** 根据mapId获取草稿课程 */
|
|
|
|
return request({
|
|
|
|
url: `/api/mapSystem/findDraftLessonBy/${mapId}`,
|
|
|
|
method: 'get',
|
|
|
|
params
|
|
|
|
});
|
|
|
|
}
|
2019-09-29 15:57:19 +08:00
|
|
|
/** 获取用户地图树 */
|
|
|
|
export function getUserMapTree(cityCode) {
|
2019-10-08 09:51:13 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
2019-09-29 15:57:19 +08:00
|
|
|
}
|
2019-09-30 10:46:29 +08:00
|
|
|
|
|
|
|
/** 运行图*/
|
|
|
|
export function getRpListByUserMapId(mapId) {
|
2019-10-08 09:51:13 +08:00
|
|
|
return request({
|
2019-10-08 14:12:53 +08:00
|
|
|
url: `/api/draftMap/runPlan/findByDraftMapId/${mapId}`,
|
2019-10-08 09:51:13 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
2019-09-30 13:26:13 +08:00
|
|
|
}
|
2019-09-30 13:24:47 +08:00
|
|
|
export function getMapList(cityCode) {
|
2019-10-08 09:51:13 +08:00
|
|
|
/** 根据cityCode获取地图列表 */
|
|
|
|
return request({
|
|
|
|
url: `/api/mapSystem/queryMapByCityCode/${cityCode}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取用户自己的运行图详情*/
|
|
|
|
export function getRpDetailByUserMapId(planId) {
|
|
|
|
return request({
|
2019-10-08 14:12:53 +08:00
|
|
|
url: `/api/draftMap/runPlan/selectDiagramData/${planId}`,
|
2019-10-08 09:51:13 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
2019-09-30 13:24:47 +08:00
|
|
|
}
|
2019-10-08 18:35:02 +08:00
|
|
|
|
|
|
|
/** 获取用户自己创建的草稿地图详情*/
|
|
|
|
export function getUserMapDetailByMapId(mapId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/mapBuild/findById/${mapId}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 用户自己的运行图仿真测试*/
|
|
|
|
export function runUserPlanNotify({ planId }) {
|
|
|
|
return request({
|
|
|
|
url: `/api/draftMap/runPlan/simulationCheck/${planId}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
2019-10-10 16:07:13 +08:00
|
|
|
|
|
|
|
/** 管理员获取需审核的课程列表 */
|
|
|
|
export function reviewLessonList(params) {
|
|
|
|
return request({
|
2019-10-11 08:55:02 +08:00
|
|
|
url: `/api/review/query/lesson`,
|
2019-10-10 16:07:13 +08:00
|
|
|
method: 'get',
|
|
|
|
params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 管理员发布课程接口 */
|
|
|
|
export function adminPublishLesson(data, id) {
|
|
|
|
return request({
|
|
|
|
url: `/api/review/${id}/publishLesson`,
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 管理员驳回课程发布申请 */
|
|
|
|
export function rejectedLessonRelease(data, id) {
|
|
|
|
return request({
|
2019-10-11 08:55:02 +08:00
|
|
|
url: `/api/review/lesson/${id}`,
|
2019-10-10 16:07:13 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 普通用户申请发布和撤销申请 */
|
|
|
|
export function releaseOrCancel(id, status) {
|
|
|
|
return request({
|
2019-10-11 08:55:02 +08:00
|
|
|
url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
|
2019-10-10 16:07:13 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
2019-10-10 17:37:07 +08:00
|
|
|
|
|
|
|
/** 管理员获取需审核的剧本列表 */
|
|
|
|
export function reviewScriptList(params) {
|
|
|
|
return request({
|
|
|
|
url: `/api/review/query/script`,
|
|
|
|
method: 'get',
|
|
|
|
params
|
|
|
|
});
|
|
|
|
}
|