Jelajahi Sumber

feat: 大屏监考中, 通话进行时限制其它通话操作按钮

chenhao 2 tahun lalu
induk
melakukan
438cbe1a83

+ 1 - 0
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoringFull.vue

@@ -33,6 +33,7 @@
                 ref="InvigilationStudent"
                 :data="item"
                 :talking="talking"
+                :enableVideoSource="!!filter.monitorVideoSource"
                 :warning="isWarning(item)"
                 :beCalled="isBeCalled(item)"
                 @operation="onOperation"

+ 11 - 1
src/features/invigilation/RealtimeMonitoring/components/InvigilationStudentFull.vue

@@ -87,6 +87,10 @@ export default {
         return {};
       },
     },
+    enableVideoSource: {
+      type: Boolean,
+      default: false,
+    },
     talking: {
       type: Object,
       default: () => ({ examRecordId: "", isVideo: false }),
@@ -126,12 +130,18 @@ export default {
   },
   methods: {
     onOperation(type) {
+      if (!this.enableVideoSource && !["message", "voice"].includes(type)) {
+        return this.$notify({
+          type: "error",
+          message: "当前未开启直播监考",
+        });
+      }
       if (type === "sound") {
         return this.$refs.ThirdViewVideo?.videoMuted();
       }
       if (
         ["talk", "video", "answer"].includes(type) &&
-        (this.disabled || this.talkingType === type)
+        (this.disabled || !!this.talkingType)
       ) {
         return;
       }