import request from '@/utils/request'

// 查询道路线列表
export function listSegment(query) {
  return request({
    url: '/xj/segment/list',
    method: 'get',
    params: query
  })
}

// 查询道路线详细
export function getSegment(id) {
  return request({
    url: '/xj/segment/' + id,
    method: 'get'
  })
}

// 新增道路线
export function addSegment(data) {
  return request({
    url: '/xj/segment',
    method: 'post',
    data: data
  })
}

// 修改道路线
export function updateSegment(data) {
  return request({
    url: '/xj/segment',
    method: 'put',
    data: data
  })
}

// 删除道路线
export function delSegment(id) {
  return request({
    url: '/xj/segment/' + id,
    method: 'delete'
  })
}
