cuoti.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. <template>
  2. <view class="phone-score-page">
  3. <!-- 段落 -->
  4. <view class="score-shiti-content">
  5. <!-- 试题区域 -->
  6. <view v-if="activeSt">
  7. <template v-if="activeSt.stTypeId == 1">
  8. <!-- 单选 -->
  9. <danxuan :question="activeSt" :key="activeSt.stId"></danxuan>
  10. </template>
  11. <template v-if="activeSt.stTypeId == 2">
  12. <!-- 多选 -->
  13. <duoxuan :question="activeSt" :key="activeSt.stId"></duoxuan>
  14. </template>
  15. <template v-if="activeSt.stTypeId == 3">
  16. <!-- 判断 -->
  17. <panduan :question="activeSt" :key="activeSt.stId"></panduan>
  18. </template>
  19. <template v-if="activeSt.stTypeId == 4">
  20. <!-- 填空 -->
  21. <tiankong :question="activeSt" :key="activeSt.stId"></tiankong>
  22. </template>
  23. <template v-if="activeSt.stTypeId == 5">
  24. <!-- 简答 -->
  25. <jianda :question="activeSt" :key="activeSt.stId"></jianda>
  26. </template>
  27. <template v-if="activeSt.stTypeId == 6">
  28. <!-- 阅读 -->
  29. <yuedu :question="activeSt" :key="activeSt.stId" @yudu-change="onYueduChange"></yuedu>
  30. </template>
  31. </view>
  32. <!-- 底部 -->
  33. <view class="kaoshi-bottom-box">
  34. <view class="shiti-num-box" @click="showAnswerCard">
  35. <icon class="shiti-num-icon"></icon>答题卡
  36. <text
  37. class="active-num">{{activeSt ? activeSt.onlyNum: 0}}</text>/<text>{{data.StListForSearch.length}}</text>
  38. </view>
  39. </view>
  40. <!-- 解析 -->
  41. <view v-if="activeSt" class="score-answer-box">
  42. <view class="phone-question-answer-box" v-if="activeSt.stTypeId == 6">
  43. <template v-if="yuduItemAnswer.stTypeId == 5">
  44. <!-- 阅读题中简答题 -->
  45. <view class="phone-line-title">答案解析</view>
  46. <view class="btdf-row">本题得分:<text>{{yuduItemAnswer.score}}</text>分</view>
  47. <view class="zqda-row">正确答案:
  48. <view>{{yuduItemAnswer.result}}</view>
  49. </view>
  50. <view class="ndda-row">您的答案:
  51. <view>{{yuduItemAnswer.reply}}</view>
  52. </view>
  53. <view class="dajx-row">答案解析:
  54. <rich-text :nodes="yuduItemAnswer.answer"></rich-text>
  55. </view>
  56. </template>
  57. <template v-else-if="yuduItemAnswer.stTypeId == 4">
  58. <view class="phone-line-title">答案解析</view>
  59. <view class="btdf-row">本题得分:<text>{{yuduItemAnswer.score}}</text>分</view>
  60. <view class="zqda-row">正确答案:
  61. <view v-for="(item,index) in yuduItemAnswer.result">{{`填空${index+1}`}} : {{item}}</view>
  62. </view>
  63. <view class="ndda-row">您的答案:
  64. <view v-for="(item,index) in yuduItemAnswer.reply"> {{`填空${index+1}`}}: {{item}}</view>
  65. </view>
  66. <view class="dajx-row">答案解析:
  67. <rich-text :nodes="yuduItemAnswer.answer"></rich-text>
  68. </view>
  69. </template>
  70. <template v-else>
  71. <view class="phone-line-title">答案解析</view>
  72. <view class="btdf-row">本题得分:<text>{{yuduItemAnswer.score}}</text>分</view>
  73. <view class="zqda-row">正确答案:<text>{{yuduItemAnswer.result}}</text></view>
  74. <view class="ndda-row">您的答案:<text>{{yuduItemAnswer.reply}}</text></view>
  75. <view class="dajx-row">答案解析:
  76. <rich-text :nodes="yuduItemAnswer.answer"></rich-text>
  77. </view>
  78. </template>
  79. </view>
  80. <view class="phone-question-answer-box" v-else-if="activeSt.stTypeId == 5">
  81. <view class="phone-line-title">答案解析</view>
  82. <view class="btdf-row">本题得分:<text>{{data.score}}</text>分</view>
  83. <view class="zqda-row">正确答案:
  84. <view>{{data.result}}</view>
  85. </view>
  86. <view class="ndda-row">您的答案:
  87. <view>{{data.reply}}</view>
  88. </view>
  89. <view class="dajx-row">答案解析:
  90. <rich-text :nodes="data.answer"></rich-text>
  91. </view>
  92. </view>
  93. <view class="phone-question-answer-box" v-else-if="activeSt.stTypeId == 4">
  94. <view class="phone-line-title">答案解析</view>
  95. <view class="btdf-row">本题得分:<text>{{answerRes.score}}</text>分</view>
  96. <view class="zqda-row">正确答案:
  97. <view v-for="(item,index) in answerRes.result">{{`填空${index+1}`}} : {{item}}</view>
  98. </view>
  99. <view class="ndda-row">您的答案:
  100. <view v-for="(item,index) in answerRes.reply"> {{`填空${index+1}`}}: {{item}}</view>
  101. </view>
  102. <view class="dajx-row">答案解析:
  103. <rich-text :nodes="answerRes.answer"></rich-text>
  104. </view>
  105. </view>
  106. <view class="phone-question-answer-box" v-else>
  107. <view class="phone-line-title">答案解析</view>
  108. <view class="btdf-row">本题得分:<text>{{answerRes.score}}</text>分</view>
  109. <view class="zqda-row">正确答案:<text>{{answerRes.result}}</text></view>
  110. <view class="ndda-row">您的答案:<text>{{answerRes.reply}}</text></view>
  111. <view class="dajx-row">答案解析:
  112. <rich-text :nodes="answerRes.answer"></rich-text>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <!-- 上下按钮 -->
  118. <view v-if="activeSt" class="score-bottom-box">
  119. <view @click="handleOpenCard" class="score-num-box">
  120. <icon class="score-num-icon"></icon>
  121. <text
  122. class="active-num">{{activeSt && activeSt.onlyNum||0}}</text>/<text>{{data.StListForSearch.length}}</text>
  123. </view>
  124. <view>
  125. <button type="default" size="mini" hover-class="none" class="phone-green-btn score-answer-btn"
  126. @click="handlePrev" v-if="!isFistStId">上一题</button>
  127. <button type="default" size="mini" hover-class="none" class="phone-green-btn score-answer-btn"
  128. @click="handleNext" v-if="!isLastStId">下一题</button>
  129. <!-- <button type="default" size="mini" hover-class="none" class="phone-green-btn score-answer-btn"
  130. @click="handleBack" v-if="isLastStId">完成</button> -->
  131. </view>
  132. </view>
  133. <!-- 答题卡 -->
  134. <uni-popup ref="popupRef" background-color="#fff" :animation="false" :is-mask-click="false" :mask-click="false">
  135. <view class="answer-card-popup">
  136. <view class="icon-title-navBar-box">
  137. <view @click="handlePopupBack" class="nav-bar-icon"> </view>
  138. <text class="nav-bar-title">答题卡</text>
  139. </view>
  140. <view class="card-content-box">
  141. <view class="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
  142. :key="paragraphIndex">
  143. <view class="paragraph-title">
  144. {{paragraph.name}}
  145. </view>
  146. <view class="paragraph-qa" v-for="(qa,qaIndex) in paragraph.qas" :key="qaIndex"
  147. :class="getQaClass(qa)" @click="answerCardItemClick(qa)">{{qa.onlyNum}}
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. </uni-popup>
  153. </view>
  154. </template>
  155. <script setup>
  156. import danxuan from "@/components/questions/danxuan.vue";
  157. import duoxuan from "@/components/questions/duoxuan.vue";
  158. import tiankong from "@/components/questions/tiankong.vue";
  159. import panduan from "@/components/questions/panduan.vue";
  160. import jianda from "@/components/questions/jianda.vue";
  161. import yuedu from "@/components/questions/yuedu.vue";
  162. import { useQuestionTools } from "@/utils/useQuestionTools.js";
  163. import {
  164. onLoad
  165. } from "@dcloudio/uni-app";
  166. import {
  167. ref,
  168. reactive,
  169. computed
  170. } from "vue"
  171. import * as ctApi from "@/api/cuoti.js"
  172. const {
  173. checkDanxuanReply,
  174. checkDuoxuanReply,
  175. checkPanduanReply,
  176. checkTiankongReply,
  177. getLetterByIndex,
  178. checkJiandaReply,
  179. checkYueduReply
  180. } = useQuestionTools();
  181. const hisId = ref(null)
  182. const popupRef = ref(null)
  183. const yuduItemAnswer = ref(null); // 阅读小题显示答案
  184. const yuduIndexQa = ref(null); // 阅读小题答案
  185. const data = reactive({
  186. ksId: null,
  187. ksName: '',
  188. stTotal: 0,
  189. zyLevelName: '',
  190. userScore: '',
  191. ksScore: 0,
  192. StListForSearch: [],
  193. duanluo: []
  194. })
  195. const questionData = ref([]);
  196. const progress = reactive({
  197. dlIndex: 0,
  198. dtIndex: 0
  199. })
  200. const dlName = computed(() => {
  201. if (data.StListForSearch && activeSt.value) {
  202. return data.StListForSearch[activeSt.value.onlyNum].paragraphName
  203. } else {
  204. return ''
  205. }
  206. })
  207. const activeSt = computed(() => {
  208. if (questionData.value.length) {
  209. return questionData.value.length && questionData.value[progress.dlIndex].qas[progress.dtIndex];
  210. } else {
  211. return null
  212. }
  213. })
  214. const answerRes = computed(() => {
  215. const qa = activeSt.value;
  216. let score = qa.score;
  217. let reply = '';
  218. let result = '';
  219. let answer = qa.answer;
  220. if (qa.stTypeId == 1) {
  221. // 单选题
  222. if (qa.reply && qa.reply.trim() !== '') {
  223. reply = getLetterByIndex(qa.reply)
  224. } else {
  225. reply = '未答'
  226. }
  227. if (qa.result) {
  228. result = getLetterByIndex(qa.result)
  229. } else {
  230. result = '无答案'
  231. }
  232. }
  233. if (qa.stTypeId == 2) {
  234. // 多选题
  235. if (qa.reply && qa.reply.length) {
  236. reply = qa.reply.map(item => {
  237. if (item.trim()) {
  238. return getLetterByIndex(item.trim())
  239. }
  240. }).join(',')
  241. } else {
  242. reply = '未答'
  243. }
  244. if (qa.result) {
  245. result = qa.result.map(item => {
  246. if (item.trim()) {
  247. return getLetterByIndex(item.trim())
  248. }
  249. }).join(',')
  250. } else {
  251. result = '无答案'
  252. }
  253. }
  254. if (qa.stTypeId == 3) {
  255. // 判断题
  256. if (qa.reply === '') {
  257. reply = '未答'
  258. } else if (qa.reply == 0) {
  259. reply = '错误'
  260. } else if (qa.reply == 1) {
  261. reply = '正确'
  262. }
  263. if (qa.result == 0) {
  264. result = '错误'
  265. } else if (qa.result == 1) {
  266. result = '正确'
  267. }
  268. }
  269. if (qa.stTypeId == 4) {
  270. let reply = qa.reply || [];
  271. let result = qa.result || [];
  272. // 填空题
  273. return {
  274. score,
  275. reply,
  276. result,
  277. answer
  278. }
  279. } else if (qa.stTypeId == 5) {
  280. let reply = qa.reply;
  281. let result = qa.result;
  282. // 简答题
  283. return {
  284. score,
  285. reply,
  286. result,
  287. answer
  288. }
  289. } else {
  290. return {
  291. score,
  292. reply,
  293. result,
  294. answer
  295. }
  296. }
  297. })
  298. function showAnswerCard() {
  299. popupRef.value.open('top')
  300. }
  301. function onYueduChange(data) {
  302. yuduIndexQa.value = data;
  303. checkYueduJiexi()
  304. }
  305. // 校验阅读解析
  306. function checkYueduJiexi() {
  307. console.log('格式化阅读题', yuduIndexQa.value)
  308. let qa = yuduIndexQa.value;
  309. let score = qa.userScore;
  310. let reply = '';
  311. let result = '';
  312. let answer = qa.answer;
  313. if (qa.stTypeId == 1) {
  314. // 单选题
  315. if (qa.reply && qa.reply.trim() !== '') {
  316. reply = getLetterByIndex(qa.reply)
  317. } else {
  318. reply = '未答'
  319. }
  320. if (qa.result) {
  321. result = getLetterByIndex(qa.result)
  322. } else {
  323. result = '无答案'
  324. }
  325. yuduItemAnswer.value = {
  326. score,
  327. reply,
  328. result,
  329. answer
  330. }
  331. }
  332. if (qa.stTypeId == 2) {
  333. // 多选题
  334. if (qa.reply && qa.reply.length) {
  335. reply = qa.reply.map(item => {
  336. if (item.trim()) {
  337. return getLetterByIndex(item.trim())
  338. }
  339. }).join(',')
  340. } else {
  341. reply = '未答'
  342. }
  343. if (qa.result) {
  344. result = qa.result.map(item => {
  345. if (item.trim()) {
  346. return getLetterByIndex(item.trim())
  347. }
  348. }).join(',')
  349. } else {
  350. result = '无答案'
  351. }
  352. yuduItemAnswer.value = {
  353. score,
  354. reply,
  355. result,
  356. answer
  357. }
  358. }
  359. if (qa.stTypeId == 3) {
  360. // 判断题
  361. if (qa.reply === '') {
  362. reply = '未答'
  363. } else if (qa.reply == 0) {
  364. reply = '错误'
  365. } else if (qa.reply == 1) {
  366. reply = '正确'
  367. }
  368. if (qa.result == 0) {
  369. result = '错误'
  370. } else if (qa.result == 1) {
  371. result = '正确'
  372. }
  373. yuduItemAnswer.value = {
  374. score,
  375. reply,
  376. result,
  377. answer
  378. }
  379. }
  380. if (qa.stTypeId == 4) {
  381. let reply = qa.reply || [];
  382. let result = qa.result || [];
  383. // 填空题
  384. yuduItemAnswer.value = {
  385. score,
  386. reply,
  387. result,
  388. answer
  389. }
  390. }
  391. if (qa.stTypeId == 5) {
  392. // 简单题
  393. let reply = qa.reply ? '未答' : qa.reply;
  394. let result = qa.result;
  395. yuduItemAnswer.value = {
  396. score,
  397. reply,
  398. result,
  399. answer
  400. }
  401. }
  402. }
  403. const isFistStId = computed(() => {
  404. if (data.StListForSearch.length) {
  405. return data.StListForSearch[0].stId == activeSt.value.stId
  406. } else {
  407. return false
  408. }
  409. });
  410. const isLastStId = computed(() => {
  411. if (data.StListForSearch.length) {
  412. return data.StListForSearch[data.StListForSearch.length - 1].stId == activeSt.value.stId
  413. } else {
  414. return false
  415. }
  416. });
  417. onLoad((options) => {
  418. hisId.value = options.hisId;
  419. initPage()
  420. })
  421. function getQaClass(qa) {
  422. if (qa.marked && qa.marked === true) {
  423. return 'paragraph-qa-block-mark';
  424. } else {
  425. if (qa.stTypeId == 1) {
  426. if (checkDanxuanReply(qa)) {
  427. return 'paragraph-qa-block-done';
  428. } else {
  429. return 'paragraph-qa-block-init';
  430. }
  431. } else if (qa.stTypeId == 2) {
  432. if (checkDuoxuanReply(qa)) {
  433. return 'paragraph-qa-block-done';
  434. } else {
  435. return 'paragraph-qa-block-init';
  436. }
  437. } else if (qa.stTypeId == 3) {
  438. if (checkPanduanReply(qa)) {
  439. return 'paragraph-qa-block-done';
  440. } else {
  441. return 'paragraph-qa-block-init';
  442. }
  443. } else if (qa.stTypeId == 4) {
  444. if (checkTiankongReply(qa)) {
  445. return 'paragraph-qa-block-done';
  446. } else {
  447. return 'paragraph-qa-block-init';
  448. }
  449. } else if (qa.stTypeId == 5) {
  450. if (checkJiandaReply(qa)) {
  451. return 'paragraph-qa-block-done';
  452. } else {
  453. return 'paragraph-qa-block-init';
  454. }
  455. } else if (qa.stTypeId == 6) {
  456. if (checkYueduReply(qa)) {
  457. return 'paragraph-qa-block-done';
  458. } else {
  459. return 'paragraph-qa-block-init';
  460. }
  461. }
  462. }
  463. }
  464. function skipQuestion(dlIndex, dtIndex) {
  465. progress.dlIndex = dlIndex;
  466. progress.dtIndex = dtIndex;
  467. handlePopupBack()
  468. }
  469. function answerCardItemClick(qa) {
  470. const actQa = data.StListForSearch.find(item => item.stId == qa.stId);
  471. skipQuestion(actQa.dlIndex, actQa.dtIndex)
  472. }
  473. function handleBack() {
  474. uni.redirectTo({
  475. url: "/pages/admin/Chengji/list"
  476. })
  477. }
  478. function formatDuanluoList() {
  479. let uIndex = 0; // 试题num
  480. let iDuanluo = 0; // 段落num
  481. let result = [];
  482. for (const duanluo of data.duanluo) {
  483. let paragraph = {
  484. qas: [],
  485. };
  486. paragraph.name = duanluo.name;
  487. let iQa = 0; // 当前试题序号
  488. let order = 0; // 当前题型中第几题
  489. for (const iDanxuan of duanluo.danxuan) {
  490. iDanxuan.type = 'danxuan';
  491. iDanxuan.marked = false;
  492. iDanxuan.onlyNum = uIndex + 1;
  493. iDanxuan.order = order;
  494. iDanxuan.iQa = iQa;
  495. paragraph.qas.push(iDanxuan);
  496. uIndex++;
  497. order++;
  498. iQa++;
  499. data.StListForSearch.push({
  500. stId: iDanxuan.stId,
  501. paragraphName: paragraph.name,
  502. dlIndex: iDuanluo,
  503. dtIndex: iDanxuan.iQa,
  504. num: iDanxuan.onlyNum
  505. })
  506. }
  507. order = 0;
  508. for (const iDuoxuan of duanluo.duoxuan) {
  509. iDuoxuan.type = 'duoxuan';
  510. iDuoxuan.marked = false;
  511. iDuoxuan.onlyNum = uIndex + 1;
  512. iDuoxuan.order = order;
  513. paragraph.qas.push(iDuoxuan);
  514. iDuoxuan.iQa = iQa;
  515. uIndex++;
  516. order++;
  517. iQa++;
  518. data.StListForSearch.push({
  519. stId: iDuoxuan.stId,
  520. paragraphName: paragraph.name,
  521. dlIndex: iDuanluo,
  522. dtIndex: iDuoxuan.iQa,
  523. num: iDuoxuan.onlyNum
  524. })
  525. }
  526. order = 0;
  527. for (const iPanduan of duanluo.panduan) {
  528. iPanduan.type = 'panduan';
  529. iPanduan.marked = false;
  530. iPanduan.onlyNum = uIndex + 1;
  531. iPanduan.order = order;
  532. paragraph.qas.push(iPanduan);
  533. iPanduan.iQa = iQa;
  534. uIndex++;
  535. order++;
  536. iQa++;
  537. data.StListForSearch.push({
  538. stId: iPanduan.stId,
  539. paragraphName: paragraph.name,
  540. dlIndex: iDuanluo,
  541. dtIndex: iPanduan.iQa,
  542. num: iPanduan.onlyNum
  543. })
  544. }
  545. order = 0;
  546. for (const iTiankong of duanluo.tiankong) {
  547. iTiankong.type = 'tiankong';
  548. iTiankong.marked = false;
  549. iTiankong.onlyNum = uIndex + 1;
  550. iTiankong.order = order;
  551. paragraph.qas.push(iTiankong);
  552. iTiankong.iQa = iQa;
  553. uIndex++;
  554. order++;
  555. iQa++;
  556. data.StListForSearch.push({
  557. stId: iTiankong.stId,
  558. paragraphName: paragraph.name,
  559. dlIndex: iDuanluo,
  560. dtIndex: iTiankong.iQa,
  561. num: iTiankong.onlyNum
  562. })
  563. }
  564. order = 0;
  565. for (const iJianda of duanluo.jianda) {
  566. iJianda.type = 'jianda';
  567. iJianda.onlyNum = uIndex + 1;
  568. iJianda.order = order;
  569. iJianda.iQa = iQa;
  570. paragraph.qas.push(iJianda);
  571. iJianda.reply = '';
  572. uIndex++;
  573. order++;
  574. iQa++;
  575. data.StListForSearch.push({
  576. stId: iJianda.stId,
  577. paragraphName: paragraph.name,
  578. dlIndex: iDuanluo,
  579. dtIndex: iJianda.iQa,
  580. num: iJianda.onlyNum
  581. })
  582. }
  583. order = 0;
  584. for (const iYuedu of duanluo.yuedu) {
  585. iYuedu.type = 'yuedu';
  586. iYuedu.onlyNum = uIndex + 1;
  587. iYuedu.order = order;
  588. iYuedu.iQa = iQa;
  589. if (iYuedu.duoxuan && iYuedu.duoxuan.length) {
  590. iYuedu.duoxuan.map((qIt) => {
  591. qIt.reply = qIt.reply || [];
  592. return qIt
  593. })
  594. }
  595. if (iYuedu.tiankong && iYuedu.tiankong.length) {
  596. iYuedu.tiankong.map((qIt) => {
  597. qIt.reply = new Array(qIt.count).fill('');
  598. return qIt;
  599. });
  600. }
  601. paragraph.qas.push(iYuedu);
  602. iYuedu.reply = [];
  603. uIndex++;
  604. order++;
  605. iQa++;
  606. data.StListForSearch.push({
  607. stId: iYuedu.stId,
  608. paragraphName: paragraph.name,
  609. dlIndex: iDuanluo,
  610. dtIndex: iYuedu.iQa,
  611. num: iYuedu.onlyNum
  612. })
  613. }
  614. iDuanluo++;
  615. questionData.value.push(paragraph)
  616. }
  617. }
  618. function handlePrev() {
  619. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  620. const index = qa.num - 1;
  621. if (index > 0) {
  622. const result = data.StListForSearch[index - 1];
  623. progress.dlIndex = result.dlIndex;
  624. progress.dtIndex = result.dtIndex
  625. }
  626. }
  627. function handleNext() {
  628. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  629. const index = qa.num - 1;
  630. if (index < data.StListForSearch.length) {
  631. const result = data.StListForSearch[index + 1];
  632. progress.dlIndex = result.dlIndex;
  633. progress.dtIndex = result.dtIndex
  634. }
  635. }
  636. function initPage() {
  637. uni.setNavigationBarTitle({
  638. title: '错题'
  639. });
  640. ctApi.getCuotiInfo({
  641. hisId: hisId.value
  642. }).then(res => {
  643. data.duanluo = [res.data];
  644. formatDuanluoList();
  645. })
  646. }
  647. function handlePopupBack() {
  648. popupRef.value.close()
  649. }
  650. function handleOpenCard() {
  651. popupRef.value.open('top')
  652. }
  653. </script>
  654. <style>
  655. </style>