ProcessService.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import request from '@/utils/httpRequest'
  2. export default class ProcessService {
  3. list (params) {
  4. return request({
  5. url: '/flowable/process/list',
  6. method: 'get',
  7. params: params
  8. })
  9. }
  10. runningDataList (params) {
  11. return request({
  12. url: '/flowable/process/runningData',
  13. method: 'get',
  14. params: params
  15. })
  16. }
  17. historyListData (params) {
  18. return request({
  19. url: '/flowable/process/historyListData',
  20. method: 'get',
  21. params: params
  22. })
  23. }
  24. revokeProcIns (id) {
  25. return request({
  26. url: `/flowable/process/revokeProcIns`,
  27. method: 'put',
  28. params: {id: id}
  29. })
  30. }
  31. deleteProcIns (ids, reason) {
  32. return request({
  33. url: '/flowable/process/deleteProcIns',
  34. method: 'delete',
  35. params: {
  36. ids: ids,
  37. reason: reason}
  38. })
  39. }
  40. deleteAllProcIns (ids) {
  41. return request({
  42. url: '/flowable/process/history/deleteAllProcIns',
  43. method: 'delete',
  44. params: {procInsIds: ids}
  45. })
  46. }
  47. suspend (procDefId) {
  48. return request({
  49. url: '/flowable/process/update/suspend',
  50. method: 'put',
  51. params: {procDefId: procDefId}
  52. })
  53. }
  54. active (procDefId) {
  55. return request({
  56. url: '/flowable/process/update/active',
  57. method: 'put',
  58. params: {procDefId: procDefId}
  59. })
  60. }
  61. stop (id, message) {
  62. return request({
  63. url: '/flowable/process/stop',
  64. method: 'put',
  65. params: {id: id, message: message}
  66. })
  67. }
  68. getFlowChart (processDefId) {
  69. return request({
  70. url: '/flowable/process/getFlowChart',
  71. method: 'get',
  72. params: {processDefId: processDefId}
  73. })
  74. }
  75. queryProcessStatus (procDefId, procInsId) {
  76. return request({
  77. url: '/flowable/process/queryProcessStatus',
  78. method: 'get',
  79. params: {procDefId: procDefId, procInsId: procInsId}
  80. })
  81. }
  82. exist (key) {
  83. return request({
  84. url: '/flowable/process/exist',
  85. method: 'get',
  86. params: {key: key}
  87. })
  88. }
  89. getByName (name) {
  90. return request({
  91. url: `/flowable/process/getByName`,
  92. method: 'get',
  93. params: {name: name}
  94. })
  95. }
  96. getById (id) {
  97. return request({
  98. url: `/flowable/process/getById`,
  99. method: 'get',
  100. params: {id: id}
  101. })
  102. }
  103. }