test.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435
  1. <template>
  2. <div class="test">
  3. <Header @confirmExit="confirmExit"></Header>
  4. <div class="main">
  5. <div class="main-left">
  6. <div class="main-left-top">
  7. <div class="top-left" @click="getChooseStudent">
  8. <div class="top-left-center">
  9. <div class="pic" :class="{ 'pic2': faceCheckStu.student_id }" v-if="faceCheckStu.student_id"> <img
  10. :src="faceCheckStu.face_pic || faceCheckStu.logo_url" /></div>
  11. <div class="pic" v-else>
  12. <img src="@/assets/images/test/profilePicture.png" />
  13. </div>
  14. <div class="name" :class="{ 'name2': faceCheckStu.student_id }">
  15. {{ faceCheckStu.student_id ? faceCheckStu.name : "虚位以待" }}
  16. </div>
  17. </div>
  18. </div>
  19. <div class="top-right">
  20. <Transition :enter-active-class="proxy?.animate.dialog.enter"
  21. :leave-active-class="proxy?.animate.dialog.leave">
  22. <div class="time"
  23. v-show="needStart && [42].includes(examState) && !['basketballv1', 'footballv1'].includes(parameter.project)">
  24. {{
  25. time.countdownNum
  26. }}</div>
  27. </Transition>
  28. <div class="tips" v-if="examState == 41">
  29. <img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
  30. <img v-if="!parameter.gesture" src="@/assets/images/test/ready2.png" />
  31. </div>
  32. <div class="complete" :class="{ 'complete2': needStart && [42].includes(examState) }"
  33. v-if="faceCheckStu.student_id && time.ready <= 0 && examState != 43 && examState != 41">
  34. <div class="scoreBox" v-if="['basketballv1', 'footballv1'].includes(parameter.project)">
  35. <div class="score">{{ currentResultObj.count || 0 }}</div>
  36. </div>
  37. <div class="scoreBox" v-else>
  38. <div class="score">{{ currentResultObj.count || 0 }}</div>
  39. <div class="unit" v-if="currentResultObj.count && !needStart">{{ unit }}</div>
  40. </div>
  41. <div class="fractionViolation">
  42. <div class="fraction">
  43. <div class="lable">得分:</div>
  44. <div class="value">{{ currentResultObj.score || "" }}</div>
  45. </div>
  46. <div class="violation">
  47. <div class="lable">{{ ['jumprope'].includes(parameter.project) ? '中断' : '犯规' }}</div>
  48. <div class="value">{{ currentResultObj.back_num || 0 }}</div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="foulBox" v-if="examState == 42 && backReason.length">
  53. <Transition :enter-active-class="proxy?.animate.mask.enter" :leave-active-class="proxy?.animate.mask.leave">
  54. <div class="foul" v-show="backReasonStr ? true : false">
  55. <div class="lable">!</div>
  56. <div class="value">{{ backReasonStr }}</div>
  57. </div>
  58. </Transition>
  59. </div>
  60. <div v-show="examState == 43 && time.ready">
  61. <div class="readyBox">
  62. <div class="value" :class="{ 'transparent': time.ready > 5 }">{{ time.ready }}</div>
  63. <div class="lable">倒计时</div>
  64. </div>
  65. </div>
  66. <div v-show="examState == 43 && !time.ready && readyState">
  67. <div class="readyBoxBefore">
  68. <div class="item" v-if="parameter.handcontroller">
  69. <div><img src="@/assets/images/test/jushou.png" /></div>
  70. <div class="lable">
  71. <div>请举左手开始</div>
  72. </div>
  73. </div>
  74. <div class="item" v-else>
  75. <div> <img src="@/assets/images/test/bujushou.png" /></div>
  76. <div class="lable">
  77. <div>请点击开始</div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="btn" @click="getReady" v-if="needStart && examState == 43 && !time.ready && readyState">开 始
  83. </div>
  84. <!-- <div v-if="needStart"> -->
  85. <!-- <div class="btn" @click="getOpenOneTestAndStartFace" v-if="examState < 41">开始识别</div> -->
  86. <!-- <div class="btn" @click="getStopFace" v-if="examState == 41 && !parameter.gesture">停止人脸识别</div> -->
  87. <!-- <div class="btn" @click="getStartOneTest" v-if="examState == 43">开始测试</div> -->
  88. <!-- <div @click="getRetestFace" v-if="examState == 43 || examState == 42">重新识别</div> -->
  89. <!-- </div> -->
  90. <!-- <div>当前状态:({{ examState == 3 ? "初始化完成" : examState == 40 ? "创建测试" : examState == 41 ? "正在人脸识别":examState == 43 ? "停止人脸识别" : examState == 42 ? "正在测试" : "请初始化" }})</div> -->
  91. <!-- <div @click="getAgain" v-if="examState == 42 || showTestAgain">再测一次</div> -->
  92. </div>
  93. <i></i>
  94. </div>
  95. <div class="main-left-bottom">
  96. <div class="bottom-left">
  97. <div class="tips"><img src="/src/assets/images/test/tips.png" /></div>
  98. <div class="pic"><img :src="'static/images/tips/' + parameter.project + '.png'" /></div>
  99. </div>
  100. <div class="bottom-right" v-html="dic.projectNote[parameter.project]">
  101. </div>
  102. </div>
  103. </div>
  104. <div class="main-right">
  105. <ReportList ref="reportListRef" :parameter="parameter" :showQRCode="true" />
  106. </div>
  107. </div>
  108. <FaceWindow ref="faceWindowRef" :faceCheckStu="faceCheckStu" :gesture="parameter.gesture" />
  109. <ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
  110. </div>
  111. </template>
  112. <script setup name="TrainTest" lang="ts">
  113. import { useWs } from '@/utils/trainWs';
  114. // import { initWs, examEnds, openOneTest, startFace, stopFace, faceConfirmOnly, startOneTest, finishOneTest, closeOneTest, suspendFaceRecognitionChannels, resumeFaceRecognitionChannels } from '@/utils/ws'
  115. import { initSpeech, speckText, playMusic, controlMusic, speckCancel, chineseNumber } from '@/utils/speech'
  116. import { useWebSocket } from '@/utils/handWs';
  117. import dayjs from 'dayjs'
  118. import dataDictionary from "@/utils/dataDictionary"
  119. const { handWs, startDevice, startHand, stateHand } = useWebSocket();
  120. const { initWs, examEnds, openOneTest, startFace, stopFace, faceConfirmOnly, startOneTest, finishOneTest, closeOneTest, suspendFaceRecognitionChannels, resumeFaceRecognitionChannels } = useWs();
  121. const { proxy } = getCurrentInstance() as any;
  122. const router = useRouter();
  123. const route = useRoute();
  124. const faceWindowRef = ref();
  125. const chooseStudentRef = ref();
  126. const reportListRef = ref();
  127. const myInfo: any = localStorage.getItem("userInfo");
  128. const dic: any = dataDictionary;
  129. const data = reactive<any>({
  130. timerManager: {},//计时器管理
  131. parameter: {},//参数
  132. time: {
  133. testTime: 60,//时长
  134. countdownNum: 0,//计时
  135. ready: 0,//预备
  136. exit: 0,//退出倒计时
  137. },
  138. userInfo: {},//用户信息
  139. examState: 0,//当前状态
  140. resultId: null,//测试ID
  141. currentResultObj: {},//成绩
  142. faceCheckStu: {},//人脸信息
  143. unit: "",//单位
  144. backReason: [],//犯规项
  145. backReasonStr: "",//犯规提示
  146. needStart: false,//是否需要按钮
  147. showTestAgain: false,//再测一次按钮
  148. readyState: true,//倒计时按钮状态
  149. exitStatus: 0,//退出响应次数
  150. sid: null,//WS的id
  151. device_info: {},//设备信息
  152. });
  153. const { timerManager, parameter, time, userInfo, examState, resultId, faceCheckStu, currentResultObj, unit, backReason, backReasonStr, needStart, showTestAgain, readyState, exitStatus, sid, device_info } = toRefs(data);
  154. /**
  155. * 接收消息
  156. */
  157. const getMessage = (e: any) => {
  158. //console.log("WS响应:", e)
  159. //获取sid
  160. if (e.cmd === 'mySid') {
  161. console.log("e.data.sid", e.data.sid)
  162. sid.value = e.data.sid;
  163. }
  164. //实时状态
  165. if (e.cmd === 'exam_status') {
  166. examState.value = e.data;
  167. }
  168. //工作站状态
  169. if (e.cmd === 'init_result') {
  170. }
  171. //测试违规
  172. if (e.cmd === 'warning_result') {
  173. console.log("eeeeeeeeeee", e)
  174. if ((e.status + "")[0] === "2") {
  175. proxy?.$modal.msgError(e.data.message);
  176. speckText(e.data.message);
  177. }
  178. }
  179. //后端播报语音
  180. if (e.cmd === 'return_audio_msg') {
  181. if (e.data.message) {
  182. proxy?.$modal.msgError(e.data.message);
  183. speckText(e.data.message);
  184. }
  185. }
  186. //错误提示
  187. if (e.cmd === 'info_result') {
  188. proxy?.$modal.msgError(e.data.message);
  189. }
  190. //错误提示
  191. if (e.cmd === 'error_result') {
  192. proxy?.$modal.msgError(e.data.message);
  193. }
  194. //测试中违规提示
  195. if (e.cmd === 'warning_notify') {
  196. let message = e.data?.message;
  197. if (message) {
  198. proxy?.$modal.msgError(message);
  199. speckText(message);
  200. }
  201. if (message == "工作站已断开!") {
  202. getExit();
  203. }
  204. }
  205. //断线状态
  206. if (e.cmd === 'disconnect_request') {
  207. let message = e.data.message;
  208. if (message) {
  209. proxy?.$modal.msgError(`${message}`);
  210. speckText(message);
  211. }
  212. getExit();
  213. }
  214. //状态变更
  215. if (e.cmd === 'set_exam_state') {
  216. examState.value = e.data;
  217. if (e.data === 3) {
  218. initProject();
  219. }
  220. if (e.data === 40) {
  221. cleanData();
  222. }
  223. if (e.data == 41) {
  224. getFaceWindow(true);
  225. }
  226. if (e.data == 43) {
  227. }
  228. if (e.data == 42) {
  229. getClearTimer("readyTimer");
  230. time.value.ready = 0;
  231. }
  232. }
  233. //新建测试后返回信息,获取result_id
  234. if (e.cmd === 'open_one_test_ack') {
  235. resultId.value = e.data.result_id;
  236. }
  237. //人脸识别状态
  238. if (e.cmd === 'face_check_result') {
  239. let myData = e.data[0] || e.data;
  240. returnStudent(myData);
  241. }
  242. //测试结束结果
  243. if (e.cmd === 'oneresult') {
  244. if (e.data.length) {
  245. let data = e.data[0];
  246. getAchievement(data)
  247. }
  248. }
  249. //结果生成完成(视频图片)
  250. if (e.cmd === 'static_urls_finished') {
  251. }
  252. //选择学生或测试结束后返回的数据
  253. if (e.cmd === 'result_info') {
  254. }
  255. };
  256. /**
  257. * 开始识别
  258. */
  259. const getOpenOneTestAndStartFace = async () => {
  260. if (examState.value > 3) {
  261. await closeOneTest();
  262. }
  263. await openOneTest();
  264. await startFace();
  265. };
  266. /**
  267. * 停止人脸识别
  268. */
  269. const getStopFace = async () => {
  270. // 旧版识别成功直接43了这里先屏蔽
  271. // if (examState.value != 41) {
  272. // return false;
  273. // }
  274. getClearTimer("face");
  275. if (needStart.value) {
  276. let txt = parameter.value.handcontroller ? ",请举左手开始测试" : ",请准备";
  277. speckText(faceCheckStu.value.name + txt);
  278. }
  279. if (examState.value == 41) {
  280. await stopFace();
  281. }
  282. if (faceCheckStu.value.student_id) {
  283. getFaceConfirmOnly();
  284. }
  285. };
  286. /**
  287. * 确定人脸信息
  288. */
  289. const getFaceConfirmOnly = (data?: any) => {
  290. if (data) {
  291. faceCheckStu.value = data;
  292. }
  293. faceConfirmOnly({
  294. result_id: resultId.value,
  295. student_id: faceCheckStu.value.student_id,
  296. gender: faceCheckStu.value.gender
  297. }, () => {
  298. faceWindowRef.value?.close();
  299. //不需要按钮的自动进入下一步
  300. if (needStart.value == false) {
  301. getStartOneTest();
  302. }
  303. });
  304. };
  305. /**
  306. * 重新识别
  307. */
  308. const getRetestFace = () => {
  309. proxy?.$modal.confirm("确定重新识别吗?").then(() => {
  310. if (needStart.value == false) {
  311. //自动流程项目重新识别直接返回3
  312. closeOneTest();
  313. } else {
  314. //手动流程项目重新识别43返回41,42返回3
  315. if (examState.value == 43) {
  316. cleanData();
  317. startFace();
  318. } else {
  319. closeOneTest();
  320. }
  321. }
  322. }).finally(() => {
  323. });
  324. };
  325. /**
  326. * 开始测试
  327. */
  328. const getStartOneTest = () => {
  329. if (examState.value != 43 || !faceCheckStu.value.student_id) {
  330. return false;
  331. }
  332. if (!faceCheckStu.value.student_id) {
  333. proxy?.$modal.msgWarning("请选择人员!");
  334. return false;
  335. }
  336. startOneTest(data == null, () => {
  337. //显示再测一次按钮
  338. showTestAgain.value = true;
  339. //停止播报;
  340. speckCancel();
  341. //计时项目才开
  342. if (needStart.value == true) {
  343. speckText("哨声");
  344. if (parameter.value.music) {
  345. playMusic(parameter.value.music);
  346. }
  347. //时间为0的为正计时,大于0的为倒计时
  348. if (time.value.testTime == 0) {
  349. getCounting("+");
  350. } else {
  351. getCounting("-");
  352. }
  353. } else {
  354. speckText(faceCheckStu.value.name + ",请开始测试");
  355. }
  356. })
  357. };
  358. /**
  359. * 再测一次
  360. */
  361. const getAgain = async () => {
  362. //预存测试人员
  363. let student = JSON.parse(JSON.stringify(faceCheckStu.value));
  364. //测试中
  365. if (examState.value == 42) {
  366. await finishOneTest();
  367. }
  368. //其他状态
  369. if (examState.value > 3) {
  370. await closeOneTest();
  371. }
  372. //重新走一次流程
  373. await openOneTest();
  374. await startFace();
  375. await stopFace();
  376. getFaceConfirmOnly(student);
  377. };
  378. /**
  379. * 确认退出
  380. */
  381. const confirmExit = () => {
  382. let handcontroller_id = parameter.value.handcontroller;
  383. proxy?.$modal.confirm(handcontroller_id ? `请保持两秒确认退出` : `确定退出吗?`).then(() => {
  384. getExit();
  385. }).finally(() => {
  386. });
  387. };
  388. /**
  389. * 退出
  390. */
  391. const getExit = () => {
  392. getClearTimer();//清除计时器
  393. examEnds();//通知工作站关闭
  394. speckCancel();//停止播报
  395. window.onbeforeunload = null;//移除事件处理器
  396. let handcontroller_id = parameter.value.handcontroller;
  397. if (handcontroller_id) {
  398. router.push({ path: '/gesture' });//跳转
  399. } else {
  400. router.push({ path: '/' });//跳转
  401. }
  402. };
  403. /**
  404. * 清空定时任务
  405. */
  406. const getClearTimer = (data?: any) => {
  407. if (data) {
  408. //清除指定
  409. clearInterval(timerManager.value[data])
  410. timerManager.value[data] = null;
  411. } else {
  412. //清除全部
  413. for (let key in timerManager.value) {
  414. if (timerManager.value.hasOwnProperty(key)) {
  415. clearInterval(timerManager.value[key])
  416. timerManager.value[key] = null;
  417. }
  418. }
  419. }
  420. };
  421. /**
  422. * 选择学生
  423. */
  424. const getChooseStudent = () => {
  425. if (examState.value < 41) {
  426. proxy?.$modal.msgWarning("请等待");
  427. }
  428. if (examState.value == 41) {
  429. chooseStudentRef.value.open();
  430. //然后定时自动关闭
  431. setTimeout(() => {
  432. faceWindowRef.value.close();
  433. }, 3000)
  434. }
  435. if (examState.value == 43) {
  436. getRetestFace();
  437. }
  438. };
  439. /**
  440. * 返回被选学生
  441. */
  442. const returnStudent = (data: any) => {
  443. speckCancel();
  444. chooseStudentRef.value.close();
  445. faceCheckStu.value = data;
  446. faceWindowRef.value.open();
  447. //然后定时自动关闭
  448. setTimeout(() => {
  449. faceWindowRef.value.close();
  450. }, 1000)
  451. getStopFace();
  452. };
  453. /**
  454. * 清除历史记录
  455. */
  456. const cleanData = () => {
  457. time.value.countdownNum = time.value.testTime;
  458. showTestAgain.value = false;
  459. faceCheckStu.value = {};
  460. currentResultObj.value = {};
  461. backReason.value = [];
  462. };
  463. /**
  464. * 自动初始化项目
  465. */
  466. const initProject = () => {
  467. //停止计时
  468. getClearTimer("countdownTimer");
  469. //恢复倒计时按钮状态
  470. readyState.value = true;
  471. //自动项目定时进入下一步
  472. let time = 0;
  473. //控制新建测试的时间,第一次快,之后就慢
  474. if (!faceCheckStu.value.student_id) {
  475. time = 1000;
  476. } else {
  477. time = 6000;
  478. }
  479. setTimeout(() => {
  480. //再加一个判断以免和再测一次冲突
  481. if (examState.value == 3) {
  482. getOpenOneTestAndStartFace();
  483. }
  484. }, time)
  485. };
  486. /**
  487. * 时间转换
  488. */
  489. // const countdownNumFormat = computed(() => {
  490. // return time.value.countdownNum;
  491. // //return proxy?.$utils.timeFormat(time.value.countdownNum);
  492. // });
  493. /**
  494. * 倒计时
  495. */
  496. const getCounting = (type: string) => {
  497. timerManager.value.countdownTimer = setInterval(() => {
  498. //正计时
  499. if (type == "+") {
  500. time.value.countdownNum++;
  501. }
  502. //倒计时
  503. if (type == "-") {
  504. if (time.value.countdownNum <= 0) {
  505. getClearTimer("countdownTimer");
  506. } else {
  507. time.value.countdownNum--;
  508. }
  509. }
  510. }, 1000);
  511. };
  512. /**
  513. * 人脸窗口
  514. */
  515. const getFaceWindow = (data: boolean, num: number = 0) => {
  516. let total = num + 1;//叠加三次后不再播放
  517. let txt = parameter.value.gesture === true ? "请举右手看摄像头人脸识别" : "请看摄像头进行人脸识别";
  518. speckText(txt);
  519. //data=true为弹出框,data=false为不要弹出框
  520. if (data) {
  521. faceWindowRef.value.open();
  522. //然后定时自动关闭
  523. setTimeout(() => {
  524. if (examState.value == 41 && faceWindowRef.value?.faceState == true) {
  525. faceWindowRef.value.close();
  526. }
  527. }, 3000)
  528. }
  529. //定时检查如果一直停留在人脸识别就提示
  530. let timeout = 16000;
  531. timerManager.value.face = setInterval(() => {
  532. getClearTimer("face");
  533. if (examState.value == 41 && total < 3) {
  534. getFaceWindow(false, total);
  535. }
  536. }, timeout)
  537. };
  538. /**
  539. * 成绩
  540. */
  541. const getAchievement = (data: any) => {
  542. //console.log("成绩", data);
  543. let type = parameter.value.project;
  544. let count =
  545. data?.[dic.typeResultKey[type]]?.toFixed(0);
  546. if (["trijump", "solidball", "shotput", "longjump"].includes(type)) {
  547. count =
  548. data?.[dic.typeResultKey[type]]?.toFixed(2);
  549. count = Math.round(count) / 100;
  550. }
  551. if (["basketballv1", "footballv1"].includes(type)) {
  552. count = proxy?.$utils.runTime(data?.[dic.typeResultKey[type]], true, 1)
  553. }
  554. data.count = count || "0";
  555. data.score = data.score || "0";
  556. currentResultObj.value = data;
  557. //违规处理
  558. let arr = backReason.value;
  559. if (["situp", "pullup", "sidepullup", "jumprope", "jumpingjack", "jump", "longjump", "verticaljump"]
  560. .indexOf(type) > -1) {
  561. if (["pullup", "situp", "jumprope", "jumpingjack"].indexOf(type) > -1) {
  562. currentResultObj.value.back_num = data?.all_failed_num;
  563. }
  564. if (type === "sidepullup") {
  565. currentResultObj.value.back_num = data?.["0"]?.hip_failed_num;
  566. }
  567. if (['jump', 'longjump', 'verticaljump'].includes(type)) {
  568. if (data?.startline_check == 0) {
  569. let txt = "踩线违规";
  570. speckText(txt);
  571. arr.push(txt)
  572. }
  573. if (data?.singleleg_jump_check == 0) {
  574. let txt = "单脚跳违规";
  575. speckText(txt);
  576. arr.push(txt)
  577. }
  578. if (data?.outside_check == 0) {
  579. let txt = "跳出测试区违规";
  580. speckText(txt);
  581. arr.push(txt)
  582. }
  583. }
  584. if (
  585. data?.elbow_check == false
  586. ) {
  587. let txt = "肘部违规";
  588. speckText(txt);
  589. arr.push(txt);
  590. }
  591. if (
  592. ["situp", "pullup"].indexOf(type) > -1 &&
  593. data?.knee_check === false
  594. ) {
  595. let txt = "腿部违规";
  596. speckText(txt);
  597. if (!arr.includes(txt)) { }
  598. arr.push(txt);
  599. }
  600. if (["situp"].indexOf(type) > -1 && data?.hand_check === false) {
  601. let txt = "手部违规";
  602. speckText(txt);
  603. if (!arr.includes(txt)) { }
  604. arr.push(txt);
  605. }
  606. if (
  607. ["pullup"].indexOf(type) > -1 &&
  608. data?.["0"]?.elbow_check === false
  609. ) {
  610. let txt = "手部违规";
  611. speckText(txt);
  612. if (!arr.includes(txt)) { }
  613. arr.push(txt);
  614. }
  615. if (["situp"].indexOf(type) > -1 && data?.["0"]?.back_check === false) {
  616. let txt = "背部违规";
  617. speckText(txt);
  618. if (!arr.includes(txt)) { }
  619. arr.push(txt);
  620. }
  621. if (
  622. ["sidepullup", "situp"].indexOf(type) > -1 &&
  623. data?.["0"]?.hip_check === false
  624. ) {
  625. let txt = "臀部违规";
  626. speckText(txt);
  627. if (!arr.includes(txt)) { }
  628. arr.push(txt);
  629. }
  630. }
  631. backReason.value = arr;
  632. if (data.isfinish) {
  633. if (['jump'].includes(type) && backReason.value.length) {
  634. speckText("请重新测试");
  635. return false;
  636. }
  637. if (["basketballv1", "footballv1"].includes(type)) {
  638. speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(proxy?.$utils.runTime(data?.[dic.typeResultKey[type]], false, 0,
  639. 1)) || 0) + ",请下一位准备!" || "");
  640. } else {
  641. speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(count) || 0) + unit.value + ",请下一位准备!" || "");
  642. }
  643. reportListRef.value.getIniReportList();
  644. faceWindowRef.value.open("right");
  645. //然后定时自动关闭
  646. setTimeout(() => {
  647. faceWindowRef.value.close();
  648. }, 1000)
  649. }
  650. };
  651. /**
  652. * 准备开始
  653. */
  654. const getReady = () => {
  655. if (needStart.value && examState.value == 43 && !time.value.ready && readyState.value) {
  656. if (time.value.ready) {
  657. return false;
  658. }
  659. speckCancel();
  660. readyState.value = false;
  661. time.value.ready = 6;
  662. timerManager.value.readyTimer = setInterval(() => {
  663. time.value.ready--;
  664. speckText(time.value.ready);
  665. if (time.value.ready == 0) {
  666. getClearTimer("readyTimer");
  667. getStartOneTest();
  668. }
  669. }, 1000);
  670. }
  671. };
  672. /**
  673. * 获取设备项目
  674. */
  675. const getDevice = async () => {
  676. let deviceid = localStorage.getItem("deviceid") || '';
  677. if (deviceid) {
  678. startDevice({ deviceid: deviceid })
  679. } else {
  680. proxy?.$modal.msgError(`缺少设备信息请重新登录!`);
  681. await proxy?.$http.common.logout({}).then((res: any) => {
  682. });
  683. proxy?.$modal?.closeLoading()
  684. //清空缓存
  685. localStorage.clear();
  686. //跳转
  687. router.push({ path: '/login/qrcode' });
  688. }
  689. };
  690. /**
  691. * 加载手势WS
  692. */
  693. const initHand = () => {
  694. handWs((e: any) => {
  695. if (router.currentRoute.value.path != '/train/test' || parameter.value.handcontroller == undefined || examState.value == 0) {
  696. return false;
  697. }
  698. console.log("eeeee", e)
  699. if (e?.wksid) {
  700. //获取设备项目
  701. getDevice()
  702. }
  703. //接收设备信息
  704. if (e?.device_info) {
  705. device_info.value = e.device_info;
  706. let handcontroller_id = device_info.value.handcontroller_id;
  707. stateHand(handcontroller_id);
  708. }
  709. //获取手势状态
  710. if (e?.cmd == 'get_handcontroller_state' && e?.state == 0) {
  711. let handcontroller_id = device_info.value.handcontroller_id;
  712. startHand(handcontroller_id);
  713. }
  714. //刷新
  715. if (e?.data?.result == "refresh") {
  716. getExit();
  717. //刷新
  718. window.location.reload()
  719. }
  720. //没初始化完成不监听手势动作
  721. if (examState.value == 0) {
  722. return false;
  723. }
  724. //左滑动
  725. if (e?.data?.result == "next_item") {
  726. if(examState.value == 43 && time.value.ready){
  727. return false;
  728. }
  729. if (examState.value == 43 || examState.value == 42) {
  730. speckCancel();//停止播报
  731. if (needStart.value == false) {
  732. //自动流程项目重新识别直接返回3
  733. closeOneTest();
  734. } else {
  735. //手动流程项目重新识别43返回41,42返回3
  736. if (examState.value == 43) {
  737. cleanData();
  738. startFace();
  739. } else {
  740. closeOneTest();
  741. }
  742. }
  743. }
  744. }
  745. //举左手
  746. if (e?.data?.result == "left_hand") {
  747. //举左手确认退出
  748. // if (exitStatus.value) {
  749. // exitStatus.value = 0;
  750. // //确认退出
  751. // let keyEvent: any = null;
  752. // keyEvent = new KeyboardEvent('keydown', {
  753. // key: 'Enter', // 键值
  754. // code: 'Enter', // 键盘代码
  755. // keyCode: 13, // 旧的键盘代码
  756. // which: 13, // 新的键盘代码
  757. // shiftKey: false, // 是否按下Shift键
  758. // ctrlKey: false, // 是否按下Ctrl键
  759. // metaKey: false, // 是否按下Meta键(Win键或Command键)
  760. // bubbles: true, // 事件是否冒泡
  761. // cancelable: true // 是否可以取消事件的默认行为
  762. // });
  763. // document.activeElement?.dispatchEvent(keyEvent);
  764. // return false;
  765. // }
  766. //开始识别
  767. if (needStart.value && examState.value < 41) {
  768. getOpenOneTestAndStartFace();
  769. return false;
  770. }
  771. //停止人脸识别
  772. // if (needStart.value && examState.value == 41) {
  773. // getStopFace();
  774. // }
  775. //开始测试
  776. if (examState.value == 43) {
  777. if (needStart.value) {
  778. getReady()
  779. } else {
  780. getStartOneTest();
  781. }
  782. return false;
  783. }
  784. }
  785. //退出
  786. if (e?.data?.result == "exit") {
  787. // console.log("exitStatus.value", exitStatus.value)
  788. if (exitStatus.value == 0) {
  789. speckText("请保持两秒确认退出");
  790. //第一次才弹出
  791. confirmExit();
  792. setTimeout(() => {
  793. let keyEvent: any = null;
  794. let myKey = null;
  795. //如果交叉手两秒后返回超过4次就确认退出
  796. if (exitStatus.value >= 4) {
  797. myKey = 'Enter';
  798. } else {
  799. myKey = 'Esc';
  800. exitStatus.value = 0;
  801. }
  802. if (myKey == 'Esc') {
  803. keyEvent = new KeyboardEvent('keydown', {
  804. key: 'Escape', // 键值
  805. code: 'Escape', // 键盘代码
  806. keyCode: 27, // 旧的键盘代码
  807. which: 27, // 新的键盘代码
  808. shiftKey: false, // 是否按下Shift键
  809. ctrlKey: false, // 是否按下Ctrl键
  810. metaKey: false, // 是否按下Meta键(Win键或Command键)
  811. bubbles: true, // 事件是否冒泡
  812. cancelable: true // 是否可以取消事件的默认行为
  813. });
  814. }
  815. if (myKey == 'Enter') {
  816. keyEvent = new KeyboardEvent('keydown', {
  817. key: 'Enter', // 键值
  818. code: 'Enter', // 键盘代码
  819. keyCode: 13, // 旧的键盘代码
  820. which: 13, // 新的键盘代码
  821. shiftKey: false, // 是否按下Shift键
  822. ctrlKey: false, // 是否按下Ctrl键
  823. metaKey: false, // 是否按下Meta键(Win键或Command键)
  824. bubbles: true, // 事件是否冒泡
  825. cancelable: true // 是否可以取消事件的默认行为
  826. });
  827. }
  828. document.activeElement?.dispatchEvent(keyEvent);
  829. }, 2500)
  830. }
  831. exitStatus.value = exitStatus.value + 1
  832. }
  833. // if (e?.data?.result == "exit") {
  834. // console.log("exitStatus.value", exitStatus.value)
  835. // if (exitStatus.value == 0) {
  836. // exitStatus.value = 1
  837. // speckText("请5秒内举左手确认退出");
  838. // //第一次才弹出
  839. // confirmExit();
  840. // time.value.exit = 6;
  841. // timerManager.value.exitTimer = setInterval(() => {
  842. // time.value.exit--;
  843. // console.log("取消倒计时", time.value.exit)
  844. // proxy?.$modal.msgWarning(`取消倒计时:${time.value.exit}`)
  845. // if (time.value.exit == 0) {
  846. // exitStatus.value = 0;
  847. // getClearTimer("exitTimer");
  848. // let keyEvent: any = null;
  849. // keyEvent = new KeyboardEvent('keydown', {
  850. // key: 'Escape', // 键值
  851. // code: 'Escape', // 键盘代码
  852. // keyCode: 27, // 旧的键盘代码
  853. // which: 27, // 新的键盘代码
  854. // shiftKey: false, // 是否按下Shift键
  855. // ctrlKey: false, // 是否按下Ctrl键
  856. // metaKey: false, // 是否按下Meta键(Win键或Command键)
  857. // bubbles: true, // 事件是否冒泡
  858. // cancelable: true // 是否可以取消事件的默认行为
  859. // });
  860. // document.activeElement?.dispatchEvent(keyEvent);
  861. // }
  862. // }, 1000);
  863. // }
  864. // }
  865. });
  866. };
  867. /**
  868. * 输出犯规
  869. */
  870. watch(() => backReason.value.length, (v) => {
  871. backReasonStr.value = backReason.value[backReason.value.length - 1];
  872. setTimeout(() => {
  873. backReasonStr.value = "";
  874. }, 1500)
  875. }, { immediate: true });
  876. /**
  877. * 播报时间
  878. */
  879. watch(() => time.value.countdownNum, (newData) => {
  880. if (examState.value != 42) {
  881. return false;
  882. }
  883. if (newData >= 30) {
  884. if (newData % 30 == 0) {
  885. speckText(
  886. `还有${newData}秒`
  887. );
  888. }
  889. }
  890. if (newData == 10) {
  891. speckText("还有10秒");
  892. }
  893. if (newData <= 5) {
  894. speckText(newData);
  895. }
  896. if (newData == 0) {
  897. speckText("哨声");
  898. }
  899. }, { immediate: true });
  900. /**
  901. * 成绩整数播报
  902. */
  903. watch(() => currentResultObj.value, (newData: any, oldData: any) => {
  904. if (examState.value != 42 || newData.count <= 0) {
  905. return false;
  906. }
  907. let project = parameter.value.project;
  908. //引体向上比较慢所以都播报
  909. if (
  910. ["pullup"].includes(project) &&
  911. newData.count > 0 &&
  912. oldData.back_num == oldData.back_num
  913. ) {
  914. speckText(newData.count);
  915. }
  916. if (
  917. ["situp", "sidepullup", "jumprope", "jumpingjack"].includes(project) &&
  918. newData.count > 0 &&
  919. newData.count % 10 == 0 &&
  920. oldData.back_num == oldData.back_num
  921. ) {
  922. speckText(newData.count);
  923. }
  924. }, { immediate: true });
  925. onBeforeMount(() => {
  926. parameter.value = route.query;
  927. let project = parameter.value.project;
  928. let area = parameter.value.area;
  929. parameter.value.examId = `${project}_${area}`; //项目+区
  930. if (parameter.value.time) {
  931. time.value.testTime = parameter.value.time
  932. }
  933. time.value.countdownNum = time.value.testTime;
  934. userInfo.value = JSON.parse(myInfo);
  935. unit.value = dic.unit[project];
  936. if (parameter.value.gesture == 'true') {
  937. parameter.value.gesture = true
  938. } else {
  939. parameter.value.gesture = false
  940. }
  941. //需要开始按钮的项目
  942. let myList = ['situp', 'jumprope', 'jumpingjack', 'footballv1', 'basketballv1', 'pingpong'];
  943. if (myList.includes(project)) {
  944. needStart.value = true;
  945. }
  946. //加载WS
  947. initWs({ parameter: parameter.value, testTime: time.value.testTime }, (data: any) => {
  948. getMessage(data);
  949. });
  950. //初始化语音
  951. initSpeech();
  952. //初始化手势
  953. initHand();
  954. //刷新关闭
  955. window.onbeforeunload = function (e) {
  956. var confirmationMessage = "刷新/关闭页面将会关闭页面,是否确认退出页面?";
  957. (e || window.event).returnValue = confirmationMessage; // 兼容 Gecko + IE
  958. let bUrl = import.meta.env.VITE_APP_BASE_API;
  959. let classId = parameter.value.classes;
  960. let project = parameter.value.project;
  961. let area = parameter.value.area;
  962. let examId = `${project}_${area}`;
  963. let mySid = sid.value;
  964. let token: any = localStorage.getItem("token")
  965. let formData = new FormData();
  966. formData.append("exam_id", examId);
  967. formData.append("class_id", classId);
  968. formData.append("token", token);
  969. formData.append("sid", mySid);
  970. navigator.sendBeacon(bUrl + "/exam/close_exam", formData)
  971. return confirmationMessage; // 兼容 Gecko + Webkit, Safari, Chrome
  972. };
  973. })
  974. onBeforeUnmount(() => {
  975. getExit();
  976. })
  977. </script>
  978. <style lang="scss" scoped>
  979. $topPadding: 5.19rem;
  980. $waiPadding: 6.51rem;
  981. .main {
  982. width: calc(100% - ($waiPadding * 2));
  983. height: 78vh;
  984. padding-top: 10rem;
  985. margin: 0 auto;
  986. display: flex;
  987. justify-content: space-between;
  988. overflow: hidden;
  989. .main-left {
  990. width: 71.5%;
  991. display: flex;
  992. flex-direction: column;
  993. justify-content: space-between;
  994. .main-left-top {
  995. display: flex;
  996. justify-content: space-between;
  997. height: 55.8%;
  998. position: relative;
  999. .top-left {
  1000. width: 37.4%;
  1001. height: 100%;
  1002. border-radius: 1.6rem;
  1003. background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
  1004. text-align: center;
  1005. display: flex;
  1006. align-items: center;
  1007. justify-content: center;
  1008. cursor: pointer;
  1009. .top-left-center {
  1010. .pic {
  1011. width: 22.3vh;
  1012. height: 22.3vh;
  1013. border-radius: 50%;
  1014. display: flex;
  1015. justify-content: center;
  1016. align-items: center;
  1017. overflow: hidden;
  1018. margin: 0 auto 2vh auto;
  1019. img {
  1020. width: 100%;
  1021. }
  1022. }
  1023. .pic2 {
  1024. box-sizing: border-box;
  1025. border: 0.44rem solid rgba(26, 41, 58, 0.6315);
  1026. }
  1027. .name {
  1028. width: 100%;
  1029. color: #1A293A;
  1030. font-size: 2.21rem;
  1031. }
  1032. .name2 {
  1033. padding: 0 0.3rem;
  1034. border-radius: 1.1rem;
  1035. background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
  1036. box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.9046), inset 0px 3px 6px 0px rgba(0, 0, 0, 0.0851);
  1037. }
  1038. }
  1039. }
  1040. .top-right {
  1041. width: 62%;
  1042. height: 100%;
  1043. border-radius: 1.6rem;
  1044. opacity: 1;
  1045. background: #ffffff;
  1046. box-sizing: border-box;
  1047. border: 0.55rem solid #13ED84;
  1048. display: flex;
  1049. align-items: center;
  1050. justify-content: center;
  1051. flex-direction: column;
  1052. position: relative;
  1053. .time {
  1054. width: 28vh;
  1055. height: 28vh;
  1056. line-height: 28vh;
  1057. border-radius: 50%;
  1058. color: #FF9402;
  1059. font-size: 11vh;
  1060. text-align: center;
  1061. background-image: url("@/assets/images/test/time.png");
  1062. background-position: center;
  1063. background-repeat: no-repeat;
  1064. background-size: 100% 100%;
  1065. position: absolute;
  1066. right: -1.5vh;
  1067. top: -11vh;
  1068. font-family: 'Saira-BlackItalic';
  1069. }
  1070. .tips {
  1071. display: flex;
  1072. justify-content: center;
  1073. align-items: center;
  1074. height: 100%;
  1075. img {
  1076. max-height: 80%;
  1077. max-height: 80%;
  1078. }
  1079. }
  1080. .complete {
  1081. width: 100%;
  1082. display: flex;
  1083. justify-content: center;
  1084. flex-direction: column;
  1085. .scoreBox {
  1086. height: 10vh;
  1087. color: #1A293A;
  1088. display: flex;
  1089. align-items: center;
  1090. justify-content: center;
  1091. margin-bottom: 5vh;
  1092. .score {
  1093. font-size: 8.5rem;
  1094. line-height: 8.5rem;
  1095. font-family: 'Saira-BlackItalic';
  1096. }
  1097. .unit {
  1098. font-size: 2rem;
  1099. margin-left: 10px;
  1100. }
  1101. }
  1102. .fractionViolation {
  1103. height: 10vh;
  1104. display: flex;
  1105. align-items: center;
  1106. justify-content: center;
  1107. .fraction {
  1108. height: 10vh;
  1109. line-height: 10vh;
  1110. border-radius: 5vh;
  1111. display: flex;
  1112. align-items: center;
  1113. padding: 0 6%;
  1114. background: linear-gradient(138deg, #38536C 21%, #1A293A 75%);
  1115. box-shadow: inset 0px 1px 13px 0px rgba(255, 255, 255, 0.9452);
  1116. .lable {
  1117. font-size: 4vh;
  1118. color: #13ED84;
  1119. }
  1120. .value {
  1121. font-size: 7vh;
  1122. color: #00FFE8;
  1123. font-family: 'Saira-BlackItalic';
  1124. min-width: 7vh;
  1125. }
  1126. }
  1127. .violation {
  1128. height: 6.1vh;
  1129. line-height: 6.1vh;
  1130. border-radius: 4vh;
  1131. border: 0.25rem solid #ED7905;
  1132. display: flex;
  1133. align-items: center;
  1134. margin-left: 11px;
  1135. padding: 3px;
  1136. box-sizing: content-box;
  1137. .lable {
  1138. font-size: 1.2rem;
  1139. color: #ffffff;
  1140. width: 6.1vh;
  1141. height: 6.1vh;
  1142. line-height: 6.1vh;
  1143. background: #ED7905;
  1144. border-radius: 50%;
  1145. text-align: center;
  1146. }
  1147. .value {
  1148. margin-left: 1.5vh;
  1149. font-size: 3.2rem;
  1150. color: #ED7905;
  1151. font-family: 'Saira-BlackItalic';
  1152. min-width: 6vh;
  1153. }
  1154. }
  1155. }
  1156. }
  1157. .complete2 {
  1158. padding-left: 20%;
  1159. padding-top: 5vh;
  1160. .scoreBox {
  1161. margin-bottom: 3vh;
  1162. justify-content: left;
  1163. }
  1164. .fractionViolation {
  1165. justify-content: left;
  1166. .fraction {
  1167. padding: 0 8%;
  1168. }
  1169. }
  1170. }
  1171. .foulBox {
  1172. height: calc(4.2vh + 0.5rem + 6px);
  1173. overflow: hidden;
  1174. display: flex;
  1175. align-items: center;
  1176. justify-content: center;
  1177. padding-top: 3vh;
  1178. .foul {
  1179. height: 4.2vh;
  1180. line-height: 4.2vh;
  1181. border-radius: 3vh;
  1182. border: 0.25rem solid #ED7905;
  1183. display: flex;
  1184. align-items: center;
  1185. margin-left: 11px;
  1186. padding: 3px;
  1187. box-sizing: content-box;
  1188. .lable {
  1189. font-size: 2rem;
  1190. color: #ffffff;
  1191. width: 4.2vh;
  1192. height: 4.2vh;
  1193. line-height: 4.2vh;
  1194. background: #ED7905;
  1195. border-radius: 50%;
  1196. text-align: center;
  1197. }
  1198. .value {
  1199. margin-left: 1.5vh;
  1200. font-size: 2rem;
  1201. color: #ED7905;
  1202. font-family: 'Saira-BlackItalic';
  1203. min-width: 6vh;
  1204. padding: 0 10px;
  1205. }
  1206. }
  1207. }
  1208. .readyBoxBefore {
  1209. display: flex;
  1210. justify-content: center;
  1211. font-size: 2.5rem;
  1212. color: #1A293A;
  1213. padding-top: 4vh;
  1214. line-height: 0;
  1215. margin-bottom: 2vh;
  1216. .item {
  1217. display: flex;
  1218. justify-content: center;
  1219. .lable {
  1220. display: flex;
  1221. align-items: center;
  1222. margin-left: 10px;
  1223. }
  1224. }
  1225. img {
  1226. height: 20vh;
  1227. }
  1228. }
  1229. .readyBox {
  1230. text-align: center;
  1231. color: #1A293A;
  1232. .value {
  1233. font-size: 8.5rem;
  1234. line-height: 8.5rem;
  1235. font-family: 'Saira-BlackItalic';
  1236. }
  1237. .lable {
  1238. font-size: 3.5rem;
  1239. }
  1240. .transparent {
  1241. opacity: 0;
  1242. }
  1243. }
  1244. .btn {
  1245. font-size: 2.21rem;
  1246. color: #FFFFFF;
  1247. text-align: center;
  1248. width: 50%;
  1249. line-height: 8vh;
  1250. line-height: 8vh;
  1251. border-radius: 15px;
  1252. opacity: 1;
  1253. background: radial-gradient(159% 126% at 5% 93%, #F99F02 0%, #ED7905 100%);
  1254. box-shadow: 3px 6px 4px 1px rgba(0, 0, 0, 0.1874), inset 0px 1px 0px 2px rgba(255, 255, 255, 0.3);
  1255. cursor: pointer;
  1256. }
  1257. }
  1258. i {
  1259. width: 4vw;
  1260. height: 4vw;
  1261. display: block;
  1262. position: absolute;
  1263. top: 50%;
  1264. left: 37.5%;
  1265. margin-top: calc(4vw * -0.5);
  1266. margin-left: calc(4vw * -0.5);
  1267. background-image: url("@/assets/images/test/yuan.png");
  1268. background-position: center;
  1269. background-repeat: no-repeat;
  1270. background-size: 100% 100%;
  1271. border-radius: 50%;
  1272. flex-shrink: 0;
  1273. transition: all 0.5s;
  1274. }
  1275. }
  1276. .main-left-bottom {
  1277. display: flex;
  1278. justify-content: space-between;
  1279. height: calc(100% - 55.8% - 3vh);
  1280. overflow: hidden;
  1281. .bottom-left {
  1282. width: 58%;
  1283. padding-right: 1rem;
  1284. display: flex;
  1285. flex-direction: column;
  1286. .tips {
  1287. height: 2.8vh;
  1288. img {
  1289. height: 100%;
  1290. }
  1291. }
  1292. .pic {
  1293. text-align: center;
  1294. width: 100%;
  1295. height: 100%;
  1296. display: flex;
  1297. justify-content: center;
  1298. overflow: hidden;
  1299. img {
  1300. max-width: 100%;
  1301. max-height: 100%;
  1302. }
  1303. }
  1304. }
  1305. .bottom-right {
  1306. width: 41%;
  1307. height: 100%;
  1308. overflow-y: scroll;
  1309. color: #F9F9F9;
  1310. font-size: 1.1rem;
  1311. line-height: 1.6rem;
  1312. &::-webkit-scrollbar {
  1313. width: 10px;
  1314. }
  1315. &::-webkit-scrollbar-thumb {
  1316. border-width: 2px;
  1317. border-radius: 4px;
  1318. border-style: dashed;
  1319. border-color: transparent;
  1320. background-color: rgba(26, 62, 78, 0.9);
  1321. background-clip: padding-box;
  1322. }
  1323. &::-webkit-scrollbar-button:hover {
  1324. border-radius: 6px;
  1325. background: rgba(26, 62, 78, 1);
  1326. }
  1327. }
  1328. }
  1329. }
  1330. .main-right {
  1331. width: 27%;
  1332. border-radius: 1.6rem;
  1333. background: linear-gradient(29deg, #092941 -82%, #2A484B 94%);
  1334. box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.4);
  1335. display: flex;
  1336. flex-direction: column;
  1337. overflow: hidden;
  1338. }
  1339. }
  1340. </style>