exam.vue 17 KB

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