test.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434
  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. exit: 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, exit, 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. if (needStart.value == false) {
  731. //自动流程项目重新识别直接返回3
  732. closeOneTest();
  733. } else {
  734. //手动流程项目重新识别43返回41,42返回3
  735. if (examState.value == 43) {
  736. cleanData();
  737. startFace();
  738. } else {
  739. closeOneTest();
  740. }
  741. }
  742. }
  743. }
  744. //举左手
  745. if (e?.data?.result == "left_hand") {
  746. //举左手确认退出
  747. // if (exit.value) {
  748. // exit.value = 0;
  749. // //确认退出
  750. // let keyEvent: any = null;
  751. // keyEvent = new KeyboardEvent('keydown', {
  752. // key: 'Enter', // 键值
  753. // code: 'Enter', // 键盘代码
  754. // keyCode: 13, // 旧的键盘代码
  755. // which: 13, // 新的键盘代码
  756. // shiftKey: false, // 是否按下Shift键
  757. // ctrlKey: false, // 是否按下Ctrl键
  758. // metaKey: false, // 是否按下Meta键(Win键或Command键)
  759. // bubbles: true, // 事件是否冒泡
  760. // cancelable: true // 是否可以取消事件的默认行为
  761. // });
  762. // document.activeElement?.dispatchEvent(keyEvent);
  763. // return false;
  764. // }
  765. //开始识别
  766. if (needStart.value && examState.value < 41) {
  767. getOpenOneTestAndStartFace();
  768. return false;
  769. }
  770. //停止人脸识别
  771. // if (needStart.value && examState.value == 41) {
  772. // getStopFace();
  773. // }
  774. //开始测试
  775. if (examState.value == 43) {
  776. if (needStart.value) {
  777. getReady()
  778. } else {
  779. getStartOneTest();
  780. }
  781. return false;
  782. }
  783. }
  784. //退出
  785. if (e?.data?.result == "exit") {
  786. // console.log("exit.value", exit.value)
  787. if (exit.value == 0) {
  788. speckText("请保持两秒确认退出");
  789. //第一次才弹出
  790. confirmExit();
  791. setTimeout(() => {
  792. let keyEvent: any = null;
  793. let myKey = null;
  794. //如果交叉手两秒后返回超过4次就确认退出
  795. if (exit.value >= 4) {
  796. myKey = 'Enter';
  797. } else {
  798. myKey = 'Esc';
  799. exit.value = 0;
  800. }
  801. if (myKey == 'Esc') {
  802. keyEvent = new KeyboardEvent('keydown', {
  803. key: 'Escape', // 键值
  804. code: 'Escape', // 键盘代码
  805. keyCode: 27, // 旧的键盘代码
  806. which: 27, // 新的键盘代码
  807. shiftKey: false, // 是否按下Shift键
  808. ctrlKey: false, // 是否按下Ctrl键
  809. metaKey: false, // 是否按下Meta键(Win键或Command键)
  810. bubbles: true, // 事件是否冒泡
  811. cancelable: true // 是否可以取消事件的默认行为
  812. });
  813. }
  814. if (myKey == 'Enter') {
  815. keyEvent = new KeyboardEvent('keydown', {
  816. key: 'Enter', // 键值
  817. code: 'Enter', // 键盘代码
  818. keyCode: 13, // 旧的键盘代码
  819. which: 13, // 新的键盘代码
  820. shiftKey: false, // 是否按下Shift键
  821. ctrlKey: false, // 是否按下Ctrl键
  822. metaKey: false, // 是否按下Meta键(Win键或Command键)
  823. bubbles: true, // 事件是否冒泡
  824. cancelable: true // 是否可以取消事件的默认行为
  825. });
  826. }
  827. document.activeElement?.dispatchEvent(keyEvent);
  828. }, 2500)
  829. }
  830. exit.value = exit.value + 1
  831. }
  832. // if (e?.data?.result == "exit") {
  833. // console.log("exit.value", exit.value)
  834. // if (exit.value == 0) {
  835. // exit.value = 1
  836. // speckText("请5秒内举左手确认退出");
  837. // //第一次才弹出
  838. // confirmExit();
  839. // time.value.exit = 6;
  840. // timerManager.value.exitTimer = setInterval(() => {
  841. // time.value.exit--;
  842. // console.log("取消倒计时", time.value.exit)
  843. // proxy?.$modal.msgWarning(`取消倒计时:${time.value.exit}`)
  844. // if (time.value.exit == 0) {
  845. // exit.value = 0;
  846. // getClearTimer("exitTimer");
  847. // let keyEvent: any = null;
  848. // keyEvent = new KeyboardEvent('keydown', {
  849. // key: 'Escape', // 键值
  850. // code: 'Escape', // 键盘代码
  851. // keyCode: 27, // 旧的键盘代码
  852. // which: 27, // 新的键盘代码
  853. // shiftKey: false, // 是否按下Shift键
  854. // ctrlKey: false, // 是否按下Ctrl键
  855. // metaKey: false, // 是否按下Meta键(Win键或Command键)
  856. // bubbles: true, // 事件是否冒泡
  857. // cancelable: true // 是否可以取消事件的默认行为
  858. // });
  859. // document.activeElement?.dispatchEvent(keyEvent);
  860. // }
  861. // }, 1000);
  862. // }
  863. // }
  864. });
  865. };
  866. /**
  867. * 输出犯规
  868. */
  869. watch(() => backReason.value.length, (v) => {
  870. backReasonStr.value = backReason.value[backReason.value.length - 1];
  871. setTimeout(() => {
  872. backReasonStr.value = "";
  873. }, 1500)
  874. }, { immediate: true });
  875. /**
  876. * 播报时间
  877. */
  878. watch(() => time.value.countdownNum, (newData) => {
  879. if (examState.value != 42) {
  880. return false;
  881. }
  882. if (newData >= 30) {
  883. if (newData % 30 == 0) {
  884. speckText(
  885. `还有${newData}秒`
  886. );
  887. }
  888. }
  889. if (newData == 10) {
  890. speckText("还有10秒");
  891. }
  892. if (newData <= 5) {
  893. speckText(newData);
  894. }
  895. if (newData == 0) {
  896. speckText("哨声");
  897. }
  898. }, { immediate: true });
  899. /**
  900. * 成绩整数播报
  901. */
  902. watch(() => currentResultObj.value, (newData: any, oldData: any) => {
  903. if (examState.value != 42 || newData.count <= 0) {
  904. return false;
  905. }
  906. let project = parameter.value.project;
  907. //引体向上比较慢所以都播报
  908. if (
  909. ["pullup"].includes(project) &&
  910. newData.count > 0 &&
  911. oldData.back_num == oldData.back_num
  912. ) {
  913. speckText(newData.count);
  914. }
  915. if (
  916. ["situp", "sidepullup", "jumprope", "jumpingjack"].includes(project) &&
  917. newData.count > 0 &&
  918. newData.count % 10 == 0 &&
  919. oldData.back_num == oldData.back_num
  920. ) {
  921. speckText(newData.count);
  922. }
  923. }, { immediate: true });
  924. onBeforeMount(() => {
  925. parameter.value = route.query;
  926. let project = parameter.value.project;
  927. let area = parameter.value.area;
  928. parameter.value.examId = `${project}_${area}`; //项目+区
  929. if (parameter.value.time) {
  930. time.value.testTime = parameter.value.time
  931. }
  932. time.value.countdownNum = time.value.testTime;
  933. userInfo.value = JSON.parse(myInfo);
  934. unit.value = dic.unit[project];
  935. if (parameter.value.gesture == 'true') {
  936. parameter.value.gesture = true
  937. } else {
  938. parameter.value.gesture = false
  939. }
  940. //需要开始按钮的项目
  941. let myList = ['situp', 'jumprope', 'jumpingjack', 'footballv1', 'basketballv1', 'pingpong'];
  942. if (myList.includes(project)) {
  943. needStart.value = true;
  944. }
  945. //加载WS
  946. initWs({ parameter: parameter.value, testTime: time.value.testTime }, (data: any) => {
  947. getMessage(data);
  948. });
  949. //初始化语音
  950. initSpeech();
  951. //初始化手势
  952. initHand();
  953. //刷新关闭
  954. window.onbeforeunload = function (e) {
  955. var confirmationMessage = "刷新/关闭页面将会关闭页面,是否确认退出页面?";
  956. (e || window.event).returnValue = confirmationMessage; // 兼容 Gecko + IE
  957. let bUrl = import.meta.env.VITE_APP_BASE_API;
  958. let classId = parameter.value.classes;
  959. let project = parameter.value.project;
  960. let area = parameter.value.area;
  961. let examId = `${project}_${area}`;
  962. let mySid = sid.value;
  963. let token: any = localStorage.getItem("token")
  964. let formData = new FormData();
  965. formData.append("exam_id", examId);
  966. formData.append("class_id", classId);
  967. formData.append("token", token);
  968. formData.append("sid", mySid);
  969. navigator.sendBeacon(bUrl + "/exam/close_exam", formData)
  970. return confirmationMessage; // 兼容 Gecko + Webkit, Safari, Chrome
  971. };
  972. })
  973. onBeforeUnmount(() => {
  974. getExit();
  975. })
  976. </script>
  977. <style lang="scss" scoped>
  978. $topPadding: 5.19rem;
  979. $waiPadding: 6.51rem;
  980. .main {
  981. width: calc(100% - ($waiPadding * 2));
  982. height: 78vh;
  983. padding-top: 10rem;
  984. margin: 0 auto;
  985. display: flex;
  986. justify-content: space-between;
  987. overflow: hidden;
  988. .main-left {
  989. width: 71.5%;
  990. display: flex;
  991. flex-direction: column;
  992. justify-content: space-between;
  993. .main-left-top {
  994. display: flex;
  995. justify-content: space-between;
  996. height: 55.8%;
  997. position: relative;
  998. .top-left {
  999. width: 37.4%;
  1000. height: 100%;
  1001. border-radius: 1.6rem;
  1002. background: radial-gradient(122% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
  1003. text-align: center;
  1004. display: flex;
  1005. align-items: center;
  1006. justify-content: center;
  1007. cursor: pointer;
  1008. .top-left-center {
  1009. .pic {
  1010. width: 22.3vh;
  1011. height: 22.3vh;
  1012. border-radius: 50%;
  1013. display: flex;
  1014. justify-content: center;
  1015. align-items: center;
  1016. overflow: hidden;
  1017. margin: 0 auto 2vh auto;
  1018. img {
  1019. width: 100%;
  1020. }
  1021. }
  1022. .pic2 {
  1023. box-sizing: border-box;
  1024. border: 0.44rem solid rgba(26, 41, 58, 0.6315);
  1025. }
  1026. .name {
  1027. width: 100%;
  1028. color: #1A293A;
  1029. font-size: 2.21rem;
  1030. }
  1031. .name2 {
  1032. padding: 0 0.3rem;
  1033. border-radius: 1.1rem;
  1034. background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
  1035. box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.9046), inset 0px 3px 6px 0px rgba(0, 0, 0, 0.0851);
  1036. }
  1037. }
  1038. }
  1039. .top-right {
  1040. width: 62%;
  1041. height: 100%;
  1042. border-radius: 1.6rem;
  1043. opacity: 1;
  1044. background: #ffffff;
  1045. box-sizing: border-box;
  1046. border: 0.55rem solid #13ED84;
  1047. display: flex;
  1048. align-items: center;
  1049. justify-content: center;
  1050. flex-direction: column;
  1051. position: relative;
  1052. .time {
  1053. width: 28vh;
  1054. height: 28vh;
  1055. line-height: 28vh;
  1056. border-radius: 50%;
  1057. color: #FF9402;
  1058. font-size: 11vh;
  1059. text-align: center;
  1060. background-image: url("@/assets/images/test/time.png");
  1061. background-position: center;
  1062. background-repeat: no-repeat;
  1063. background-size: 100% 100%;
  1064. position: absolute;
  1065. right: -1.5vh;
  1066. top: -11vh;
  1067. font-family: 'Saira-BlackItalic';
  1068. }
  1069. .tips {
  1070. display: flex;
  1071. justify-content: center;
  1072. align-items: center;
  1073. height: 100%;
  1074. img {
  1075. max-height: 80%;
  1076. max-height: 80%;
  1077. }
  1078. }
  1079. .complete {
  1080. width: 100%;
  1081. display: flex;
  1082. justify-content: center;
  1083. flex-direction: column;
  1084. .scoreBox {
  1085. height: 10vh;
  1086. color: #1A293A;
  1087. display: flex;
  1088. align-items: center;
  1089. justify-content: center;
  1090. margin-bottom: 5vh;
  1091. .score {
  1092. font-size: 8.5rem;
  1093. line-height: 8.5rem;
  1094. font-family: 'Saira-BlackItalic';
  1095. }
  1096. .unit {
  1097. font-size: 2rem;
  1098. margin-left: 10px;
  1099. }
  1100. }
  1101. .fractionViolation {
  1102. height: 10vh;
  1103. display: flex;
  1104. align-items: center;
  1105. justify-content: center;
  1106. .fraction {
  1107. height: 10vh;
  1108. line-height: 10vh;
  1109. border-radius: 5vh;
  1110. display: flex;
  1111. align-items: center;
  1112. padding: 0 6%;
  1113. background: linear-gradient(138deg, #38536C 21%, #1A293A 75%);
  1114. box-shadow: inset 0px 1px 13px 0px rgba(255, 255, 255, 0.9452);
  1115. .lable {
  1116. font-size: 4vh;
  1117. color: #13ED84;
  1118. }
  1119. .value {
  1120. font-size: 7vh;
  1121. color: #00FFE8;
  1122. font-family: 'Saira-BlackItalic';
  1123. min-width: 7vh;
  1124. }
  1125. }
  1126. .violation {
  1127. height: 6.1vh;
  1128. line-height: 6.1vh;
  1129. border-radius: 4vh;
  1130. border: 0.25rem solid #ED7905;
  1131. display: flex;
  1132. align-items: center;
  1133. margin-left: 11px;
  1134. padding: 3px;
  1135. box-sizing: content-box;
  1136. .lable {
  1137. font-size: 1.2rem;
  1138. color: #ffffff;
  1139. width: 6.1vh;
  1140. height: 6.1vh;
  1141. line-height: 6.1vh;
  1142. background: #ED7905;
  1143. border-radius: 50%;
  1144. text-align: center;
  1145. }
  1146. .value {
  1147. margin-left: 1.5vh;
  1148. font-size: 3.2rem;
  1149. color: #ED7905;
  1150. font-family: 'Saira-BlackItalic';
  1151. min-width: 6vh;
  1152. }
  1153. }
  1154. }
  1155. }
  1156. .complete2 {
  1157. padding-left: 20%;
  1158. padding-top: 5vh;
  1159. .scoreBox {
  1160. margin-bottom: 3vh;
  1161. justify-content: left;
  1162. }
  1163. .fractionViolation {
  1164. justify-content: left;
  1165. .fraction {
  1166. padding: 0 8%;
  1167. }
  1168. }
  1169. }
  1170. .foulBox {
  1171. height: calc(4.2vh + 0.5rem + 6px);
  1172. overflow: hidden;
  1173. display: flex;
  1174. align-items: center;
  1175. justify-content: center;
  1176. padding-top: 3vh;
  1177. .foul {
  1178. height: 4.2vh;
  1179. line-height: 4.2vh;
  1180. border-radius: 3vh;
  1181. border: 0.25rem solid #ED7905;
  1182. display: flex;
  1183. align-items: center;
  1184. margin-left: 11px;
  1185. padding: 3px;
  1186. box-sizing: content-box;
  1187. .lable {
  1188. font-size: 2rem;
  1189. color: #ffffff;
  1190. width: 4.2vh;
  1191. height: 4.2vh;
  1192. line-height: 4.2vh;
  1193. background: #ED7905;
  1194. border-radius: 50%;
  1195. text-align: center;
  1196. }
  1197. .value {
  1198. margin-left: 1.5vh;
  1199. font-size: 2rem;
  1200. color: #ED7905;
  1201. font-family: 'Saira-BlackItalic';
  1202. min-width: 6vh;
  1203. padding: 0 10px;
  1204. }
  1205. }
  1206. }
  1207. .readyBoxBefore {
  1208. display: flex;
  1209. justify-content: center;
  1210. font-size: 2.5rem;
  1211. color: #1A293A;
  1212. padding-top: 4vh;
  1213. line-height: 0;
  1214. margin-bottom: 2vh;
  1215. .item {
  1216. display: flex;
  1217. justify-content: center;
  1218. .lable {
  1219. display: flex;
  1220. align-items: center;
  1221. margin-left: 10px;
  1222. }
  1223. }
  1224. img {
  1225. height: 20vh;
  1226. }
  1227. }
  1228. .readyBox {
  1229. text-align: center;
  1230. color: #1A293A;
  1231. .value {
  1232. font-size: 8.5rem;
  1233. line-height: 8.5rem;
  1234. font-family: 'Saira-BlackItalic';
  1235. }
  1236. .lable {
  1237. font-size: 3.5rem;
  1238. }
  1239. .transparent {
  1240. opacity: 0;
  1241. }
  1242. }
  1243. .btn {
  1244. font-size: 2.21rem;
  1245. color: #FFFFFF;
  1246. text-align: center;
  1247. width: 50%;
  1248. line-height: 8vh;
  1249. line-height: 8vh;
  1250. border-radius: 15px;
  1251. opacity: 1;
  1252. background: radial-gradient(159% 126% at 5% 93%, #F99F02 0%, #ED7905 100%);
  1253. box-shadow: 3px 6px 4px 1px rgba(0, 0, 0, 0.1874), inset 0px 1px 0px 2px rgba(255, 255, 255, 0.3);
  1254. cursor: pointer;
  1255. }
  1256. }
  1257. i {
  1258. width: 4vw;
  1259. height: 4vw;
  1260. display: block;
  1261. position: absolute;
  1262. top: 50%;
  1263. left: 37.5%;
  1264. margin-top: calc(4vw * -0.5);
  1265. margin-left: calc(4vw * -0.5);
  1266. background-image: url("@/assets/images/test/yuan.png");
  1267. background-position: center;
  1268. background-repeat: no-repeat;
  1269. background-size: 100% 100%;
  1270. border-radius: 50%;
  1271. flex-shrink: 0;
  1272. transition: all 0.5s;
  1273. }
  1274. }
  1275. .main-left-bottom {
  1276. display: flex;
  1277. justify-content: space-between;
  1278. height: calc(100% - 55.8% - 3vh);
  1279. overflow: hidden;
  1280. .bottom-left {
  1281. width: 58%;
  1282. padding-right: 1rem;
  1283. display: flex;
  1284. flex-direction: column;
  1285. .tips {
  1286. height: 2.8vh;
  1287. img {
  1288. height: 100%;
  1289. }
  1290. }
  1291. .pic {
  1292. text-align: center;
  1293. width: 100%;
  1294. height: 100%;
  1295. display: flex;
  1296. justify-content: center;
  1297. overflow: hidden;
  1298. img {
  1299. max-width: 100%;
  1300. max-height: 100%;
  1301. }
  1302. }
  1303. }
  1304. .bottom-right {
  1305. width: 41%;
  1306. height: 100%;
  1307. overflow-y: scroll;
  1308. color: #F9F9F9;
  1309. font-size: 1.1rem;
  1310. line-height: 1.6rem;
  1311. &::-webkit-scrollbar {
  1312. width: 10px;
  1313. }
  1314. &::-webkit-scrollbar-thumb {
  1315. border-width: 2px;
  1316. border-radius: 4px;
  1317. border-style: dashed;
  1318. border-color: transparent;
  1319. background-color: rgba(26, 62, 78, 0.9);
  1320. background-clip: padding-box;
  1321. }
  1322. &::-webkit-scrollbar-button:hover {
  1323. border-radius: 6px;
  1324. background: rgba(26, 62, 78, 1);
  1325. }
  1326. }
  1327. }
  1328. }
  1329. .main-right {
  1330. width: 27%;
  1331. border-radius: 1.6rem;
  1332. background: linear-gradient(29deg, #092941 -82%, #2A484B 94%);
  1333. box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.4);
  1334. display: flex;
  1335. flex-direction: column;
  1336. overflow: hidden;
  1337. }
  1338. }
  1339. </style>