mtx-process-service.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. import axios from '@/common/services/axios-instance'
  2. class MtxProcessService {
  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. // 获取分类path
  32. findupcatinfo(categoryId) {
  33. const url = 'api/xcoa-mobile/v1/icmtxprocess/findupcatinfo?categoryId=' + categoryId
  34. return axios.post(url).then(function(res) {
  35. return res
  36. })
  37. }
  38. // 删除时检查分类
  39. deleteCheckCategory(ids) {
  40. return axios
  41. .get('api/xcoa-mobile/v1/icmtxprocess/delete-check-category?ids=' + ids)
  42. .then(function(res) {
  43. return res.data
  44. })
  45. }
  46. // 删除时分类
  47. deleteCategory(ids) {
  48. return axios
  49. .delete('api/xcoa-mobile/v1/icmtxprocess/delete-category?ids=' + ids)
  50. .then(function(res) {
  51. return res.data
  52. })
  53. }
  54. // 删除事项
  55. deleteIcIcmatrix(ids) {
  56. return axios
  57. .delete('api/xcoa-mobile/v1/icmtxprocess/delete-iamAuditMatters?ids=' + ids)
  58. .then(function(res) {
  59. return res.data
  60. })
  61. }
  62. // 获取分级授权下拉列表
  63. getManagedHierarchyOrg(formId) {
  64. return axios({
  65. url: `api/xcoa-mobile/v1/iam-page/getHavePermissionOrg/${formId}`,
  66. method: 'post',
  67. }).then((res) => {
  68. return res
  69. })
  70. }
  71. // 导出内控措施
  72. exportItem(id, versionId) {
  73. return axios({
  74. method: 'post',
  75. url: 'api/xcoa-mobile/v1/icmtxmeasure/exportItem',
  76. params: { id: Number(id), versionId: Number(versionId) },
  77. responseType: 'blob',
  78. })
  79. }
  80. // 导出模板
  81. exportItemTemplate(level) {
  82. return axios({
  83. method: 'post',
  84. url: 'api/xcoa-mobile/v1/icmtxmeasure/exportItemTemplate',
  85. params: { level: Number(level) },
  86. responseType: 'blob',
  87. })
  88. }
  89. // 导入数据
  90. importItemTemplate(importType, groupId, mtxVersionId, orgId) {
  91. return axios({
  92. method: 'post',
  93. url: 'api/xcoa-mobile/v1/icmtxmeasure/importItemTemplate',
  94. params: {
  95. importType: importType,
  96. groupId: groupId,
  97. mtxVersionId: mtxVersionId,
  98. auditOrgId: orgId,
  99. },
  100. })
  101. }
  102. // 拖拽功能
  103. dragNode(data) {
  104. return axios({
  105. method: 'post',
  106. url: 'api/xcoa-mobile/v1/icmtxprocess/drage',
  107. data: data,
  108. })
  109. }
  110. // 获取版本ID
  111. getversion(belongUnitId) {
  112. return axios({
  113. method: 'post',
  114. url: 'api/xcoa-mobile/v1/icmtxversion/getMtxVersion',
  115. params: { belongUnitId: belongUnitId },
  116. })
  117. }
  118. // 检查分类
  119. CheckCategory(ids) {
  120. return axios
  121. .get('api/xcoa-mobile/v1/icmtxprocess/check-category?ids=' + ids)
  122. .then(function(res) {
  123. return res.data
  124. })
  125. }
  126. // 检查编号唯一
  127. checkMeasurecode(measureCode, id, mtxVersionId, auditOrgId) {
  128. return axios({
  129. method: 'post',
  130. url: 'api/xcoa-mobile/v1/icmtxmeasure/checkMeasureCode',
  131. params: {
  132. measureCode: measureCode,
  133. id: id,
  134. mtxVersionId: mtxVersionId,
  135. auditOrgId: auditOrgId,
  136. },
  137. })
  138. }
  139. }
  140. export default new MtxProcessService()