import request from '@/utils/request'

// 查询区域列表
export function listRegion(query) {
  return request({
    url: '/base/region/list',
    method: 'get',
    params: query
  })
}

export function getAllRegion(id) {
  return request({
    url: '/base/region/allRegion/'+id,
    method: 'get',
  })
}

// 查询区域详细
export function getRegion(id) {
  return request({
    url: '/base/region/' + id,
    method: 'get'
  })
}

// 新增区域
export function addRegion(data) {
  return request({
    url: '/base/region',
    method: 'post',
    data: data
  })
}

// 修改区域
export function updateRegion(data) {
  return request({
    url: '/base/region',
    method: 'put',
    data: data
  })
}

// 删除区域
export function delRegion(id) {
  return request({
    url: '/base/region/' + id,
    method: 'delete'
  })
}
export function handleApprove(data) {
  return request({
    url: '/base/region/handleApprove',
    method: 'put',
    data: data
  })
}
