import request from '@/utils/request'

// 分页查询车辆信息列表
export function pageListVehicle(query) {
  return request({
    url: '/cm/vehicle/pageList',
    method: 'get',
    params: query
  })
}

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

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

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

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

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

// 导出车辆信息
export function exportVehicle(query) {
  return request({
    url: '/cm/vehicle/' + 'export',
    method: 'post',
    params: query
  })
}
