rt-sim-training-client/src/api/jmap/pathunit.js

45 lines
924 B
JavaScript
Raw Normal View History

2019-07-25 10:30:30 +08:00
import request from '@/utils/request';
/** 获取路径单元列表*/
export function getRouteUnitList(id, data) {
2019-11-18 14:44:01 +08:00
return request({
url: `/api/mapBuild/${id}/routeUnit`,
method: 'get',
params: data
});
2019-07-25 10:30:30 +08:00
}
/** 创建路径单元*/
export function addRouteUnit(data) {
2019-11-18 14:44:01 +08:00
return request({
url: `/api/mapBuild/routeUnit`,
method: 'post',
data: data
});
2019-07-25 10:30:30 +08:00
}
/** 删除路径单元*/
export function delRouteUnit(id) {
2019-11-18 14:44:01 +08:00
return request({
url: `/api/mapBuild/routeUnit/${id}`,
method: 'DELETE'
});
2019-07-25 10:30:30 +08:00
}
/** 获取路径单元*/
export function getRouteUnit(id) {
2019-11-18 14:44:01 +08:00
return request({
url: `/api/mapBuild/routeUnit/${id}`,
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 更新路径单元*/
export function setRouteUnit(data) {
2019-11-18 14:44:01 +08:00
return request({
url: `/api/mapBuild/routeUnit/${data.id}`,
method: 'put',
data: data
});
2019-07-25 10:30:30 +08:00
}