dusenyao há 3 anos atrás
pai
commit
08366769d1

+ 15 - 5
src/components/course/FinishCourseware.vue

@@ -69,16 +69,26 @@ export default {
   },
   methods: {
     finishTaskMaterial() {
+      if (this.exam_answer.length === 0) {
+        this.$message.warning('请完成课件');
+        return;
+      }
+      const loading = this.$loading();
       FinishMyTaskMaterial_Student({
         task_id: this.id,
         material_type: 'COURSEWARE',
         material_id: this.coursewareId,
         exam_answer: this.exam_answer
-      }).then(() => {
-        this.$message.success('完成课件成功');
-        this.dialogClose();
-        this.$router.go(0);
-      });
+      })
+        .then(() => {
+          this.$message.success('完成课件成功');
+          this.dialogClose();
+          this.$router.go(0);
+        })
+        .finally(() => {
+          loading.close();
+          this.exam_answer = '';
+        });
     },
 
     handleBookUserAnswer(data) {

+ 1 - 1
src/components/live/CurMaterial.vue

@@ -7,7 +7,7 @@
     @close="dialogMaterialClose"
   >
     <div slot="title" class="dialog-header">
-      <span class="dialog-header-title">当前推送课件</span>
+      <span class="dialog-header-title">当前推送资料</span>
       <span @click="isAlignCenter = !isAlignCenter">
         <svg-icon :icon-class="isAlignCenter ? 'align-left' : 'align-center'" />
       </span>

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

@@ -628,6 +628,7 @@ $draw-h: 520px;
       // 画板
       #draw-parent {
         height: $draw-h;
+        width: 100%;
         position: relative;
         background-color: $live-bc;
         overflow: hidden;

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

@@ -914,6 +914,7 @@ $draw-h: 520px;
       // 画板
       #draw-parent {
         height: $draw-h;
+        width: 100%;
         position: relative;
         background-color: $live-bc;
         overflow: hidden;

+ 8 - 0
src/views/live/teacher/live.js

@@ -324,6 +324,14 @@ export function initListener(vue) {
       message: `全体${msg}成功`
     });
   });
+
+  // 接收自定义消息
+  rtc.on('publish_message', data => {
+    // 连接中途下麦
+    if (data.type === 'handsDown-load-student' && data.uid === vue.connectUid) {
+      vue.callLoading = false;
+    }
+  });
 }
 
 /**