import request from '@/utils/request'

// 查询车辆信息列表
export function listInfo(query) {
  return request({
    url: '/vehicle/info/list',
    method: 'get',
    params: query
  })
}

// 查询车辆信息详细
export function getInfo(id) {
  return request({
    url: '/vehicle/info/' + id,
    method: 'get'
  })
}

// 新增车辆信息
export function addInfo(data) {
  return request({
    url: '/vehicle/info',
    method: 'post',
    data: data
  })
}

// 修改车辆信息
export function updateInfo(data) {
  return request({
    url: '/vehicle/info',
    method: 'put',
    data: data
  })
}

// 删除车辆信息
export function delInfo(id) {
  return request({
    url: '/vehicle/info/' + id,
    method: 'delete'
  })
}

export function realTimeLocus(vin){
  return request({
    url: '/vehicle/info/realTimeLocus/' + vin,
    method: 'get'
  })
}

export function realTimeLocusDel(vin){
  return request({
    url: '/vehicle/info/realTimeLocus/' + vin,
    method: 'delete'
  })
}

export function getVehicleDataByVin(vin){
  return request({
    url: '/vehicle/info/data/' + vin,
    method: 'get'
  })
}
export function getVehicleIndexData(){
  return request({
    url: '/vehicle/info/indexData/',
    method: 'get'
  })
}


