import request from "@/api";

// 获取用车辆运力管理列表
export function getDriverList(data: any) {
  return request({
    url: "/admin/inTransitVehicle/page",
    method: "get",
    params: data
  });
}
//调用车辆运力管理新增
export function addDriverInfo(data: any) {
  return request({
    url: "/admin/inTransitVehicle",
    method: "post",
    data
  });
}
//修改用车辆运力管理
export function updataDriverInfo(data: any) {
  return request({
    url: "/admin/inTransitVehicle",
    method: "PUT",
    data
  });
}
// 获取用车辆运力管理详情
export function getDriverDetail(id: any) {
  return request({
    url: "/admin/inTransitVehicle/" + id,
    method: "get"
  });
}
// 删除用车辆运力管理
export function deleteDriver(id: any) {
  return request({
    url: "/admin/inTransitVehicle/" + id,
    method: "DELETE"
  });
}

//获取车牌号下拉
export function getListCars() {
  return request({
    url: "/admin/vehicleCapacity/list",
    method: "get"
  });
}

//查看车辆轨迹
export function getCrasUrl(id: any) {
  return request({
    url: "/admin/inTransitVehicle/trajectory/" + id,
    method: "get"
  });
}
