import { http } from '@/utils/http/axios';

/**
 * @description: 部门列表
 */
export function deptList(params) {
  return http.request({
    url: '/dept/list',
    method: 'get',
    params,
  });
}

/**
 * @description: 部门树形列表
 */
export function deptTreeList(params?) {
  return http.request({
    url: '/dept/queryRegionTree',
    method: 'get',
    params,
  });
}

/**
 * @description: 添加部门
 */
export function addDept(params) {
  return http.request({
    url: '/dept/add',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑部门
 */
export function editDept(params) {
  return http.request({
    url: '/dept/update',
    method: 'post',
    params,
  });
}

/**
 * @description: 部门详情
 */
export function deptInfo(params) {
  return http.request({
    url: '/dept/view',
    method: 'get',
    params,
  });
}

/**
 * @description: 删除部门
 */
export function deleteDept(params) {
  return http.request({
    url: '/dept/delete',
    method: 'post',
    params,
  });
}
