Files
electron-4/src/renderer/src/api/route/index.ts

48 lines
1.0 KiB
TypeScript

//路径规划
import request from '@/axios/request'
export const RouteApi = {
// 查看路径
queryRoute: async (data: any) => {
return await request.post({
url: `/graphhopper/route`,
data
});
},
//获取地图列表
getRouteList: async () => {
return await request.post({
url: `/pbfInfo/list`
})
},
// //加载路网数据
// loadRoute: async (data: any) => {
// return await request.post({
// url: `/graphhopper/loadMap`,
// data,
// headersType: 'application/x-www-form-urlencoded'
// })
// },
//添加路网数据
loadRoute: async (data: any) => {
return await request.post({
url: `/pbfInfo/add`,
data,
headersType: 'application/x-www-form-urlencoded'
})
},
//启用路网数据
enableRoute: async (data: any) => {
return await request.post({
url: `/pbfInfo/enable`,
data,
})
},
//删除路网数据
delRoute: async (data: any) => {
return await request.post({
url: `/pbfInfo/delete`,
data,
})
},
}