hr.js 635 B

1234567891011121314151617181920212223242526272829
  1. import { request } from 'umi'
  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. }