import request from '@/utils/request'
export function listCarType() {
  return request({
    url: '/history/car/listCarType',
    method: 'get'
  })
}

export function getCarList(form) {
  return request({
    url: '/history/car/listCar',
    method: 'post',
    data:form
  })
}

export function delCar(carVin) {
  return request({
    url: '/history/car/deleteCar?carVin='+carVin,
    method: 'post'
  })
}

export function updateCar(carForm) {
  return request({
    url: '/history/car/updateCar',
    method: 'post',
    data:carForm
  })
}

export function listFence() {
  return request({
    url: '/history/car/listFence',
    method: 'get'
  })
}

export function insertCar(carInsert) {
  return request({
    url: '/history/car/insertCar',
    method: 'post',
    data:carInsert
  })
}

export function getList() {
  return request({
    url: '/history/history/listHistoricalTrack',
    method: 'get'
  })
}

export function deleteRecord(recordId) {
  return request({
    url: '/history/history/delHistoricalTrack?recordId='+recordId,
    method: 'post',
    data:recordId
  })
}


export function historyMap(recordCar) {
  return request({
    url: '/history/history/carRecord',
    method: 'post',
    data:recordCar
  })
}

export function realTime(vin) {
  return request({
    url: '/history/car/realTime?vin='+vin,
    method: 'post',
    data:vin
  })
}

export function listRealTime(vin) {
  return request({
    url: '/history/car/listRealTime?vin='+vin,
    method: 'post',
    data:vin
  })
}
