punchInApi.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import request from "@/utils/request";
  2. /**
  3. * 查询打卡任务列表
  4. */
  5. export function queryPunchIn() {
  6. return request({
  7. url: "/punchIn/queryPunchIn"
  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. }