12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076 |
- <template>
- <div class="live">
- <!--顶部-->
- <div class="live-top">
- <div class="live-title">
- <div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
- <div>
- <el-button v-if="!liveStat" @click="startLive">开启直播</el-button>
- <el-button v-if="liveStat" icon="el-icon-switch-button" @click="closeLiveRoom">
- 结束直播
- </el-button>
- <el-button v-if="liveStat" @click="reconnection">重连</el-button>
- <el-button @click="setDevice(true)">设置设备</el-button>
- </div>
- </div>
- <div class="live-course-name">{{ roomInfo.course_name }}</div>
- <div class="live-teacher">
- <span class="live-teacher-name">
- <svg-icon icon-class="person" />{{ roomInfo.teacher_name }}
- </span>
- <span><svg-icon icon-class="people" />{{ roomInfo.student_count }}</span>
- </div>
- </div>
- <!-- 主容器 -->
- <div class="live-container">
- <!-- 左侧 -->
- <div class="live-container-left">
- <div v-show="callLoading" class="loading">
- <div class="loading-wrapper">
- <el-avatar icon="el-icon-user" :src="connectStudent.student_image_url" />
- <p class="loading-title">
- 正在呼叫【{{ connectStudent.student_name }}】,等待对方接通...
- </p>
- <div>
- <el-button type="danger" circle @click="handsDown">
- <svg-icon icon-class="hang-up" />
- </el-button>
- </div>
- </div>
- </div>
- <div v-show="connect" class="student-parent">
- <div v-show="roomInfo.video_mode === 1 || remoteStreamType === 1" id="student"></div>
- <template v-if="remoteStreamType !== 1">
- <template v-if="roomInfo.video_mode === 1">
- <el-button type="danger" @click="handsDown">
- <svg-icon icon-class="hang-up" /> 挂断
- </el-button>
- </template>
- <template v-else>
- <div class="student-audio">
- <el-avatar icon="el-icon-user" :src="connectStudent.student_image_url" />
- <span class="connect-name">{{ connectStudent.student_name }}</span>
- <el-button type="danger" circle @click="handsDown">
- <svg-icon icon-class="hang-up" />
- </el-button>
- </div>
- </template>
- </template>
- </div>
- <div v-show="isDraw" id="draw-parent">
- <div v-show="isDrawSetting" class="draw-setting">
- <span class="brush-shape">
- <svg-icon icon-class="brush-shape" />
- </span>
- <span
- v-for="item in drawColorList"
- :key="item"
- :class="['draw-color', item === '#FF4747' ? 'current' : '']"
- :style="{ 'background-color': item }"
- ></span>
- <span v-for="item in drawThicknessList" :key="item" class="draw-thickness">
- <span :style="{ width: item * 2 + 'px', height: item * 2 + 'px' }"></span>
- </span>
- <span class="brush-clear">
- <svg-icon icon-class="clear" />
- </span>
- </div>
- </div>
- <div class="button-group">
- <div class="button-group-left">
- <span class="icon-button" @click="publishShareStream">
- <svg-icon icon-class="share" />
- </span>
- <span class="icon-button" @click="showDrawSetting">
- <svg-icon icon-class="draw" />
- </span>
- <span class="icon-button" @click="startGroup">
- <svg-icon icon-class="group" />
- </span>
- <span class="icon-button" @click="dialogVisible = true">
- <svg-icon icon-class="push" />
- </span>
- </div>
- <div class="button-group-right"></div>
- </div>
- <div class="live-container-left-chat">
- <div class="chat-top">
- <span>聊天</span>
- <label @click="chatBans">
- <input v-model="roomData.allow_chat" type="checkbox" class="allow-chat" />
- <span>禁言</span>
- </label>
- </div>
- <div class="chat-window">
- <ul ref="chat" class="chat-window-ul">
- <li v-for="(item, i) in chatList" :key="i">
- <div class="msg-normal">
- <span>{{ item.username }}: </span>
- <span>{{ item.msg }}</span>
- </div>
- </li>
- </ul>
- </div>
- <div class="chat-speak">
- <el-input
- v-model="msg"
- placeholder="输入发言"
- maxlength="400"
- @keydown.enter.native="sendMsg"
- >
- <el-button slot="append" @click="sendMsg">发送</el-button>
- </el-input>
- </div>
- </div>
- </div>
- <!-- 右侧 -->
- <div class="live-container-right">
- <div
- class="live-teacher-lens"
- @mouseover="liveMenuShow = true"
- @mouseout="liveMenuShow = false"
- >
- <div id="live"></div>
- <div :style="{ bottom: liveMenuShow ? '0' : '-40px' }" class="live-wrapper">
- <div>
- {{ roomInfo.teacher_name }}
- </div>
- <div>
- <span :style="{ color: netStatusColor }">{{ netStatus }}</span>
- </div>
- </div>
- </div>
- <div class="student-list">
- <div class="student-list-title">学生列表</div>
- <ul>
- <li v-for="item in student_list" :key="item.room_user_id">
- <div class="student-list-left">
- <el-avatar icon="el-icon-user" size="small" :src="item.student_image_url" />
- <span class="name">{{ item.student_name }}</span>
- </div>
- <div class="student-list-right">
- <svg-icon
- v-if="item.connection_mode === 1 && item.connection_status !== 0"
- icon-class="hang-up"
- @click="handsDown(item.room_user_id)"
- />
- <svg-icon v-else icon-class="video" @click="invite(item, 1)" />
- <svg-icon
- v-if="item.connection_mode === 2 && item.connection_status !== 0"
- icon-class="hang-up"
- @click="handsDown(item.room_user_id)"
- />
- <svg-icon v-else icon-class="voice" @click="invite(item, 2)" />
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 推送资料 -->
- <select-material
- :dialog-visible="dialogVisible"
- :task-id="task_id"
- @dialogClose="dialogClose"
- @dialogPush="dialogPush"
- />
- <!-- 教师查看当前完成列表 -->
- <complete-list
- :task-id="task_id"
- :dialog-visible-complete="dialogVisibleComplete"
- @dialogCompleteClose="dialogCompleteClose"
- />
- <select-device
- :dialog-visible-device="dialogVisibleDevice"
- :device="device"
- @dialogDeviceClose="dialogDeviceClose"
- />
- <el-dialog
- title="分组讨论组数"
- top="30vh"
- width="300px"
- class="dialog-group"
- :visible.sync="dialogVisibleGroup"
- :close-on-click-modal="false"
- >
- <el-select v-model="group_count">
- <el-option v-for="i in groupNumList" :key="i" :label="i" :value="i" />
- </el-select>
- <span slot="footer">
- <el-button size="small" @click="closeGroup">取 消</el-button>
- <el-button size="small" type="primary" @click="dialogGroup">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- GetLiveRoomStudentList,
- CloseLiveRoom,
- GetLiveRoomInfo,
- StudentExitLiveRoom,
- StartGroup,
- GetGroupStatus,
- DealStudentConnection,
- GetStudentInfo_Connection
- } from '@/api/live';
- import { app } from '@/store/mutation-types';
- import SelectMaterial from '@/components/live/SelectMaterial.vue';
- import CompleteList from './CompleteList.vue';
- import SelectDevice from '../SelectDevice.vue';
- import * as common from './live';
- export default {
- components: {
- SelectMaterial,
- CompleteList,
- SelectDevice
- },
- data() {
- return {
- task_id: this.$route.query.task_id,
- // 连麦
- connect: false,
- // 连线学员信息
- connectStudent: {},
- // 等待接通
- callLoading: false,
- dialogVisible: false,
- // 学员完成
- dialogVisibleComplete: false,
- // 定时器
- timer: null,
- remoteStreamType: -1,
- rtc: null,
- roomData: {
- desc: '直播间标题',
- name: '姓名',
- user: {
- id: '',
- name: '',
- role: 'talker',
- rommid: ''
- },
- max_users: 1,
- allow_chat: true,
- allow_audio: true,
- allow_speak: true
- },
- roomInfo: {
- room_id: '',
- video_mode: 1,
- task_name: '',
- cs_item_name: '',
- course_name: '',
- teacher_name: '',
- student_count: 0,
- student_connection_info: {}
- },
- loadedNumber: 0,
- speakData: {},
- roomContext: {},
- msg: '',
- chatList: [],
- isDrawSetting: false,
- drawColorList: ['#FF4747', '#343434', '#628EFF', '#FFCA0E'],
- drawThicknessList: ['1', '3', '5'],
- // 直播间学员列表
- student_list: [],
- // 直播状态
- liveStat: false,
- liveMenuShow: false,
- // 分组讨论
- groupNumList: [],
- group_count: 1,
- // 网络整体情况
- netStatus: 0,
- dialogVisibleGroup: false,
- dialogVisibleDevice: false,
- isRecreate: false,
- device: {
- video: [],
- audio: []
- }
- };
- },
- computed: {
- // 画板模式
- isDraw() {
- return !this.connect && !this.callLoading;
- },
- netStatusColor() {
- if (this.netStatus >= 1000) {
- return '#f00';
- }
- if (this.netStatus >= 500) {
- return '#d6e91a';
- }
- if (this.netStatus >= 200) {
- return '#6aee4c';
- }
- return '#38d514';
- },
- connectUid() {
- return 'room_user_id' in this.connectStudent ? this.connectStudent.room_user_id : '';
- }
- },
- watch: {
- loadedNumber(newVal) {
- if (newVal === 5) {
- common.createScript(
- 'https://class.csslcloud.net/static/SDK/docSDK/drawSdk_3.0.js'
- ).onload = () => {
- this.initSDK();
- this.$loading().close();
- };
- }
- },
- // 聊天列表滚动
- chatList() {
- common.chatRoll(this);
- }
- },
- created() {
- GetGroupStatus({ task_id: this.task_id }).then(({ is_enable_group }) => {
- if (is_enable_group === 'true') {
- this.$router.push({
- path: '/live/teacher/group',
- query: {
- task_id: this.task_id
- }
- });
- } else {
- this.$loading({
- text: '加载直播所需SDK中...',
- background: '#fff'
- });
- common.downloadWebSDK(this);
- this.getLiveRoomStudentList();
- this.getLiveRoomInfo();
- }
- });
- },
- mounted() {
- document.addEventListener(
- 'click',
- e => {
- let target = e.target;
- let isHasClass = false;
- do {
- if (target === null) {
- break;
- }
- if (target.className === 'draw-setting') {
- isHasClass = true;
- }
- target = target.parentElement;
- } while (!isHasClass);
- if (!isHasClass) {
- this.isDrawSetting = false;
- }
- },
- true
- );
- this.getLiveRoomStudentListPolling();
- },
- beforeDestroy() {
- clearInterval(this.timer);
- common.closeVideo('main');
- },
- methods: {
- initSDK() {
- const { live_room_sys_user_id, room_id, session_id } = this.$route.query;
- this.rtc = common.initSDK({
- userid: live_room_sys_user_id,
- roomid: room_id,
- sessionid: session_id
- });
- common.initListener(this); // 注册监听事件
- this.getLiveStat();
- },
- getLiveRoomInfo() {
- GetLiveRoomInfo({ task_id: this.task_id }).then(
- ({
- room_id,
- video_mode,
- task_name,
- cs_item_name,
- course_name,
- teacher_name,
- student_count,
- student_connection_info
- }) => {
- this.roomInfo = {
- room_id,
- video_mode,
- task_name,
- cs_item_name,
- course_name,
- teacher_name,
- student_count,
- student_connection_info
- };
- this.connectStudent = student_connection_info;
- if (student_connection_info.connection_status === 1) {
- this.callLoading = true;
- }
- if (student_connection_info.connection_status === 2) {
- this.connect = true;
- }
- }
- );
- },
- closeLiveRoom() {
- CloseLiveRoom({ task_id: this.task_id }).then(() => {
- this.$router.push('/');
- this.$message.success('关闭直播成功');
- });
- },
- startLive() {
- common.startLive();
- },
- getLiveStat() {
- common.getLiveStat({
- success: data => {
- this.liveStat = data.started;
- },
- fail: str => {
- this.liveStat = false;
- console.log('直播关闭状态或查询直播失败', str);
- }
- });
- },
- // 推送桌面共享
- publishShareStream() {
- common.publishShareStream();
- },
- // 关闭桌面共享
- unPubShareStream() {
- common.unPubShareStream();
- },
- reconnection() {
- common.reconnection();
- },
- // 老师邀请学生上麦
- invite(student, mode) {
- if (this.connect || this.callLoading) {
- this.$message.warning('正在连麦中');
- return;
- }
- this.callLoading = true;
- this.connectStudent = student;
- GetLiveRoomInfo({ task_id: this.task_id })
- .then(({ video_mode }) => {
- let uid = student.room_user_id;
- this.roomInfo.video_mode = mode;
- if (video_mode === mode) {
- this.inviteStudent(uid, student, mode);
- } else {
- common.roomUpdate({
- video_mode: mode,
- roomUpdateSuccess: data => {
- console.log(data, '连麦音视频模式更新请求成功!');
- this.inviteStudent(uid, student, mode);
- },
- roomUpdateFailed: data => {
- this.callLoading = false;
- this.$message.error('连麦音视频模式更新请求失败! 请稍后再试!');
- }
- });
- }
- })
- .catch(() => {
- this.callLoading = false;
- });
- },
- inviteStudent(uid, connectStudent, mode) {
- common.invite({
- uid,
- success: str => {
- console.log('邀请上麦成功', str);
- this.dealStudentConnection(uid, 1, mode);
- common.sendPublishMessage({
- type: 'inviteImage',
- connectStudent
- });
- },
- fail: data => {
- console.log('邀请上麦失败:', data);
- this.callLoading = false;
- this.$message.error(`邀请上麦失败:${data.errorMsg}`);
- }
- });
- },
- dealStudentConnection(room_user_id, deal_mode, connection_mode) {
- DealStudentConnection({
- task_id: this.task_id,
- room_user_id,
- deal_mode,
- connection_mode
- }).then(() => {
- this.getLiveRoomStudentList();
- });
- },
- handsDown(uid) {
- let connectUid = typeof uid === 'string' ? uid : this.connectUid;
- if (connectUid.length === 0) {
- GetStudentInfo_Connection({ task_id: this.task_id }).then(({ room_user_id }) =>
- this.handsDown_Live(room_user_id)
- );
- } else {
- this.handsDown_Live(connectUid);
- }
- },
- // 下麦
- handsDown_Live(uid) {
- common.handsDown({
- uid,
- success: str => {
- if (this.callLoading) {
- common.sendPublishMessage({
- type: 'handsDown-load',
- uid
- });
- }
- this.dealStudentConnection(uid, 0, this.connectStudent.connection_mode);
- this.callLoading = false;
- this.connect = false;
- common.updateMcResult('', 0);
- this.$message.success('下麦成功');
- this.connectStudent = {};
- },
- fail: data => {
- this.callLoading = false;
- this.connect = false;
- console.log('下麦失败', data);
- this.$message.warning(`下麦失败:${data.errorMsg}`);
- }
- });
- },
- // 发消息
- sendMsg() {
- common.sendMsg(this.msg);
- this.msg = '';
- },
- chatBans() {
- common.roomUpdate({
- allow_chat: !this.roomData.allow_chat,
- roomUpdateSuccess: function (data) {
- console.log(data, '房间模板配置更新请求成功!');
- },
- roomUpdateFailed: function (data) {
- console.log(data, '房间模板配置更新请求失败! 请稍后再试!');
- }
- });
- },
- // 画笔变更
- drawChange(action, value) {
- common.drawChange(action, value);
- },
- // 设置音视频设备
- setDevice(isRecreate) {
- this.isRecreate = isRecreate;
- this.dialogVisibleDevice = true;
- },
- getNetPoint() {
- common.getNetPoint();
- },
- dialogDeviceClose(device) {
- this.$store.commit(`app/${app.SET_DEVICE}`, device);
- this.dialogVisibleDevice = false;
- if (this.isRecreate) {
- common.closeVideoTeacher({
- streamName: 'main',
- success: () => {
- common.createLocalStream();
- },
- fail: str => {
- console.log(str);
- }
- });
- } else {
- common.createLocalStream();
- }
- },
- showDrawSetting() {
- this.isDrawSetting = !this.isDrawSetting;
- },
- getLiveRoomStudentList() {
- GetLiveRoomStudentList({ task_id: this.task_id }).then(({ student_list }) => {
- this.student_list = student_list;
- });
- },
- getLiveRoomStudentListPolling() {
- this.timer = setInterval(() => {
- this.getLiveRoomStudentList();
- }, 5000);
- },
- studentExitLiveRoom(room_user_id) {
- StudentExitLiveRoom({ task_id: this.task_id, room_user_id });
- },
- publishStream() {
- common.publishStream('main');
- },
- // 分组讨论
- startGroup() {
- for (let i = 1; i <= this.student_list.length; i++) {
- this.groupNumList.push(i);
- }
- this.dialogVisibleGroup = true;
- },
- // 弹出框方法
- dialogGroup() {
- // 开始分组讨论
- StartGroup({ task_id: this.task_id, group_count: this.group_count }).then(() => {
- this.$message.success('开启分组讨论成功');
- this.$router.push({
- path: '/live/teacher/group',
- query: {
- task_id: this.task_id
- }
- });
- });
- },
- closeGroup() {
- this.dialogVisibleGroup = false;
- this.groupNumList = [];
- this.group_count = 1;
- },
- dialogClose() {
- this.dialogVisible = false;
- },
- dialogPush() {
- this.dialogVisible = false;
- this.dialogVisibleComplete = true;
- },
- dialogCompleteClose() {
- this.dialogVisibleComplete = false;
- }
- }
- };
- </script>
- <style lang="scss">
- @import '~@/styles/mixin.scss';
- $live-bc: #3d3938;
- .live {
- @include container;
- @include dialog;
- .dialog-group .el-dialog__body {
- height: 65px;
- }
- // 顶部
- &-top {
- background-color: #fff;
- padding: 24px 32px;
- border-top-left-radius: 8px;
- border-top-right-radius: 8px;
- .live-title {
- display: flex;
- justify-content: space-between;
- &-name {
- font-size: 22px;
- }
- .el-button {
- border-radius: 4px;
- padding: 7px 12px;
- }
- }
- .live-course-name {
- font-size: 14px;
- color: #737373;
- line-height: 30px;
- }
- .live-teacher {
- margin-top: 12px;
- .svg-icon {
- margin-right: 8px;
- }
- &-name {
- margin-right: 60px;
- }
- }
- }
- // 主容器
- &-container {
- display: flex;
- justify-content: left;
- &-left {
- width: 832px;
- background-color: #fff;
- border-radius: 8px;
- .loading {
- position: relative;
- width: 100%;
- height: 468px;
- color: #fff;
- background-color: #646464;
- display: flex;
- justify-content: center;
- align-items: center;
- &-wrapper {
- text-align: center;
- > .el-avatar {
- width: 96px;
- height: 96px;
- line-height: 96px;
- margin-bottom: 24px;
- > &--icon {
- font-size: 36px;
- }
- }
- .loading-title {
- margin-bottom: 24px;
- }
- }
- }
- .student-parent {
- position: relative;
- width: 100%;
- height: 468px;
- #student {
- width: 100%;
- height: 468px;
- position: relative;
- background-color: $live-bc;
- }
- > .el-button {
- position: absolute;
- bottom: 40px;
- left: calc(50% - 44px);
- }
- .student-audio {
- width: 100%;
- height: 100%;
- background-color: #646464;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .connect-name {
- color: #fff;
- margin: 24px 0;
- }
- > .el-avatar {
- width: 96px;
- height: 96px;
- line-height: 96px;
- > &--icon {
- font-size: 36px;
- }
- }
- }
- }
- #draw-parent {
- width: 100%;
- height: 468px;
- position: relative;
- background-color: $live-bc;
- overflow: hidden;
- // 设置屏幕画笔
- .draw-setting {
- position: absolute;
- bottom: 13px;
- left: 22px;
- z-index: 9999;
- background-color: #a0a0a0;
- padding: 6px;
- border-radius: 40px;
- height: 40px;
- width: 275px;
- line-height: 28px;
- & > span {
- display: inline-block;
- text-align: center;
- margin-right: 10px;
- }
- & > span.brush-shape {
- width: 28px;
- height: 28px;
- border-radius: 50%;
- background-color: #fff;
- cursor: pointer;
- }
- .draw-color {
- position: relative;
- top: 5px;
- height: 18px;
- width: 18px;
- border-radius: 50%;
- cursor: pointer;
- }
- .current::after {
- content: '';
- position: absolute;
- bottom: -7px;
- left: 7px;
- width: 4px;
- height: 4px;
- border-radius: 50%;
- background-color: #292929;
- }
- .draw-thickness {
- height: 18px;
- width: 18px;
- cursor: pointer;
- display: inline-flex;
- flex-direction: column;
- justify-content: center;
- vertical-align: middle;
- align-items: center;
- span {
- border-radius: 50%;
- background-color: #000;
- }
- }
- & > .brush-clear {
- width: 28px;
- height: 28px;
- border-radius: 50%;
- background-color: #666;
- cursor: pointer;
- margin-right: 0;
- }
- }
- }
- .button-group {
- display: flex;
- justify-content: space-between;
- height: 48px;
- background-color: #4d4d4d;
- padding: 0 15px;
- border-bottom-left-radius: 5px;
- .svg-icon {
- font-size: 20px;
- }
- &-left {
- .stop-group {
- color: #fff;
- }
- > .icon-button {
- display: inline-block;
- height: 100%;
- padding: 14px 16px;
- cursor: pointer;
- &:active,
- &:hover {
- background-color: #3d3d3d;
- }
- }
- }
- }
- // 聊天窗口
- &-chat {
- height: 278px;
- border: 1px solid #ccc;
- border-bottom-left-radius: 8px;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .chat-top {
- display: flex;
- justify-content: space-between;
- padding: 15px 15px 10px;
- border-bottom: 1px solid #e6e6e6;
- color: #959595;
- label {
- cursor: pointer;
- }
- .allow-chat {
- margin-right: 12px;
- }
- }
- .chat-window {
- position: relative;
- width: 100%;
- height: 100%;
- overflow: hidden;
- &-ul {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- overflow: auto;
- .msg-normal {
- padding: 7px 16px;
- }
- }
- }
- .chat-speak {
- padding: 16px;
- }
- }
- }
- &-right {
- height: 794px;
- padding: 8px;
- background-color: #2c2c2c;
- border-end-end-radius: 8px;
- .live-teacher-lens {
- position: relative;
- overflow: hidden;
- #live {
- width: 352px;
- height: 198px;
- background-color: $live-bc;
- }
- .live-wrapper {
- display: flex;
- position: absolute;
- height: 40px;
- width: 100%;
- background-color: #000;
- opacity: 0.7;
- color: #fff;
- line-height: 40px;
- padding: 0 16px;
- transition: all 300ms ease-in 0s;
- > div:first-child {
- flex: 6;
- }
- > div:last-child {
- flex: 4;
- text-align: right;
- }
- }
- }
- // 学员列表
- .student-list {
- width: 100%;
- padding: 24px 16px;
- margin-top: 2px;
- height: calc(100% - 200px);
- background-color: #2c2c2c;
- font-size: 14px;
- color: #fff;
- &-title {
- margin-bottom: 16px;
- }
- ul {
- height: calc(100% - 18px);
- overflow: auto;
- }
- li {
- display: flex;
- margin-bottom: 16px;
- .student-list-left {
- flex: 8;
- .name {
- vertical-align: super;
- margin-left: 8px;
- }
- }
- .student-list-right {
- flex: 2;
- .svg-icon {
- font-size: 18px;
- cursor: pointer;
- margin-top: 7px;
- margin-right: 8px;
- }
- }
- }
- }
- }
- }
- }
- </style>
|