hr.ts 916 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { request } from '@umijs/max'
  2. /**
  3. * @description 获取部门列表
  4. */
  5. export async function getDepartMentList(parentId) {
  6. return request('/department/list', {
  7. params: { parentId }
  8. })
  9. }
  10. /**
  11. * @description 新增部门
  12. */
  13. export async function addDepartment(payload) {
  14. return request('/department/add', { method: 'POST', data: payload })
  15. }
  16. /**
  17. * @description 删除部门
  18. */
  19. export async function delDepartment(id) {
  20. return request('/department/delete', { method: 'POST', data: { id } })
  21. }
  22. /** 获取部门-员工列表 */
  23. export async function queryDepartmentStaffList() {
  24. return request('/department/staff')
  25. }
  26. /** 获取通讯录人员列表 */
  27. export async function queryStaffContacts(payload) {
  28. const data = await request('/staff/listV2', {
  29. params: { ...payload }
  30. })
  31. return data
  32. }
  33. // export async function queryStaffContacts() {
  34. // return request('/staff/listV2')
  35. // }