import request from "@/api";

// 获取司机列表
export function getDriverList(data: any) {
  return request({
    url: "/admin/driver/page",
    method: "get",
    params: data
  });
}
//新增司机信息
export function addDriverInfo(data: any) {
  return request({
    url: "/admin/driver",
    method: "post",
    data
  });
}
//修改司机信息
export function updataDriverInfo(data: any) {
  return request({
    url: "/admin/driver",
    method: "PUT",
    data
  });
}
// 获取司机详情
export function getDriverDetail(id: any) {
  return request({
    url: "/admin/driver/" + id,
    method: "get"
  });
}
// 删除司机信息
export function deleteDriver(id: any) {
  return request({
    url: "/admin/driver/" + id,
    method: "DELETE"
  });
}

// 获取车辆列表
export function getVehicleList(data: any) {
  return request({
    url: "/admin/vehicle/page",
    method: "get",
    params: data
  });
}
//新增车辆信息
export function addVehicleInfo(data: any) {
  return request({
    url: "/admin/vehicle",
    method: "post",
    data
  });
}
//修改车辆信息
export function updataVehicleInfo(data: any) {
  return request({
    url: "/admin/vehicle",
    method: "PUT",
    data
  });
}
// 获取车辆详情
export function getVehicleDetail(id: any) {
  return request({
    url: "/admin/vehicle/" + id,
    method: "get"
  });
}
// 删除车辆信息
export function deleteVehicle(id: any) {
  return request({
    url: "/admin/vehicle/" + id,
    method: "DELETE"
  });
}
