dusenyao há 3 anos atrás
pai
commit
485bc1cbc7

+ 1 - 0
src/components/course/FinishCourseware.vue

@@ -77,6 +77,7 @@ export default {
       }).then(() => {
       }).then(() => {
         this.$message.success('完成课件成功');
         this.$message.success('完成课件成功');
         this.dialogClose();
         this.dialogClose();
+        this.$router.go(0);
       });
       });
     },
     },
 
 

+ 20 - 0
src/views/live/SelectDevice.vue

@@ -0,0 +1,20 @@
+<template>
+  <el-dialog :visible="dialogVisibleDevice"></el-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    dialogVisibleDevice: {
+      default: false,
+      type: Boolean
+    }
+  },
+  data() {
+    return {};
+  },
+  methods: {}
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 0
src/views/live/teacher/index.vue

@@ -10,6 +10,7 @@
             结束直播
             结束直播
           </el-button>
           </el-button>
           <el-button v-if="liveStat" @click="reconnection">重连</el-button>
           <el-button v-if="liveStat" @click="reconnection">重连</el-button>
+          <el-button @click="getDevice">设置设备</el-button>
         </div>
         </div>
       </div>
       </div>
       <div class="live-course-name">{{ roomInfo.course_name }}</div>
       <div class="live-course-name">{{ roomInfo.course_name }}</div>

+ 7 - 1
src/views/live/teacher/live.js

@@ -182,9 +182,15 @@ export function initListener(vue) {
     console.log('房间设置事件', data); // 房间设置事件
     console.log('房间设置事件', data); // 房间设置事件
   });
   });
 
 
+  // 网络整体状态事件
+  rtc.on('netStatus', data => {
+    console.log(data);
+  });
+
+  // 推流异常断开事件
   rtc.on('publishStreamErr', data => {
   rtc.on('publishStreamErr', data => {
-    console.log('推流意外终止:' + data.streamName);
     // 直播开启状态下,尝试重推这条流
     // 直播开启状态下,尝试重推这条流
+    console.log('推流意外终止:' + data.streamName);
   });
   });
 
 
   // 视频无法自动播放
   // 视频无法自动播放

+ 6 - 6
src/views/task_details/student/index.vue

@@ -115,16 +115,14 @@
     </div>
     </div>
 
 
     <completion-view
     <completion-view
-      v-if="my_execute_info.is_finished === 'true'"
       :task-id="id"
       :task-id="id"
       :cur-student-id="$store.state.user.user_code"
       :cur-student-id="$store.state.user.user_code"
-      :cur-courseware-id="coursewareId"
+      :cur-courseware-id="curCoursewareId"
       :dialog-visible="dialogVisible_completion"
       :dialog-visible="dialogVisible_completion"
       @dialogClose="dialogClose_completion"
       @dialogClose="dialogClose_completion"
     />
     />
 
 
     <finish-courseware
     <finish-courseware
-      v-else
       :id="id"
       :id="id"
       :courseware-id="coursewareId"
       :courseware-id="coursewareId"
       :dialog-visible="dialogVisible"
       :dialog-visible="dialogVisible"
@@ -169,6 +167,7 @@ export default {
       file_list: [],
       file_list: [],
       dialogVisible: false,
       dialogVisible: false,
       coursewareId: '',
       coursewareId: '',
+      curCoursewareId: '',
       dialogVisible_completion: false,
       dialogVisible_completion: false,
       my_execute_info: {},
       my_execute_info: {},
       student_remark: '',
       student_remark: '',
@@ -298,11 +297,12 @@ export default {
       if (this.my_execute_info.is_finished === 'true' && is_finished === 'false') {
       if (this.my_execute_info.is_finished === 'true' && is_finished === 'false') {
         return this.$message.warning('该课件没有被完成');
         return this.$message.warning('该课件没有被完成');
       }
       }
-      this.coursewareId = id;
-      if (this.my_execute_info.is_finished === 'true') {
+      if (is_finished === 'true') {
         this.dialogVisible_completion = true;
         this.dialogVisible_completion = true;
+        this.curCoursewareId = id;
       } else {
       } else {
         this.dialogVisible = true;
         this.dialogVisible = true;
+        this.coursewareId = id;
       }
       }
     },
     },
 
 
@@ -313,7 +313,7 @@ export default {
 
 
     dialogClose_completion() {
     dialogClose_completion() {
       this.dialogVisible_completion = false;
       this.dialogVisible_completion = false;
-      this.coursewareId = '';
+      this.curCoursewareId = '';
     }
     }
   }
   }
 };
 };