taskManage.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. import service from '../utils/js/request'
  2. const taskManage = {
  3. /**
  4. * 获取任务列表
  5. * @param {Object} param
  6. */
  7. getTask: function(param) {
  8. return service({
  9. url: '/task/mp/page',
  10. method: 'POST',
  11. data: param
  12. })
  13. },
  14. /**
  15. * 建议获取个人任务
  16. */
  17. getSuggest: function(data) {
  18. return service({
  19. url: "/task/mp/getSuggest",
  20. method: "get",
  21. data: data
  22. })
  23. },
  24. /**
  25. * 添加到今日任务
  26. * @param {Object} params
  27. */
  28. addToday: function(params) {
  29. return service({
  30. url: "/task/today/add",
  31. method: "post",
  32. data: params
  33. })
  34. },
  35. /**
  36. * 完结结个人任务
  37. * @param {Object} params
  38. */
  39. taskFinish: function(params) {
  40. return service({
  41. url: "/task/persontask/taskfinish",
  42. method: "post",
  43. data: params
  44. })
  45. },
  46. /**
  47. * 反完结个人任务
  48. * @param {Object} params
  49. */
  50. taskUnFinish: function(params) {
  51. return service({
  52. url: "/task/persontask/taskunfinish",
  53. method: "post",
  54. data: params
  55. })
  56. },
  57. /**
  58. * 更改个人任务的重要性
  59. * @param {Object} params
  60. */
  61. changeImportant: function(params) {
  62. return service({
  63. url: "/task/persontask/changeimportant",
  64. method: "post",
  65. data: params
  66. })
  67. },
  68. /**
  69. * 新增个人任务并添加到今日任务
  70. * @param {Object} params
  71. */
  72. addTodayTask: function(params) {
  73. return service({
  74. url: "/task/persontask/addtoday",
  75. method: "post",
  76. data: params
  77. })
  78. },
  79. /**
  80. * 新增个人任务
  81. * @param {Object} params
  82. */
  83. addTask: function(params) {
  84. return service({
  85. url: "/task/persontask/add",
  86. method: "post",
  87. data: params
  88. })
  89. },
  90. /**
  91. * 获取任务步骤
  92. * @param {任务id} taskId
  93. */
  94. getTaskStep: function(taskId) {
  95. return service({
  96. url: "/task/step/list",
  97. method: "get",
  98. data: {
  99. taskId: taskId
  100. }
  101. })
  102. },
  103. /**
  104. * 新增任务步骤
  105. * @param {任务步骤参数} params
  106. */
  107. addStep: function(params) {
  108. return service({
  109. url: "/task/step/add",
  110. method: "post",
  111. data: params
  112. })
  113. },
  114. /**
  115. * 完结任务步骤
  116. * @param {任务步骤参数}} params
  117. */
  118. stepFinish: function(params) {
  119. return service({
  120. url: "/task/step/finish",
  121. method: "post",
  122. data: params
  123. })
  124. },
  125. /**
  126. * 反完结任务步骤
  127. * @param {任务步骤参数} params
  128. */
  129. stepUnFinish: function(params) {
  130. return service({
  131. url: "/task/step/unfinish",
  132. method: "post",
  133. data: params
  134. })
  135. },
  136. /**
  137. * 删除步骤
  138. * @param {任务步骤参数} params
  139. */
  140. deleteStep: function(params) {
  141. return service({
  142. url: "/task/step/delete",
  143. method: "post",
  144. data: params
  145. })
  146. },
  147. /**
  148. * 更新任务
  149. * @param {任务参数}} params
  150. */
  151. taskEdit: function(params) {
  152. return service({
  153. url: "/task/persontask/edit",
  154. method: "post",
  155. data: params
  156. })
  157. },
  158. /**
  159. * 删除今日任务
  160. * @param {任务参数} params
  161. * @returns
  162. */
  163. deleteToday: function(params) {
  164. return service({
  165. url: "/task/today/delete",
  166. method: "post",
  167. data: params
  168. })
  169. },
  170. /**
  171. * 获取今日任务
  172. * @param {Object} taskId
  173. */
  174. getFile: function(taskId) {
  175. return service({
  176. url: "/task/file/list",
  177. method: "get",
  178. data: {
  179. "taskId": taskId
  180. }
  181. })
  182. },
  183. /**
  184. * 删除今日任务
  185. * @param {Object} id
  186. * @param {Object} fileId
  187. */
  188. deleteFile(id, fileId) {
  189. return service({
  190. url: "/task/file/delete",
  191. method: "get",
  192. data: {
  193. id: id,
  194. fileId: fileId
  195. },
  196. })
  197. },
  198. /**
  199. * 删除任务、今日任务、任务步骤、任务汇报等
  200. * @param {任务参数} params
  201. */
  202. deleteTask(params) {
  203. return service({
  204. url: "/task/persontask/delete",
  205. method: "post",
  206. data: params
  207. })
  208. },
  209. }
  210. export default taskManage