import request from '@/utils/request'

// 分页查询司机信息列表
export function pageListDriver(query) {
  return request({
    url: '/cm/driver/pageList',
    method: 'get',
    params: query
  })
}

// 查询司机信息列表
export function listDriver(query) {
  return request({
    url: '/cm/driver/list',
    method: 'get',
    params: query
  })
}

// 查询司机信息详细
export function getDriver(id) {
  return request({
    url: '/cm/driver/' + id,
    method: 'get'
  })
}

// 新增司机信息
export function addDriver(data) {
  return request({
    url: '/cm/driver',
    method: 'post',
    data: data
  })
}

// 修改司机信息
export function updateDriver(data) {
  return request({
    url: '/cm/driver',
    method: 'put',
    data: data
  })
}

// 删除司机信息
export function delDriver(id) {
  return request({
    url: '/cm/driver/' + id,
    method: 'delete'
  })
}

// 导出司机信息
export function exportDriver(query) {
  return request({
    url: '/cm/driver/' + 'export',
    method: 'post',
    params: query
  })
}
