ic-service.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. import axios from '@/common/services/axios-instance'
  2. class IcService {
  3. // 获取审计事项列表信息
  4. findIcIcmatrix(id) {
  5. return axios
  6. .get('api/xcoa-mobile/v1/icmtxprocess/findIamAuditMatters?id=', id)
  7. .then(function(res) {
  8. return res.data
  9. })
  10. }
  11. fngetsortNum(id) {
  12. return axios
  13. .post('api/xcoa-mobile/v1/icmtxmeasure/getsortNum?catalogId=' + id)
  14. .then(function(res) {
  15. return res.data
  16. })
  17. }
  18. // 获取审计事项分类树
  19. findIcIcmatrixCategoryTree(parentId, orgId, versionId) {
  20. const url =
  21. 'api/xcoa-mobile/v1/icmtxprocess/findIamAuditMattersCategoryTree?parentId=' +
  22. parentId +
  23. '&auditOrgId=' +
  24. orgId +
  25. '&versionId=' +
  26. versionId
  27. return axios.post(url).then(function(res) {
  28. return res
  29. })
  30. }
  31. // 获取措施节点
  32. findIcIcmeasureCategoryTree(parentId, orgId, versionId) {
  33. const url =
  34. 'api/xcoa-mobile/v1/icmtxprocess/findIcIcmeasureCategoryTree?parentId=' +
  35. parentId +
  36. '&auditOrgId=' +
  37. orgId +
  38. '&versionId=' +
  39. versionId
  40. return axios.post(url).then(function(res) {
  41. return res
  42. })
  43. }
  44. // 获取分类path
  45. findupcatinfo(categoryId) {
  46. const url = 'api/xcoa-mobile/v1/icmtxprocess/findupcatinfo?categoryId=' + categoryId
  47. return axios.post(url).then(function(res) {
  48. return res
  49. })
  50. }
  51. // 删除时检查分类
  52. deleteCheckCategory(ids) {
  53. return axios
  54. .get('api/xcoa-mobile/v1/icmtxprocess/delete-check-category?ids=' + ids)
  55. .then(function(res) {
  56. return res.data
  57. })
  58. }
  59. // 删除时分类
  60. deleteCategory(ids) {
  61. return axios
  62. .delete('api/xcoa-mobile/v1/icmtxprocess/delete-category?ids=' + ids)
  63. .then(function(res) {
  64. return res.data
  65. })
  66. }
  67. // 删除事项
  68. deleteIcIcmatrix(ids) {
  69. return axios
  70. .delete('api/xcoa-mobile/v1/icmtxprocess/delete-iamAuditMatters?ids=' + ids)
  71. .then(function(res) {
  72. return res.data
  73. })
  74. }
  75. // 获取分级授权下拉列表
  76. getManagedHierarchyOrg(formId) {
  77. return axios({
  78. url: `api/xcoa-mobile/v1/iam-page/getHavePermissionOrg/${formId}`,
  79. method: 'post',
  80. }).then((res) => {
  81. return res
  82. })
  83. }
  84. // 导出内控措施
  85. exportItem(id, versionId) {
  86. return axios({
  87. method: 'post',
  88. url: 'api/xcoa-mobile/v1/icmtxmeasure/exportItem',
  89. params: { id: Number(id), versionId: Number(versionId) },
  90. responseType: 'blob',
  91. })
  92. }
  93. // 导出模板
  94. exportItemTemplate(level) {
  95. return axios({
  96. method: 'post',
  97. url: 'api/xcoa-mobile/v1/icmtxmeasure/exportItemTemplate',
  98. params: { level: Number(level) },
  99. responseType: 'blob',
  100. })
  101. }
  102. // 导入数据
  103. importItemTemplate(importType, groupId, mtxVersionId, orgId) {
  104. return axios({
  105. method: 'post',
  106. url: 'api/xcoa-mobile/v1/icmtxmeasure/importItemTemplate',
  107. params: {
  108. importType: importType,
  109. groupId: groupId,
  110. mtxVersionId: mtxVersionId,
  111. auditOrgId: orgId,
  112. },
  113. })
  114. }
  115. // 拖拽功能
  116. dragNode(data) {
  117. return axios({
  118. method: 'post',
  119. url: 'api/xcoa-mobile/v1/icmtxprocess/drage',
  120. data: data,
  121. })
  122. }
  123. // 获取版本ID
  124. getversion(belongUnitId) {
  125. return axios({
  126. method: 'post',
  127. url: 'api/xcoa-mobile/v1/icmtxversion/getMtxVersion',
  128. params: { belongUnitId: belongUnitId },
  129. })
  130. }
  131. // 检查分类
  132. CheckCategory(ids) {
  133. return axios
  134. .get('api/xcoa-mobile/v1/icmtxprocess/check-category?ids=' + ids)
  135. .then(function(res) {
  136. return res.data
  137. })
  138. }
  139. }
  140. export default new IcService()