import request from "@/utils/request";

// 查询道路段列表
export function getSectionList(query) {
  return request({
    url: "/api/v2/segment/list",
    method: "post",
    data: query,
  });
}

// 查询路线下拉列表
export function getSegmentList() {
  return request({
    url: "/xj/route/listDropDown",
    method: "get",
  });
}

//  新增路段
export function addSection(query) {
  return request({
    url: "/api/v2/segment/add",
    method: "post",
    data: query,
  });
}

// 删除路段
export function deleteSection(query) {
    return request({
      url: "/api/v2/segment/delete",
      method: "delete",
      data: query,
    });
  }

//  修改路段信息
export function updateSection(query) {
    return request({
      url: "/api/v2/segment/update",
      method: "put",
      data: query,
    });
  }

  // 查询管理站下拉数据
  export function getDeptList(params) {
    return request({
      url: "/system/dept/listDropDown",
      method: "get",
      params,
    });
  }

