audit-service.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. import axios from '@/common/services/axios-instance'
  2. class AuditService {
  3. // 获取审计计划流程实例ID
  4. getPlanInstId(params) {
  5. return axios({
  6. url: 'api/xcoa-mobile/v1/iamauditplan/getPlanInstId',
  7. method: 'get',
  8. params: params,
  9. }).then((res) => {
  10. return res.data
  11. })
  12. }
  13. // 检查指定年份年度计划是否已经存在
  14. existYearPlan(id, planYear, orgid, operNum) {
  15. return axios({
  16. url:
  17. `api/xcoa-mobile/v1/iamauditplan/existYearPlan?id=` +
  18. id +
  19. `&planYear=` +
  20. planYear +
  21. `&auditOrgId=` +
  22. orgid +
  23. '&operNum=' +
  24. operNum,
  25. })
  26. }
  27. // 自动预排
  28. autoPrequeue(id, unitCode, planYear, unitIdList) {
  29. return axios({
  30. url:
  31. `api/xcoa-mobile/v1/iamauditplan/autoPrequeue?id=` +
  32. id +
  33. `&unitCode=` +
  34. unitCode +
  35. `&planYear=` +
  36. planYear +
  37. `&unitIdList=` +
  38. unitIdList,
  39. })
  40. }
  41. // 检查表单是否作废
  42. isWaste(id) {
  43. return axios({
  44. url: `api/xcoa-mobile/v1/iamauditplan/checkDept?id=` + id,
  45. })
  46. }
  47. // 删除前校验
  48. beforeDeleteCheck(ids) {
  49. return axios({
  50. url: `api/xcoa-mobile/v1/iamauditplan/beforeDeleteCheck?ids=` + ids,
  51. })
  52. }
  53. // 删除计划变更信息
  54. deleteProjectChange(ids) {
  55. return axios({
  56. url: `api/xcoa-mobile/v1/iamauditprojectchange/deleteProjectChange?ids=` + ids,
  57. })
  58. }
  59. // 根据已办获取代办
  60. findTodoId(instId) {
  61. return axios({
  62. url: `api/xcoa-mobile/v1/iam-common/query/todo?instId=` + instId,
  63. })
  64. }
  65. // 获取计划年度
  66. getPlanYear() {
  67. return axios({
  68. url: `api/xcoa-mobile/v1/iamauditplan/getPlanYear`,
  69. })
  70. }
  71. // 获取项目信息
  72. getProjectInfoById(id) {
  73. return axios({
  74. url: `api/xcoa-mobile/v1/iamauditproject/getProjectInfoById?id=` + id,
  75. })
  76. }
  77. // 校验项目是否已启动
  78. checkProjectIsStart(id) {
  79. return axios({
  80. url: `api/xcoa-mobile/v1/iamauditproject/checkProjectIsStart?id=` + id,
  81. })
  82. }
  83. // 取消项目
  84. cancelProject(id) {
  85. return axios({
  86. url: `api/xcoa-mobile/v1/iamauditproject/cancelProject?id=` + id,
  87. })
  88. }
  89. // 计划项目变更批量提交
  90. projectChangeBatchSubmit(params, srcTrustId) {
  91. const headers = {
  92. 'Content-Type': 'application/json',
  93. }
  94. if (srcTrustId) {
  95. headers['X-RUN-AS'] = srcTrustId
  96. }
  97. return axios
  98. .post(`api/xcoa-mobile/v1/iamauditprojectchange/projectChangeBatchSubmit`, params, {
  99. headers,
  100. })
  101. .then(function(res) {
  102. return res.data
  103. })
  104. }
  105. // 通过计划年度获取计划信息
  106. getPlanByPlanYear(planYear) {
  107. return axios({
  108. url: `api/xcoa-mobile/v1/iamauditplan/getPlanByPlanYear?planYear=` + planYear,
  109. })
  110. }
  111. // 获取审计计划信息
  112. getAuditPlanById(id) {
  113. return axios({
  114. url: `api/xcoa-mobile/v1/iamauditplan/getAuditPlanById?id=` + id,
  115. })
  116. }
  117. // 校验权限
  118. checkPermission() {
  119. return axios({
  120. url: `api/xcoa-mobile/v1/iamauditplan/checkPermission`,
  121. })
  122. }
  123. // 获取用户所在机构
  124. getCurrentUserGroup() {
  125. return axios({
  126. url: `api/xcoa-mobile/v1/iamorg/getCurrentUserGroup`,
  127. method: 'get',
  128. }).then((res) => {
  129. return res
  130. })
  131. }
  132. // 获取用户所在机构
  133. findIamOrgId(params) {
  134. return axios({
  135. url: 'api/xcoa-mobile/v1/iamorg/findIamOrgId',
  136. method: 'post',
  137. params,
  138. })
  139. }
  140. }
  141. export default new AuditService()