punchInApi.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. loading: true,
  72. loadingText: "正在查询打卡任务,请稍后..."
  73. });
  74. }
  75. /**
  76. * 归档打卡任务
  77. * @param {Object} data
  78. */
  79. export function archivePunchIn(data) {
  80. return request({
  81. url: "/punchIn/archivePunchIn",
  82. method: "post",
  83. data
  84. });
  85. }
  86. /**
  87. * 补卡
  88. * @param {Object} data
  89. */
  90. export function remakePunchIn(data) {
  91. return request({
  92. url: "/punchIn/remakePunchIn",
  93. method: "post",
  94. data
  95. });
  96. }
  97. /**
  98. * 撤销打卡
  99. * @param {Object} data
  100. */
  101. export function revokePunchIn(data) {
  102. return request({
  103. url: "/punchIn/revokePunchIn",
  104. method: "post",
  105. data
  106. });
  107. }
  108. /**
  109. * 查询打卡数据
  110. * @param {Object} data
  111. */
  112. export function queryPunchInData(data) {
  113. return request({
  114. url: "/punchIn/queryPunchInData",
  115. method: "post",
  116. data
  117. });
  118. }