test.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  1. <template>
  2. <div class="center">
  3. <beforeSubmitMask
  4. :show="beforeSubmitVisible"
  5. @cancel="
  6. () => {
  7. beforeSubmitVisible = false;
  8. }
  9. "
  10. :correctScore="correctScore"
  11. :errorScore="errorScore"
  12. :total="list.length"
  13. @confirm="
  14. () => {
  15. beforeSubmitVisible = false;
  16. submitVisible = true;
  17. }
  18. "
  19. ></beforeSubmitMask>
  20. <submitMask v-if="submitVisible" :correctScore="correctScore"></submitMask>
  21. <correctAnswerMask
  22. :question="wrongQuestion"
  23. :no="wrongQuestionIndex"
  24. @close="
  25. () => {
  26. correctAnswerVisible = false;
  27. }
  28. "
  29. v-if="correctAnswerVisible"
  30. ></correctAnswerMask>
  31. <div class="box">
  32. <div class="main">
  33. <div class="container1">
  34. <div class="kaoti">
  35. <div class="kaoti-header">金牌驾考</div>
  36. <div class="kaoti-headerText">第01考台</div>
  37. </div>
  38. <div class="student">
  39. <div class="student-header">考生信息</div>
  40. <div class="mt10">
  41. <img class="driver" :src="headimg" />
  42. <div class="driverInfo">
  43. <div>姓名:{{ username }}</div>
  44. <div>性别:{{ sex }}</div>
  45. <div>类型:{{ carType }}</div>
  46. <div>科目:{{ subject }}</div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="restTime">
  51. <div class="restTime-header">剩余时间</div>
  52. <div class="restTime-headerText">{{ countdownTime }}</div>
  53. </div>
  54. </div>
  55. <div class="container2">
  56. <div class="container2-row1">
  57. <div class="topic">
  58. <div class="topic-header">考试题目</div>
  59. <div class="topic-issue">
  60. <span>{{ listIndex + 1 }}.{{ list[listIndex].issue }}</span>
  61. </div>
  62. <div class="mt9 topic-select">
  63. <div
  64. v-for="(item, index) in list[listIndex].optsArr"
  65. :key="index"
  66. class="topic-select-item"
  67. >
  68. {{ letter[index] }}.<span>{{ item }}</span>
  69. </div>
  70. <!-- <div class="topic-select-item">B.<span>xx</span></div> countdown-->
  71. </div>
  72. </div>
  73. <div class="answer">
  74. <span class="answer-tip">您选择的答案:</span>
  75. <div style="display: flex; align-items: center">
  76. <span>选项:</span>
  77. <div v-if="list[listIndex].questionType < 3" class="answer-list">
  78. <div
  79. v-for="(item, index) in list[listIndex].optsArr"
  80. :key="index"
  81. class="answer-list-item"
  82. @click="selectExamAnswer(item)"
  83. :class="{
  84. answer_selected: list[listIndex].userAnswer == item,
  85. }"
  86. >
  87. {{ letter[index] }}
  88. </div>
  89. <!-- <div class="answer-list-item answer-list-item_select">B</div> -->
  90. </div>
  91. <div v-if="list[listIndex].questionType == 3" class="answer-list">
  92. <div
  93. v-for="(item, index) in list[listIndex].optsArr"
  94. :key="index"
  95. class="answer-list-item"
  96. @click="selectExamAnswers(item)"
  97. :class="{
  98. answer_selected: list[listIndex].userAnswer.includes(item),
  99. }"
  100. >
  101. {{ letter[index] }}
  102. </div>
  103. <!-- <div class="answer-list-item answer-list-item_select">B</div> -->
  104. </div>
  105. </div>
  106. </div>
  107. <div class="coll">
  108. <table border="0" class="coll-table-topic">
  109. <tr :key="index" v-for="(item, index) in list.length / 10">
  110. <td
  111. v-for="(_item, _index) in 10"
  112. :class="{
  113. collselected: index * 10 + _index == listIndex,
  114. }"
  115. :data-key="index * 10 + _index + 1"
  116. :key="_index"
  117. @click="changeListIndex"
  118. >
  119. <div
  120. style="white-space: nowrap"
  121. :data-key="index * 10 + _index + 1"
  122. class="coll-table-topic-item"
  123. :class="{
  124. 'text-red': list[index * 10 + _index].isError,
  125. }"
  126. >
  127. {{list[index * 10 + _index ].userAnswerLetter || "" }}
  128. </div>
  129. </td>
  130. </tr>
  131. </table>
  132. </div>
  133. </div>
  134. <div class="container2-row2">
  135. <div class="w-half">
  136. <div class="left-line1">
  137. 操作提示:{{ questionTypeMap[list[listIndex].questionType] }}
  138. </div>
  139. <div class="left-line2">请在备选答案中选择你认为正确的答案!</div>
  140. </div>
  141. <div class="w-half">
  142. <div class="right">
  143. <div
  144. @click="beforeTopic"
  145. class="right-button1"
  146. :class="{
  147. button1_disabled: listIndex == 0,
  148. }"
  149. >
  150. 上一题
  151. </div>
  152. <div
  153. @click="nextTopic"
  154. class="right-button1"
  155. :class="{
  156. button1_disabled: listIndex == list.length - 1,
  157. }"
  158. >
  159. 下一题
  160. </div>
  161. <div @click="submitScore" class="right-button2">交卷</div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <!-- <div class="container3">
  167. <div class="coll">
  168. <table border="0" class="coll-table-topic">
  169. <tr>
  170. <td class="coll-table-topic-item bg-498ef5">
  171. <div class="coll-table-topic-item coll-header1-row bg-498ef5">题目</div>
  172. </td>
  173. <td
  174. class="coll-table-topic-item bg-498ef5"
  175. v-for="(item, index) in 10"
  176. :key="index"
  177. >
  178. <div class="coll-table-topic-item coll-header1-row bg-498ef5">
  179. {{ index + 1 }}列
  180. </div>
  181. </td>
  182. </tr>
  183. <tr :key="index" v-for="(item, index) in list.length / 10">
  184. <td class="coll-table-topic-item bg-498ef5">
  185. <div style="white-space: nowrap">{{ index + 1 }}行</div>
  186. </td>
  187. <td
  188. v-for="(_item, _index) in 10"
  189. :class="{
  190. collselected: index * 10 + _index == listIndex,
  191. }"
  192. :data-key="index * 10 + _index + 1"
  193. :key="_index"
  194. @click="changeListIndex"
  195. >
  196. <div
  197. style="white-space: nowrap"
  198. :data-key="index * 10 + _index + 1"
  199. class="coll-table-topic-item"
  200. >
  201. {{ index * 10 + _index + 1 }}
  202. </div>
  203. </td>
  204. </tr>
  205. </table>
  206. </div>
  207. </div> -->
  208. </div>
  209. <div class="bottom">
  210. <img
  211. class="icon"
  212. @click="
  213. () => {
  214. router.back();
  215. }
  216. "
  217. src="@/assets/img/backButton.png"
  218. />
  219. <img class="answer-img" v-if="list[listIndex].image" :src="list[listIndex].image" />
  220. </div>
  221. </div>
  222. </div>
  223. </template>
  224. <script lang="ts">
  225. import { defineComponent, reactive, ref, onMounted } from 'vue';
  226. import dayjs from 'dayjs';
  227. import beforeSubmitMask from '@/components/mask/beforeSubmitMask.vue';
  228. import submitMask from '@/components/mask/submitMask.vue';
  229. import correctAnswerMask from '@/components/mask/correctAnswerMask.vue';
  230. // import Api from '@/api/api';
  231. import { countdownTime, countdown, countdownTimer } from '@/hooks/countdown';
  232. import { useStore } from 'vuex';
  233. // import router from '@/router';
  234. import { useExamTest } from '@/hooks/examTest';
  235. import { useRoute, useRouter } from 'vue-router';
  236. import { useStringMap } from '@/hooks/stringMap';
  237. export default defineComponent({
  238. setup() {
  239. //清除定时器
  240. //
  241. window.clearInterval(countdownTimer.value);
  242. const headimg = useRoute().query?.headimg;
  243. const username = useRoute().query?.username;
  244. const store = useStore();
  245. const router = useRouter();
  246. const { subjectMap, carTypeMap } = useStringMap();
  247. let subject = subjectMap[Number(useRoute().query?.subject)];
  248. let sex = '男';
  249. let carType = carTypeMap[useRoute().query?.gs as string];
  250. let {
  251. list,
  252. beforeSubmitVisible,
  253. listIndex,
  254. submitScore,
  255. changeListIndex,
  256. selectExamAnswer,
  257. beforeTopic,
  258. nextTopic,
  259. getPgae,
  260. selectExamAnswers,
  261. correctScore,
  262. errorScore,
  263. submitVisible,
  264. wrongQuestion,
  265. wrongQuestionIndex,
  266. correctAnswerVisible,
  267. } = useExamTest();
  268. //设置开始时间
  269. store.commit('SET_BEGINTIME', {
  270. beginTime: `${dayjs().format('MM-DD HH:mm:ss')}`,
  271. });
  272. getPgae();
  273. // let list = ref<selectTestQuestionInfo.row[]>([
  274. // {
  275. // createTime: '2021-11-05 10:25:51',
  276. // id: 20,
  277. // image: null,
  278. // imageYdt: null,
  279. // answer: '√',
  280. // answerkeyword: null,
  281. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  282. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  283. // explainJs:
  284. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  285. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  286. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  287. // opts: '√-×',
  288. // optsArr: ['√', '×'],
  289. // skillkeyword: '追究-答对',
  290. // titlekeyword: '追究',
  291. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  292. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  293. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  294. // liceCar: '1',
  295. // liceBus: '1',
  296. // liceTruck: '1',
  297. // liceMoto: '0',
  298. // sequeIssue: '2',
  299. // classIssue: '32',
  300. // placeIssue: '0',
  301. // excellIssue: '1',
  302. // copyIssue: '0',
  303. // mockIssue: '0',
  304. // sequeIssueName: '练习二',
  305. // placeIssueName: null,
  306. // excellIssueName: '必学题一',
  307. // classIssueName: '刑法题',
  308. // questionType: 1,
  309. // subject: 1,
  310. // classSort: 16,
  311. // excellSort: 39,
  312. // sequeSort: 118,
  313. // placeSort: null,
  314. // userAnswer: '',
  315. // },
  316. // {
  317. // createTime: '2021-11-05 10:25:51',
  318. // id: 20,
  319. // image: null,
  320. // imageYdt: null,
  321. // answer: '√',
  322. // answerkeyword: null,
  323. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  324. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  325. // explainJs:
  326. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  327. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  328. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  329. // opts: '√-×',
  330. // optsArr: ['√', '×'],
  331. // skillkeyword: '追究-答对',
  332. // titlekeyword: '追究',
  333. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  334. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  335. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  336. // liceCar: '1',
  337. // liceBus: '1',
  338. // liceTruck: '1',
  339. // liceMoto: '0',
  340. // sequeIssue: '2',
  341. // classIssue: '32',
  342. // placeIssue: '0',
  343. // excellIssue: '1',
  344. // copyIssue: '0',
  345. // mockIssue: '0',
  346. // sequeIssueName: '练习二',
  347. // placeIssueName: null,
  348. // excellIssueName: '必学题一',
  349. // classIssueName: '刑法题',
  350. // questionType: 1,
  351. // subject: 1,
  352. // classSort: 16,
  353. // excellSort: 39,
  354. // sequeSort: 118,
  355. // placeSort: null,
  356. // userAnswer: '',
  357. // },
  358. // {
  359. // createTime: '2021-11-05 10:25:51',
  360. // id: 20,
  361. // image: null,
  362. // imageYdt: null,
  363. // answer: '√',
  364. // answerkeyword: null,
  365. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  366. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  367. // explainJs:
  368. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  369. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  370. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  371. // opts: '√-×',
  372. // optsArr: ['√', '×'],
  373. // skillkeyword: '追究-答对',
  374. // titlekeyword: '追究',
  375. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  376. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  377. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  378. // liceCar: '1',
  379. // liceBus: '1',
  380. // liceTruck: '1',
  381. // liceMoto: '0',
  382. // sequeIssue: '2',
  383. // classIssue: '32',
  384. // placeIssue: '0',
  385. // excellIssue: '1',
  386. // copyIssue: '0',
  387. // mockIssue: '0',
  388. // sequeIssueName: '练习二',
  389. // placeIssueName: null,
  390. // excellIssueName: '必学题一',
  391. // classIssueName: '刑法题',
  392. // questionType: 1,
  393. // subject: 1,
  394. // classSort: 16,
  395. // excellSort: 39,
  396. // sequeSort: 118,
  397. // placeSort: null,
  398. // userAnswer: '',
  399. // },
  400. // {
  401. // createTime: '2021-11-05 10:25:51',
  402. // id: 20,
  403. // image: null,
  404. // imageYdt: null,
  405. // answer: '√',
  406. // answerkeyword: null,
  407. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  408. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  409. // explainJs:
  410. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  411. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  412. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  413. // opts: '√-×',
  414. // optsArr: ['√', '×'],
  415. // skillkeyword: '追究-答对',
  416. // titlekeyword: '追究',
  417. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  418. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  419. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  420. // liceCar: '1',
  421. // liceBus: '1',
  422. // liceTruck: '1',
  423. // liceMoto: '0',
  424. // sequeIssue: '2',
  425. // classIssue: '32',
  426. // placeIssue: '0',
  427. // excellIssue: '1',
  428. // copyIssue: '0',
  429. // mockIssue: '0',
  430. // sequeIssueName: '练习二',
  431. // placeIssueName: null,
  432. // excellIssueName: '必学题一',
  433. // classIssueName: '刑法题',
  434. // questionType: 1,
  435. // subject: 1,
  436. // classSort: 16,
  437. // excellSort: 39,
  438. // sequeSort: 118,
  439. // placeSort: null,
  440. // userAnswer: '',
  441. // },
  442. // {
  443. // createTime: '2021-11-05 10:25:51',
  444. // id: 20,
  445. // image: null,
  446. // imageYdt: null,
  447. // answer: '√',
  448. // answerkeyword: null,
  449. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  450. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  451. // explainJs:
  452. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  453. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  454. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  455. // opts: '√-×',
  456. // optsArr: ['√', '×'],
  457. // skillkeyword: '追究-答对',
  458. // titlekeyword: '追究',
  459. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  460. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  461. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  462. // liceCar: '1',
  463. // liceBus: '1',
  464. // liceTruck: '1',
  465. // liceMoto: '0',
  466. // sequeIssue: '2',
  467. // classIssue: '32',
  468. // placeIssue: '0',
  469. // excellIssue: '1',
  470. // copyIssue: '0',
  471. // mockIssue: '0',
  472. // sequeIssueName: '练习二',
  473. // placeIssueName: null,
  474. // excellIssueName: '必学题一',
  475. // classIssueName: '刑法题',
  476. // questionType: 1,
  477. // subject: 1,
  478. // classSort: 16,
  479. // excellSort: 39,
  480. // sequeSort: 118,
  481. // placeSort: null,
  482. // userAnswer: '',
  483. // },
  484. // {
  485. // createTime: '2021-11-05 10:25:51',
  486. // id: 20,
  487. // image: null,
  488. // imageYdt: null,
  489. // answer: '√',
  490. // answerkeyword: null,
  491. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  492. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  493. // explainJs:
  494. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  495. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  496. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  497. // opts: '√-×',
  498. // optsArr: ['√', '×'],
  499. // skillkeyword: '追究-答对',
  500. // titlekeyword: '追究',
  501. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  502. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  503. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  504. // liceCar: '1',
  505. // liceBus: '1',
  506. // liceTruck: '1',
  507. // liceMoto: '0',
  508. // sequeIssue: '2',
  509. // classIssue: '32',
  510. // placeIssue: '0',
  511. // excellIssue: '1',
  512. // copyIssue: '0',
  513. // mockIssue: '0',
  514. // sequeIssueName: '练习二',
  515. // placeIssueName: null,
  516. // excellIssueName: '必学题一',
  517. // classIssueName: '刑法题',
  518. // questionType: 1,
  519. // subject: 1,
  520. // classSort: 16,
  521. // excellSort: 39,
  522. // sequeSort: 118,
  523. // placeSort: null,
  524. // userAnswer: '',
  525. // },
  526. // {
  527. // createTime: '2021-11-05 10:25:51',
  528. // id: 20,
  529. // image: null,
  530. // imageYdt: null,
  531. // answer: '√',
  532. // answerkeyword: null,
  533. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  534. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  535. // explainJs:
  536. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  537. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  538. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  539. // opts: '√-×',
  540. // optsArr: ['√', '×'],
  541. // skillkeyword: '追究-答对',
  542. // titlekeyword: '追究',
  543. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  544. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  545. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  546. // liceCar: '1',
  547. // liceBus: '1',
  548. // liceTruck: '1',
  549. // liceMoto: '0',
  550. // sequeIssue: '2',
  551. // classIssue: '32',
  552. // placeIssue: '0',
  553. // excellIssue: '1',
  554. // copyIssue: '0',
  555. // mockIssue: '0',
  556. // sequeIssueName: '练习二',
  557. // placeIssueName: null,
  558. // excellIssueName: '必学题一',
  559. // classIssueName: '刑法题',
  560. // questionType: 1,
  561. // subject: 1,
  562. // classSort: 16,
  563. // excellSort: 39,
  564. // sequeSort: 118,
  565. // placeSort: null,
  566. // userAnswer: '',
  567. // },
  568. // {
  569. // createTime: '2021-11-05 10:25:51',
  570. // id: 20,
  571. // image: null,
  572. // imageYdt: null,
  573. // answer: '√',
  574. // answerkeyword: null,
  575. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  576. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  577. // explainJs:
  578. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  579. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  580. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  581. // opts: '√-×',
  582. // optsArr: ['√', '×'],
  583. // skillkeyword: '追究-答对',
  584. // titlekeyword: '追究',
  585. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  586. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  587. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  588. // liceCar: '1',
  589. // liceBus: '1',
  590. // liceTruck: '1',
  591. // liceMoto: '0',
  592. // sequeIssue: '2',
  593. // classIssue: '32',
  594. // placeIssue: '0',
  595. // excellIssue: '1',
  596. // copyIssue: '0',
  597. // mockIssue: '0',
  598. // sequeIssueName: '练习二',
  599. // placeIssueName: null,
  600. // excellIssueName: '必学题一',
  601. // classIssueName: '刑法题',
  602. // questionType: 1,
  603. // subject: 1,
  604. // classSort: 16,
  605. // excellSort: 39,
  606. // sequeSort: 118,
  607. // placeSort: null,
  608. // userAnswer: '',
  609. // },
  610. // {
  611. // createTime: '2021-11-05 10:25:51',
  612. // id: 20,
  613. // image: null,
  614. // imageYdt: null,
  615. // answer: '√',
  616. // answerkeyword: null,
  617. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  618. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  619. // explainJs:
  620. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  621. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  622. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  623. // opts: '√-×',
  624. // optsArr: ['√', '×'],
  625. // skillkeyword: '追究-答对',
  626. // titlekeyword: '追究',
  627. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  628. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  629. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  630. // liceCar: '1',
  631. // liceBus: '1',
  632. // liceTruck: '1',
  633. // liceMoto: '0',
  634. // sequeIssue: '2',
  635. // classIssue: '32',
  636. // placeIssue: '0',
  637. // excellIssue: '1',
  638. // copyIssue: '0',
  639. // mockIssue: '0',
  640. // sequeIssueName: '练习二',
  641. // placeIssueName: null,
  642. // excellIssueName: '必学题一',
  643. // classIssueName: '刑法题',
  644. // questionType: 1,
  645. // subject: 1,
  646. // classSort: 16,
  647. // excellSort: 39,
  648. // sequeSort: 118,
  649. // placeSort: null,
  650. // userAnswer: '',
  651. // },
  652. // {
  653. // createTime: '2021-11-05 10:25:51',
  654. // id: 20,
  655. // image: null,
  656. // imageYdt: null,
  657. // answer: '√',
  658. // answerkeyword: null,
  659. // explainGif: 'https://t1-1305573081.file.myqcloud.com/qb/gif/20.gif',
  660. // explainJq: '题目中看到“追究”.答对;“不追究”.答错。',
  661. // explainJs:
  662. // '《道路交通安全法》第九十九条:未取得机动车驾驶证、机动车驾驶证被吊销或者机动车驾驶证被暂扣期间驾驶机动车的,由公安机关交通管理部门处二百元以上二千元以下罚款,可以并处十五日以下拘留。',
  663. // explainMp3: 'https://t1-1305573081.file.myqcloud.com/qb/mp3/explain20.mp3',
  664. // issue: '对未取得驾驶证驾驶机动车的,追究其法律责任。',
  665. // opts: '√-×',
  666. // optsArr: ['√', '×'],
  667. // skillkeyword: '追究-答对',
  668. // titlekeyword: '追究',
  669. // issuemp3: 'https://t1-1305573081.file.myqcloud.com/qb/issue/issue20.mp3',
  670. // answermp3: 'https://t1-1305573081.file.myqcloud.com/qb/answer/answer20.mp3',
  671. // explainjsmp3: 'https://t1-1305573081.file.myqcloud.com/qb/explainjs/explainJS20.mp3',
  672. // liceCar: '1',
  673. // liceBus: '1',
  674. // liceTruck: '1',
  675. // liceMoto: '0',
  676. // sequeIssue: '2',
  677. // classIssue: '32',
  678. // placeIssue: '0',
  679. // excellIssue: '1',
  680. // copyIssue: '0',
  681. // mockIssue: '0',
  682. // sequeIssueName: '练习二',
  683. // placeIssueName: null,
  684. // excellIssueName: '必学题一',
  685. // classIssueName: '刑法题',
  686. // questionType: 1,
  687. // subject: 1,
  688. // classSort: 16,
  689. // excellSort: 39,
  690. // sequeSort: 118,
  691. // placeSort: null,
  692. // userAnswer: '',
  693. // },
  694. // ]);
  695. // let listIndex = ref(0);
  696. // let submitScore = () => {
  697. // let score =0
  698. // list.value.forEach(item=>{
  699. // score +=item.answer==item.userAnswer?1:0
  700. // })
  701. // store.commit('SET_ENDTIME', {
  702. // endTime: `${dayjs().format('MM-DD HH:mm:ss')}`,
  703. // });
  704. // router.push({
  705. // name: 'examScore',
  706. // query: {
  707. // score:score,
  708. // total:list.value.length
  709. // },
  710. // });
  711. // };
  712. // let changeListIndex = (e: PointerEvent) => {
  713. // listIndex.value = Number(e.target?.dataset?.key) - 1;
  714. // };
  715. // let selectExamAnswer = (item: string) => {
  716. // list.value[listIndex.value] = { ...list.value[listIndex.value], userAnswer: item };
  717. // console.log(list.value[listIndex.value], item);
  718. // };
  719. // let beforeTopic = () => {
  720. // if (listIndex.value == 0) {
  721. // return;
  722. // }
  723. // listIndex.value = listIndex.value - 1;
  724. // };
  725. // let nextTopic = () => {
  726. // if (listIndex.value == list.value.length - 1) {
  727. // return;
  728. // }
  729. // listIndex.value = listIndex.value + 1;
  730. // };
  731. // Api.studentQustionInfoSelectTestQuestionInfo({
  732. // liceBus: '',
  733. // liceCar: '1',
  734. // liceMoto: '',
  735. // liceTruck: '',
  736. // subject: 1,
  737. // }).then((res) => {
  738. // res.data.rows.forEach((item) => {
  739. // item.optsArr = item.opts.split('-');
  740. // item.userAnswer = '';
  741. // });
  742. // list.value = res.data.rows;
  743. // });
  744. onMounted(() => {
  745. //倒计时结束
  746. countdown().then((timer) => {
  747. window.clearInterval(timer as number);
  748. submitScore();
  749. });
  750. });
  751. return {
  752. list,
  753. letter: ['A', 'B', 'C', 'D', 'E', 'F'],
  754. questionTypeMap: ['', '判断题', '选择题', '多选题'],
  755. listIndex: listIndex,
  756. beforeTopic,
  757. nextTopic,
  758. changeListIndex,
  759. selectExamAnswer,
  760. selectExamAnswers,
  761. countdownTime,
  762. store,
  763. router,
  764. submitScore,
  765. beforeSubmitVisible,
  766. submitVisible,
  767. correctScore,
  768. errorScore,
  769. headimg,
  770. subject,
  771. username,
  772. carType,
  773. sex,
  774. wrongQuestion,
  775. wrongQuestionIndex,
  776. correctAnswerVisible,
  777. };
  778. },
  779. components: {
  780. beforeSubmitMask,
  781. submitMask,
  782. correctAnswerMask,
  783. },
  784. });
  785. </script>
  786. <style lang="scss" scoped>
  787. .text-red {
  788. color: red;
  789. }
  790. .w-half {
  791. width: 50%;
  792. }
  793. .mt10 {
  794. margin-top: 10px;
  795. }
  796. .mt6 {
  797. margin-top: 6px;
  798. }
  799. .mt13 {
  800. margin-top: 13px;
  801. }
  802. .border-none {
  803. border: none;
  804. }
  805. .bg-498ef5 {
  806. background: #498ef5;
  807. }
  808. .bottom {
  809. display: flex;
  810. position: relative;
  811. justify-content: center;
  812. border-left: 1px solid #c6c7c9;
  813. border-bottom: 1px solid #c6c7c9;
  814. border-right: 1px solid #c6c7c9;
  815. height: 74px;
  816. .icon {
  817. width: 35px;
  818. height: 35px;
  819. position: absolute;
  820. left: 17px;
  821. bottom: 21px;
  822. }
  823. }
  824. .center {
  825. display: flex;
  826. height: 100vh;
  827. background: #f6f2f1;
  828. }
  829. .box {
  830. padding-top: 5px;
  831. padding-bottom: 5px;
  832. padding-left: 7px;
  833. padding-right: 7px;
  834. overflow: hidden;
  835. }
  836. .main {
  837. display: flex;
  838. border: 1px solid #c6c7c9;
  839. }
  840. .container3 {
  841. flex: 1;
  842. }
  843. .container2 {
  844. box-sizing: border-box;
  845. width: 613px;
  846. .container2-row1 {
  847. display: flex;
  848. flex-wrap: wrap;
  849. flex-direction: column;
  850. height: 220px;
  851. width: 100%;
  852. }
  853. .container2-row2 {
  854. display: flex;
  855. flex-wrap: wrap;
  856. flex-direction: row;
  857. height: 42px;
  858. width: 100%;
  859. align-content: center;
  860. align-items: center;
  861. border-top: 1px solid #b8c0cc;
  862. border-left: 1px solid #b8c0cc;
  863. text-align: left;
  864. font-size: 11px;
  865. padding-left: 8px;
  866. .left-line1 {
  867. color: #bc322d;
  868. text-align: left;
  869. font-size: 11px;
  870. width: 100%;
  871. }
  872. .left-line2 {
  873. color: #3d3c38;
  874. text-align: left;
  875. font-size: 11px;
  876. width: 100%;
  877. }
  878. .right {
  879. display: flex;
  880. align-content: center;
  881. align-items: center;
  882. justify-content: flex-end;
  883. padding-right: 16px;
  884. .right-button1 {
  885. width: 58px;
  886. height: 28px;
  887. background: #fffffb;
  888. opacity: 1;
  889. font-size: 12px;
  890. color: #3d3c38;
  891. line-height: 28px;
  892. text-align: center;
  893. margin-left: 16px;
  894. }
  895. .button1_disabled {
  896. background-color: #f9faf5;
  897. color: #979893;
  898. }
  899. .right-button2 {
  900. width: 58px;
  901. height: 28px;
  902. background: #fffffb;
  903. opacity: 1;
  904. font-size: 12px;
  905. line-height: 28px;
  906. text-align: center;
  907. margin-left: 16px;
  908. }
  909. }
  910. }
  911. }
  912. .container1 {
  913. display: flex;
  914. width: 119px;
  915. flex-direction: column;
  916. }
  917. .coll {
  918. position: relative;
  919. display: flex;
  920. margin-top: 9px;
  921. .coll-header1 {
  922. width: 231px;
  923. height: 21px;
  924. border-spacing: 0;
  925. border-right: 1px solid #b8c0cc;
  926. div {
  927. box-sizing: border-box;
  928. }
  929. .coll-header1-row {
  930. width: 21px;
  931. height: 21px;
  932. line-height: 21px;
  933. background: #498ef5;
  934. border-right: 1px solid #b8c0cc;
  935. font-size: 10px;
  936. white-space: nowrap;
  937. }
  938. // .coll-header1-row_border{
  939. // border-bottom: 1px solid #fff;
  940. // }
  941. }
  942. .coll-header2 {
  943. // position: absolute;
  944. // top: 0px;
  945. display: flex;
  946. flex-direction: column;
  947. flex-wrap: nowrap;
  948. border-spacing: 0;
  949. height: 237px;
  950. width: 21px;
  951. .coll-header2-col {
  952. width: 23px;
  953. height: 25px;
  954. border-top: 1px solid #b8c0cc;
  955. font-size: 10px;
  956. line-height: 21px;
  957. background: #498ef5;
  958. white-space: nowrap;
  959. }
  960. }
  961. .coll-table-topic {
  962. background: #f2f3f5;
  963. border-spacing: 0;
  964. border-left: 1px solid #d2d1cf;
  965. border-top: 1px solid #d2d1cf;
  966. td {
  967. border-bottom: 1px solid #d2d1cf;
  968. border-right: 1px solid #d2d1cf;
  969. div {
  970. font-size: 8px;
  971. width: 15px;
  972. height: 17px;
  973. line-height: 17px;
  974. }
  975. // font-size: 12px;
  976. .coll-table-topic-item {
  977. border: none;
  978. white-space: nowrap;
  979. div {
  980. white-space: nowrap;
  981. }
  982. }
  983. }
  984. .collselected {
  985. background: #498ef5;
  986. color: #fff;
  987. }
  988. }
  989. }
  990. .answer {
  991. width: 410px;
  992. font-size: 13px;
  993. text-align: left;
  994. height: 41px;
  995. line-height: 41px;
  996. display: flex;
  997. justify-content: space-between;
  998. align-items: center;
  999. align-content: center;
  1000. flex-wrap: wrap;
  1001. padding-left: 18px;
  1002. padding-right: 13px;
  1003. border-left: 1px solid #b8c0cc;
  1004. .answer-tip {
  1005. color: #498ef5;
  1006. font-weight: 700;
  1007. }
  1008. .answer-list {
  1009. display: flex;
  1010. justify-content: space-between;
  1011. width: auto;
  1012. height: 24px;
  1013. .answer_selected {
  1014. color: #fff;
  1015. background: #498ef5;
  1016. }
  1017. .answer-list-item {
  1018. width: 24px;
  1019. height: 24px;
  1020. line-height: 24px;
  1021. border-radius: 2px;
  1022. font-size: 13px;
  1023. font-weight: 600;
  1024. border: 1px solid #b8c0cc;
  1025. border-radius: 6px;
  1026. text-align: center;
  1027. margin-left: 6px;
  1028. }
  1029. .answer-list-item_select {
  1030. color: #fff;
  1031. background: #498ef5;
  1032. }
  1033. }
  1034. }
  1035. .answer-img {
  1036. height: 74px;
  1037. }
  1038. .topic {
  1039. border: 1px solid #b8c0cc;
  1040. width: 410px;
  1041. height: 178px;
  1042. position: relative;
  1043. border-top: none;
  1044. border-right: none;
  1045. border-bottom: none;
  1046. padding-top: 6px;
  1047. .topic-issue {
  1048. font-size: 14px;
  1049. padding-left: 10px;
  1050. font-weight: normal;
  1051. text-align: left;
  1052. font-weight: 700;
  1053. }
  1054. .topic-header {
  1055. display: none;
  1056. color: #498ef5;
  1057. background: #f6f2f1;
  1058. top: 0;
  1059. left: 30px;
  1060. text-align: left;
  1061. padding-left: 2px;
  1062. padding-right: 2px;
  1063. white-space: nowrap;
  1064. font-size: 10px;
  1065. }
  1066. .topic-select {
  1067. display: flex;
  1068. width: 100%;
  1069. height: 37px;
  1070. padding-left: 10px;
  1071. padding-right: 10px;
  1072. font-size: 14px;
  1073. flex-wrap: wrap;
  1074. }
  1075. .topic-select-item {
  1076. width: 100%;
  1077. font-size: 14px;
  1078. text-align: left;
  1079. font-weight: 700;
  1080. }
  1081. }
  1082. .student {
  1083. border-bottom: 1px solid #b8c0cc;
  1084. width: 100%;
  1085. height: 175px;
  1086. font-size: 13px;
  1087. position: relative;
  1088. .student-header {
  1089. color: #498ef5;
  1090. background: #f6f2f1;
  1091. text-align: left;
  1092. padding-left: 2px;
  1093. padding-right: 2px;
  1094. white-space: nowrap;
  1095. font-weight: 600;
  1096. font-size: 10px;
  1097. text-align: center;
  1098. margin-top: 7px;
  1099. }
  1100. .driver {
  1101. width: 54px;
  1102. height: 54px;
  1103. }
  1104. .driverInfo {
  1105. font-size: 9px;
  1106. font-weight: 600;
  1107. padding-top: 10px;
  1108. text-align: left;
  1109. padding-left: 10px;
  1110. div {
  1111. margin-bottom: 6px;
  1112. }
  1113. }
  1114. }
  1115. .kaoti {
  1116. width: 100%;
  1117. position: relative;
  1118. height: 46px;
  1119. border-bottom: 1px solid #b8c0cc;
  1120. font-size: 13px;
  1121. font-weight: 600;
  1122. display: flex;
  1123. flex-wrap: wrap;
  1124. align-content: center;
  1125. align-items: center;
  1126. .kaoti-header {
  1127. color: #498ef5;
  1128. background: #f6f2f1;
  1129. width: 100%;
  1130. font-size: 10px;
  1131. text-align: center;
  1132. white-space: nowrap;
  1133. font-size: 12px;
  1134. }
  1135. .kaoti-headerText {
  1136. font-size: 8px;
  1137. font-weight: normal;
  1138. width: 100%;
  1139. text-align: center;
  1140. font-size: 11px;
  1141. color: #3d3c38;
  1142. }
  1143. }
  1144. .restTime {
  1145. width: 100%;
  1146. position: relative;
  1147. height: 42px;
  1148. font-size: 9px;
  1149. font-weight: 600;
  1150. display: flex;
  1151. align-content: center;
  1152. align-items: center;
  1153. flex-wrap: wrap;
  1154. // border-right: 1px solid #b8c0cc;
  1155. .restTime-header {
  1156. color: #498ef5;
  1157. font-size: 11px;
  1158. background: #f6f2f1;
  1159. width: 100%;
  1160. text-align: center;
  1161. padding-left: 8px;
  1162. padding-right: 8px;
  1163. white-space: nowrap;
  1164. }
  1165. .restTime-headerText {
  1166. font-size: 14px;
  1167. color: #3d3c38;
  1168. width: 100%;
  1169. }
  1170. }
  1171. .mt6 {
  1172. margin-top: 6px;
  1173. }
  1174. .mt9 {
  1175. margin-top: 9px;
  1176. }
  1177. .mt19 {
  1178. margin-top: 19px;
  1179. }
  1180. .font13 {
  1181. font-size: 13px;
  1182. }
  1183. </style>