punchInApi.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import request from "@/utils/request";
  2. /**
  3. * 查询打卡任务列表
  4. */
  5. export function queryPunchIns() {
  6. return request({
  7. url: "/punchIn/queryPunchIns"
  8. });
  9. }
  10. /**
  11. * 新增打卡任务
  12. * @param {Object} data
  13. */
  14. export function addPunchIn(data) {
  15. return request({
  16. url: "/punchIn/savePunchIn",
  17. method: "post",
  18. data,
  19. loading: true,
  20. loadingText: "正在保存打卡任务,请稍后..."
  21. });
  22. }
  23. /**
  24. * 更新打卡任务
  25. * @param {Object} data
  26. */
  27. export function updatePunchIn(data) {
  28. return request({
  29. url: "/punchIn/updatePunchIn",
  30. method: "post",
  31. data,
  32. loading: true,
  33. loadingText: "正在更新打卡任务,请稍后..."
  34. });
  35. }
  36. /**
  37. * 删除打卡任务
  38. * @param {Object} data
  39. */
  40. export function deletePunchIn(data) {
  41. return request({
  42. url: "/punchIn/deletePunchIn",
  43. method: "post",
  44. data,
  45. loading: true,
  46. loadingText: "正在删除打卡任务,请稍后..."
  47. });
  48. }
  49. /**
  50. * 打卡
  51. * @param {Object} data
  52. */
  53. export function doPunchIn(data) {
  54. return request({
  55. url: "/punchIn/doPunchIn",
  56. method: "post",
  57. data,
  58. loading: true,
  59. loadingText: "正在打卡,请稍后..."
  60. });
  61. }
  62. /**
  63. * 根据ID查询打卡任务
  64. * @param {Object} data
  65. */
  66. export function queryPunchInById(data) {
  67. return request({
  68. url: "/punchIn/queryPunchInById",
  69. method: "post",
  70. data
  71. });
  72. }
  73. /**
  74. * 归档打卡任务
  75. * @param {Object} data
  76. */
  77. export function archivePunchIn(data) {
  78. return request({
  79. url: "/punchIn/archivePunchIn",
  80. method: "post",
  81. data
  82. });
  83. }
  84. /**
  85. * 补卡
  86. * @param {Object} data
  87. */
  88. export function remakPunchIn(data) {
  89. return request({
  90. url: "/punchIn/remakPunchIn",
  91. method: "post",
  92. data
  93. });
  94. }
  95. /**
  96. * 撤销打卡
  97. * @param {Object} data
  98. */
  99. export function revokePunchIn(data) {
  100. return request({
  101. url: "/punchIn/revokePunchIn",
  102. method: "post",
  103. data
  104. });
  105. }