taskService.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. import request from "../../common/request"
  2. export default {
  3. start (params) {
  4. console.log('提交的参数',params)
  5. return request({
  6. url: "/flowable/task/start",
  7. method: "post",
  8. params: params
  9. });
  10. },
  11. todoList: function (params) {
  12. return request({
  13. url: "/flowable/task/todo",
  14. method: "get",
  15. params: params,
  16. });
  17. },
  18. historicList: function (params) {
  19. return request({
  20. url: "/flowable/task/historic",
  21. method: "get",
  22. params: params,
  23. });
  24. },
  25. historicTaskList: function (procInsId) {
  26. return request({
  27. url: "/flowable/task/historicTaskList",
  28. method: "get",
  29. params: { procInsId: procInsId },
  30. });
  31. },
  32. myApplyedList: function (params) {
  33. return request({
  34. url: "/flowable/task/myApplyed",
  35. method: "get",
  36. params: params,
  37. });
  38. },
  39. getTaskDef: function (params) {
  40. return request({
  41. url: "/flowable/task/getTaskDef",
  42. method: "get",
  43. params: params,
  44. });
  45. },
  46. delegate: function (taskId, userId) {
  47. return request({
  48. url: "/flowable/task/delegate",
  49. method: "put",
  50. params: { taskId: taskId, userId: userId },
  51. });
  52. },
  53. callback: function (params) {
  54. return request({
  55. url: "/flowable/task/callback",
  56. method: "put",
  57. params: params,
  58. });
  59. },
  60. audit: function (data) {
  61. return request({
  62. url: "/flowable/task/audit",
  63. method: "post",
  64. header: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
  65. data: data,
  66. });
  67. },
  68. backNodes: function (taskId) {
  69. return request({
  70. url: "/flowable/task/backNodes",
  71. method: "put",
  72. params: { taskId: taskId },
  73. });
  74. },
  75. back: function (params) {
  76. return request({
  77. url: "/flowable/task/back",
  78. method: "put",
  79. params: params,
  80. });
  81. },
  82. transfer: function (taskId, userId) {
  83. return request({
  84. url: "/flowable/task/transfer",
  85. method: "put",
  86. params: { taskId: taskId, userId: userId },
  87. });
  88. },
  89. addSignTask: function (data) {
  90. return request({
  91. url: "/flowable/task/addSignTask",
  92. method: "post",
  93. header: {
  94. "Content-Type":
  95. "application/x-www-form-urlencoded; charset=utf-8",
  96. },
  97. data: data,
  98. });
  99. },
  100. getFlowChart: function (processInstanceId) {
  101. return request({
  102. url: "/flowable/task/getFlowChart",
  103. method: "get",
  104. params: { processInstanceId: processInstanceId },
  105. });
  106. },
  107. urge: function (data) {
  108. return request({
  109. url: "/flowable/task/urge",
  110. method: "post",
  111. header: {
  112. "Content-Type":
  113. "application/x-www-form-urlencoded; charset=utf-8",
  114. },
  115. data: data,
  116. });
  117. },
  118. getProcessDefIdByRoleName: function (params) {
  119. return request({
  120. url: "/flowable/task/getProcessDefIdByRoleName",
  121. method: "get",
  122. params: params,
  123. });
  124. },
  125. getTaskNameByProcInsId (procInsId) {
  126. return request({
  127. url: `/flowable/task/getTaskNameByProcInsId`,
  128. method: 'get',
  129. params: {procInsId: procInsId}
  130. })
  131. },
  132. getProcessDefinitionIdByInstanceId (procInsId) {
  133. return request({
  134. url: `/flowable/task/getProcessDefinitionIdByInstanceId`,
  135. method: 'get',
  136. params: {procInsId: procInsId}
  137. })
  138. },
  139. getHistoryProcessDefinitionIdByInstanceId (procInsId) {
  140. return request({
  141. url: `/flowable/task/getHistoryProcessDefinitionIdByInstanceId`,
  142. method: 'get',
  143. params: {procInsId: procInsId}
  144. })
  145. },
  146. getProcessNameByInstanceId (procInsId) {
  147. return request({
  148. url: `/flowable/task/getProcessNameByInstanceId`,
  149. method: 'get',
  150. params: {procInsId: procInsId}
  151. })
  152. }
  153. };