ExamInvigilation.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. <template>
  2. <div class="exam-invigilation">
  3. <div class="invigilation-analysis">
  4. <div class="part-box-head">
  5. <div class="part-box-head-left"><h1>考情监控</h1></div>
  6. <div class="part-box-head-right" @click="exitFullscreen">
  7. <i class="icon icon-full-screen"></i>退出全屏
  8. </div>
  9. </div>
  10. <div class="invigilation-summary">
  11. <div class="invigilation-summary-item">
  12. <div class="part-box">
  13. <h5>
  14. <span>在线(人)</span>
  15. <el-popover
  16. placement="top-start"
  17. width="200"
  18. trigger="hover"
  19. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  20. >
  21. <i class="el-icon-question" slot="reference"></i>
  22. </el-popover>
  23. </h5>
  24. <p>26000</p>
  25. </div>
  26. </div>
  27. <div class="invigilation-summary-item">
  28. <div class="part-box">
  29. <h5>
  30. <span>待考(人)</span>
  31. <el-popover
  32. placement="top-start"
  33. width="200"
  34. trigger="hover"
  35. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  36. >
  37. <i class="el-icon-question" slot="reference"></i>
  38. </el-popover>
  39. </h5>
  40. <p>170</p>
  41. </div>
  42. </div>
  43. <div class="invigilation-summary-item">
  44. <div class="part-box">
  45. <h5>
  46. <span>考试中(人)</span>
  47. <el-popover
  48. placement="top-start"
  49. width="200"
  50. trigger="hover"
  51. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  52. >
  53. <i class="el-icon-question" slot="reference"></i>
  54. </el-popover>
  55. </h5>
  56. <p>2560</p>
  57. </div>
  58. </div>
  59. <div class="invigilation-summary-item">
  60. <div class="part-box">
  61. <h5>
  62. <span>通讯故障(人)</span>
  63. <el-popover
  64. placement="top-start"
  65. width="200"
  66. trigger="hover"
  67. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  68. >
  69. <i class="el-icon-question" slot="reference"></i>
  70. </el-popover>
  71. </h5>
  72. <p>26000</p>
  73. </div>
  74. </div>
  75. <div class="invigilation-summary-item">
  76. <div class="part-box">
  77. <h5>
  78. <span>预警(人)</span>
  79. <el-popover
  80. placement="top-start"
  81. width="200"
  82. trigger="hover"
  83. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  84. >
  85. <i class="el-icon-question" slot="reference"></i>
  86. </el-popover>
  87. </h5>
  88. <p>15</p>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="invigilation-online part-box">
  93. <h3 class="invigilation-part-title">
  94. <span>各机构在线考试人数分布</span>
  95. <el-popover
  96. placement="top-start"
  97. width="200"
  98. trigger="hover"
  99. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  100. >
  101. <i class="el-icon-question" slot="reference"></i>
  102. </el-popover>
  103. </h3>
  104. <echart-render
  105. :chart-data="onlineData"
  106. chart-type="bar"
  107. v-if="chartDataReady"
  108. ></echart-render>
  109. </div>
  110. <div class="invigilation-warning">
  111. <el-row :gutter="20">
  112. <el-col :span="12">
  113. <div class="part-box">
  114. <h3 class="invigilation-part-title">
  115. <span>机构预警分布</span>
  116. <el-popover
  117. placement="top-start"
  118. width="200"
  119. trigger="hover"
  120. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  121. >
  122. <i class="el-icon-question" slot="reference"></i>
  123. </el-popover>
  124. </h3>
  125. <echart-render
  126. :chart-data="orgWarningData"
  127. chart-type="pie"
  128. v-if="chartDataReady"
  129. ></echart-render>
  130. </div>
  131. </el-col>
  132. <el-col :span="12">
  133. <div class="part-box">
  134. <h3 class="invigilation-part-title">
  135. <span>预警类型分布</span>
  136. <el-popover
  137. placement="top-start"
  138. width="200"
  139. trigger="hover"
  140. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  141. >
  142. <i class="el-icon-question" slot="reference"></i>
  143. </el-popover>
  144. </h3>
  145. <echart-render
  146. :chart-data="typeWarningData"
  147. chart-type="pie"
  148. v-if="chartDataReady"
  149. ></echart-render>
  150. </div>
  151. </el-col>
  152. </el-row>
  153. </div>
  154. <div class="invigilation-trend part-box">
  155. <h3 class="invigilation-part-title">
  156. <span>预警时间趋势</span>
  157. <el-popover
  158. placement="top-start"
  159. width="200"
  160. trigger="hover"
  161. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  162. >
  163. <i class="el-icon-question" slot="reference"></i>
  164. </el-popover>
  165. </h3>
  166. <echart-render
  167. :chart-data="warningTrendData"
  168. chart-type="line"
  169. v-if="chartDataReady"
  170. ></echart-render>
  171. </div>
  172. <div class="invigilation-message part-box">
  173. <h3 class="invigilation-part-title">
  174. <span>预警消息</span>
  175. <el-popover
  176. placement="top-start"
  177. width="200"
  178. trigger="hover"
  179. content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
  180. >
  181. <i class="el-icon-question" slot="reference"></i>
  182. </el-popover>
  183. </h3>
  184. <div class="message-list">
  185. <div class="message-item">
  186. <span><i class="el-icon-warning"></i></span>
  187. <span>2020-7-1 08:23</span>
  188. <span
  189. >张三(证件号:1001001)陌生人入境,系统已提示李四(账号:lisi)进行人工干预</span
  190. >
  191. </div>
  192. <div class="message-item">
  193. <span><i class="el-icon-warning"></i></span>
  194. <span>2020-7-1 08:23</span>
  195. <span
  196. >张三(证件号:1001001)陌生人入境,系统已提示李四(账号:lisi)进行人工干预</span
  197. >
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. <div class="invigilation-list">
  203. <h3>实时监控台</h3>
  204. <invigilation-student
  205. v-for="item in students"
  206. :key="item.examStudentId"
  207. :data="item"
  208. ></invigilation-student>
  209. <div class="invigilation-student invigilation-student-warning">
  210. <div class="student-video"></div>
  211. <div class="student-info">
  212. <h6><span>刘西西</span><i class="icon icon-net-break"></i></h6>
  213. <p><span>证件号:</span><span>000000000000000008</span></p>
  214. <p><span>答题进度:</span><span>20%</span></p>
  215. <div class="student-time">
  216. <i class="el-icon-alarm-clock"></i>
  217. <span>50:32:15</span>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="invigilation-student invigilation-student-netbreak">
  222. <div class="student-video"></div>
  223. <div class="student-info">
  224. <h6><span>刘西西</span><i class="icon icon-net-break"></i></h6>
  225. <p><span>证件号:</span><span>000000000000000008</span></p>
  226. <p><span>答题进度:</span><span>20%</span></p>
  227. <div class="student-time">
  228. <i class="el-icon-alarm-clock"></i>
  229. <span>50:32:15</span>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </template>
  236. <script>
  237. import EchartRender from "../common/EchartRender";
  238. import InvigilationStudent from "../common/InvigilationStudent";
  239. export default {
  240. name: "exam-invigilation",
  241. components: { EchartRender, InvigilationStudent },
  242. data() {
  243. return {
  244. onlineData: {
  245. dataList: [
  246. {
  247. name: "数学学院",
  248. count: 500,
  249. },
  250. {
  251. name: "物理学院",
  252. count: 700,
  253. },
  254. {
  255. name: "计算机学院",
  256. count: 300,
  257. },
  258. {
  259. name: "外语学院",
  260. count: 400,
  261. },
  262. ],
  263. type: "light", // light or dark
  264. },
  265. orgWarningData: {
  266. dataList: [
  267. {
  268. name: "数学学院",
  269. count: 50,
  270. },
  271. {
  272. name: "物理学院",
  273. count: 5,
  274. },
  275. {
  276. name: "计算机学院",
  277. count: 20,
  278. },
  279. {
  280. name: "外语学院",
  281. count: 25,
  282. },
  283. ],
  284. type: "light",
  285. },
  286. typeWarningData: {
  287. dataList: [
  288. {
  289. name: "频繁离开座位",
  290. count: 50,
  291. },
  292. {
  293. name: "身份验证不通过",
  294. count: 5,
  295. },
  296. {
  297. name: "陌生人入境",
  298. count: 20,
  299. },
  300. {
  301. name: "疑似:开启虚拟摄像头",
  302. count: 25,
  303. },
  304. ],
  305. type: "light",
  306. },
  307. warningTrendData: {
  308. dataList: [
  309. {
  310. name: "8:00",
  311. count: 13,
  312. },
  313. {
  314. name: "9:00",
  315. count: 16,
  316. },
  317. {
  318. name: "10:00",
  319. count: 20,
  320. },
  321. {
  322. name: "11:00",
  323. count: 16,
  324. },
  325. {
  326. name: "12:00",
  327. count: 10,
  328. },
  329. {
  330. name: "13:00",
  331. count: 16,
  332. },
  333. {
  334. name: "14:00",
  335. count: 25,
  336. },
  337. {
  338. name: "15:00",
  339. count: 30,
  340. },
  341. {
  342. name: "16:00",
  343. count: 22,
  344. },
  345. {
  346. name: "17:00",
  347. count: 15,
  348. },
  349. {
  350. name: "18:00",
  351. count: 12,
  352. },
  353. {
  354. name: "19:00",
  355. count: 20,
  356. },
  357. ],
  358. type: "light",
  359. },
  360. chartDataReady: false,
  361. students: [],
  362. };
  363. },
  364. computed: {
  365. isFullScreen() {
  366. return this.$store.state.isFullScreen;
  367. },
  368. },
  369. watch: {
  370. isFullScreen(val) {
  371. this.fullScreenChange(val);
  372. },
  373. },
  374. mounted() {
  375. this.chartDataReady = true;
  376. },
  377. methods: {
  378. exitFullscreen() {
  379. const exitFullscreen =
  380. document.exitFullscreen ||
  381. document.mozCancelFullScreen ||
  382. document.webkitCancelFullScreen;
  383. exitFullscreen.call(document);
  384. },
  385. checkDocIsFullscreen() {
  386. return (
  387. document.fullscreenElement ||
  388. document.msFullscreenElement ||
  389. document.mozFullscreenElement ||
  390. document.webkitFullscreenElement
  391. );
  392. },
  393. fullScreenChange(isFullScreen) {
  394. this.chartDataReady = false;
  395. this.$nextTick(() => {
  396. const colorType = isFullScreen ? "dark" : "light";
  397. this.onlineData.type = colorType;
  398. this.orgWarningData.type = colorType;
  399. this.typeWarningData.type = colorType;
  400. this.warningTrendData.type = colorType;
  401. this.chartDataReady = true;
  402. });
  403. },
  404. },
  405. };
  406. </script>
  407. <style lang="scss" scoped>
  408. .exam-invigilation {
  409. position: relative;
  410. padding-right: 310px;
  411. .part-box-head-right {
  412. display: none;
  413. }
  414. .part-box {
  415. position: relative;
  416. }
  417. .invigilation-part-title {
  418. position: absolute;
  419. top: 20px;
  420. left: 20px;
  421. font-size: 16px;
  422. font-weight: 500;
  423. z-index: 9;
  424. }
  425. .el-icon-question {
  426. margin-left: 5px;
  427. color: #bdc8da;
  428. }
  429. }
  430. .invigilation-list {
  431. position: absolute;
  432. top: 0;
  433. right: 0;
  434. width: 280px;
  435. height: 100%;
  436. background: #fff;
  437. border-radius: 6px;
  438. padding: 20px;
  439. z-index: 9;
  440. overflow-y: auto;
  441. overflow-x: hidden;
  442. > h3 {
  443. font-size: 18px;
  444. font-weight: 600;
  445. line-height: 25px;
  446. margin-bottom: 20px;
  447. }
  448. }
  449. .invigilation-analysis {
  450. .part-box-head-left h1 {
  451. line-height: 25px;
  452. }
  453. }
  454. .invigilation-summary {
  455. margin: 0 -10px;
  456. font-size: 0;
  457. &-item {
  458. display: inline-block;
  459. vertical-align: top;
  460. width: 20%;
  461. padding: 0 10px;
  462. font-size: 14px;
  463. h5 {
  464. font-size: 14px;
  465. height: 20px;
  466. color: #626a82;
  467. margin: 0;
  468. }
  469. p {
  470. font-size: 32px;
  471. line-height: 51px;
  472. font-weight: 600;
  473. color: #202b4b;
  474. margin: 0;
  475. }
  476. &:first-child {
  477. .part-box {
  478. background-color: #3a93fb;
  479. }
  480. h5 {
  481. color: #fff;
  482. }
  483. p {
  484. color: #fff;
  485. font-weight: 900;
  486. font-size: 36px;
  487. }
  488. }
  489. }
  490. }
  491. .invigilation-online {
  492. height: 360px;
  493. }
  494. .invigilation-warning {
  495. .part-box {
  496. height: 282px;
  497. padding-top: 50px;
  498. padding-bottom: 10px;
  499. }
  500. }
  501. .invigilation-trend {
  502. height: 327px;
  503. }
  504. .invigilation-message {
  505. min-height: 160px;
  506. padding-top: 70px;
  507. .message-item {
  508. margin-bottom: 15px;
  509. span {
  510. display: inline-block;
  511. vertical-align: middle;
  512. line-height: 20px;
  513. &:first-child {
  514. color: #fe5863;
  515. }
  516. &:nth-of-type(2) {
  517. margin: 0 20px 0 12px;
  518. color: #8c94ac;
  519. }
  520. }
  521. }
  522. }
  523. </style>
  524. <style lang="scss">
  525. // fullscreen style
  526. .app-fullscreen {
  527. .part-box {
  528. background: #2d325a;
  529. }
  530. .exam-invigilation {
  531. margin: -30px;
  532. padding-right: 280px;
  533. color: #fff;
  534. .part-box-head-right {
  535. display: block;
  536. cursor: pointer;
  537. color: #737aae;
  538. > i {
  539. margin-right: 8px;
  540. margin-top: -2px;
  541. }
  542. }
  543. .part-box-head-left > h1 {
  544. color: #fff;
  545. }
  546. .el-icon-question {
  547. color: #737aae;
  548. }
  549. }
  550. .invigilation-analysis {
  551. padding: 30px;
  552. background: #25294a;
  553. }
  554. .invigilation-list {
  555. background: #202442;
  556. border-radius: 0;
  557. .invigilation-student {
  558. background: #2d325a;
  559. border-radius: 10px;
  560. }
  561. .student-info {
  562. .student-time {
  563. background: #353c70;
  564. }
  565. > p {
  566. color: #737aae;
  567. }
  568. }
  569. }
  570. .invigilation-summary {
  571. &-item {
  572. h5 {
  573. color: #737aae;
  574. }
  575. p {
  576. color: #fff;
  577. }
  578. &:first-child {
  579. .el-icon-question {
  580. color: #fff;
  581. }
  582. }
  583. }
  584. }
  585. }
  586. </style>