audit-matters-service.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import axios from '@/common/services/axios-instance'
  2. class AuditMattersService {
  3. // 获取审计事项列表信息
  4. findIamAuditMatters(id) {
  5. return axios
  6. .get('api/xcoa-mobile/v1/iam-audit-matters/findIamAuditMatters?id=', id)
  7. .then(function(res) {
  8. return res.data
  9. })
  10. }
  11. // 获取审计事项分类树
  12. findIamAuditMattersCategoryTree(parentId, orgId) {
  13. const url =
  14. 'api/xcoa-mobile/v1/iam-audit-matters-catalog/findIamAuditMattersCategoryTree?parentId=' +
  15. parentId +
  16. '&orgId=' +
  17. orgId
  18. return axios.post(url).then(function(res) {
  19. return res
  20. })
  21. }
  22. // 删除时检查分类
  23. deleteCheckCategory(ids) {
  24. return axios
  25. .get('api/xcoa-mobile/v1/iam-audit-matters-catalog/delete-check-category?ids=' + ids)
  26. .then(function(res) {
  27. return res.data
  28. })
  29. }
  30. // 删除时分类
  31. deleteCategory(ids) {
  32. return axios
  33. .delete('api/xcoa-mobile/v1/iam-audit-matters-catalog/delete-category?ids=' + ids)
  34. .then(function(res) {
  35. return res.data
  36. })
  37. }
  38. // 删除事项
  39. deleteIamAuditMatters(ids) {
  40. return axios
  41. .delete('api/xcoa-mobile/v1/iam-audit-matters/delete-iamAuditMatters?ids=' + ids)
  42. .then(function(res) {
  43. return res.data
  44. })
  45. }
  46. // 获取分级授权下拉列表
  47. getManagedHierarchyOrg(formId) {
  48. return axios({
  49. url: `api/xcoa-mobile/v1/iam-page/getHavePermissionOrg/${formId}`,
  50. method: 'post',
  51. }).then((res) => {
  52. return res
  53. })
  54. }
  55. // 导出审计事项
  56. exportItem(id, rootId) {
  57. return axios({
  58. method: 'post',
  59. url: 'api/xcoa-mobile/v1/iam-audit-matters/exportItem',
  60. params: { id: Number(id), rootId: Number(rootId) },
  61. responseType: 'blob',
  62. })
  63. }
  64. // 导出模板
  65. exportItemTemplate(level) {
  66. return axios({
  67. method: 'post',
  68. url: 'api/xcoa-mobile/v1/iam-audit-matters/exportItemTemplate',
  69. params: { level: Number(level) },
  70. responseType: 'blob',
  71. })
  72. }
  73. // 导入数据
  74. importItemTemplate(importType, groupId, orgId) {
  75. return axios({
  76. method: 'post',
  77. url: 'api/xcoa-mobile/v1/iam-audit-matters/importItemTemplate',
  78. params: { importType: importType, groupId: groupId, orgId: orgId },
  79. })
  80. }
  81. // 拖拽功能
  82. dragNode(data) {
  83. return axios({
  84. method: 'post',
  85. url: 'api/xcoa-mobile/v1/iam-audit-matters-catalog/drage',
  86. data: data,
  87. }).then((res) => {
  88. return res.data
  89. })
  90. }
  91. }
  92. export default new AuditMattersService()