|
@@ -21,13 +21,21 @@
|
|
|
<!-- 左侧 -->
|
|
|
<div class="group-container-left">
|
|
|
<div class="group-discussion">
|
|
|
- <div id="group-local" class="group-box"></div>
|
|
|
+ <div v-show="localStream" id="group-local" class="group-box"></div>
|
|
|
+ <div v-show="!localStream" class="group-box student-info">
|
|
|
+ <el-avatar icon="el-icon-user" :src="studentSelf.student_image_url" :size="100" />
|
|
|
+ <span class="student_name">{{ studentSelf.student_name }}</span>
|
|
|
+ </div>
|
|
|
<div
|
|
|
v-for="(item, i) in streamList"
|
|
|
:id="`group-${i}`"
|
|
|
:key="item.id()"
|
|
|
class="group-box"
|
|
|
></div>
|
|
|
+ <div v-for="item in noStreamList" :key="item.student_id" class="group-box student-info">
|
|
|
+ <el-avatar icon="el-icon-user" :src="item.student_image_url" :size="80" />
|
|
|
+ <span class="student_name">{{ item.student_name }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="button-group">
|
|
|
<div class="button-group-left"></div>
|
|
@@ -115,6 +123,7 @@ export default {
|
|
|
session_id: '',
|
|
|
live_room_sys_user_id: '',
|
|
|
room_id: '',
|
|
|
+ localStream: false,
|
|
|
// 定时器
|
|
|
timer: null,
|
|
|
rtc: null,
|
|
@@ -153,7 +162,11 @@ export default {
|
|
|
// 直播状态
|
|
|
liveStat: false,
|
|
|
liveMenuShow: false,
|
|
|
- is_teacher_in_group: false
|
|
|
+ is_teacher_in_group: false,
|
|
|
+ // 无远程流学员列表
|
|
|
+ noStreamList: [],
|
|
|
+ // 学员自身信息
|
|
|
+ studentSelf: {}
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -174,6 +187,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
streamList(newVal) {
|
|
|
+ let list = this.student_list.filter(item => {
|
|
|
+ if (item.is_self === 'false') {
|
|
|
+ let isNoStream = true;
|
|
|
+ for (let i = 0; i < newVal.length; i++) {
|
|
|
+ if (newVal[i].id().split('-')[0] === item.room_user_id) isNoStream = false;
|
|
|
+ }
|
|
|
+ return isNoStream;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ this.noStreamList = list;
|
|
|
+
|
|
|
if (newVal.length > 0) {
|
|
|
this.$nextTick(() => {
|
|
|
newVal[newVal.length - 1].show(`group-${newVal.length - 1}`);
|
|
@@ -301,6 +326,8 @@ export default {
|
|
|
this.live_room_sys_user_id = live_room_sys_user_id;
|
|
|
this.room_id = room_id;
|
|
|
this.student_list = student_list;
|
|
|
+ this.noStreamList = student_list.filter(item => item.is_self === 'false');
|
|
|
+ this.studentSelf = student_list.find(item => item.is_self === 'true');
|
|
|
common.downloadWebSDK(this);
|
|
|
});
|
|
|
}
|
|
@@ -379,6 +406,23 @@ $live-bc: #3d3938;
|
|
|
width: 256px;
|
|
|
height: 144px;
|
|
|
margin: 8px;
|
|
|
+
|
|
|
+ &.student-info {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ border: 2px solid #625c5b;
|
|
|
+
|
|
|
+ .el-avatar {
|
|
|
+ margin-top: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .student_name {
|
|
|
+ height: 28px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|