import request from '@/utils/request'; /** 运行图*/ export function getRpListByUserMapId(mapId) { return request({ url: `/api/draftMap/runPlan/findByDraftMapId/${mapId}`, method: 'get' }); } /** 获取用户自己的运行图详情*/ export function getRpDetailByUserMapId(planId) { return request({ url: `/api/draftMap/runPlan/selectDiagramData/${planId}`, method: 'get' }); } /** 获取用户自己创建的草稿地图详情*/ export function getUserMapDetailByMapId(mapId) { return request({ url: `/api/mapBuild/findById/${mapId}`, method: 'get' }); } /** 管理员获取需审核的课程列表 */ export function reviewLessonList(params) { return request({ url: `/api/review/query/lesson`, 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({ url: `/api/review/lesson/${id}`, method: 'post', data: data }); } /** 普通用户申请课程发布和撤销申请 */ export function releaseOrCancel(id, status) { return request({ url: `/api/review/lesson/releaseOrCancel/${id}/${status}`, method: 'get' }); } /** 管理员获取需审核的剧本列表 ok */ export function reviewScriptList(params) { return request({ url: `/api/review/query/script`, method: 'get', params }); } /** 管理员发布剧本 ok */ export function publishScript(id) { return request({ url: `/api/review/${id}/publishScript`, method: 'post' }); } /** 管理员剧本申请驳回 ok */ export function rejectScript(id, data) { return request({ url: `/api/review/script/${id}`, method: 'post', data: data }); } /** 管理员获取需审核的运行图列表 */ export function reviewRunPlanList(params) { return request({ url: `/api/review/query/runPlan`, method: 'get', params }); } /** 管理员发布运行图 */ export function publishRunPlan(planId, data) { return request({ url: `/api/review/${planId}/publishRunPlan`, method: 'post', data: data }); } /** 发布运行图(所有权限用户) */ export function publishRunPlanAllUser(planId, runPlanName) { return request({ url: `/api/review/${planId}/directPublishRunPlan?runPlanName=${runPlanName}`, method: 'post' }); } /** 普通用户申请或撤销运行图发布 */ export function releaseOrCancelRunPlan(planId, status) { return request({ url: `/api/review/runPlan/releaseOrCancel/${planId}/${status}`, method: 'get' }); } /** 管理员运行图申请驳回 */ export function rejectRunPlan(id, data) { return request({ url: `/api/review/runPlan/${id}`, method: 'post', data: data }); } /** 查看课程详情 */ export function reviewLessonDetail(id) { return request({ url: `/api/review/previewLesson/${id}`, method: 'get' }); } /** 管理员预览草稿运行图*/ export function previewRunPlan(planId) { return request({ url: `/api/review/previewRunPlan/${planId}`, method: 'get' }); } /** 加载剧本 */ export function loadDraftScript(scriptId, memberId, group) { return request({ url: `/api/simulation/${group}/scriptDraft/${scriptId}?memberId=${memberId}`, method: 'post' }); } /** 剧本预览选择角色 */ export function loadDraftScriptNew(memberId, group) { return request({ // url: `/simulation/${group}/choosePlay?memberId=${memberId}`, url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`, method: 'put' }); } /** 剧本预览选择角色 */ export function loadDraftScriptNewMode(memberId, group, mode) { return request({ // url: `/simulation/${group}/choosePlay?memberId=${memberId}`, url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`, method: 'put' }); } /** 获取已发布的有地图的城市列表*/ export function publisMapCityList(data) { return request({ url: `/api/map/city?dicCode=${data}`, method: 'get' }); }