audit-tree-service.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import axios from '@/common/services/axios-instance'
  2. class AuditTreeService {
  3. // 业务类型分类树
  4. getCategoryTree(parentId, treeparams, params) {
  5. return axios({
  6. url: `api/xcoa-mobile/v1/iam-tree/findTreeNodeById/${treeparams.configId}/${parentId}`,
  7. method: 'post',
  8. params,
  9. }).then((res) => {
  10. res.data.forEach((item) => (item.isLeaf = item.leaf))
  11. return res
  12. })
  13. }
  14. // 拖拽功能
  15. dragNode(params) {
  16. return axios({
  17. url: `api/xcoa-mobile/v1/iam-tree/moveTreeNode/${params.configId}/${params.id}/${params.targetId}/${params.position}`,
  18. method: 'post',
  19. data: null,
  20. }).then((res) => {
  21. return res.data
  22. })
  23. }
  24. // 获取分级授权下拉列表
  25. getManagedHierarchyOrg(formId) {
  26. return axios({
  27. url: `api/xcoa-mobile/v1/iam-page/getHavePermissionOrg/${formId}`,
  28. method: 'post',
  29. }).then((res) => {
  30. return res
  31. })
  32. }
  33. // 获取分级授权下拉列表(子项)
  34. getChildPermissionOrg(formId) {
  35. return axios({
  36. url: `api/xcoa-mobile/v1/iam-page/getChildPermissionOrg/${formId}`,
  37. method: 'post',
  38. }).then((res) => {
  39. return res
  40. })
  41. }
  42. }
  43. export default new AuditTreeService()