2019-08-29 17:16:33 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
/** 分页查找上线的剧本*/
|
|
|
|
export function getScriptPageListOnline(params) {
|
2019-11-12 17:06:12 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/script/paging/online`,
|
|
|
|
// url: `/api/script/paging/published`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
2019-08-29 17:16:33 +08:00
|
|
|
}
|
|
|
|
|
2020-05-14 17:24:47 +08:00
|
|
|
/** 分页查找上线的剧本(新版)*/
|
|
|
|
export function getScriptPageListOnlineNew(params) {
|
|
|
|
return request({
|
2020-05-15 16:54:31 +08:00
|
|
|
url: `/api/script/v1/paging/online`,
|
2020-05-14 17:24:47 +08:00
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-10-16 16:36:25 +08:00
|
|
|
/** 通过ID查询发布的剧本的详细信息 */
|
2019-08-29 17:16:33 +08:00
|
|
|
export function getScriptById(id) {
|
2019-11-12 17:06:12 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/script/${id}/detail`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
2019-08-29 17:16:33 +08:00
|
|
|
}
|
2020-05-14 17:24:47 +08:00
|
|
|
|
|
|
|
/** 通过ID查询发布的剧本的详细信息(新版) */
|
|
|
|
export function getScriptByIdNew(id) {
|
|
|
|
return request({
|
2020-05-15 16:54:31 +08:00
|
|
|
url: `/api/script/v1/${id}/detail`,
|
2020-05-14 17:24:47 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-05-11 15:43:36 +08:00
|
|
|
/** 通过group查询未发布剧本的详细信息 */
|
2019-10-28 19:14:49 +08:00
|
|
|
export function getDraftScriptByGroup(group) {
|
2019-11-12 17:06:12 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/simulation/${group}/script/loadedScript`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
2019-10-16 16:36:25 +08:00
|
|
|
}
|
2020-04-21 10:07:26 +08:00
|
|
|
|
2020-05-11 15:43:36 +08:00
|
|
|
/** 通过group查询未发布剧本的详细信息(新版) */
|
|
|
|
export function getDraftScriptByGroupNew(group) {
|
|
|
|
return request({
|
|
|
|
url: `/api/scriptSimulation/${group}/scriptDetail`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-04-21 10:07:26 +08:00
|
|
|
/** 剧本撤销发布 */
|
|
|
|
export function retractScript(id, data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${id}/retract`,
|
|
|
|
method: 'put'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 剧本发布 */
|
|
|
|
export function publishScript(id, data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${id}/publish`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 更新剧本基本信息 */
|
|
|
|
export function updateScript(id, data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${id}`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 根据剧本id删除剧本 */
|
|
|
|
export function deleteScript(id) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${id}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 分页查找个人录制的仿真剧本*/
|
|
|
|
export function getScriptPageList(mapId, params) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${mapId}/list`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 创建剧本 */
|
|
|
|
export function createScript(data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft`,
|
|
|
|
method: 'post',
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 根据id查询任务基础信息 */
|
|
|
|
export function getScriptByIdBasic(id) {
|
|
|
|
return request({
|
|
|
|
url: `/api/script/draft/${id}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
2020-06-12 17:44:18 +08:00
|
|
|
|
|
|
|
/** 切换剧本的仿真成员 */
|
|
|
|
export function changeScriptRole(group, memberId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/scriptSimulation/${group}/${memberId}/switch`,
|
|
|
|
method: 'put'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-08-17 18:47:38 +08:00
|
|
|
/** 获取所有选取过的成员 接口(剧本录制) */
|
|
|
|
export function getAllSelectedScriptRole(group) {
|
|
|
|
return request({
|
|
|
|
url: `/api/scriptSimulation/${group}/allSelectedMembers`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-09-18 16:02:22 +08:00
|
|
|
/** 加载剧本接口(仿真使用 竞赛) */
|
|
|
|
export function loadScript(group, scriptId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/scriptSimulation/${group}/load/script/${scriptId}`,
|
|
|
|
method: 'PUT'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 剧本实训结束 接口(仿真使用 竞赛) */
|
|
|
|
export function endScriptTraining(group) {
|
|
|
|
return request({
|
|
|
|
url: `/api/scriptSimulation/${group}/finish`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|