papers.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. import request from '@/utils/request'
  2. /// 科目列表
  3. export function getPaperSubjects(query) {
  4. // 2025.10.16 科目更新和组卷类型有关系
  5. // query: {buildType}
  6. return request({
  7. url: '/learn/teaching/subjects',
  8. method: 'get',
  9. params: query
  10. })
  11. }
  12. /// 科目列表
  13. export function getPaperKnowledges(query) {
  14. // 2025.10.16 科目更新和组卷类型有关系
  15. // query: {
  16. // 定向条件:universityId,majorId,majorPlanId
  17. // 全量条件:examType,subjectId
  18. // }
  19. return request({
  20. url: '/learn/teaching/knowledges',
  21. method: 'get',
  22. params: query
  23. })
  24. }
  25. /// 省份列表
  26. export function getPaperProvinces(query) {
  27. return request({
  28. url: '/learn/teaching/provinces',
  29. method: 'get',
  30. params: query
  31. })
  32. }
  33. /// 考生类型
  34. export function getPaperExamTypes(query) {
  35. // query: {} // 2025.10.16 科目更新和组卷类型有关系,应该不需要参数了
  36. return request({
  37. url: '/learn/teaching/examTypes',
  38. method: 'get',
  39. params: {location: '湖南', ...query}
  40. })
  41. }
  42. /// 院校
  43. export function getPaperUniversities(query) {
  44. // query: {batchId}
  45. return request({
  46. url: '/learn/teaching/universities',
  47. method: 'get',
  48. params: query
  49. })
  50. }
  51. /// 专业组
  52. export function getPaperMajors(query) {
  53. // query: {location, examType, batchId, universityId}
  54. return request({
  55. url: '/learn/teaching/majors',
  56. method: 'get',
  57. params: query
  58. })
  59. }
  60. /// 试卷批次
  61. export function getPaperBatches() {
  62. return request({
  63. url: '/learn/test/list',
  64. method: 'get'
  65. })
  66. }
  67. /// 试卷题型
  68. export function getPaperQuestionTypes(query) {
  69. // query: {subjectId, majorPlanId}
  70. return request({
  71. url: '/learn/teaching/questionTypes',
  72. method: 'get',
  73. params: query
  74. })
  75. }
  76. // 试卷试题
  77. export function getPaperQuestions(query) {
  78. // query: {...}
  79. return request({
  80. url: '/learn/questions/list',
  81. method: 'get',
  82. params: query
  83. })
  84. }
  85. // 班级
  86. export function getPaperClasses(query) {
  87. return request({
  88. url: '/learn/teaching/classes',
  89. method: 'get',
  90. params: query
  91. })
  92. }
  93. // 学生
  94. export function getPaperStudents(query) {
  95. return request({
  96. url: '/learn/teaching/students',
  97. method: 'get',
  98. params: query
  99. })
  100. }
  101. export function getPaperDetail(query) {
  102. return request({
  103. url: '/learn/teaching/paper',
  104. method: 'get',
  105. params: query
  106. })
  107. }
  108. export function getPaperClassStatistic(query) {
  109. // 2025.10.16 新增班级统计,用于组卷生成
  110. // const queryDemo = {
  111. // buildType: '', // 试卷构建类型,定义枚举?
  112. // batchId: '', // 批次
  113. // examType: '',
  114. // subjectId: '',
  115. // universityId: '',
  116. // majorGroup: '',
  117. // majorPlanId: ''
  118. // }
  119. // const responseDemo = {
  120. // classId: '',
  121. // className: '',
  122. // total: '',
  123. // built: '',
  124. // sent: '',
  125. // finished: '',
  126. // exact: '',
  127. // exactNew: '',
  128. // lastBuiltTime: '',
  129. // lastSentTime: ''
  130. // }
  131. return request({
  132. url: '/learn/teaching/classStatistic',
  133. method: 'get',
  134. params: query
  135. })
  136. }
  137. export function buildPaperExactIntelligent(data) {
  138. // {buildType, batchId, classIds}
  139. return request({
  140. url: '/learn/teaching/build/exactIntelligent',
  141. method: 'post',
  142. data
  143. })
  144. }
  145. export function buildPaperFullIntelligent(data) {
  146. // {buildType, batchId, examType, subjectId, classIds}
  147. return request({
  148. url: '/learn/teaching/build/fullIntelligent',
  149. method: 'post',
  150. data
  151. })
  152. }
  153. export function buildPaperExactHand(data) {
  154. // {buildType, batchId, universityId, majorId, majorPlanId, classIds, questions}
  155. return request({
  156. url: '/learn/teaching/build/exactHand',
  157. method: 'post',
  158. data
  159. })
  160. }
  161. export function buildPaperFullHand(data) {
  162. // {buildType, batchId, examType, subjectId, questions}
  163. return request({
  164. url: '/learn/teaching/build/fullHand',
  165. method: 'post',
  166. data
  167. })
  168. }
  169. export function getBuiltPaper(params) {
  170. // 与上面的4个build接口参数一样,只不过走1个接口,返回试卷详情
  171. // // TODO: remove test code
  172. // return Promise.resolve({
  173. // code: 200,
  174. // data: {
  175. // paperId: 1,
  176. // paperName: '试卷名称',
  177. // questions: [
  178. // {
  179. // "createBy": null,
  180. // "createTime": "2025-09-15 03:12:52",
  181. // "updateBy": null,
  182. // "updateTime": null,
  183. // "remark": null,
  184. // "id": 1,
  185. // "title": "获取信息最常用、最快捷、最方便、最可靠的方法就是从因特网上检索信息",
  186. // "optionA": "对",
  187. // "optionB": "错",
  188. // "optionC": null,
  189. // "optionD": null,
  190. // "optionE": null,
  191. // "optionF": null,
  192. // "optionG": null,
  193. // "answer1": "B",
  194. // "answer2": "B",
  195. // "qtpye": "判断题",
  196. // "subjectId": 10,
  197. // "paperId": null,
  198. // "knowledgeId": 2533,
  199. // "diff": 0,
  200. // "similarity": 0,
  201. // "parse": "",
  202. // "knowId": null,
  203. // "gradeId": -1,
  204. // "knowledges": null,
  205. // "area": null,
  206. // "year": 2025,
  207. // "paperTpye": null,
  208. // "source": "聚恒普高",
  209. // "fromSite": "",
  210. // "isSub": null,
  211. // "isNormal": null,
  212. // "isKonw": null,
  213. // "tiid": "10026648",
  214. // "md5": null,
  215. // "isunique": null,
  216. // "md52": null,
  217. // "score": 0,
  218. // "options": null,
  219. // "number": null,
  220. // "paperTypeTitle": null,
  221. // "options0": null,
  222. // "title0": "",
  223. // "title1": null,
  224. // "parse0": null,
  225. // "answer0": null,
  226. // "isUpdate": 0,
  227. // "isSubType": "0",
  228. // "typeId": null,
  229. // "userId": null,
  230. // "collect": false
  231. // },
  232. // {
  233. // "createBy": null,
  234. // "createTime": "2025-09-14 21:06:24",
  235. // "updateBy": null,
  236. // "updateTime": null,
  237. // "remark": null,
  238. // "id": 2,
  239. // "title": "( ) 抗损性强、可折叠、可局部穿孔、可局部切割。",
  240. // "optionA": "二维条码",
  241. // "optionB": "磁卡",
  242. // "optionC": "IC卡",
  243. // "optionD": "光卡",
  244. // "optionE": null,
  245. // "optionF": null,
  246. // "optionG": null,
  247. // "answer1": "A",
  248. // "answer2": "A",
  249. // "qtpye": "单选题",
  250. // "subjectId": 12,
  251. // "paperId": null,
  252. // "knowledgeId": 2278,
  253. // "diff": 0,
  254. // "similarity": 0,
  255. // "parse": "本题主要考查信息编码。磁卡、IC卡、光卡均不可折叠,抗损性差。二维条码抗损性强、可折叠、可局部穿孔、可局部切割,故本题选A选项。",
  256. // "knowId": null,
  257. // "gradeId": -1,
  258. // "knowledges": null,
  259. // "area": null,
  260. // "year": 2025,
  261. // "paperTpye": null,
  262. // "source": "聚恒普高",
  263. // "fromSite": "",
  264. // "isSub": null,
  265. // "isNormal": null,
  266. // "isKonw": null,
  267. // "tiid": "10036700",
  268. // "md5": null,
  269. // "isunique": null,
  270. // "md52": null,
  271. // "score": 1,
  272. // "options": null,
  273. // "number": null,
  274. // "paperTypeTitle": null,
  275. // "options0": null,
  276. // "title0": "",
  277. // "title1": null,
  278. // "parse0": null,
  279. // "answer0": null,
  280. // "isUpdate": 0,
  281. // "isSubType": "0",
  282. // "typeId": null,
  283. // "userId": null,
  284. // "collect": false
  285. // },
  286. // {
  287. // "createBy": null,
  288. // "createTime": "2025-09-14 21:27:53",
  289. // "updateBy": null,
  290. // "updateTime": null,
  291. // "remark": null,
  292. // "id": 3,
  293. // "title": "字号中阿拉伯字号越大,表示字符越____;中文字号越小,表示字符越____。",
  294. // "optionA": "大、小",
  295. // "optionB": "小、大",
  296. // "optionC": "不变",
  297. // "optionD": "大、大",
  298. // "optionE": null,
  299. // "optionF": null,
  300. // "optionG": null,
  301. // "answer1": "D",
  302. // "answer2": "D",
  303. // "qtpye": "单选题",
  304. // "subjectId": 12,
  305. // "paperId": null,
  306. // "knowledgeId": 2297,
  307. // "diff": 0,
  308. // "similarity": 0,
  309. // "parse": "字号中阿拉伯字号越大,表示字符越大中文字号越小,表示字符越大。",
  310. // "knowId": null,
  311. // "gradeId": -1,
  312. // "knowledges": null,
  313. // "area": null,
  314. // "year": 2025,
  315. // "paperTpye": null,
  316. // "source": "聚恒普高",
  317. // "fromSite": "",
  318. // "isSub": null,
  319. // "isNormal": null,
  320. // "isKonw": null,
  321. // "tiid": "10048401",
  322. // "md5": null,
  323. // "isunique": null,
  324. // "md52": null,
  325. // "score": 1,
  326. // "options": null,
  327. // "number": null,
  328. // "paperTypeTitle": null,
  329. // "options0": null,
  330. // "title0": "",
  331. // "title1": null,
  332. // "parse0": null,
  333. // "answer0": null,
  334. // "isUpdate": 0,
  335. // "isSubType": "0",
  336. // "typeId": null,
  337. // "userId": null,
  338. // "collect": false
  339. // },
  340. // {
  341. // "createBy": null,
  342. // "createTime": "2025-09-14 21:18:58",
  343. // "updateBy": null,
  344. // "updateTime": null,
  345. // "remark": null,
  346. // "id": 4,
  347. // "title": "打开Excel后会自动创建一个名为Book1的文件,该文件扩展名为()",
  348. // "optionA": "PPT",
  349. // "optionB": "DBF",
  350. // "optionC": "XLS",
  351. // "optionD": "DOC",
  352. // "optionE": null,
  353. // "optionF": null,
  354. // "optionG": null,
  355. // "answer1": "C",
  356. // "answer2": "C",
  357. // "qtpye": "单选题",
  358. // "subjectId": 12,
  359. // "paperId": null,
  360. // "knowledgeId": 2282,
  361. // "diff": 0,
  362. // "similarity": 0,
  363. // "parse": "Excel电子表格文件的扩展名是xls。",
  364. // "knowId": null,
  365. // "gradeId": -1,
  366. // "knowledges": null,
  367. // "area": null,
  368. // "year": 2025,
  369. // "paperTpye": null,
  370. // "source": "聚恒普高",
  371. // "fromSite": "",
  372. // "isSub": null,
  373. // "isNormal": null,
  374. // "isKonw": null,
  375. // "tiid": "10053344",
  376. // "md5": null,
  377. // "isunique": null,
  378. // "md52": null,
  379. // "score": 1,
  380. // "options": null,
  381. // "number": null,
  382. // "paperTypeTitle": null,
  383. // "options0": null,
  384. // "title0": "",
  385. // "title1": null,
  386. // "parse0": null,
  387. // "answer0": null,
  388. // "isUpdate": 0,
  389. // "isSubType": "0",
  390. // "typeId": null,
  391. // "userId": null,
  392. // "collect": false
  393. // },
  394. // {
  395. // "createBy": null,
  396. // "createTime": "2025-09-15 04:38:31",
  397. // "updateBy": null,
  398. // "updateTime": null,
  399. // "remark": null,
  400. // "id": 5,
  401. // "title": "力使物体产生转动的效果与矩心的位置()。\n ",
  402. // "optionA": "有关",
  403. // "optionB": "无关",
  404. // "optionC": "有时有关",
  405. // "optionD": "说不清",
  406. // "optionE": null,
  407. // "optionF": null,
  408. // "optionG": null,
  409. // "answer1": "A",
  410. // "answer2": "A",
  411. // "qtpye": "单选题",
  412. // "subjectId": 22,
  413. // "paperId": null,
  414. // "knowledgeId": 2487,
  415. // "diff": 0,
  416. // "similarity": 0,
  417. // "parse": "",
  418. // "knowId": null,
  419. // "gradeId": -1,
  420. // "knowledges": null,
  421. // "area": null,
  422. // "year": 2025,
  423. // "paperTpye": null,
  424. // "source": "聚恒普高",
  425. // "fromSite": "",
  426. // "isSub": null,
  427. // "isNormal": null,
  428. // "isKonw": null,
  429. // "tiid": "10072901",
  430. // "md5": null,
  431. // "isunique": null,
  432. // "md52": null,
  433. // "score": 1,
  434. // "options": null,
  435. // "number": null,
  436. // "paperTypeTitle": null,
  437. // "options0": null,
  438. // "title0": "",
  439. // "title1": null,
  440. // "parse0": null,
  441. // "answer0": null,
  442. // "isUpdate": 0,
  443. // "isSubType": "0",
  444. // "typeId": null,
  445. // "userId": null,
  446. // "collect": false
  447. // },
  448. // {
  449. // "createBy": null,
  450. // "createTime": "2025-09-15 02:11:16",
  451. // "updateBy": null,
  452. // "updateTime": null,
  453. // "remark": null,
  454. // "id": 6,
  455. // "title": "小明使用Excel统计自己一年来的收入情况,在单元格B3到B14中,依次存放了从一月到十二月的收入情况,想在单元格B15中求出一年的平均月收入,应选用公式()",
  456. // "optionA": "AVERAGE(B3:B14)",
  457. // "optionB": "SUM(B3:B14)",
  458. // "optionC": "AVERAGE(B1:B14)",
  459. // "optionD": "AVERAGE(B3:B15)",
  460. // "optionE": null,
  461. // "optionF": null,
  462. // "optionG": null,
  463. // "answer1": "A",
  464. // "answer2": "A",
  465. // "qtpye": "单选题",
  466. // "subjectId": 12,
  467. // "paperId": null,
  468. // "knowledgeId": 2264,
  469. // "diff": 0,
  470. // "similarity": 0,
  471. // "parse": "想在单元格B15中求出一年的平均月收入,可使用求平均值函数AVERAGE(),求值区域是B3:B14,故应选用公式AVERAGE(B3:B14)。",
  472. // "knowId": null,
  473. // "gradeId": -1,
  474. // "knowledges": null,
  475. // "area": null,
  476. // "year": 2025,
  477. // "paperTpye": null,
  478. // "source": "聚恒普高",
  479. // "fromSite": "",
  480. // "isSub": null,
  481. // "isNormal": null,
  482. // "isKonw": null,
  483. // "tiid": "10075149",
  484. // "md5": null,
  485. // "isunique": null,
  486. // "md52": null,
  487. // "score": 0,
  488. // "options": null,
  489. // "number": null,
  490. // "paperTypeTitle": null,
  491. // "options0": null,
  492. // "title0": "",
  493. // "title1": null,
  494. // "parse0": null,
  495. // "answer0": null,
  496. // "isUpdate": 0,
  497. // "isSubType": "0",
  498. // "typeId": null,
  499. // "userId": null,
  500. // "collect": false
  501. // },
  502. // {
  503. // "createBy": null,
  504. // "createTime": "2025-09-14 21:06:24",
  505. // "updateBy": null,
  506. // "updateTime": null,
  507. // "remark": null,
  508. // "id": 7,
  509. // "title": "当前,在计算机应用方面已进入以()为特征的时代。",
  510. // "optionA": "并行处理技术",
  511. // "optionB": "分布式系统",
  512. // "optionC": "微型计算机",
  513. // "optionD": "计算机网络",
  514. // "optionE": null,
  515. // "optionF": null,
  516. // "optionG": null,
  517. // "answer1": "D",
  518. // "answer2": "D",
  519. // "qtpye": "单选题",
  520. // "subjectId": 12,
  521. // "paperId": null,
  522. // "knowledgeId": 2278,
  523. // "diff": 0,
  524. // "similarity": 0,
  525. // "parse": "当前,在计算机应用方面已进入以计算机网络为特征的时代。",
  526. // "knowId": null,
  527. // "gradeId": -1,
  528. // "knowledges": null,
  529. // "area": null,
  530. // "year": 2025,
  531. // "paperTpye": null,
  532. // "source": "聚恒普高",
  533. // "fromSite": "",
  534. // "isSub": null,
  535. // "isNormal": null,
  536. // "isKonw": null,
  537. // "tiid": "10117673",
  538. // "md5": null,
  539. // "isunique": null,
  540. // "md52": null,
  541. // "score": 1,
  542. // "options": null,
  543. // "number": null,
  544. // "paperTypeTitle": null,
  545. // "options0": null,
  546. // "title0": "",
  547. // "title1": null,
  548. // "parse0": null,
  549. // "answer0": null,
  550. // "isUpdate": 0,
  551. // "isSubType": "0",
  552. // "typeId": null,
  553. // "userId": null,
  554. // "collect": false
  555. // }
  556. // ]
  557. // }
  558. // })
  559. return request({
  560. url: '/learn/teaching/build/getBuiltPaper',
  561. method: 'get',
  562. params
  563. })
  564. }
  565. export function getPaperClassRecords(params) {
  566. // {id: 1, buildType: '定向智能', classId: 1, className: '2501班', batchName: '第一批', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15}
  567. // // TODO: remove test code
  568. // return Promise.resolve({
  569. // code: 200,
  570. // total: 1,
  571. // rows: [
  572. // {
  573. // buildType: 'ExactIntelligent',
  574. // classId: 1,
  575. // className: '2501班',
  576. // batchId: 1,
  577. // batchName: '第一批',
  578. // total: 50,
  579. // unexact: 10,
  580. // exact: 40,
  581. // unsend: 10,
  582. // send: 20,
  583. // unfinish: 5,
  584. // finish: 15
  585. // }
  586. // ]
  587. // })
  588. return request({
  589. url: '/learn/teaching/getPaperClassRecords',
  590. method: 'get',
  591. params
  592. })
  593. }
  594. export function getPaperStudentRecords(params) {
  595. // // TODO: remove test code
  596. // return Promise.resolve({
  597. // code: 200,
  598. // data: [{
  599. // studentId: 1,
  600. // studentName: '张三',
  601. // classId: 1,
  602. // className: '2501班',
  603. // mobile: '13933445566',
  604. // batchId: 1,
  605. // batchName: '第一批',
  606. // paperId: 1,
  607. // paperName: '试卷一',
  608. // subjectId: 1,
  609. // subjectName: '科目说明',
  610. // state: '组卷已完成',
  611. // total: 100,
  612. // score: 99,
  613. // rate: null,
  614. // }, {
  615. // studentId: 1,
  616. // studentName: '张三',
  617. // classId: 1,
  618. // className: '2501班',
  619. // mobile: '13933445566',
  620. // batchId: 1,
  621. // batchName: '第一批',
  622. // paperId: 1,
  623. // paperName: '试卷一',
  624. // subjectId: 1,
  625. // subjectName: '科目说明',
  626. // state: '组卷已完成',
  627. // total: 100,
  628. // score: 99,
  629. // rate: 99,
  630. // }]
  631. // })
  632. return request({
  633. url: '/learn/teaching/getPaperStudentRecords',
  634. method: 'get',
  635. params
  636. })
  637. }
  638. export function getPaperStudentDetail(params) {
  639. // // TODO: remove test code
  640. // return Promise.resolve({
  641. // code: 200,
  642. // data: [
  643. // {
  644. // knowledgeId: 1,
  645. // knowledgeName: '知识点1',
  646. // num: 5,
  647. // correct: 4,
  648. // rate: 80
  649. // }
  650. // ]
  651. // })
  652. return request({
  653. url: '/learn/teaching/getPaperStudentDetail',
  654. method: 'get',
  655. params
  656. })
  657. }
  658. export function sendUnfinishAlarm(data) {
  659. return request({
  660. url: '/learn/teaching/postUnfinishAlarm',
  661. method: 'post',
  662. data
  663. })
  664. }
  665. export function getClassesBuildStatsDetail(params) {
  666. // params: {buildType, batchId, classId, statType}
  667. // statType: 'send' | 'total' | 'unexact' | 'unfinish' | 'unsend'
  668. return request({
  669. url: '/learn/teaching/getClassesBuildStatsDetail',
  670. method: 'get',
  671. params
  672. })
  673. }