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

export enum Api {
  list = '/sys/user/queryByOrgCodeForAddressList',
  positionList = '/sys/position/list',
  queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
  addXzbm = `/sys/user/addXzbm`,
  editXzbm = `/sys/user/editXzbm`,
  delXzbm = `/sys/user/delXzbm`,
  treePidXzbm = `/sys/api/xzbm`,
  treeXzbm = `/sys/api/tree/xzbm`,
  
}
/**
 * 获取部门树列表
 */
export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params });
/**
 * 部门用户信息
 */
export const list = (params?) => defHttp.get({ url: Api.list, params });
/**
 * 职务list
 */

export const positionList = (params?) => defHttp.get({ url: Api.positionList, params });
export const treeXzbm = (params?) => defHttp.get({ url: Api.treeXzbm, params });
export const treePidXzbm = (params?) => defHttp.get({ url: `${Api.treePidXzbm}/${params.pid}`});
export const addXzbm = (params?) => defHttp.post({ url: Api.addXzbm, params });
export const editXzbm = (params?) => defHttp.post({ url: Api.editXzbm, params });
export const delXzbm = (params?) => defHttp.post({ url: Api.delXzbm, params });
