exam.vue 17 KB

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