import request from '@/utils/request'

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

// 查询驾驶员信息列表
export function listDriver(query) {
  return request({
    url: '/tm/driver/list',
    method: 'get',
    params: query
  })
}

// 查询驾驶员信息详细
export function getDriver(driverId) {
  return request({
    url: '/tm/driver/' + driverId,
    method: 'get'
  })
}

// 新增驾驶员信息
export function addDriver(data) {
  return request({
    url: '/tm/driver',
    method: 'post',
    data: data
  })
}

// 修改驾驶员信息
export function updateDriver(data) {
  return request({
    url: '/tm/driver',
    method: 'put',
    data: data
  })
}

// 删除驾驶员信息
export function delDriver(driverId) {
  return request({
    url: '/tm/driver/' + driverId,
    method: 'delete'
  })
}

// 导出驾驶员信息
export function exportDriver(query) {
  return request({
    url: '/tm/driver/' + 'export',
    method: 'post',
    params: query
  })
}
