task.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. import { request } from '../libs/request.js'
  2. /**
  3. * 获取分页任务列表
  4. * @param {Object} params
  5. */
  6. export function getCheckTaskByList(data) {
  7. return request({
  8. url: "/goaf/goaftask/list",
  9. method: 'GET',
  10. data
  11. })
  12. }
  13. /**
  14. * 获取分页任务列表
  15. * @param {Object} data
  16. */
  17. export function getCheckTaskByPage(data) {
  18. return request({
  19. url: '/check/task/page',
  20. header: {
  21. 'content-type': "application/x-www-form-urlencoded"
  22. },
  23. data
  24. })
  25. }
  26. /**
  27. * 通过id获取详情
  28. * @param id
  29. */
  30. export function getTaskDetailById(id) {
  31. return request({
  32. url: '/check/task/view/'+id
  33. })
  34. }
  35. /**
  36. * 通过id进行任务的处理操作
  37. * @param id
  38. */
  39. export function manageTaskById(id) {
  40. return request({
  41. url: '/check/task/handle/'+id,
  42. method: 'PUT'
  43. })
  44. }
  45. /**
  46. * Transfer CheckTask
  47. * 转交任务
  48. * @param data
  49. * @returns {AxiosPromise}
  50. */
  51. export function transferCheckTask(data) {
  52. return request({
  53. url: `/check/task/transfer`,
  54. method: 'PUT',
  55. data
  56. })
  57. }
  58. /**
  59. * Cancel CheckTask
  60. * 取消任务
  61. * @param data
  62. * @returns {AxiosPromise}
  63. */
  64. export function cancelCheckTask(checkTaskId) {
  65. return request({
  66. url: `/check/task/cancel/${checkTaskId}`,
  67. method: 'PUT'
  68. })
  69. }
  70. /**
  71. * Complete CheckTask
  72. * @param data
  73. * @returns {AxiosPromise}
  74. * 完成任务
  75. */
  76. export function completeCheckTask(checkTaskId) {
  77. return request({
  78. url: `/check/task/complete/${checkTaskId}`,
  79. method: 'PUT'
  80. })
  81. }
  82. /**
  83. * 批量更新CheckTaskDoing Item
  84. * @param data
  85. * @returns {AxiosPromise}
  86. */
  87. export function batchUpdateCheckTaskDoingItem(taskId, checkResult) {
  88. return request({
  89. url: `/check/task/doing/item/batchUpdate/${taskId}/${checkResult}`,
  90. method: 'PUT'
  91. })
  92. }
  93. // 提交任务
  94. export function handleCheckTask(data) {
  95. return request({
  96. url: '/goaf/goaftask/completed',
  97. method: 'POST',
  98. data
  99. })
  100. }
  101. // 任务统计
  102. export function goaftaskstatis(data) {
  103. return request({
  104. url: "/goaf/goaftaskstatis",
  105. method: 'GET',
  106. data
  107. })
  108. }
  109. // 任务统计
  110. export function goafhdangerstatis(data) {
  111. return request({
  112. url: "/goaf/goafhdangerstatis",
  113. method: 'GET',
  114. data
  115. })
  116. }