import request from '@/utils/request'

/**
* 省市区数据表树形查询列表
* @param {查询条件} data
*/
export function regionTreeList(query) {
  return request({
    url: '/business/Region/getRegionTreeList',
    method: 'get',
    params: query
  })
}

/**
* 省市区数据表树形查询列表(二级)
* @param {查询条件} data
*/
export function getSecondRegionTreeList(query) {
  return request({
    url: '/business/Region/getSecondRegionTreeList',
    method: 'get',
    params: query
  })
}

// 省市区数据表新增或修改
export function addOrUpdateRegion(data) {
  return request({
    url: '/business/Region/addOrUpdateRegion',
    method: 'post',
    data: data,
  })
}

// 省市区数据表删除
export function delRegion(ids) {
  return request({
    url: '/business/Region/'+ ids,
    method: 'delete'
  })
}

// 省市区数据表导出
export function exportRegion(query) {
  return request({
    url: 'business/Region/exportRegion',
    method: 'get',
    params: query
  })
}

