import request from '@/utils/request'

// 列表
export const getWaterrightList = query => {
  return request({
    url: '/wpr/waterright/tree/list',
    method: 'get',
    params: query
  });
}

// 新增
export const addWaterright = data => {
  return request({
    url: '/wpr/waterright/add',
    method: 'post',
    data
  }) 
}

// 修改
export const editWaterright = data => {
  return request({
    url: '/wpr/waterright/edit',
    method: 'put',
    data
  }) 
}

// 获取上级区域水权信息
export const getWaterrightUpareaInfo = query => {
  return request({
    url: '/wpr/waterright/uparea/info',
    method: 'get',
    params: query
  }) 
}