import { axios } from '@/utils/request'

//  查询所有分区
export const subareaQueryAll = (params) => {
  return axios({
    url: `/subarea/queryAll`,
    method: 'get'
  })
}

// 查询包含区域的所有分区
export const subareaQueryIncludeAreaAll = (params) => {
  return axios({
    url: `/subarea/queryIncludeAreaAll`,
    method: 'get'
  })
}

// 根据sn删除分区信息
export const subareaDeleteBySn = (params) => {
  return axios({
    url: `/subarea/deleteBySn/${params.sn}`,
    method: 'get'
  })
}

// 根据分区sn查询选中分区
export const subareaFindBySn = (params) => {
  return axios({
    url: `/subarea/findBySn/${params.sn}`,
    method: 'get'
  })
}

// 保存选中省市区
export const subareaSaveSubareaArea = (params) => {
  return axios({
    url: `/subarea/saveSubareaArea`,
    data: params,
    method: 'post'
  })
}