| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 查询GPS坐标列表 |
| | | // 查询GPS位置列表 |
| | | export function listGps(query) { |
| | | return request({ |
| | | url: '/system/gps/list', |
| | |
| | | }) |
| | | } |
| | | |
| | | // 查询GPS坐标详细 |
| | | // 查询GPS位置详细 |
| | | export function getGps(gpsId) { |
| | | return request({ |
| | | url: '/system/gps/' + gpsId, |
| | |
| | | }) |
| | | } |
| | | |
| | | // 新增GPS坐标 |
| | | // 新增GPS位置 |
| | | export function addGps(data) { |
| | | return request({ |
| | | url: '/system/gps', |
| | |
| | | }) |
| | | } |
| | | |
| | | // 修改GPS坐标 |
| | | // 修改GPS位置 |
| | | export function updateGps(data) { |
| | | return request({ |
| | | url: '/system/gps', |
| | |
| | | }) |
| | | } |
| | | |
| | | // 删除GPS坐标 |
| | | // 删除GPS位置 |
| | | export function delGps(gpsId) { |
| | | return request({ |
| | | url: '/system/gps/' + gpsId, |
| | |
| | | }) |
| | | } |
| | | |
| | | // 导出GPS坐标 |
| | | export function exportGps(query) { |
| | | // 获取车辆最新GPS位置 |
| | | export function getLastPosition(deviceId) { |
| | | return request({ |
| | | url: '/system/gps/export', |
| | | url: '/system/gps/lastPosition/' + deviceId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 获取所有车辆GPS位置 |
| | | export function getAllPositions() { |
| | | return request({ |
| | | url: '/system/gps/allPositions', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 获取车辆历史轨迹 |
| | | export function getTrackHistory(deviceId, startTime, endTime) { |
| | | return request({ |
| | | url: '/system/gps/trackHistory', |
| | | method: 'get', |
| | | params: query |
| | | params: { |
| | | deviceId, |
| | | startTime, |
| | | endTime |
| | | } |
| | | }) |
| | | } |