2019-07-26 13:32:43 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
/** 分页查找仿真任务*/
|
|
|
|
export function getQuestPageList(params) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/paging`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 创建任务 */
|
|
|
|
export function createQuest(data) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest`,
|
|
|
|
method: 'post',
|
|
|
|
data
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 根据任务id删除任务 */
|
|
|
|
export function deleteQuest(id) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 根据id查询任务基础信息 */
|
|
|
|
export function getQuestById(id) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'get',
|
|
|
|
});
|
2019-08-01 15:19:24 +08:00
|
|
|
}
|
|
|
|
/** 根据id查询任务基础信息 */
|
|
|
|
export function getQuestByIdList(id) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}/detail`,
|
|
|
|
method: 'get',
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 更新任务基本信息 */
|
|
|
|
export function updateQuest(id, data) {
|
2019-08-08 10:31:46 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
/** 更新任务地图定位信息 */
|
|
|
|
export function updateMapLocation(id, data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}/mapLocation`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|