import request from '@/utils/request'

//统计数据
export function gettotal() {
  return request({
    url: '/api/dashboard/home',
    method: 'get'
  })
}

//车辆位置轨迹
export function getloca(deviceId,start,end) {
  return request({
    url: `/vehicle-location/${deviceId}`,
    method: 'get',
    params:{
        start,
        end
    }
  })
}

//设备数据
export function equdata() {
  return request({
    url: '/monitor/dashboard/overview',
    method: 'get'
  })
}

//设备分布
export function equfenbu() {
  return request({
    url: '/monitor/device/latest-locations',
    method: 'get'
  })
}

//查询设备轨迹
export function equguiji(deviceId,start,end) {
  return request({
    url: `monitor/device/${deviceId}/track`,
    method: 'get',
    params:{
        deviceId,
        start,
        end
    }
  })
}
