exam.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import request from '@/utils/request'
  2. import { parseStrEmpty } from "@/utils/ruoyi";
  3. // 老师考试相关 start
  4. // 查询老师考试集合列表
  5. export function examTearcherList(query) {
  6. return request({
  7. url: '/sim/real-exam-collection/teacher/exam/list',
  8. method: 'get',
  9. params: query
  10. })
  11. }
  12. // 查询老师考试集合详细信息
  13. export function examTearcherGet(examCollectionId) {
  14. return request({
  15. url: '/sim/real-exam-collection/' + parseStrEmpty(examCollectionId),
  16. method: 'get'
  17. })
  18. }
  19. // 新增老师考试集合
  20. export function examTearcheradd(data) {
  21. return request({
  22. url: '/sim/real-exam-collection',
  23. method: 'post',
  24. data: data
  25. })
  26. }
  27. // 修改老师考试集合
  28. export function examTearcherupdate(data) {
  29. return request({
  30. url: '/sim/real-exam-collection',
  31. method: 'put',
  32. data: data
  33. })
  34. }
  35. // 删除考试集合老师考试集合列表
  36. export function examTearcherdel(examCollectionIds) {
  37. return request({
  38. url: '/sim/real-exam-collection/' + examCollectionIds,
  39. method: 'delete'
  40. })
  41. }
  42. // 打开考试集合
  43. export function examTearcheropen(examCollectionId,examCollectionState) {
  44. const data = {
  45. examCollectionState
  46. }
  47. return request({
  48. url: '/sim/real-exam-collection/teacher/exam/open/' + examCollectionId,
  49. method: 'put',
  50. data: data
  51. })
  52. }
  53. // 关闭考试集合
  54. export function examTearcherclose(examCollectionId,examCollectionState) {
  55. const data = {
  56. examCollectionState
  57. }
  58. return request({
  59. url: '/sim/real-exam-collection/teacher/exam/close/' + examCollectionId,
  60. method: 'put',
  61. data: data
  62. })
  63. }
  64. // 老师考试相关 end
  65. // 老师练习相关 start
  66. // 练习集合列表
  67. export function exerciseTearcherList(query) {
  68. return request({
  69. url: '/sim/real-exam-collection/teacher/exercise/list',
  70. method: 'get',
  71. params: query
  72. })
  73. }
  74. // 老师练习相关 end
  75. // 学生考试相关 start
  76. // 查询学生考试集合列表
  77. export function examStudentList() {
  78. return request({
  79. url: '/sim/real-exam/student/exam/listByUserId/',
  80. method: 'get'
  81. })
  82. }
  83. // 学生进入考试
  84. export function examStudentEnter(examId) {
  85. return request({
  86. url: '/sim/real-exam/student/exam/enter/' + parseStrEmpty(examId),
  87. method: 'get'
  88. })
  89. }
  90. // 学生开始考试
  91. export function examStudentStart(examId) {
  92. return request({
  93. url: '/sim/real-exam/student/exam/start/' + parseStrEmpty(examId),
  94. method: 'get'
  95. })
  96. }
  97. // 准备考试界面
  98. export function examStudentPrepare(examId) {
  99. return request({
  100. url: '/sim/real-exam/student/exam/prepare/' + parseStrEmpty(examId),
  101. method: 'get'
  102. })
  103. }
  104. // 正在考试界面
  105. export function examStudentAnswering(examId) {
  106. return request({
  107. url: '/sim/real-exam/student/exam/answering/' + parseStrEmpty(examId),
  108. method: 'get'
  109. })
  110. }
  111. //考试交卷界面
  112. export function examStudentSubmit(examId) {
  113. return request({
  114. url: '/sim/real-exam/student/exam/submit/' + parseStrEmpty(examId),
  115. method: 'get'
  116. })
  117. }
  118. //结束考试界面
  119. export function examStudentReport(examId) {
  120. return request({
  121. url: '/sim/real-exam/student/exam/report/' + parseStrEmpty(examId),
  122. method: 'get'
  123. })
  124. }
  125. // 学生获取考试详细信息
  126. export function examStudentGet(userId) {
  127. return request({
  128. url: '/sim/real-exam/student/' + parseStrEmpty(userId),
  129. method: 'get'
  130. })
  131. }
  132. // 学生考试相关 end