exam.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. <template>
  2. <view class="phone-kaoshi-page">
  3. <!-- 导航区域 -->
  4. <view class="icon-title-bjcolor-navBar-box">
  5. <view @click="handleBack" class="nav-bar-icon"></view>
  6. <text class="nav-bar-title">{{data.ksName}}</text>
  7. </view>
  8. <!-- 第一行 -->
  9. <view class="kaoshi-page-title">
  10. <view v-if="activeSt" class="title-types">{{dlName}}</view>
  11. <!-- 倒计时 -->
  12. <view v-if="!!data.endSecond">
  13. <uni-countdown :show-day="false" :showHour="true" :showMinute="true" :second="data.endSecond" @timeup="onTimeUp"
  14. :start="startCountDown"></uni-countdown>
  15. </view>
  16. </view>
  17. <view class="kaoshi-shiti-content">
  18. <!-- 内容区域 -->
  19. <!-- 试题区域 -->
  20. <view v-if="activeSt">
  21. <template v-if="activeSt.stTypeId == 1">
  22. <!-- 单选 -->
  23. <danxuan :question="activeSt" :key="activeSt.stId"></danxuan>
  24. </template>
  25. <template v-if="activeSt.stTypeId == 2">
  26. <!-- 多选 -->
  27. <duoxuan :question="activeSt" :key="activeSt.stId"></duoxuan>
  28. </template>
  29. <template v-if="activeSt.stTypeId == 3">
  30. <!-- 判断 -->
  31. <panduan :question="activeSt" :key="activeSt.stId"></panduan>
  32. </template>
  33. <template v-if="activeSt.stTypeId == 4">
  34. <!-- 填空 -->
  35. <tiankong :question="activeSt" :key="activeSt.stId"></tiankong>
  36. </template>
  37. </view>
  38. </view>
  39. <view class="kaoshi-bottom-box">
  40. <button class="phone-green-btn bj-btn" hover-class="none" type="default" size="mini"
  41. @click="handleBiaoji">{{activeSt && activeSt.marked ? '取标':'标记'}}</button>
  42. <view @click="showAnswerCard" class="shiti-num-box">
  43. <icon class="shiti-num-icon"></icon>
  44. <text
  45. class="active-num">{{activeSt ? activeSt.onlyNum: 0}}</text>/<text>{{data.StListForSearch.length}}</text>
  46. </view>
  47. <button class="phone-green-btn save-btn" hover-class="none" type="default" size="mini"
  48. @click="handleSave(true)">保存</button>
  49. </view>
  50. <template v-if="activeSt">
  51. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-prev"
  52. @click="handlePrev" v-if="!isFistStId">上一题</button>
  53. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-next"
  54. @click="handleNext" v-if="!isLastStId">下一题</button>
  55. <button type="default" size="mini" hover-class="none" class="phone-green-btn ks-btn-next"
  56. @click="handleJiaojuan" v-if="isLastStId">交卷</button>
  57. </template>
  58. <!-- 答题卡 -->
  59. <uni-popup ref="popupRef" background-color="#fff" :animation="false" :is-mask-click="false" :mask-click="false">
  60. <view class="answer-card-popup">
  61. <view class="icon-title-bjcolor-navBar-box">
  62. <view @click="handlePopupBack" class="nav-bar-icon"> </view>
  63. <text class="nav-bar-title">答题卡</text>
  64. </view>
  65. <view class="card-content-box">
  66. <view class="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
  67. :key="paragraphIndex">
  68. <view class="paragraph-title">
  69. {{paragraph.name}}
  70. </view>
  71. <view class="paragraph-qa" v-for="(qa,qaIndex) in paragraph.qas" :key="qaIndex"
  72. :class="getQaClass(qa)" @click="answerCardItemClick(qa)">{{qa.onlyNum}}
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </uni-popup>
  78. <!-- 摄像头确认 -->
  79. <!-- <zhuapaiConfirm ref="zhuapaiConfirmRef" @success="zpConfirmSuccess" @error="zpConfirmError"
  80. @cancel="zpConfirmCancel" key="1"></zhuapaiConfirm> -->
  81. <template v-if="data.zhuapai && data.zhuapai > 0">
  82. <!-- 抓拍 -->
  83. <!-- <zhuapaiVue ref="zhuapaiRef" @error="zpError" @success="zpSuccess" key="2" @progress="onProgress"></zhuapaiVue> -->
  84. </template>
  85. <!-- 切屏 -->
  86. <!-- <qiepingVue ref="qiepingRef" @zhuapai="qpZhuapai" @forceSubmit="forceSubmit" @qiepingToast="qiepingToast"
  87. key="3"></qiepingVue> -->
  88. <!-- 交卷确认 -->
  89. <answerQueren ref="answerQrRef" @confirm="handleQuerenConfirm"></answerQueren>
  90. <!-- 考试得分 -->
  91. <submitScoreVue ref="subScoreRef" @confirm="handleScoreConfirm" @close="handleScoreClose"></submitScoreVue>
  92. <!-- 切屏确认弹窗 -->
  93. <!-- <qiepingDlVue ref="qiepingDlRef" :content="messageContent" title="注意" okBtn="知道了"></qiepingDlVue> -->
  94. </view>
  95. </template>
  96. <script setup>
  97. import {
  98. ref,
  99. reactive,
  100. computed,
  101. watch,
  102. nextTick
  103. } from "vue";
  104. import zhuapaiVue from "@/components/zhuapaiConfirm/zhuapai.vue";
  105. import qiepingVue from "@/components/zhuapaiConfirm/qieping.vue";
  106. import zhuapaiConfirm from "@/components/zhuapaiConfirm/index.vue";
  107. import answerQueren from "@/components/zhuapaiConfirm/answerQueren.vue";
  108. import submitScoreVue from "@/components/zhuapaiConfirm/submitScore.vue";
  109. import {
  110. onLoad
  111. } from "@dcloudio/uni-app";
  112. import * as ksApi from "@/api/exam.js"
  113. import danxuan from "@/components/questions/danxuan.vue";
  114. import duoxuan from "@/components/questions/duoxuan.vue";
  115. import tiankong from "@/components/questions/tiankong.vue";
  116. import panduan from "@/components/questions/panduan.vue";
  117. import {
  118. useQuestionTools
  119. } from "@/components/questions/useQuestionTools.js";
  120. import {
  121. useKaoShiCache
  122. } from "./examTools"
  123. import qiepingDlVue from "@/components/dialog/qiepingDl.vue";
  124. const {
  125. checkDanxuanReply,
  126. checkDuoxuanReply,
  127. checkPanduanReply,
  128. checkTiankongReply,
  129. getLetterByIndex
  130. } = useQuestionTools();
  131. const {
  132. saveCacheKs,
  133. getCacheKs,
  134. removeCacheKs
  135. } = useKaoShiCache();
  136. onLoad((option) => {
  137. data.ksId = option.ksId;
  138. data.zhuapai = option.zhuapai;
  139. data.userKaozhengId = option.userKaozhengId;
  140. data.from = option.from;
  141. if (data.zhuapai && data.zhuapai != 0) {
  142. // 考试前确认摄像头
  143. nextTick(() => {
  144. initBeforKaoshi();
  145. })
  146. } else {
  147. initKaoshi();
  148. }
  149. })
  150. const popupRef = ref(null)
  151. const zhuapaiRef = ref(null)
  152. const qiepingRef = ref(null)
  153. const zhuapaiConfirmRef = ref(null)
  154. const answerQrRef = ref(null);
  155. const startCountDown = ref(false);
  156. const subScoreRef = ref(null);
  157. const messageContent = ref('');
  158. const qiepingDlRef = ref(null);
  159. const timer1 = ref(null);
  160. const data = reactive({
  161. ksId: null,
  162. operId: null,
  163. ksName: '',
  164. stTotal: 0,
  165. stScore: 0,
  166. biaoji: {},
  167. endSecond: 0,
  168. pageSize: 0,
  169. toggleScreenFlag: 0,
  170. toggleScreenSecond: 0,
  171. zhuapai: 0,
  172. duanluo: [],
  173. StListForSearch: [],
  174. from: '',
  175. hisId: '',
  176. userKaozhengId: ''
  177. })
  178. const markDB = ref([]);
  179. const questionData = ref([]);
  180. const progress = reactive({
  181. dlIndex: 0,
  182. dtIndex: 0
  183. })
  184. const dlName = computed(() => {
  185. if (data.StListForSearch && activeSt.value) {
  186. return data.StListForSearch[activeSt.value.onlyNum - 1].paragraphName
  187. } else {
  188. return ''
  189. }
  190. })
  191. watch(() => data.duanluo, (newVal) => {
  192. // 计算已答试题数量
  193. }, {
  194. deep: true
  195. })
  196. const activeSt = computed(() => {
  197. if (questionData.value.length) {
  198. return questionData.value.length && questionData.value[progress.dlIndex].qas[progress.dtIndex];
  199. } else {
  200. return null
  201. }
  202. })
  203. const isFistStId = computed(() => {
  204. if (data.StListForSearch.length) {
  205. return data.StListForSearch[0].stId == activeSt.value.stId
  206. } else {
  207. return false
  208. }
  209. });
  210. const isLastStId = computed(() => {
  211. if (data.StListForSearch.length) {
  212. return data.StListForSearch[data.StListForSearch.length - 1].stId == activeSt.value.stId
  213. } else {
  214. return false
  215. }
  216. });
  217. function handleScoreClose() {
  218. handleBack()
  219. }
  220. // 考试得分相关 start
  221. function handleScoreConfirm() {
  222. uni.redirectTo({
  223. url: `/pages/client/Chengji/ksScoreShijuan?hisId=${data.hisId}&from=kaoshi`
  224. })
  225. }
  226. // 考试得分相关 end
  227. // 保存相关
  228. function handleSave(showToast) {
  229. if (timer1.value) {
  230. uni.showToast({
  231. title: '请勿连续保存',
  232. icon: 'none'
  233. })
  234. return
  235. }
  236. timer1.value = setTimeout(() => {
  237. clearTimeout(timer1.value);
  238. },10*1000);
  239. console.log(questionData.value)
  240. const result = []
  241. const option = {
  242. force: false,
  243. operId: data.operId,
  244. replyList: []
  245. }
  246. questionData.value.forEach(dl => {
  247. dl.qas.forEach(st => {
  248. const opt = {
  249. stId: st.stId,
  250. reply: st.reply,
  251. }
  252. result.push(opt)
  253. option.replyList.push(opt)
  254. })
  255. })
  256. // 保存试题答案
  257. saveCacheKs(data.operId, {replyList:result, position: {dlIndex:progress.dlIndex, dtIndex: progress.dtIndex}})
  258. // 保存答题进度
  259. ksApi.getClientKsSave(option).then(res => {
  260. if (res.data && showToast) {
  261. uni.showToast({
  262. title: '保存成功',
  263. })
  264. }
  265. })
  266. }
  267. // 交卷相关功能 start
  268. function checkJiaojuan() {
  269. const result = []
  270. let count = 0;
  271. let total = 0;
  272. questionData.value.forEach(dl => {
  273. dl.qas.forEach(st => {
  274. const opt = {
  275. stId: st.stId,
  276. reply: st.reply,
  277. stTypeId: st.stTypeId
  278. }
  279. result.push(opt)
  280. })
  281. })
  282. result.forEach(item => {
  283. total++;
  284. if (item.stTypeId == 1 && !checkDanxuanReply(item)) {
  285. count++;
  286. }
  287. if (item.stTypeId == 2 && !checkDuoxuanReply(item)) {
  288. count++;
  289. }
  290. if (item.stTypeId == 3 && !checkPanduanReply(item)) {
  291. count++;
  292. }
  293. if (item.stTypeId == 4 && !checkTiankongReply(item)) {
  294. count++;
  295. }
  296. })
  297. return {
  298. total,
  299. count,
  300. }
  301. }
  302. function handleJiaojuan() {
  303. const result = checkJiaojuan()
  304. console.log(result)
  305. if (result.count) {
  306. // 提示
  307. answerQrRef.value.showDialog({
  308. answercartsCount: result.total - result.count,
  309. answercartsTotal: result.total,
  310. })
  311. } else {
  312. handleSubmit()
  313. }
  314. }
  315. function handleQuerenConfirm() {
  316. handleSubmit()
  317. }
  318. function handleSubmit(force = false) {
  319. const result = {
  320. force,
  321. operId: data.operId,
  322. replyList: []
  323. };
  324. questionData.value.forEach(dl => {
  325. dl.qas.forEach(st => {
  326. const opt = {
  327. stId: st.stId,
  328. reply: st.reply
  329. }
  330. result.replyList.push(opt)
  331. })
  332. })
  333. ksApi.getClientKsSubmit(result).then(res => {
  334. if (res.code == 0) {
  335. subScoreRef.value.showDialog(res.data);
  336. data.hisId = res.data.hisId;
  337. // 清空缓存
  338. removeCacheKs(data.operId);
  339. }
  340. })
  341. }
  342. function onTimeUp() {
  343. handleSubmit();
  344. }
  345. // 交卷相关功能 end
  346. // 切屏功能 start
  347. function qiepingToast(count) {
  348. messageContent.value = `已离开${count}次。${data.toggleScreenFlag}次将自动交卷!`
  349. qiepingDlRef.value.handleShow()
  350. }
  351. function forceSubmit() {
  352. // 强制交卷
  353. console.log('强制交卷')
  354. handleSubmit(true)
  355. }
  356. function qpZhuapai() {
  357. // 重新开启抓拍
  358. zhuapaiRef.value && zhuapaiRef.value.showVideoBtn();
  359. }
  360. // 切屏功能 end
  361. // 摄像头抓拍相关功能 start
  362. function zpSuccess() {}
  363. function zpError() {
  364. uni.showToast({
  365. title: '抓拍图片异常',
  366. icon: 'none'
  367. })
  368. handleBack()
  369. }
  370. // 摄像头抓拍相关功能 end
  371. // 摄像头确认相关功能 start
  372. function onProgress() {
  373. uni.showToast({
  374. icon: 'none',
  375. title: '摄像头运行环境异常,请重新进入考试',
  376. duration: 8000
  377. })
  378. handleBack();
  379. }
  380. function zpConfirmSuccess() {
  381. initKaoshi();
  382. }
  383. function zpConfirmError() {
  384. handleBack()
  385. }
  386. function zpConfirmCancel() {
  387. handleBack()
  388. }
  389. // 摄像头确认相关功能 end
  390. function getQaClass(qa) {
  391. if (qa.marked && qa.marked === true) {
  392. return 'paragraph-qa-block-mark';
  393. } else {
  394. if (qa.stTypeId == 1) {
  395. if (checkDanxuanReply(qa)) {
  396. return 'paragraph-qa-block-done';
  397. } else {
  398. return 'paragraph-qa-block-init';
  399. }
  400. } else if (qa.stTypeId == 2) {
  401. if (checkDuoxuanReply(qa)) {
  402. return 'paragraph-qa-block-done';
  403. } else {
  404. return 'paragraph-qa-block-init';
  405. }
  406. } else if (qa.stTypeId == 3) {
  407. if (checkPanduanReply(qa)) {
  408. return 'paragraph-qa-block-done';
  409. } else {
  410. return 'paragraph-qa-block-init';
  411. }
  412. } else if (qa.stTypeId == 4) {
  413. if (checkTiankongReply(qa)) {
  414. return 'paragraph-qa-block-done';
  415. } else {
  416. return 'paragraph-qa-block-init';
  417. }
  418. }
  419. }
  420. }
  421. function skipQuestion(dlIndex, dtIndex) {
  422. progress.dlIndex = dlIndex;
  423. progress.dtIndex = dtIndex;
  424. handlePopupBack()
  425. }
  426. function answerCardItemClick(qa) {
  427. const actQa = data.StListForSearch.find(item => item.stId == qa.stId);
  428. skipQuestion(actQa.dlIndex, actQa.dtIndex)
  429. }
  430. function handleBack() {
  431. const pages = getCurrentPages();
  432. if (pages.length>1) {
  433. uni.navigateBack()
  434. } else {
  435. history.back();
  436. }
  437. }
  438. function showAnswerCard() {
  439. popupRef.value.open('top')
  440. }
  441. function handlePopupBack() {
  442. popupRef.value.close()
  443. }
  444. function handlePrev() {
  445. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  446. const index = qa.onlyNum - 1;
  447. if (index > 0) {
  448. const result = data.StListForSearch[index - 1];
  449. progress.dlIndex = result.dlIndex;
  450. progress.dtIndex = result.dtIndex
  451. }
  452. }
  453. function handleNext() {
  454. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  455. const index = qa.onlyNum - 1;
  456. if (index < data.StListForSearch.length) {
  457. const result = data.StListForSearch[index + 1];
  458. progress.dlIndex = result.dlIndex;
  459. progress.dtIndex = result.dtIndex
  460. }
  461. }
  462. function formatDuanluoList(dlData) {
  463. let uIndex = 0; // 试题onlyNum
  464. let iDuanluo = 0; // 段落onlyNum
  465. let result = [];
  466. for (const duanluo of data.duanluo) {
  467. let paragraph = {
  468. qas: [],
  469. };
  470. paragraph.name = duanluo.name;
  471. let iQa = 0; // 当前试题序号
  472. let order = 0; // 当前题型中第几题
  473. for (const iDanxuan of duanluo.danxuan) {
  474. iDanxuan.type = 'danxuan';
  475. iDanxuan.marked = data.biaoji[iDanxuan.stId] ? true: false;
  476. iDanxuan.onlyNum = uIndex + 1;
  477. iDanxuan.order = order;
  478. iDanxuan.iQa = iQa;
  479. paragraph.qas.push(iDanxuan);
  480. uIndex++;
  481. order++;
  482. iQa++;
  483. data.StListForSearch.push({
  484. stId: iDanxuan.stId,
  485. paragraphName: paragraph.name,
  486. dlIndex: iDuanluo,
  487. dtIndex: iDanxuan.iQa,
  488. onlyNum: iDanxuan.onlyNum
  489. })
  490. }
  491. order = 0;
  492. for (const iDuoxuan of duanluo.duoxuan) {
  493. iDuoxuan.type = 'duoxuan';
  494. iDuoxuan.marked = data.biaoji[iDuoxuan.stId] ? true: false;
  495. iDuoxuan.onlyNum = uIndex + 1;
  496. iDuoxuan.order = order;
  497. paragraph.qas.push(iDuoxuan);
  498. iDuoxuan.iQa = iQa;
  499. iDuoxuan.reply = [];
  500. uIndex++;
  501. order++;
  502. iQa++;
  503. data.StListForSearch.push({
  504. stId: iDuoxuan.stId,
  505. paragraphName: paragraph.name,
  506. dlIndex: iDuanluo,
  507. dtIndex: iDuoxuan.iQa,
  508. onlyNum: iDuoxuan.onlyNum
  509. })
  510. }
  511. order = 0;
  512. for (const iPanduan of duanluo.panduan) {
  513. iPanduan.type = 'panduan';
  514. iPanduan.marked = data.biaoji[iPanduan.stId] ? true: false;
  515. iPanduan.onlyNum = uIndex + 1;
  516. iPanduan.order = order;
  517. paragraph.qas.push(iPanduan);
  518. iPanduan.iQa = iQa;
  519. uIndex++;
  520. order++;
  521. iQa++;
  522. data.StListForSearch.push({
  523. stId: iPanduan.stId,
  524. paragraphName: paragraph.name,
  525. dlIndex: iDuanluo,
  526. dtIndex: iPanduan.iQa,
  527. onlyNum: iPanduan.onlyNum
  528. })
  529. }
  530. order = 0;
  531. for (const iTiankong of duanluo.tiankong) {
  532. iTiankong.type = 'tiankong';
  533. iTiankong.marked = data.biaoji[iTiankong.stId] ? true: false;
  534. iTiankong.onlyNum = uIndex + 1;
  535. iTiankong.order = order;
  536. paragraph.qas.push(iTiankong);
  537. iTiankong.iQa = iQa;
  538. iTiankong.reply = new Array(iTiankong.count).fill('');;
  539. uIndex++;
  540. order++;
  541. iQa++;
  542. data.StListForSearch.push({
  543. stId: iTiankong.stId,
  544. paragraphName: paragraph.name,
  545. dlIndex: iDuanluo,
  546. dtIndex: iTiankong.iQa,
  547. onlyNum: iTiankong.onlyNum
  548. })
  549. }
  550. iDuanluo++;
  551. questionData.value.push(paragraph)
  552. console.log('1', questionData.value)
  553. console.log('2', data.StListForSearch)
  554. }
  555. }
  556. function handleBiaoji() {
  557. activeSt.value.marked = !activeSt.value.marked;
  558. data.biaoji[activeSt.value.stId] = activeSt.value.marked
  559. ksApi.getClientKaoshiBiaoji({
  560. operId: data.operId,
  561. biaoji: JSON.stringify(data.biaoji)
  562. }).catch(err => {
  563. /* uni.redirectTo({
  564. url: '/pages/client/Kaoshi/list'
  565. }) */
  566. handleBack()
  567. })
  568. }
  569. function formatKaoshiData() {
  570. const historyData = getCacheKs(data.operId);
  571. if (historyData) {
  572. const { replyList ,position } = historyData;
  573. if (replyList) {
  574. questionData.value.forEach(dl => {
  575. dl.qas.forEach(st => {
  576. st.reply = replyList.find(item => item.stId == st.stId).reply
  577. })
  578. })
  579. }
  580. if (position) {
  581. progress.dlIndex = position.dlIndex;
  582. progress.dtIndex = position.dtIndex;
  583. }
  584. }
  585. }
  586. // 摄像头确认初始化
  587. function initBeforKaoshi() {
  588. console.log(zhuapaiConfirmRef.value)
  589. zhuapaiConfirmRef.value.showDialog()
  590. }
  591. function initKaoshi() {
  592. ksApi.getClientKsStart({
  593. ksId: data.ksId,
  594. userKaozhengId: data.userKaozhengId
  595. }).then(res => {
  596. const {
  597. ksId,
  598. operId,
  599. ksName,
  600. stTotal,
  601. stScore,
  602. biaoji,
  603. endSecond,
  604. pageSize,
  605. toggleScreenFlag,
  606. toggleScreenSecond,
  607. zhuapai,
  608. duanluoList
  609. } = res.data;
  610. data.ksId = ksId;
  611. data.operId = operId;
  612. data.ksName = ksName;
  613. data.stTotal = stTotal;
  614. data.stScore = stScore;
  615. data.biaoji = biaoji ? JSON.parse(biaoji): {};
  616. data.endSecond = endSecond;
  617. data.pageSize = pageSize;
  618. data.toggleScreenFlag = toggleScreenFlag;
  619. data.toggleScreenSecond = toggleScreenSecond;
  620. data.zhuapai = zhuapai;
  621. data.duanluo = duanluoList;
  622. formatDuanluoList(data.duanluo);
  623. // 设置缓存
  624. formatKaoshiData();
  625. // 设置抓拍监听
  626. if (data.zhuapai && data.zhuapai > 0) {
  627. zhuapaiRef.value.init({
  628. zhuapai: zhuapai,
  629. operId: operId
  630. });
  631. }
  632. // 设置切屏监听
  633. qiepingRef.value.init({
  634. zhuapaiFlag: true,
  635. toggleScreenFlag: toggleScreenFlag,
  636. toggleScreenSecond: toggleScreenSecond,
  637. ksId: data.ksId
  638. })
  639. uni.setNavigationBarTitle({
  640. title: data.ksName
  641. });
  642. startCountDown.value = true;
  643. }).catch(err => {
  644. handleBack()
  645. })
  646. }
  647. </script>