group.vue 24 KB

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