exam.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  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" :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="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
  66. :key="paragraphIndex">
  67. <view class="paragraph-title">
  68. {{paragraph.name}}
  69. </view>
  70. <view class="paragraph-qa" v-for="(qa,qaIndex) in paragraph.qas" :key="qaIndex"
  71. :class="getQaClass(qa)" @click="answerCardItemClick(qa)">{{qa.onlyNum}}
  72. </view>
  73. </view>
  74. </view>
  75. </uni-popup>
  76. <!-- 摄像头确认 -->
  77. <zhuapaiConfirm ref="zhuapaiConfirmRef" @success="zpConfirmSuccess" @error="zpConfirmError"
  78. @cancel="zpConfirmCancel" key="1"></zhuapaiConfirm>
  79. <template v-if="data.zhuapai && data.zhuapai > 0">
  80. <!-- 抓拍 -->
  81. <zhuapaiVue ref="zhuapaiRef" @error="zpError" @success="zpSuccess" key="2"></zhuapaiVue>
  82. </template>
  83. <!-- 切屏 -->
  84. <qiepingVue ref="qiepingRef" @zhuapai="qpZhuapai" @forceSubmit="forceSubmit" @qiepingToast="qiepingToast"
  85. key="3"></qiepingVue>
  86. <!-- 交卷确认 -->
  87. <answerQueren ref="answerQrRef" @confirm="handleQuerenConfirm"></answerQueren>
  88. <!-- 考试得分 -->
  89. <submitScoreVue ref="subScoreRef" @confirm="handleScoreConfirm" @close="handleScoreClose"></submitScoreVue>
  90. <!-- 切屏确认弹窗 -->
  91. <qiepingDlVue ref="qiepingDlRef" :content="messageContent" title="注意" okBtn="知道了"></qiepingDlVue>
  92. </view>
  93. </template>
  94. <script setup>
  95. import {
  96. ref,
  97. reactive,
  98. computed,
  99. watch,
  100. nextTick
  101. } from "vue";
  102. import zhuapaiVue from "@/components/zhuapaiConfirm/zhuapai.vue";
  103. import qiepingVue from "@/components/zhuapaiConfirm/qieping.vue";
  104. import zhuapaiConfirm from "@/components/zhuapaiConfirm/index.vue";
  105. import answerQueren from "@/components/zhuapaiConfirm/answerQueren.vue";
  106. import submitScoreVue from "@/components/zhuapaiConfirm/submitScore.vue";
  107. import {
  108. onLoad
  109. } from "@dcloudio/uni-app";
  110. import * as ksApi from "@/api/kaoshi.js"
  111. import danxuan from "@/components/questions/danxuan.vue";
  112. import duoxuan from "@/components/questions/duoxuan.vue";
  113. import tiankong from "@/components/questions/tiankong.vue";
  114. import panduan from "@/components/questions/panduan.vue";
  115. import {
  116. useQuestionTools
  117. } from "@/components/questions/useQuestionTools.js";
  118. import {
  119. useKaoShiCache
  120. } from "./examTools"
  121. import qiepingDlVue from "@/components/dialog/qiepingDl.vue";
  122. const {
  123. checkDanxuanReply,
  124. checkDuoxuanReply,
  125. checkPanduanReply,
  126. checkTiankongReply,
  127. getLetterByIndex
  128. } = useQuestionTools();
  129. const {
  130. saveCacheKs,
  131. getCacheKs,
  132. removeCacheKs
  133. } = useKaoShiCache();
  134. onLoad((option) => {
  135. data.ksId = option.ksId;
  136. data.zhuapai = option.zhuapai;
  137. data.from = option.from;
  138. if (data.zhuapai && data.zhuapai != 0) {
  139. // 考试前确认摄像头
  140. nextTick(() => {
  141. initBeforKaoshi();
  142. })
  143. } else {
  144. initKaoshi();
  145. }
  146. })
  147. const popupRef = ref(null)
  148. const zhuapaiRef = ref(null)
  149. const qiepingRef = ref(null)
  150. const zhuapaiConfirmRef = ref(null)
  151. const answerQrRef = ref(null);
  152. const startCountDown = ref(false);
  153. const subScoreRef = ref(null);
  154. const messageContent = ref('');
  155. const qiepingDlRef = ref(null);
  156. const timer1 = ref(null);
  157. const data = reactive({
  158. ksId: null,
  159. operId: null,
  160. ksName: '',
  161. stTotal: 0,
  162. stScore: 0,
  163. biaoji: {},
  164. endSecond: 0,
  165. pageSize: 0,
  166. toggleScreenFlag: 0,
  167. toggleScreenSecond: 0,
  168. zhuapai: 0,
  169. duanluo: [],
  170. StListForSearch: [],
  171. from: ''
  172. })
  173. const markDB = ref([]);
  174. const questionData = ref([]);
  175. const progress = reactive({
  176. dlIndex: 0,
  177. dtIndex: 0
  178. })
  179. const dlName = computed(() => {
  180. if (data.StListForSearch && activeSt.value) {
  181. return data.StListForSearch[activeSt.value.onlyNum - 1].paragraphName
  182. } else {
  183. return ''
  184. }
  185. })
  186. watch(() => data.duanluo, (newVal) => {
  187. // 计算已答试题数量
  188. }, {
  189. deep: true
  190. })
  191. const activeSt = computed(() => {
  192. if (questionData.value.length) {
  193. return questionData.value.length && questionData.value[progress.dlIndex].qas[progress.dtIndex];
  194. } else {
  195. return null
  196. }
  197. })
  198. const isFistStId = computed(() => {
  199. if (data.StListForSearch.length) {
  200. return data.StListForSearch[0].stId == activeSt.value.stId
  201. } else {
  202. return false
  203. }
  204. });
  205. const isLastStId = computed(() => {
  206. if (data.StListForSearch.length) {
  207. return data.StListForSearch[data.StListForSearch.length - 1].stId == activeSt.value.stId
  208. } else {
  209. return false
  210. }
  211. });
  212. function handleScoreClose() {
  213. handleBack()
  214. }
  215. // 考试得分相关 start
  216. function handleScoreConfirm() {
  217. uni.redirectTo({
  218. url: '/pages/client/Chengji/list'
  219. })
  220. }
  221. // 考试得分相关 end
  222. // 保存相关
  223. function handleSave(showToast) {
  224. if (timer1.value) {
  225. uni.showToast({
  226. title: '请勿连续保存',
  227. icon: 'none'
  228. })
  229. return
  230. }
  231. timer1.value = setTimeout(() => {
  232. clearTimeout(timer1.value);
  233. },10*1000);
  234. console.log(questionData.value)
  235. const result = []
  236. const option = {
  237. force: false,
  238. operId: data.operId,
  239. replyList: []
  240. }
  241. questionData.value.forEach(dl => {
  242. dl.qas.forEach(st => {
  243. const opt = {
  244. stId: st.stId,
  245. reply: st.reply,
  246. }
  247. result.push(opt)
  248. option.replyList.push(opt)
  249. })
  250. })
  251. // 保存试题答案
  252. saveCacheKs(data.operId, {replyList:result, position: {dlIndex:progress.dlIndex, dtIndex: progress.dtIndex}})
  253. // 保存答题进度
  254. ksApi.getClientKsSave(option).then(res => {
  255. if (res.data && showToast) {
  256. uni.showToast({
  257. title: '保存成功',
  258. })
  259. }
  260. })
  261. }
  262. // 交卷相关功能 start
  263. function checkJiaojuan() {
  264. const result = []
  265. let count = 0;
  266. let total = 0;
  267. questionData.value.forEach(dl => {
  268. dl.qas.forEach(st => {
  269. const opt = {
  270. stId: st.stId,
  271. reply: st.reply,
  272. stTypeId: st.stTypeId
  273. }
  274. result.push(opt)
  275. })
  276. })
  277. result.forEach(item => {
  278. total++;
  279. if (item.stTypeId == 1 && !checkDanxuanReply(item)) {
  280. count++;
  281. }
  282. if (item.stTypeId == 2 && !checkDuoxuanReply(item)) {
  283. count++;
  284. }
  285. if (item.stTypeId == 3 && !checkPanduanReply(item)) {
  286. count++;
  287. }
  288. if (item.stTypeId == 4 && !checkTiankongReply(item)) {
  289. count++;
  290. }
  291. })
  292. return {
  293. total,
  294. count,
  295. }
  296. }
  297. function handleJiaojuan() {
  298. const result = checkJiaojuan()
  299. console.log(result)
  300. if (result.count) {
  301. // 提示
  302. answerQrRef.value.showDialog({
  303. answercartsCount: result.total - result.count,
  304. answercartsTotal: result.total,
  305. })
  306. } else {
  307. handleSubmit()
  308. }
  309. }
  310. function handleQuerenConfirm() {
  311. handleSubmit()
  312. }
  313. function handleSubmit(force = false) {
  314. const result = {
  315. force,
  316. operId: data.operId,
  317. replyList: []
  318. };
  319. console.log(questionData.value)
  320. uni.showLoading({
  321. title: '加载中'
  322. })
  323. questionData.value.forEach(dl => {
  324. dl.qas.forEach(st => {
  325. const opt = {
  326. stId: st.stId,
  327. reply: st.reply
  328. }
  329. result.replyList.push(opt)
  330. })
  331. })
  332. ksApi.getClientKsSubmit(result).then(res => {
  333. if (res.code == 0) {
  334. subScoreRef.value.showDialog(res.data);
  335. // 清空缓存
  336. removeCacheKs(data.operId);
  337. }
  338. }).finally(err => {
  339. uni.hideLoading()
  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. uni.redirectTo({
  369. url: '/pages/client/Kaoshi/list'
  370. })
  371. }
  372. // 摄像头抓拍相关功能 end
  373. // 摄像头确认相关功能 start
  374. function zpConfirmSuccess() {
  375. initKaoshi();
  376. }
  377. function zpConfirmError() {
  378. // uni.showToast({
  379. // title: '摄像头唤起异常',
  380. // icon: 'none'
  381. // })
  382. uni.redirectTo({
  383. url: '/pages/client/Kaoshi/list'
  384. })
  385. }
  386. function zpConfirmCancel() {
  387. uni.redirectTo({
  388. url: '/pages/client/Kaoshi/list'
  389. })
  390. }
  391. // 摄像头确认相关功能 end
  392. function getQaClass(qa) {
  393. if (qa.marked && qa.marked === true) {
  394. return 'paragraph-qa-block-mark';
  395. } else {
  396. if (qa.stTypeId == 1) {
  397. if (checkDanxuanReply(qa)) {
  398. return 'paragraph-qa-block-done';
  399. } else {
  400. return 'paragraph-qa-block-init';
  401. }
  402. } else if (qa.stTypeId == 2) {
  403. if (checkDuoxuanReply(qa)) {
  404. return 'paragraph-qa-block-done';
  405. } else {
  406. return 'paragraph-qa-block-init';
  407. }
  408. } else if (qa.stTypeId == 3) {
  409. if (checkPanduanReply(qa)) {
  410. return 'paragraph-qa-block-done';
  411. } else {
  412. return 'paragraph-qa-block-init';
  413. }
  414. } else if (qa.stTypeId == 4) {
  415. if (checkTiankongReply(qa)) {
  416. return 'paragraph-qa-block-done';
  417. } else {
  418. return 'paragraph-qa-block-init';
  419. }
  420. }
  421. }
  422. }
  423. function skipQuestion(dlIndex, dtIndex) {
  424. progress.dlIndex = dlIndex;
  425. progress.dtIndex = dtIndex;
  426. handlePopupBack()
  427. }
  428. function answerCardItemClick(qa) {
  429. const actQa = data.StListForSearch.find(item => item.stId == qa.stId);
  430. skipQuestion(actQa.dlIndex, actQa.dtIndex)
  431. }
  432. function handleBack() {
  433. const pages = getCurrentPages();
  434. if (pages.length>1) {
  435. uni.navigateBack()
  436. } else {
  437. /* if (data.from == 'shouye') {
  438. uni.redirectTo({
  439. url: "/pages/client/ShouYe/shouye"
  440. })
  441. } else if (data.from == 'kaoshiList') {
  442. uni.redirectTo({
  443. url: "/pages/client/Kaoshi/list"
  444. })
  445. } else {
  446. uni.redirectTo({
  447. url: "/pages/client/ShouYe/shouye"
  448. })
  449. } */
  450. history.back();
  451. }
  452. }
  453. function showAnswerCard() {
  454. popupRef.value.open('bottom')
  455. }
  456. function handlePopupBack() {
  457. popupRef.value.close()
  458. }
  459. function handlePrev() {
  460. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  461. const index = qa.onlyNum - 1;
  462. if (index > 0) {
  463. const result = data.StListForSearch[index - 1];
  464. progress.dlIndex = result.dlIndex;
  465. progress.dtIndex = result.dtIndex
  466. }
  467. }
  468. function handleNext() {
  469. const qa = data.StListForSearch.find(item => item.stId == activeSt.value.stId);
  470. const index = qa.onlyNum - 1;
  471. if (index < data.StListForSearch.length) {
  472. const result = data.StListForSearch[index + 1];
  473. progress.dlIndex = result.dlIndex;
  474. progress.dtIndex = result.dtIndex
  475. }
  476. }
  477. function formatDuanluoList(dlData) {
  478. let uIndex = 0; // 试题onlyNum
  479. let iDuanluo = 0; // 段落onlyNum
  480. let result = [];
  481. for (const duanluo of data.duanluo) {
  482. let paragraph = {
  483. qas: [],
  484. };
  485. paragraph.name = duanluo.name;
  486. let iQa = 0; // 当前试题序号
  487. let order = 0; // 当前题型中第几题
  488. for (const iDanxuan of duanluo.danxuan) {
  489. iDanxuan.type = 'danxuan';
  490. iDanxuan.marked = data.biaoji[iDanxuan.stId] ? true: false;
  491. iDanxuan.onlyNum = uIndex + 1;
  492. iDanxuan.order = order;
  493. iDanxuan.iQa = iQa;
  494. paragraph.qas.push(iDanxuan);
  495. uIndex++;
  496. order++;
  497. iQa++;
  498. data.StListForSearch.push({
  499. stId: iDanxuan.stId,
  500. paragraphName: paragraph.name,
  501. dlIndex: iDuanluo,
  502. dtIndex: iDanxuan.iQa,
  503. onlyNum: iDanxuan.onlyNum
  504. })
  505. }
  506. order = 0;
  507. for (const iDuoxuan of duanluo.duoxuan) {
  508. iDuoxuan.type = 'duoxuan';
  509. iDuoxuan.marked = data.biaoji[iDuoxuan.stId] ? true: false;
  510. iDuoxuan.onlyNum = uIndex + 1;
  511. iDuoxuan.order = order;
  512. paragraph.qas.push(iDuoxuan);
  513. iDuoxuan.iQa = iQa;
  514. iDuoxuan.reply = [];
  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. onlyNum: iDuoxuan.onlyNum
  524. })
  525. }
  526. order = 0;
  527. for (const iPanduan of duanluo.panduan) {
  528. iPanduan.type = 'panduan';
  529. iPanduan.marked = data.biaoji[iPanduan.stId] ? true: 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. onlyNum: iPanduan.onlyNum
  543. })
  544. }
  545. order = 0;
  546. for (const iTiankong of duanluo.tiankong) {
  547. iTiankong.type = 'tiankong';
  548. iTiankong.marked = data.biaoji[iTiankong.stId] ? true: false;
  549. iTiankong.onlyNum = uIndex + 1;
  550. iTiankong.order = order;
  551. paragraph.qas.push(iTiankong);
  552. iTiankong.iQa = iQa;
  553. iTiankong.reply = new Array(iTiankong.count).fill('');;
  554. uIndex++;
  555. order++;
  556. iQa++;
  557. data.StListForSearch.push({
  558. stId: iTiankong.stId,
  559. paragraphName: paragraph.name,
  560. dlIndex: iDuanluo,
  561. dtIndex: iTiankong.iQa,
  562. onlyNum: iTiankong.onlyNum
  563. })
  564. }
  565. iDuanluo++;
  566. questionData.value.push(paragraph)
  567. console.log('1', questionData.value)
  568. console.log('2', data.StListForSearch)
  569. }
  570. }
  571. function handleBiaoji() {
  572. activeSt.value.marked = !activeSt.value.marked;
  573. data.biaoji[activeSt.value.stId] = activeSt.value.marked
  574. ksApi.getClientKaoshiBiaoji({
  575. operId: data.operId,
  576. biaoji: JSON.stringify(data.biaoji)
  577. }).catch(err => {
  578. uni.redirectTo({
  579. url: '/pages/client/Kaoshi/list'
  580. })
  581. })
  582. }
  583. function formatKaoshiData() {
  584. const historyData = getCacheKs(data.operId);
  585. if (historyData) {
  586. const { replyList ,position } = historyData;
  587. if (replyList) {
  588. questionData.value.forEach(dl => {
  589. dl.qas.forEach(st => {
  590. st.reply = replyList.find(item => item.stId == st.stId).reply
  591. })
  592. })
  593. }
  594. if (position) {
  595. progress.dlIndex = position.dlIndex;
  596. progress.dtIndex = position.dtIndex;
  597. }
  598. }
  599. }
  600. // 摄像头确认初始化
  601. function initBeforKaoshi() {
  602. console.log(zhuapaiConfirmRef.value)
  603. zhuapaiConfirmRef.value.showDialog()
  604. }
  605. function initKaoshi() {
  606. ksApi.getClientKsStart({
  607. ksId: data.ksId
  608. }).then(res => {
  609. const {
  610. ksId,
  611. operId,
  612. ksName,
  613. stTotal,
  614. stScore,
  615. biaoji,
  616. endSecond,
  617. pageSize,
  618. toggleScreenFlag,
  619. toggleScreenSecond,
  620. zhuapai,
  621. duanluoList
  622. } = res.data;
  623. data.ksId = ksId;
  624. data.operId = operId;
  625. data.ksName = ksName;
  626. data.stTotal = stTotal;
  627. data.stScore = stScore;
  628. data.biaoji = biaoji ? JSON.parse(biaoji): {};
  629. data.endSecond = endSecond;
  630. data.pageSize = pageSize;
  631. data.toggleScreenFlag = toggleScreenFlag;
  632. data.toggleScreenSecond = toggleScreenSecond;
  633. data.zhuapai = zhuapai;
  634. data.duanluo = duanluoList;
  635. formatDuanluoList(data.duanluo);
  636. // 设置缓存
  637. formatKaoshiData();
  638. // 设置抓拍监听
  639. if (data.zhuapai && data.zhuapai > 0) {
  640. zhuapaiRef.value.init({
  641. zhuapai: zhuapai,
  642. operId: operId
  643. });
  644. }
  645. // 设置切屏监听
  646. qiepingRef.value.init({
  647. zhuapaiFlag: true,
  648. toggleScreenFlag: toggleScreenFlag,
  649. toggleScreenSecond: toggleScreenSecond,
  650. ksId: data.ksId
  651. })
  652. uni.setNavigationBarTitle({
  653. title: data.ksName
  654. });
  655. startCountDown.value = true;
  656. })
  657. }
  658. </script>