import request from '@/utils/request'

// 查询地址树
export function getAddressTree(query) {
  return request({
    url: '/address/getAddressTree/full',
    method: 'get',
    params: query
  })
}
export function getAddressTreeAdd(query) {
  return request({
    url: '/address/getAddressTree/code',
    method: 'get',
    params: query
  })
}
export function getSecAddressTree(query) {
  return request({
    url: '/grid/region/top/address/tree',
    method: 'get',
    params: query
  })
}

export function getDeptTree() {
  return request({
    url: '/system/user/deptTree',
    method: 'get',
  })
}
export function getCommerList() {
  return request({
    url: '/system/user/getDeptName',
    method: 'get',
  })
}
export function deptTreeByManager(query) {
  return request({
    url: `/system/user/deptTreeByManager?deptId=${query}`,
    method: 'get',
  })
}
export function getTopDeptTree() {
  return request({
    url: '/system/user/deptTree/top',
    method: 'get',
  })
}

export function getDeptUserTree(query) {
  return request({
    url: '/system/user/treeUser',
    method: 'get',
    params: query
  })
}


export function getRegionCodeByDept(query) {
  return request({
    url: '/address/dept/region',
    method: 'get',
    params: query
  })
}
export function getDetailRegion(query) {
  return request({
    url: '/address/region',
    method: 'get',
    params: query
  })
}
export function grtRessStandardize(data) {

  return request({
    url: `/address/analyse/addressStandardize?address=${data}`,
    method: 'get',

  })
}

// 查询全部机构
export function systemUserDeptTreeAll(data) {
  return request({
    url: '/system/user/deptTree/all',
    method: 'get'
  })
}