exam.vue 17 KB

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