Forráskód Böngészése

视频放大停止自动刷新列表

zhangjie 2 éve
szülő
commit
eca340e5f3

+ 1 - 0
src/features/invigilation/ExamInvigilation/ExamInvigilation.vue

@@ -174,6 +174,7 @@
           :max-retry-count="1"
           detail-name="详情"
           @muted-change="videoAllMuted"
+          @video-view-change="videoViewChange"
         ></invigilation-student>
       </div>
     </div>

+ 1 - 0
src/features/invigilation/ExamInvigilation/ExamInvigilationFull.vue

@@ -22,6 +22,7 @@
             :max-retry-count="1"
             detail-name="MORE"
             @muted-change="videoAllMuted"
+            @video-view-change="videoViewChange"
           ></invigilation-student>
         </div>
       </div>

+ 5 - 0
src/features/invigilation/ExamInvigilation/examInviMixins.js

@@ -51,6 +51,7 @@ export default {
       inviTimeChartOption: null,
       inviStudentWainList: [],
       curMapAreaInd: 0,
+      videoIsLargeView: false,
       // setTs
       setTsMap: {
         summary: [],
@@ -102,6 +103,9 @@ export default {
         refInst.mutedPlayer(true);
       });
     },
+    videoViewChange(isLarge) {
+      this.videoIsLargeView = isLarge;
+    },
     // interval
     async intervalSummary() {
       const typeName = "summary";
@@ -189,6 +193,7 @@ export default {
       this.summary = Object.assign({}, this.summary, data);
     },
     async getStudentVideoList() {
+      if (this.videoIsLargeView) return;
       // interval 10s
       const res = await examInvigilationVideoRandomList({ randomNum: 4 });
       const domainLen = this.liveDomains.length;

+ 8 - 1
src/features/invigilation/OnlinePatrol/PatrolExamDetail.vue

@@ -236,6 +236,7 @@
           :data="item"
           show-type="patrol"
           @muted-change="videoAllMuted"
+          @video-view-change="videoViewChange"
         ></invigilation-student>
       </div>
     </div>
@@ -272,7 +273,7 @@ import {
 import { mapState, mapMutations, mapActions } from "vuex";
 
 export default {
-  name: "realtime-monitoring",
+  name: "patrol-exam-detail",
   components: {
     RightOrWrong,
     InvigilationStudent,
@@ -319,6 +320,7 @@ export default {
         MOBILE_SECOND: "mobileSecondMonitorStatusSource",
       },
       viewingAngles: [],
+      videoIsLargeView: false,
     };
   },
   computed: {
@@ -409,6 +411,8 @@ export default {
       this.getList();
     },
     async getList() {
+      if (this.pageType === "1" && this.videoIsLargeView) return;
+
       const datas = {
         ...this.filter,
         pageNumber: this.current,
@@ -459,6 +463,9 @@ export default {
         refInst.mutedPlayer(true);
       });
     },
+    videoViewChange(isLarge) {
+      this.videoIsLargeView = isLarge;
+    },
     goBack() {
       window.history.go(-1);
     },

+ 7 - 0
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoring.vue

@@ -298,6 +298,7 @@
           ref="InvigilationStudent"
           :data="item"
           @muted-change="videoAllMuted"
+          @video-view-change="videoViewChange"
         ></invigilation-student>
       </div>
     </div>
@@ -415,6 +416,7 @@ export default {
         MOBILE_SECOND: "mobileSecondMonitorStatusSource",
       },
       viewingAngles: [],
+      videoIsLargeView: false,
       IS_ADMIN: this.$store.state.user.roleCodes.includes("ADMIN"),
     };
   },
@@ -544,6 +546,8 @@ export default {
       this.getList();
     },
     async getList() {
+      if (this.pageType === "1" && this.videoIsLargeView) return;
+
       const datas = {
         ...this.filter,
         ...this.monitorStatusFilter,
@@ -700,6 +704,9 @@ export default {
         refInst.mutedPlayer(true);
       });
     },
+    videoViewChange(isLarge) {
+      this.videoIsLargeView = isLarge;
+    },
     async toFullScreen() {
       const fullscreenEnabled =
         document.fullscreenEnabled ||

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

@@ -42,6 +42,7 @@
                 @operation="onOperation"
                 @muted-change="videoAllMuted"
                 @click.native="toDetail(item)"
+                @video-view-change="videoViewChange"
               ></invigilation-student-full>
             </div>
           </div>
@@ -158,6 +159,7 @@ export default {
         "transform-origin": "0 0",
         transform: "scale(1) translate(-50%)",
       },
+      videoIsLargeView: false,
       IS_ADMIN: this.$store.state.user.roleCodes.includes("ADMIN"),
     };
   },
@@ -209,6 +211,8 @@ export default {
 
     /** 查询视频列表 */
     async getList() {
+      if (this.videoIsLargeView) return;
+
       if (this.videoListSource) {
         this.videoListSource.cancel("cancel prev");
       }
@@ -284,6 +288,9 @@ export default {
         refInst.mutedPlayer(true);
       });
     },
+    videoViewChange(isLarge) {
+      this.videoIsLargeView = isLarge;
+    },
 
     /** 跳转详情 */
     toDetail(item) {

+ 2 - 0
src/features/invigilation/RealtimeMonitoring/components/InvigilationStudentFull.vue

@@ -168,6 +168,7 @@ export default {
     },
     toLargeView() {
       this.$emit("muted-change");
+      this.$emit("video-view-change", true);
       this.$refs.ThirdViewVideo.destroyPlayer();
       this.$refs.InvigilationStudentMediaDialog.open();
     },
@@ -181,6 +182,7 @@ export default {
       this.$refs.ThirdViewVideo.mutedPlayer(muted);
     },
     dialogClose() {
+      this.$emit("video-view-change", false);
       this.$refs.ThirdViewVideo.reloadVideo();
     },
   },

+ 2 - 0
src/features/invigilation/common/InvigilationStudent.vue

@@ -108,6 +108,7 @@ export default {
     },
     toLargeView() {
       this.$emit("muted-change");
+      this.$emit("video-view-change", true);
       this.$refs.ThirdViewVideo.destroyPlayer();
       this.$refs.InvigilationStudentMediaDialog.open();
     },
@@ -118,6 +119,7 @@ export default {
       this.$refs.ThirdViewVideo.mutedPlayer(muted);
     },
     dialogClose() {
+      this.$emit("video-view-change", false);
       this.$refs.ThirdViewVideo.reloadVideo();
     },
   },