import request from '@/utils/request'

export function getTreeDepartment() {
  return request({
    url: '/department/treeDepartment',
    method: 'get'
  })
}
export function addDepartment(data) {
  return request({
    url: '/department/addDepartment',
    method: 'post',
    data
  })
}
export function editDepartment(data) {
  return request({
    url: '/department/editDepartment',
    method: 'post',
    data
  })
}

export function delDepartment(id) {
  return request({
    url: '/department/deleteDepartment/' + id,
    method: 'get'
  })
}

export function editDepartmentShow(id) {
  return request({
    url: '/department/editDepartmentShow/' + id,
    method: 'get'
  })
}
//查询当前登录人部门下的员工列表
export function loginUserDepartmentOfUserList() {
  return request({
    url: '/department/getLoginUserDepartmentOfUserList',
    method: 'get'
  })
}
//查询当前登录人部门下的员工列表
export function getTreeDepartmentByDepartmentId(id) {
  return request({
    url: '/department/getTreeDepartmentByDepartmentId/' + id,
    method: 'get'
  })
}
// 获取基地
export function getBasePlaces() {
  return request({
    url: '/department/getBasePlaces',
    method: 'get'
  })
}
