import request from '@/utils/request'

// 查询车辆运行记录列表
export function listMove(query) {
  return request({
    url: '/vehicle/move/list',
    method: 'get',
    params: query
  })
}

// 查询车辆运行记录详细
export function getMove(id) {
  return request({
    url: '/vehicle/move/' + id,
    method: 'get'
  })
}

// 新增车辆运行记录
export function addMove(data) {
  return request({
    url: '/vehicle/move',
    method: 'post',
    data: data
  })
}

// 修改车辆运行记录
export function updateMove(data) {
  return request({
    url: '/vehicle/move',
    method: 'put',
    data: data
  })
}

// 删除车辆运行记录
export function delMove(id) {
  return request({
    url: '/vehicle/move/' + id,
    method: 'delete'
  })
}



// 准备开始历史数据
export function historyMoveStart(vin,startTime, endTime) {
  return request({
    url: '/vehicle/move/historyMove/' + vin + "/" + startTime + "/" + endTime,
    method: 'get'
  })
}
// 查看结束历史数据
export function historyMoveDel(vin) {
  return request({
    url: '/vehicle/move/historyMove/' + vin,
    method: 'DELETE'
  })
}


// 历史数据
export function historyMove(vin) {
  return request({
    url: '/vehicle/move/history/' + vin,
    method: 'get'
  })
}
