group.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <div class="live">
  3. <!--顶部-->
  4. <div class="live-top">
  5. <div class="live-title">
  6. <div class="live-title-name">
  7. {{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}
  8. </div>
  9. <div>
  10. <el-button @click="stopGroup">
  11. {{ $t('Key404') }}
  12. </el-button>
  13. <el-button v-show="isGroup" @click="reconnection">
  14. {{ $t('Key405') }}
  15. </el-button>
  16. <el-button v-show="isGroup && !isAudit" @click="setCurGroupToExample_Teacher">
  17. {{ $t('Key406') }}
  18. </el-button>
  19. <el-button v-show="isGroup && !isAudit" @click="exitCurGroup_Teacher">
  20. {{ $t('Key407') }}
  21. </el-button>
  22. </div>
  23. </div>
  24. <div class="live-course-name">
  25. {{ roomInfo.course_name }}
  26. </div>
  27. <div class="live-teacher">
  28. <span class="live-teacher-name"> <svg-icon icon-class="person" />{{ roomInfo.teacher_name }} </span>
  29. <span><svg-icon icon-class="people" />{{ roomInfo.student_count }}</span>
  30. </div>
  31. </div>
  32. <!-- 主容器 -->
  33. <div class="live-container">
  34. <!-- 左侧 -->
  35. <div class="live-container-left">
  36. <div v-show="!isGroup" class="student-group">
  37. <template v-for="(item, i) in group_list">
  38. <div :key="item.room_id" class="student-group-list" @click="enterGroup(item.group_id)">
  39. <div class="group-serial">
  40. {{ i + 1 }}
  41. </div>
  42. <div class="student-group-list-avatar">
  43. <el-avatar
  44. v-for="li in item.student_list"
  45. :key="li.student_id"
  46. icon="el-icon-user"
  47. :src="li.student_image_url"
  48. />
  49. </div>
  50. </div>
  51. </template>
  52. </div>
  53. <div v-show="isGroup" class="group-discussion" :style="{ height: isAudit ? '404px' : '468px' }">
  54. <div v-for="(item, i) in streamList" :key="item.id()" class="group-wrapper">
  55. <div :id="`group-${i}`" class="group-box" />
  56. <div class="live-wrapper-stream">
  57. {{ searchStudentName(item.id()) }}
  58. <svg-icon :icon-class="item.hasAudio() ? 'mike-on-grey' : ''" />
  59. <svg-icon v-if="isMobile(item.id())" icon-class="mobile" />
  60. </div>
  61. </div>
  62. <div v-for="item in noStreamList" :key="item.student_id" class="group-box student-info">
  63. <el-avatar icon="el-icon-user" :src="item.student_image_url" :size="80" />
  64. <span class="student_name">{{ item.student_name }}</span>
  65. </div>
  66. </div>
  67. <div v-if="isAudit" class="audit-list">
  68. <svg-icon icon-class="arrow-left-white" @click="listMove('left')" />
  69. <div ref="avatar" class="audit-list-container">
  70. <div ref="list" class="avatar-list" :style="{ 'margin-left': marginLeft + 'px' }">
  71. <el-avatar
  72. v-for="item in audience_list"
  73. :key="item.student_id"
  74. :size="32"
  75. :src="item.student_image_url"
  76. />
  77. </div>
  78. </div>
  79. <svg-icon icon-class="arrow-right-white" @click="listMove('right')" />
  80. </div>
  81. <div class="button-group">
  82. <div class="button-group-left">
  83. <span class="stop-group" @click="stopGroup">{{ $t('Key404') }}</span>
  84. </div>
  85. <div class="button-group-right" />
  86. </div>
  87. <div class="live-container-left-chat">
  88. <div class="chat-top">
  89. <span>{{ $t('Key409') }}</span>
  90. <el-button size="small" @click="sendAllMsg">
  91. {{ $t('Key408') }}
  92. </el-button>
  93. </div>
  94. <div class="chat-window">
  95. <ul ref="chat" class="chat-window-ul">
  96. <li v-for="(item, i) in chatList" :key="i">
  97. <div class="msg-normal">
  98. <span>{{ item.username }}: </span>
  99. <span>{{ item.msg }}</span>
  100. </div>
  101. </li>
  102. </ul>
  103. </div>
  104. <div class="chat-speak">
  105. <el-input
  106. v-model="msg"
  107. :placeholder="isGroup ? $t('Key410') : $t('Key411')"
  108. maxlength="400"
  109. :disabled="!isGroup"
  110. @keydown.enter.native="sendMsg"
  111. >
  112. <el-button slot="append" :disabled="!isGroup" @click="sendMsg">
  113. {{ $t('Key302') }}
  114. </el-button>
  115. </el-input>
  116. </div>
  117. </div>
  118. </div>
  119. <!-- 右侧 -->
  120. <div class="live-container-right">
  121. <div class="live-teacher-lens" @mouseover="liveMenuShow = true" @mouseout="liveMenuShow = false">
  122. <div id="live" />
  123. <div :style="{ bottom: liveMenuShow ? '0' : '-40px' }" class="live-wrapper">
  124. <div>
  125. {{ roomInfo.teacher_name }}
  126. </div>
  127. <div />
  128. </div>
  129. </div>
  130. <div class="student-list">
  131. <div class="student-list-title">
  132. {{ $t('Key412') }}
  133. </div>
  134. <ul>
  135. <template v-if="isGroup">
  136. <li v-for="item in student_list" :key="item.room_user_id">
  137. <div class="student-list-left">
  138. <el-avatar icon="el-icon-user" size="small" :src="item.student_image_url" />
  139. <span class="name">{{ item.student_name }}</span>
  140. </div>
  141. </li>
  142. </template>
  143. <template v-else>
  144. <template v-for="item in group_list">
  145. <li v-for="el in item.student_list" :key="el.student_id">
  146. <div class="student-list-left">
  147. <el-avatar icon="el-icon-user" size="small" :src="el.student_image_url" />
  148. <span class="name">{{ el.student_name }}</span>
  149. </div>
  150. <div class="student-list-right" />
  151. </li>
  152. </template>
  153. </template>
  154. </ul>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. </template>
  160. <script>
  161. import {
  162. GetLiveRoomInfo,
  163. StudentExitLiveRoom,
  164. StopGroup,
  165. GetGroupInfo_Teacher,
  166. CreateEnterLiveRoomSession,
  167. JoinGroup_Teacher,
  168. ExitCurGroup_Teacher,
  169. GetMyGroupInfo_Teacher,
  170. GetGroupStatus,
  171. SendGroupMessage,
  172. SetCurGroupToExample_Teacher
  173. } from '@/api/live';
  174. import * as common from './group';
  175. export default {
  176. data() {
  177. return {
  178. task_id: this.$route.query.task_id,
  179. isGroup: false,
  180. group_id: '',
  181. // 是否旁听
  182. isAudit: false,
  183. // 定时器
  184. timer: null,
  185. marginLeft: 0,
  186. rtc: null,
  187. roomData: {
  188. desc: '直播间标题',
  189. name: '姓名',
  190. user: {
  191. id: '',
  192. name: '',
  193. role: 'talker',
  194. rommid: ''
  195. },
  196. max_users: 1,
  197. allow_chat: true,
  198. allow_audio: true,
  199. allow_speak: true
  200. },
  201. roomInfo: {
  202. room_id: '',
  203. video_mode: 1,
  204. task_name: '',
  205. cs_item_name: '',
  206. course_name: '',
  207. teacher_name: '',
  208. student_count: 0
  209. },
  210. loadedNumber: 0,
  211. speakData: {},
  212. roomContext: {},
  213. msg: '',
  214. chatList: [],
  215. // 小组成员列表
  216. group_list: [],
  217. live_room_sys_user_id: '',
  218. // 直播状态
  219. liveStat: false,
  220. liveMenuShow: false,
  221. room_id: '',
  222. session_id: '',
  223. streamList: [],
  224. student_list: [],
  225. // 无远程流学员列表
  226. noStreamList: [],
  227. // 旁听学员列表
  228. audience_list: []
  229. };
  230. },
  231. watch: {
  232. loadedNumber(newVal) {
  233. if (newVal === 2) {
  234. if (!this.room_id || !this.session_id) {
  235. return;
  236. }
  237. this.rtc = common.initSDK({
  238. userid: this.live_room_sys_user_id,
  239. roomid: this.room_id,
  240. sessionid: this.session_id
  241. });
  242. common.initListener(this); // 注册监听事件
  243. this.loadedNumber = 0;
  244. }
  245. },
  246. streamList(newVal) {
  247. let list = this.student_list.filter(item => {
  248. let isNoStream = true;
  249. for (let i = 0; i < newVal.length; i++) {
  250. if (newVal[i].id().split('-')[0] === item.room_user_id) isNoStream = false;
  251. }
  252. return isNoStream;
  253. });
  254. this.noStreamList = list;
  255. if (newVal.length > 0) {
  256. this.$nextTick(() => {
  257. newVal[newVal.length - 1].show(`group-${newVal.length - 1}`);
  258. });
  259. }
  260. },
  261. // 聊天列表滚动
  262. chatList() {
  263. common.chatRoll(this);
  264. }
  265. },
  266. created() {
  267. GetGroupStatus({ task_id: this.task_id }).then(({ is_teacher_in_group }) => {
  268. if (is_teacher_in_group === 'true') {
  269. GetMyGroupInfo_Teacher({
  270. task_id: this.task_id
  271. }).then(({ room_id, is_example, group_id, teacher: { session_id }, student_list, audience_list }) => {
  272. this.room_id = room_id;
  273. this.session_id = session_id;
  274. this.noStreamList = student_list;
  275. this.student_list = student_list;
  276. common.downloadWebSDK(this);
  277. this.isGroup = true;
  278. this.group_id = group_id;
  279. this.isAudit = is_example === 'true';
  280. this.audience_list = audience_list;
  281. });
  282. }
  283. });
  284. this.getLiveRoomInfo();
  285. GetGroupInfo_Teacher({ task_id: this.task_id }).then(({ live_room_sys_user_id, group_list }) => {
  286. this.group_list = group_list;
  287. this.live_room_sys_user_id = live_room_sys_user_id;
  288. });
  289. this.updateWordPack({
  290. word_key_list: [
  291. 'Key404',
  292. 'Key405',
  293. 'Key406',
  294. 'Key407',
  295. 'Key409',
  296. 'Key408',
  297. 'Key410',
  298. 'Key411',
  299. 'Key302',
  300. 'Key412',
  301. 'Key94',
  302. 'Key83',
  303. 'Key46',
  304. 'Key413',
  305. 'Key414',
  306. 'Key415',
  307. 'Key416',
  308. 'Key417',
  309. 'Key443',
  310. 'Key402',
  311. 'Key403'
  312. ]
  313. });
  314. },
  315. beforeDestroy() {
  316. common.closeVideo('main');
  317. this.streamList.forEach(item => {
  318. common.unSubscribeStream(item);
  319. });
  320. },
  321. methods: {
  322. getLiveRoomInfo() {
  323. GetLiveRoomInfo({ task_id: this.task_id }).then(
  324. ({ room_id, video_mode, task_name, cs_item_name, course_name, teacher_name, student_count }) => {
  325. this.roomInfo = {
  326. room_id,
  327. video_mode,
  328. task_name,
  329. cs_item_name,
  330. course_name,
  331. teacher_name,
  332. student_count
  333. };
  334. }
  335. );
  336. },
  337. // 发消息
  338. sendMsg() {
  339. common.sendMsg(this.msg);
  340. this.msg = '';
  341. },
  342. reconnection() {
  343. common.reconnection();
  344. },
  345. // 给所有小组发送消息
  346. sendAllMsg() {
  347. this.$prompt(' ', this.$i18n.t('Key408'), {
  348. confirmButtonText: this.$i18n.t('Key94'),
  349. cancelButtonText: this.$i18n.t('Key83'),
  350. inputValidator(val) {
  351. if (val !== null && val.length > 0) return true;
  352. return this.$i18n.t('Key46');
  353. }
  354. }).then(({ value }) => {
  355. SendGroupMessage({ task_id: this.task_id, group_message_text: value }).then(() => {
  356. this.$message.success(this.$i18n.t('Key413'));
  357. });
  358. });
  359. },
  360. chatBans() {
  361. common.roomUpdate({
  362. allow_chat: !this.roomData.allow_chat,
  363. roomUpdateSuccess(data) {
  364. console.log(data, '房间模板配置更新请求成功!');
  365. },
  366. roomUpdateFailed(data) {
  367. console.log(data, '房间模板配置更新请求失败! 请稍后再试!');
  368. }
  369. });
  370. },
  371. studentExitLiveRoom(room_user_id) {
  372. StudentExitLiveRoom({ task_id: this.task_id, room_user_id });
  373. },
  374. // 分组讨论
  375. stopGroup() {
  376. StopGroup({ task_id: this.task_id }).then(() => {
  377. this.$message.success(this.$i18n.t('Key414'));
  378. CreateEnterLiveRoomSession({
  379. task_id: this.task_id
  380. }).then(({ live_room_sys_user_id, room_id, session_id, room_user_id }) => {
  381. this.$router.push({
  382. path: `/live/teacher`,
  383. query: {
  384. live_room_sys_user_id,
  385. room_id,
  386. session_id,
  387. task_id: this.task_id,
  388. room_user_id
  389. }
  390. });
  391. });
  392. });
  393. },
  394. enterGroup(group_id) {
  395. JoinGroup_Teacher({ task_id: this.task_id, group_id })
  396. .then(({ room_id, session_id }) => {
  397. this.room_id = room_id;
  398. this.session_id = session_id;
  399. common.downloadWebSDK(this);
  400. this.isGroup = true;
  401. this.group_id = group_id;
  402. return GetMyGroupInfo_Teacher({ task_id: this.task_id });
  403. })
  404. .then(({ student_list }) => {
  405. this.noStreamList = student_list;
  406. this.student_list = student_list;
  407. });
  408. },
  409. searchStudentName(id) {
  410. let uid = id.split('-')[0];
  411. if (uid) {
  412. let student = this.student_list.find(item => item.room_user_id === uid);
  413. return student ? student.student_name : '';
  414. }
  415. return '';
  416. },
  417. isMobile(id) {
  418. let uid = id.split('-')[0];
  419. if (uid) {
  420. let student = this.student_list.find(item => item.room_user_id === uid);
  421. return student ? student.is_mobile === 'true' : false;
  422. }
  423. return false;
  424. },
  425. listMove(direction) {
  426. let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
  427. if (w > 60) {
  428. let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
  429. let width = direction === 'right' ? left - 60 : left + 60;
  430. if (Math.abs(width) > w) width = -w;
  431. this.marginLeft = width > 0 ? 0 : width;
  432. }
  433. },
  434. exitCurGroup_Teacher() {
  435. ExitCurGroup_Teacher({ task_id: this.task_id }).then(() => {
  436. this.isGroup = false;
  437. this.group_id = '';
  438. this.room_id = '';
  439. this.session_id = '';
  440. common.closeVideo('main');
  441. this.streamList.forEach(item => {
  442. common.unSubscribeStream(item);
  443. });
  444. this.streamList = [];
  445. common.removeWebSDK();
  446. this.$message.success(this.$i18n.t('Key415'));
  447. });
  448. },
  449. setCurGroupToExample_Teacher() {
  450. const loading = this.$loading({ text: this.$i18n.t('Key416') });
  451. SetCurGroupToExample_Teacher({ task_id: this.task_id, group_id: this.group_id })
  452. .then(() => {
  453. this.isAudit = true;
  454. this.$message.success(this.$i18n.t('Key417'));
  455. return GetMyGroupInfo_Teacher({ task_id: this.task_id });
  456. })
  457. .then(({ audience_list }) => {
  458. this.audience_list = audience_list;
  459. })
  460. .finally(() => {
  461. loading.close();
  462. });
  463. }
  464. }
  465. };
  466. </script>
  467. <style lang="scss" scoped>
  468. @import '~@/styles/mixin';
  469. $live-bc: #3d3938;
  470. .live {
  471. @include container;
  472. // 顶部
  473. &-top {
  474. padding: 24px 32px;
  475. background-color: #fff;
  476. border-top-left-radius: 8px;
  477. border-top-right-radius: 8px;
  478. .live-title {
  479. display: flex;
  480. justify-content: space-between;
  481. &-name {
  482. font-size: 22px;
  483. }
  484. .el-button {
  485. padding: 7px 12px;
  486. border-radius: 4px;
  487. }
  488. }
  489. .live-course-name {
  490. font-size: 14px;
  491. line-height: 30px;
  492. color: #737373;
  493. }
  494. .live-teacher {
  495. margin-top: 12px;
  496. .svg-icon {
  497. margin-right: 8px;
  498. }
  499. &-name {
  500. margin-right: 60px;
  501. }
  502. }
  503. }
  504. // 主容器
  505. &-container {
  506. display: flex;
  507. justify-content: left;
  508. &-left {
  509. width: 832px;
  510. background-color: #fff;
  511. border-radius: 8px;
  512. .student-group {
  513. display: flex;
  514. flex-wrap: wrap;
  515. width: 100%;
  516. height: 468px;
  517. padding: 10px 0 10px 24px;
  518. overflow: auto;
  519. background-color: #4d4d4d;
  520. &-list {
  521. position: relative;
  522. width: 255px;
  523. height: 144px;
  524. padding: 24px;
  525. margin: 0 8px 8px 0;
  526. cursor: pointer;
  527. background-color: #646464;
  528. &-avatar {
  529. display: flex;
  530. flex-wrap: wrap;
  531. align-items: center;
  532. height: 92px;
  533. margin-top: 12px;
  534. overflow: auto;
  535. .el-avatar {
  536. margin: 0 7px 6px 0;
  537. }
  538. }
  539. .group-serial {
  540. position: absolute;
  541. top: 0;
  542. left: 0;
  543. display: inline-block;
  544. width: 24px;
  545. height: 24px;
  546. line-height: 24px;
  547. color: #fff;
  548. text-align: center;
  549. background-color: #3d3d3d;
  550. }
  551. }
  552. }
  553. // 分组讨论
  554. .group-discussion {
  555. display: grid;
  556. grid-template-rows: 144px;
  557. grid-template-columns: 1fr 1fr 1fr;
  558. gap: 8px;
  559. width: 100%;
  560. height: 468px;
  561. padding: 24px;
  562. overflow-y: auto;
  563. background-color: $live-bc;
  564. .group-box {
  565. width: 100%;
  566. height: 144px;
  567. &.student-info {
  568. display: flex;
  569. flex-direction: column;
  570. align-items: center;
  571. justify-content: space-between;
  572. border: 2px solid #625c5b;
  573. .el-avatar {
  574. margin-top: 12px;
  575. }
  576. .student_name {
  577. height: 28px;
  578. color: #fff;
  579. }
  580. }
  581. }
  582. .group-wrapper {
  583. position: relative;
  584. .live-wrapper-stream {
  585. position: absolute;
  586. top: 112px;
  587. width: calc(100% - 16px);
  588. height: 32px;
  589. padding: 0 15px;
  590. margin: 0 8px;
  591. line-height: 32px;
  592. color: #fff;
  593. text-align: center;
  594. background-color: rgba(0, 0, 0, 70%);
  595. transition: all 300ms ease-in 0s;
  596. > .svg-icon {
  597. margin-left: 12px;
  598. }
  599. }
  600. }
  601. }
  602. // 旁听列表
  603. .audit-list {
  604. display: flex;
  605. align-items: center;
  606. width: 100%;
  607. height: 64px;
  608. padding: 16px 24px;
  609. background-color: #5a5a5a;
  610. &-container {
  611. width: 100%;
  612. height: 100%;
  613. margin: 0 24px;
  614. overflow: hidden;
  615. .avatar-list {
  616. display: inline-block;
  617. white-space: nowrap;
  618. .el-avatar {
  619. margin-left: 8px;
  620. }
  621. }
  622. }
  623. .svg-icon {
  624. cursor: pointer;
  625. }
  626. }
  627. .button-group {
  628. display: flex;
  629. justify-content: space-between;
  630. height: 48px;
  631. padding: 0 15px;
  632. background-color: #4d4d4d;
  633. border-bottom-left-radius: 5px;
  634. .svg-icon {
  635. font-size: 20px;
  636. }
  637. &-left {
  638. .stop-group {
  639. color: #fff;
  640. }
  641. > span {
  642. display: inline-block;
  643. height: 100%;
  644. padding: 14px 16px;
  645. cursor: pointer;
  646. &:active,
  647. &:hover {
  648. background-color: #3d3d3d;
  649. }
  650. }
  651. }
  652. }
  653. // 聊天窗口
  654. &-chat {
  655. display: flex;
  656. flex-direction: column;
  657. justify-content: space-between;
  658. height: 278px;
  659. border: 1px solid #ccc;
  660. border-bottom-left-radius: 8px;
  661. .chat-top {
  662. display: flex;
  663. align-items: center;
  664. justify-content: space-between;
  665. padding: 15px 15px 10px;
  666. color: #959595;
  667. border-bottom: 1px solid #e6e6e6;
  668. label {
  669. cursor: pointer;
  670. }
  671. .allow-chat {
  672. margin-right: 12px;
  673. }
  674. }
  675. .chat-window {
  676. position: relative;
  677. width: 100%;
  678. height: 100%;
  679. overflow: hidden;
  680. &-ul {
  681. position: absolute;
  682. top: 0;
  683. left: 0;
  684. width: 100%;
  685. height: 100%;
  686. overflow: auto;
  687. .msg-normal {
  688. padding: 7px 16px;
  689. }
  690. }
  691. }
  692. .chat-speak {
  693. padding: 16px;
  694. }
  695. }
  696. }
  697. &-right {
  698. height: 794px;
  699. padding: 8px;
  700. background-color: #2c2c2c;
  701. border-end-end-radius: 8px;
  702. .live-teacher-lens {
  703. position: relative;
  704. overflow: hidden;
  705. #live {
  706. width: 352px;
  707. height: 198px;
  708. background-color: $live-bc;
  709. }
  710. .live-wrapper {
  711. position: absolute;
  712. width: 100%;
  713. height: 40px;
  714. padding: 0 16px;
  715. line-height: 40px;
  716. color: #fff;
  717. background-color: rgba(0, 0, 0, 70%);
  718. transition: all 300ms ease-in 0s;
  719. }
  720. }
  721. // 学员列表
  722. .student-list {
  723. width: 100%;
  724. height: calc(100% - 200px);
  725. padding: 24px 16px;
  726. margin-top: 2px;
  727. font-size: 14px;
  728. color: #fff;
  729. background-color: #2c2c2c;
  730. &-title {
  731. margin-bottom: 16px;
  732. }
  733. ul {
  734. height: calc(100% - 20px);
  735. overflow-x: auto;
  736. }
  737. li {
  738. display: flex;
  739. margin-bottom: 16px;
  740. .student-list-left {
  741. flex: 8;
  742. .name {
  743. margin-left: 8px;
  744. vertical-align: super;
  745. }
  746. }
  747. .student-list-right {
  748. flex: 2;
  749. .svg-icon {
  750. margin-top: 7px;
  751. margin-right: 8px;
  752. font-size: 18px;
  753. cursor: pointer;
  754. }
  755. }
  756. }
  757. }
  758. }
  759. }
  760. }
  761. </style>