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

166 lines
4.1 KiB
JavaScript
Raw Normal View History

2019-09-29 14:27:58 +08:00
import request from '@/utils/request';
2019-09-30 10:46:29 +08:00
/** 运行图*/
export function getRpListByUserMapId(mapId) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/draftMap/runPlan/findByDraftMapId/${mapId}`,
method: 'get'
});
}
2019-10-08 09:51:13 +08:00
/** 获取用户自己的运行图详情*/
export function getRpDetailByUserMapId(planId) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/draftMap/runPlan/selectDiagramData/${planId}`,
method: 'get'
});
2019-09-30 13:24:47 +08:00
}
2019-10-08 18:35:02 +08:00
/** 获取用户自己创建的草稿地图详情*/
export function getUserMapDetailByMapId(mapId) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/mapBuild/findById/${mapId}`,
method: 'get'
});
2019-10-08 18:35:02 +08:00
}
2019-10-10 16:07:13 +08:00
/** 管理员获取需审核的课程列表 */
export function reviewLessonList(params) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/query/lesson`,
method: 'get',
params
});
2019-10-10 16:07:13 +08:00
}
/** 管理员发布课程接口 */
export function adminPublishLesson(data, id) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/${id}/publishLesson`,
method: 'post',
data: data
});
2019-10-10 16:07:13 +08:00
}
/** 管理员驳回课程发布申请 */
export function rejectedLessonRelease(data, id) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/lesson/${id}`,
method: 'post',
data: data
});
2019-10-10 16:07:13 +08:00
}
2019-10-22 13:40:42 +08:00
/** 普通用户申请课程发布和撤销申请 */
export function releaseOrCancel(id, status) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/lesson/releaseOrCancel/${id}/${status}`,
method: 'get'
});
2019-10-22 13:40:42 +08:00
}
2019-10-10 17:37:07 +08:00
/** 管理员获取需审核的剧本列表 ok */
2019-10-10 17:37:07 +08:00
export function reviewScriptList(params) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/query/script`,
method: 'get',
params
});
2019-10-10 17:37:07 +08:00
}
/** 管理员发布剧本 ok */
export function publishScript(id) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/${id}/publishScript`,
method: 'post'
});
2019-10-14 13:58:26 +08:00
}
/** 管理员剧本申请驳回 ok */
2019-10-14 13:58:26 +08:00
export function rejectScript(id, data) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/script/${id}`,
method: 'post',
data: data
});
2019-10-14 13:58:26 +08:00
}
2019-10-12 16:47:54 +08:00
/** 管理员获取需审核的运行图列表 */
export function reviewRunPlanList(params) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/query/runPlan`,
method: 'get',
params
});
2019-10-12 16:47:54 +08:00
}
/** 管理员发布运行图 */
export function publishRunPlan(planId, data) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/${planId}/publishRunPlan`,
method: 'post',
data: data
});
2019-10-12 16:47:54 +08:00
}
2020-08-17 18:12:51 +08:00
/** 发布运行图(所有权限用户) */
export function publishRunPlanAllUser(planId, runPlanName) {
return request({
url: `/api/review/${planId}/directPublishRunPlan?runPlanName=${runPlanName}`,
method: 'post'
});
}
2019-10-14 13:04:23 +08:00
/** 普通用户申请或撤销运行图发布 */
export function releaseOrCancelRunPlan(planId, status) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/runPlan/releaseOrCancel/${planId}/${status}`,
method: 'get'
});
2019-10-12 16:47:54 +08:00
}
/** 管理员运行图申请驳回 */
export function rejectRunPlan(id, data) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/runPlan/${id}`,
method: 'post',
data: data
});
2019-10-14 13:10:36 +08:00
}
2019-10-12 17:14:03 +08:00
/** 查看课程详情 */
export function reviewLessonDetail(id) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/previewLesson/${id}`,
method: 'get'
});
2019-10-14 13:04:23 +08:00
}
/** 管理员预览草稿运行图*/
export function previewRunPlan(planId) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/review/previewRunPlan/${planId}`,
method: 'get'
});
2019-10-12 17:14:03 +08:00
}
2019-10-17 18:06:04 +08:00
/** 加载剧本 */
export function loadDraftScript(scriptId, memberId, group) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/simulation/${group}/scriptDraft/${scriptId}?memberId=${memberId}`,
2019-11-12 17:06:12 +08:00
method: 'post'
});
2019-10-17 18:06:04 +08:00
}
/** 剧本预览选择角色 */
2020-05-12 10:51:17 +08:00
export function loadDraftScriptNew(memberId, group) {
return request({
// url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
2020-07-14 14:48:26 +08:00
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`,
method: 'put'
});
}
/** 获取已发布的有地图的城市列表*/
export function publisMapCityList(data) {
2019-11-12 17:06:12 +08:00
return request({
url: `/api/map/city?dicCode=${data}`,
method: 'get'
});
}