examwork-markresult.js 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { httpApp } from "@/plugins/axiosIndex";
  2. import { pickBy } from "lodash-es";
  3. import { object2QueryString } from "@/utils/utils";
  4. export function searchMarkResult({
  5. examId = "",
  6. examActivityId = "",
  7. courseCode = "",
  8. name = "",
  9. identity = "",
  10. pageNumber = 1,
  11. pageSize = 10,
  12. }) {
  13. const data = pickBy(
  14. {
  15. examId,
  16. examActivityId,
  17. name,
  18. courseCode,
  19. identity,
  20. pageNumber,
  21. pageSize,
  22. },
  23. (v) => v !== "" && v !== null
  24. );
  25. return httpApp.post(
  26. "/api/admin/examStudent/mark/result?" + object2QueryString(data)
  27. );
  28. }
  29. export function exportMarkResult({
  30. examId = "",
  31. examActivityId = "",
  32. courseCode = "",
  33. name = "",
  34. identity = "",
  35. type = "",
  36. }) {
  37. const data = pickBy(
  38. {
  39. examId,
  40. examActivityId,
  41. name,
  42. courseCode,
  43. identity,
  44. type,
  45. },
  46. (v) => v !== "" && v !== null
  47. );
  48. return httpApp.post(
  49. `/api/admin/examStudent/mark/result/${type}/export?` +
  50. object2QueryString(data)
  51. );
  52. }