Sfoglia il codice sorgente

批次编辑:录屏取决于电脑摄像头启用

Michael Wang 4 anni fa
parent
commit
6ec61967cd
1 ha cambiato i file con 24 aggiunte e 6 eliminazioni
  1. 24 6
      src/features/examwork/ExamManagement/ExamEdit.vue

+ 24 - 6
src/features/examwork/ExamManagement/ExamEdit.vue

@@ -387,9 +387,17 @@
                 <div class="d-flex">
                   <div class="d-flex flex-column justify-content-between">
                     <el-checkbox label="CLIENT_CAMERA"
-                      >电脑摄像头主机位</el-checkbox
+                      >电脑摄像头主机位</el-checkbox
                     >
-                    <el-checkbox label="CLIENT_SCREEN"
+                    <el-checkbox
+                      label="CLIENT_SCREEN"
+                      :disabled="
+                        !form.monitorVideoSource.includes('CLIENT_CAMERA')
+                      "
+                      :title="
+                        !form.monitorVideoSource.includes('CLIENT_CAMERA') &&
+                        '原因:先选择电脑摄像头主机位'
+                      "
                       >电脑开启录屏</el-checkbox
                     >
                     <el-checkbox label="MOBILE_FIRST">手机主机位</el-checkbox>
@@ -422,14 +430,14 @@
                         style="width: 52px !important;"
                       >
                         <div :class="monitorImgSrc('MOBILE_SECOND')" />
-                        手机辅机位
+                        <span style="font-size: 10px;">手机辅机位</span>
                       </div>
                       <div
                         class="d-flex flex-column justify-content-center align-items-center"
                         style="width: 350px !important;"
                       >
                         <div :class="monitorImgSrc('CLIENT_CAMERA')" />
-                        电脑摄像头主机位
+                        <span style="font-size: 10px;">电脑摄像头主机位</span>
                       </div>
                       <div style="width: 52px !important;"></div>
                     </div>
@@ -443,7 +451,7 @@
                         style="width: 350px !important;"
                       >
                         <div :class="monitorImgSrc('CLIENT_SCREEN')" />
-                        电脑开启录屏
+                        <span style="font-size: 10px;">电脑开启录屏</span>
                       </div>
                       <div style="width: 52px !important;"></div>
                     </div>
@@ -455,7 +463,7 @@
                         style="width: 52px !important;"
                       >
                         <div :class="monitorImgSrc('MOBILE_FIRST')" />
-                        手机主机位
+                        <span style="font-size: 10px;">手机主机位</span>
                       </div>
                     </div>
                   </div>
@@ -625,6 +633,16 @@ export default {
             (v) => v !== "MOBILE_SECOND"
           );
         }
+        if (
+          // 没动静,不修改,避免死循环
+          (v || []).includes("CLIENT_CAMERA") !==
+            (ov || []).includes("CLIENT_CAMERA") &&
+          !this.form.monitorVideoSource.includes("CLIENT_CAMERA")
+        ) {
+          this.form.monitorVideoSource = this.form.monitorVideoSource.filter(
+            (v) => v !== "CLIENT_SCREEN"
+          );
+        }
       },
     },
     "form.cameraPhotoUpload": {