group.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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. ]
  310. });
  311. },
  312. beforeDestroy() {
  313. common.closeVideo('main');
  314. this.streamList.forEach(item => {
  315. common.unSubscribeStream(item);
  316. });
  317. },
  318. methods: {
  319. getLiveRoomInfo() {
  320. GetLiveRoomInfo({ task_id: this.task_id }).then(
  321. ({ room_id, video_mode, task_name, cs_item_name, course_name, teacher_name, student_count }) => {
  322. this.roomInfo = {
  323. room_id,
  324. video_mode,
  325. task_name,
  326. cs_item_name,
  327. course_name,
  328. teacher_name,
  329. student_count
  330. };
  331. }
  332. );
  333. },
  334. // 发消息
  335. sendMsg() {
  336. common.sendMsg(this.msg);
  337. this.msg = '';
  338. },
  339. reconnection() {
  340. common.reconnection();
  341. },
  342. // 给所有小组发送消息
  343. sendAllMsg() {
  344. this.$prompt(' ', this.$i18n.t('Key408'), {
  345. confirmButtonText: this.$i18n.t('Key94'),
  346. cancelButtonText: this.$i18n.t('Key83'),
  347. inputValidator(val) {
  348. if (val !== null && val.length > 0) return true;
  349. return this.$i18n.t('Key46');
  350. }
  351. }).then(({ value }) => {
  352. SendGroupMessage({ task_id: this.task_id, group_message_text: value }).then(() => {
  353. this.$message.success(this.$i18n.t('Key413'));
  354. });
  355. });
  356. },
  357. chatBans() {
  358. common.roomUpdate({
  359. allow_chat: !this.roomData.allow_chat,
  360. roomUpdateSuccess(data) {
  361. console.log(data, '房间模板配置更新请求成功!');
  362. },
  363. roomUpdateFailed(data) {
  364. console.log(data, '房间模板配置更新请求失败! 请稍后再试!');
  365. }
  366. });
  367. },
  368. studentExitLiveRoom(room_user_id) {
  369. StudentExitLiveRoom({ task_id: this.task_id, room_user_id });
  370. },
  371. // 分组讨论
  372. stopGroup() {
  373. StopGroup({ task_id: this.task_id }).then(() => {
  374. this.$message.success(this.$i18n.t('Key414'));
  375. CreateEnterLiveRoomSession({
  376. task_id: this.task_id
  377. }).then(({ live_room_sys_user_id, room_id, session_id, room_user_id }) => {
  378. this.$router.push({
  379. path: `/live/teacher`,
  380. query: {
  381. live_room_sys_user_id,
  382. room_id,
  383. session_id,
  384. task_id: this.task_id,
  385. room_user_id
  386. }
  387. });
  388. });
  389. });
  390. },
  391. enterGroup(group_id) {
  392. JoinGroup_Teacher({ task_id: this.task_id, group_id })
  393. .then(({ room_id, session_id }) => {
  394. this.room_id = room_id;
  395. this.session_id = session_id;
  396. common.downloadWebSDK(this);
  397. this.isGroup = true;
  398. this.group_id = group_id;
  399. return GetMyGroupInfo_Teacher({ task_id: this.task_id });
  400. })
  401. .then(({ student_list }) => {
  402. this.noStreamList = student_list;
  403. this.student_list = student_list;
  404. });
  405. },
  406. searchStudentName(id) {
  407. let uid = id.split('-')[0];
  408. if (uid) {
  409. let student = this.student_list.find(item => item.room_user_id === uid);
  410. return student ? student.student_name : '';
  411. }
  412. return '';
  413. },
  414. isMobile(id) {
  415. let uid = id.split('-')[0];
  416. if (uid) {
  417. let student = this.student_list.find(item => item.room_user_id === uid);
  418. return student ? student.is_mobile === 'true' : false;
  419. }
  420. return false;
  421. },
  422. listMove(direction) {
  423. let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
  424. if (w > 60) {
  425. let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
  426. let width = direction === 'right' ? left - 60 : left + 60;
  427. if (Math.abs(width) > w) width = -w;
  428. this.marginLeft = width > 0 ? 0 : width;
  429. }
  430. },
  431. exitCurGroup_Teacher() {
  432. ExitCurGroup_Teacher({ task_id: this.task_id }).then(() => {
  433. this.isGroup = false;
  434. this.group_id = '';
  435. this.room_id = '';
  436. this.session_id = '';
  437. common.closeVideo('main');
  438. this.streamList.forEach(item => {
  439. common.unSubscribeStream(item);
  440. });
  441. this.streamList = [];
  442. common.removeWebSDK();
  443. this.$message.success(this.$i18n.t('Key415'));
  444. });
  445. },
  446. setCurGroupToExample_Teacher() {
  447. const loading = this.$loading({ text: this.$i18n.t('Key416') });
  448. SetCurGroupToExample_Teacher({ task_id: this.task_id, group_id: this.group_id })
  449. .then(() => {
  450. this.isAudit = true;
  451. this.$message.success(this.$i18n.t('Key417'));
  452. return GetMyGroupInfo_Teacher({ task_id: this.task_id });
  453. })
  454. .then(({ audience_list }) => {
  455. this.audience_list = audience_list;
  456. })
  457. .finally(() => {
  458. loading.close();
  459. });
  460. }
  461. }
  462. };
  463. </script>
  464. <style lang="scss" scoped>
  465. @import '~@/styles/mixin';
  466. $live-bc: #3d3938;
  467. .live {
  468. @include container;
  469. // 顶部
  470. &-top {
  471. padding: 24px 32px;
  472. background-color: #fff;
  473. border-top-left-radius: 8px;
  474. border-top-right-radius: 8px;
  475. .live-title {
  476. display: flex;
  477. justify-content: space-between;
  478. &-name {
  479. font-size: 22px;
  480. }
  481. .el-button {
  482. padding: 7px 12px;
  483. border-radius: 4px;
  484. }
  485. }
  486. .live-course-name {
  487. font-size: 14px;
  488. line-height: 30px;
  489. color: #737373;
  490. }
  491. .live-teacher {
  492. margin-top: 12px;
  493. .svg-icon {
  494. margin-right: 8px;
  495. }
  496. &-name {
  497. margin-right: 60px;
  498. }
  499. }
  500. }
  501. // 主容器
  502. &-container {
  503. display: flex;
  504. justify-content: left;
  505. &-left {
  506. width: 832px;
  507. background-color: #fff;
  508. border-radius: 8px;
  509. .student-group {
  510. display: flex;
  511. flex-wrap: wrap;
  512. width: 100%;
  513. height: 468px;
  514. padding: 10px 0 10px 24px;
  515. overflow: auto;
  516. background-color: #4d4d4d;
  517. &-list {
  518. position: relative;
  519. width: 255px;
  520. height: 144px;
  521. padding: 24px;
  522. margin: 0 8px 8px 0;
  523. cursor: pointer;
  524. background-color: #646464;
  525. &-avatar {
  526. display: flex;
  527. flex-wrap: wrap;
  528. align-items: center;
  529. height: 92px;
  530. margin-top: 12px;
  531. overflow: auto;
  532. .el-avatar {
  533. margin: 0 7px 6px 0;
  534. }
  535. }
  536. .group-serial {
  537. position: absolute;
  538. top: 0;
  539. left: 0;
  540. display: inline-block;
  541. width: 24px;
  542. height: 24px;
  543. line-height: 24px;
  544. color: #fff;
  545. text-align: center;
  546. background-color: #3d3d3d;
  547. }
  548. }
  549. }
  550. // 分组讨论
  551. .group-discussion {
  552. display: grid;
  553. grid-template-rows: 144px;
  554. grid-template-columns: 1fr 1fr 1fr;
  555. gap: 8px;
  556. width: 100%;
  557. height: 468px;
  558. padding: 24px;
  559. overflow-y: auto;
  560. background-color: $live-bc;
  561. .group-box {
  562. width: 100%;
  563. height: 144px;
  564. &.student-info {
  565. display: flex;
  566. flex-direction: column;
  567. align-items: center;
  568. justify-content: space-between;
  569. border: 2px solid #625c5b;
  570. .el-avatar {
  571. margin-top: 12px;
  572. }
  573. .student_name {
  574. height: 28px;
  575. color: #fff;
  576. }
  577. }
  578. }
  579. .group-wrapper {
  580. position: relative;
  581. .live-wrapper-stream {
  582. position: absolute;
  583. top: 112px;
  584. width: calc(100% - 16px);
  585. height: 32px;
  586. padding: 0 15px;
  587. margin: 0 8px;
  588. line-height: 32px;
  589. color: #fff;
  590. text-align: center;
  591. background-color: rgba(0, 0, 0, 70%);
  592. transition: all 300ms ease-in 0s;
  593. > .svg-icon {
  594. margin-left: 12px;
  595. }
  596. }
  597. }
  598. }
  599. // 旁听列表
  600. .audit-list {
  601. display: flex;
  602. align-items: center;
  603. width: 100%;
  604. height: 64px;
  605. padding: 16px 24px;
  606. background-color: #5a5a5a;
  607. &-container {
  608. width: 100%;
  609. height: 100%;
  610. margin: 0 24px;
  611. overflow: hidden;
  612. .avatar-list {
  613. display: inline-block;
  614. white-space: nowrap;
  615. .el-avatar {
  616. margin-left: 8px;
  617. }
  618. }
  619. }
  620. .svg-icon {
  621. cursor: pointer;
  622. }
  623. }
  624. .button-group {
  625. display: flex;
  626. justify-content: space-between;
  627. height: 48px;
  628. padding: 0 15px;
  629. background-color: #4d4d4d;
  630. border-bottom-left-radius: 5px;
  631. .svg-icon {
  632. font-size: 20px;
  633. }
  634. &-left {
  635. .stop-group {
  636. color: #fff;
  637. }
  638. > span {
  639. display: inline-block;
  640. height: 100%;
  641. padding: 14px 16px;
  642. cursor: pointer;
  643. &:active,
  644. &:hover {
  645. background-color: #3d3d3d;
  646. }
  647. }
  648. }
  649. }
  650. // 聊天窗口
  651. &-chat {
  652. display: flex;
  653. flex-direction: column;
  654. justify-content: space-between;
  655. height: 278px;
  656. border: 1px solid #ccc;
  657. border-bottom-left-radius: 8px;
  658. .chat-top {
  659. display: flex;
  660. align-items: center;
  661. justify-content: space-between;
  662. padding: 15px 15px 10px;
  663. color: #959595;
  664. border-bottom: 1px solid #e6e6e6;
  665. label {
  666. cursor: pointer;
  667. }
  668. .allow-chat {
  669. margin-right: 12px;
  670. }
  671. }
  672. .chat-window {
  673. position: relative;
  674. width: 100%;
  675. height: 100%;
  676. overflow: hidden;
  677. &-ul {
  678. position: absolute;
  679. top: 0;
  680. left: 0;
  681. width: 100%;
  682. height: 100%;
  683. overflow: auto;
  684. .msg-normal {
  685. padding: 7px 16px;
  686. }
  687. }
  688. }
  689. .chat-speak {
  690. padding: 16px;
  691. }
  692. }
  693. }
  694. &-right {
  695. height: 794px;
  696. padding: 8px;
  697. background-color: #2c2c2c;
  698. border-end-end-radius: 8px;
  699. .live-teacher-lens {
  700. position: relative;
  701. overflow: hidden;
  702. #live {
  703. width: 352px;
  704. height: 198px;
  705. background-color: $live-bc;
  706. }
  707. .live-wrapper {
  708. position: absolute;
  709. width: 100%;
  710. height: 40px;
  711. padding: 0 16px;
  712. line-height: 40px;
  713. color: #fff;
  714. background-color: rgba(0, 0, 0, 70%);
  715. transition: all 300ms ease-in 0s;
  716. }
  717. }
  718. // 学员列表
  719. .student-list {
  720. width: 100%;
  721. height: calc(100% - 200px);
  722. padding: 24px 16px;
  723. margin-top: 2px;
  724. font-size: 14px;
  725. color: #fff;
  726. background-color: #2c2c2c;
  727. &-title {
  728. margin-bottom: 16px;
  729. }
  730. ul {
  731. height: calc(100% - 20px);
  732. overflow-x: auto;
  733. }
  734. li {
  735. display: flex;
  736. margin-bottom: 16px;
  737. .student-list-left {
  738. flex: 8;
  739. .name {
  740. margin-left: 8px;
  741. vertical-align: super;
  742. }
  743. }
  744. .student-list-right {
  745. flex: 2;
  746. .svg-icon {
  747. margin-top: 7px;
  748. margin-right: 8px;
  749. font-size: 18px;
  750. cursor: pointer;
  751. }
  752. }
  753. }
  754. }
  755. }
  756. }
  757. }
  758. </style>