|
@@ -6,7 +6,8 @@
|
|
|
<div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
|
|
<div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
|
|
|
<div>
|
|
<div>
|
|
|
<el-button @click="stopGroup">结束群组讨论</el-button>
|
|
<el-button @click="stopGroup">结束群组讨论</el-button>
|
|
|
- <el-button v-show="isGroup" @click="exitCurGroup_Teacher">退出小组讨论</el-button>
|
|
|
|
|
|
|
+ <el-button v-show="isGroup && !isAudit" @click="setCurGroupToExample_Teacher">设为示范讨论组</el-button>
|
|
|
|
|
+ <el-button v-show="isGroup && !isAudit" @click="exitCurGroup_Teacher">退出小组讨论</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="live-course-name">{{ roomInfo.course_name }}</div>
|
|
<div class="live-course-name">{{ roomInfo.course_name }}</div>
|
|
@@ -34,7 +35,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-show="isGroup" class="group-discussion">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div v-show="isGroup" class="group-discussion" :style="{ height: isAudit ? '404px' : '468px' }">
|
|
|
<div v-for="(item, i) in streamList" :key="item.id()" class="group-wrapper">
|
|
<div v-for="(item, i) in streamList" :key="item.id()" class="group-wrapper">
|
|
|
<div :id="`group-${i}`" class="group-box"></div>
|
|
<div :id="`group-${i}`" class="group-box"></div>
|
|
|
<div class="live-wrapper-stream">
|
|
<div class="live-wrapper-stream">
|
|
@@ -49,6 +51,22 @@
|
|
|
<span class="student_name">{{ item.student_name }}</span>
|
|
<span class="student_name">{{ item.student_name }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="isAudit" class="audit-list">
|
|
|
|
|
+ <svg-icon icon-class="arrow-left-white" @click="listMove('left')" />
|
|
|
|
|
+ <div ref="avatar" class="audit-list-container">
|
|
|
|
|
+ <div ref="list" class="avatar-list" :style="{ 'margin-left': marginLeft + 'px' }">
|
|
|
|
|
+ <el-avatar
|
|
|
|
|
+ v-for="item in audience_list"
|
|
|
|
|
+ :key="item.student_id"
|
|
|
|
|
+ :size="32"
|
|
|
|
|
+ :src="item.student_image_url"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <svg-icon icon-class="arrow-right-white" @click="listMove('right')" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<div class="button-group">
|
|
<div class="button-group">
|
|
|
<div class="button-group-left">
|
|
<div class="button-group-left">
|
|
|
<span class="stop-group" @click="stopGroup">结束群组讨论</span>
|
|
<span class="stop-group" @click="stopGroup">结束群组讨论</span>
|
|
@@ -134,7 +152,8 @@ import {
|
|
|
ExitCurGroup_Teacher,
|
|
ExitCurGroup_Teacher,
|
|
|
GetMyGroupInfo_Teacher,
|
|
GetMyGroupInfo_Teacher,
|
|
|
GetGroupStatus,
|
|
GetGroupStatus,
|
|
|
- SendGroupMessage
|
|
|
|
|
|
|
+ SendGroupMessage,
|
|
|
|
|
+ SetCurGroupToExample_Teacher
|
|
|
} from '@/api/live';
|
|
} from '@/api/live';
|
|
|
import * as common from './group';
|
|
import * as common from './group';
|
|
|
|
|
|
|
@@ -143,8 +162,12 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
task_id: this.$route.query.task_id,
|
|
task_id: this.$route.query.task_id,
|
|
|
isGroup: false,
|
|
isGroup: false,
|
|
|
|
|
+ group_id: '',
|
|
|
|
|
+ // 是否旁听
|
|
|
|
|
+ isAudit: false,
|
|
|
// 定时器
|
|
// 定时器
|
|
|
timer: null,
|
|
timer: null,
|
|
|
|
|
+ marginLeft: 0,
|
|
|
rtc: null,
|
|
rtc: null,
|
|
|
roomData: {
|
|
roomData: {
|
|
|
desc: '直播间标题',
|
|
desc: '直播间标题',
|
|
@@ -185,7 +208,9 @@ export default {
|
|
|
streamList: [],
|
|
streamList: [],
|
|
|
student_list: [],
|
|
student_list: [],
|
|
|
// 无远程流学员列表
|
|
// 无远程流学员列表
|
|
|
- noStreamList: []
|
|
|
|
|
|
|
+ noStreamList: [],
|
|
|
|
|
+ // 旁听学员列表
|
|
|
|
|
+ audience_list: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -228,12 +253,15 @@ export default {
|
|
|
if (is_teacher_in_group === 'true') {
|
|
if (is_teacher_in_group === 'true') {
|
|
|
GetMyGroupInfo_Teacher({
|
|
GetMyGroupInfo_Teacher({
|
|
|
task_id: this.task_id
|
|
task_id: this.task_id
|
|
|
- }).then(({ room_id, teacher: { session_id }, student_list }) => {
|
|
|
|
|
|
|
+ }).then(({ room_id, is_example, group_id, teacher: { session_id }, student_list, audience_list }) => {
|
|
|
this.room_id = room_id;
|
|
this.room_id = room_id;
|
|
|
this.session_id = session_id;
|
|
this.session_id = session_id;
|
|
|
this.student_list = student_list;
|
|
this.student_list = student_list;
|
|
|
common.downloadWebSDK(this);
|
|
common.downloadWebSDK(this);
|
|
|
this.isGroup = true;
|
|
this.isGroup = true;
|
|
|
|
|
+ this.group_id = group_id;
|
|
|
|
|
+ this.isAudit = is_example === 'true';
|
|
|
|
|
+ this.audience_list = audience_list;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -332,6 +360,7 @@ export default {
|
|
|
this.session_id = session_id;
|
|
this.session_id = session_id;
|
|
|
common.downloadWebSDK(this);
|
|
common.downloadWebSDK(this);
|
|
|
this.isGroup = true;
|
|
this.isGroup = true;
|
|
|
|
|
+ this.group_id = group_id;
|
|
|
return GetMyGroupInfo_Teacher({ task_id: this.task_id });
|
|
return GetMyGroupInfo_Teacher({ task_id: this.task_id });
|
|
|
})
|
|
})
|
|
|
.then(({ student_list }) => {
|
|
.then(({ student_list }) => {
|
|
@@ -358,9 +387,20 @@ export default {
|
|
|
return false;
|
|
return false;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ listMove(direction) {
|
|
|
|
|
+ let w = this.$refs.list.clientWidth - this.$refs.avatar.clientWidth;
|
|
|
|
|
+ if (w > 60) {
|
|
|
|
|
+ let left = Number(this.$refs.list.style['margin-left'].slice(0, -2));
|
|
|
|
|
+ let width = direction === 'right' ? left - 60 : left + 60;
|
|
|
|
|
+ if (Math.abs(width) > w) width = -w;
|
|
|
|
|
+ this.marginLeft = width > 0 ? 0 : width;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
exitCurGroup_Teacher() {
|
|
exitCurGroup_Teacher() {
|
|
|
ExitCurGroup_Teacher({ task_id: this.task_id }).then(() => {
|
|
ExitCurGroup_Teacher({ task_id: this.task_id }).then(() => {
|
|
|
this.isGroup = false;
|
|
this.isGroup = false;
|
|
|
|
|
+ this.group_id = '';
|
|
|
this.room_id = '';
|
|
this.room_id = '';
|
|
|
this.session_id = '';
|
|
this.session_id = '';
|
|
|
common.closeVideo('main');
|
|
common.closeVideo('main');
|
|
@@ -371,13 +411,25 @@ export default {
|
|
|
common.removeWebSDK();
|
|
common.removeWebSDK();
|
|
|
this.$message.success('退出小组讨论成功');
|
|
this.$message.success('退出小组讨论成功');
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ setCurGroupToExample_Teacher() {
|
|
|
|
|
+ SetCurGroupToExample_Teacher({ task_id: this.task_id, group_id: this.group_id })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.isAudit = true;
|
|
|
|
|
+ this.$message.success('把当前分组设为示范讨论组成功');
|
|
|
|
|
+ return GetMyGroupInfo_Teacher({ task_id: this.task_id });
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(({ audience_list }) => {
|
|
|
|
|
+ this.audience_list = audience_list;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-@import '~@/styles/mixin.scss';
|
|
|
|
|
|
|
+@import '~@/styles/mixin';
|
|
|
$live-bc: #3d3938;
|
|
$live-bc: #3d3938;
|
|
|
|
|
|
|
|
.live {
|
|
.live {
|
|
@@ -385,8 +437,8 @@ $live-bc: #3d3938;
|
|
|
|
|
|
|
|
// 顶部
|
|
// 顶部
|
|
|
&-top {
|
|
&-top {
|
|
|
- background-color: #fff;
|
|
|
|
|
padding: 24px 32px;
|
|
padding: 24px 32px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
border-top-left-radius: 8px;
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
border-top-right-radius: 8px;
|
|
|
|
|
|
|
@@ -399,15 +451,15 @@ $live-bc: #3d3938;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.el-button {
|
|
.el-button {
|
|
|
- border-radius: 4px;
|
|
|
|
|
padding: 7px 12px;
|
|
padding: 7px 12px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.live-course-name {
|
|
.live-course-name {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- color: #737373;
|
|
|
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
|
|
|
+ color: #737373;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.live-teacher {
|
|
.live-teacher {
|
|
@@ -434,28 +486,28 @@ $live-bc: #3d3938;
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
|
|
|
|
|
.student-group {
|
|
.student-group {
|
|
|
- width: 100%;
|
|
|
|
|
- height: 468px;
|
|
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
- background-color: #4d4d4d;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 468px;
|
|
|
padding: 10px 0 10px 24px;
|
|
padding: 10px 0 10px 24px;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ background-color: #4d4d4d;
|
|
|
|
|
|
|
|
&-list {
|
|
&-list {
|
|
|
- background-color: #646464;
|
|
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- padding: 24px;
|
|
|
|
|
width: 255px;
|
|
width: 255px;
|
|
|
height: 144px;
|
|
height: 144px;
|
|
|
|
|
+ padding: 24px;
|
|
|
margin: 0 8px 8px 0;
|
|
margin: 0 8px 8px 0;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+ background-color: #646464;
|
|
|
|
|
|
|
|
&-avatar {
|
|
&-avatar {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- height: 92px;
|
|
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ height: 92px;
|
|
|
margin-top: 12px;
|
|
margin-top: 12px;
|
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
|
|
|
|
@@ -466,33 +518,34 @@ $live-bc: #3d3938;
|
|
|
|
|
|
|
|
.group-serial {
|
|
.group-serial {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- display: inline-block;
|
|
|
|
|
top: 0;
|
|
top: 0;
|
|
|
left: 0;
|
|
left: 0;
|
|
|
- height: 24px;
|
|
|
|
|
|
|
+ display: inline-block;
|
|
|
width: 24px;
|
|
width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ line-height: 24px;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
- background-color: #3d3d3d;
|
|
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- line-height: 24px;
|
|
|
|
|
|
|
+ background-color: #3d3d3d;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 分组讨论
|
|
// 分组讨论
|
|
|
.group-discussion {
|
|
.group-discussion {
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-rows: 144px;
|
|
|
|
|
+ grid-template-columns: 1fr 1fr 1fr;
|
|
|
|
|
+ gap: 8px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 468px;
|
|
height: 468px;
|
|
|
- position: relative;
|
|
|
|
|
|
|
+ padding: 24px;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
background-color: $live-bc;
|
|
background-color: $live-bc;
|
|
|
- overflow: auto;
|
|
|
|
|
|
|
|
|
|
.group-box {
|
|
.group-box {
|
|
|
- width: 254px;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
height: 144px;
|
|
height: 144px;
|
|
|
- margin: 8px;
|
|
|
|
|
|
|
|
|
|
&.student-info {
|
|
&.student-info {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -517,15 +570,15 @@ $live-bc: #3d3938;
|
|
|
|
|
|
|
|
.live-wrapper-stream {
|
|
.live-wrapper-stream {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- top: 120px;
|
|
|
|
|
- height: 32px;
|
|
|
|
|
|
|
+ top: 112px;
|
|
|
width: calc(100% - 16px);
|
|
width: calc(100% - 16px);
|
|
|
- background-color: rgba(0, 0, 0, 0.7);
|
|
|
|
|
- color: #fff;
|
|
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ padding: 0 15px;
|
|
|
|
|
+ margin: 0 8px;
|
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
|
|
|
+ color: #fff;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- margin: 0 8px;
|
|
|
|
|
- padding: 0 15px;
|
|
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.7);
|
|
|
transition: all 300ms ease-in 0s;
|
|
transition: all 300ms ease-in 0s;
|
|
|
|
|
|
|
|
> .svg-icon {
|
|
> .svg-icon {
|
|
@@ -535,12 +588,42 @@ $live-bc: #3d3938;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 旁听列表
|
|
|
|
|
+ .audit-list {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 64px;
|
|
|
|
|
+ padding: 16px 24px;
|
|
|
|
|
+ background-color: #5a5a5a;
|
|
|
|
|
+
|
|
|
|
|
+ &-container {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ margin: 0 24px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+
|
|
|
|
|
+ .avatar-list {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+
|
|
|
|
|
+ .el-avatar {
|
|
|
|
|
+ margin-left: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .svg-icon {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.button-group {
|
|
.button-group {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
height: 48px;
|
|
height: 48px;
|
|
|
- background-color: #4d4d4d;
|
|
|
|
|
padding: 0 15px;
|
|
padding: 0 15px;
|
|
|
|
|
+ background-color: #4d4d4d;
|
|
|
border-bottom-left-radius: 5px;
|
|
border-bottom-left-radius: 5px;
|
|
|
|
|
|
|
|
.svg-icon {
|
|
.svg-icon {
|
|
@@ -568,20 +651,20 @@ $live-bc: #3d3938;
|
|
|
|
|
|
|
|
// 聊天窗口
|
|
// 聊天窗口
|
|
|
&-chat {
|
|
&-chat {
|
|
|
- height: 278px;
|
|
|
|
|
- border: 1px solid #ccc;
|
|
|
|
|
- border-bottom-left-radius: 8px;
|
|
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
|
+ height: 278px;
|
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
|
+ border-bottom-left-radius: 8px;
|
|
|
|
|
|
|
|
.chat-top {
|
|
.chat-top {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
padding: 15px 15px 10px;
|
|
padding: 15px 15px 10px;
|
|
|
- border-bottom: 1px solid #e6e6e6;
|
|
|
|
|
color: #959595;
|
|
color: #959595;
|
|
|
|
|
+ border-bottom: 1px solid #e6e6e6;
|
|
|
|
|
|
|
|
label {
|
|
label {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
@@ -619,8 +702,8 @@ $live-bc: #3d3938;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&-right {
|
|
&-right {
|
|
|
- padding: 8px;
|
|
|
|
|
height: 794px;
|
|
height: 794px;
|
|
|
|
|
+ padding: 8px;
|
|
|
background-color: #2c2c2c;
|
|
background-color: #2c2c2c;
|
|
|
border-end-end-radius: 8px;
|
|
border-end-end-radius: 8px;
|
|
|
|
|
|
|
@@ -636,12 +719,12 @@ $live-bc: #3d3938;
|
|
|
|
|
|
|
|
.live-wrapper {
|
|
.live-wrapper {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- height: 40px;
|
|
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- background-color: rgba(0, 0, 0, 0.7);
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- line-height: 40px;
|
|
|
|
|
|
|
+ height: 40px;
|
|
|
padding: 0 16px;
|
|
padding: 0 16px;
|
|
|
|
|
+ line-height: 40px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.7);
|
|
|
transition: all 300ms ease-in 0s;
|
|
transition: all 300ms ease-in 0s;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -649,12 +732,12 @@ $live-bc: #3d3938;
|
|
|
// 学员列表
|
|
// 学员列表
|
|
|
.student-list {
|
|
.student-list {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
+ height: calc(100% - 200px);
|
|
|
padding: 24px 16px;
|
|
padding: 24px 16px;
|
|
|
margin-top: 2px;
|
|
margin-top: 2px;
|
|
|
- height: calc(100% - 200px);
|
|
|
|
|
- background-color: #2c2c2c;
|
|
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
|
|
+ background-color: #2c2c2c;
|
|
|
|
|
|
|
|
&-title {
|
|
&-title {
|
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
@@ -673,8 +756,8 @@ $live-bc: #3d3938;
|
|
|
flex: 8;
|
|
flex: 8;
|
|
|
|
|
|
|
|
.name {
|
|
.name {
|
|
|
- vertical-align: super;
|
|
|
|
|
margin-left: 8px;
|
|
margin-left: 8px;
|
|
|
|
|
+ vertical-align: super;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -682,10 +765,10 @@ $live-bc: #3d3938;
|
|
|
flex: 2;
|
|
flex: 2;
|
|
|
|
|
|
|
|
.svg-icon {
|
|
.svg-icon {
|
|
|
- font-size: 18px;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
margin-top: 7px;
|
|
margin-top: 7px;
|
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|