Kaynağa Gözat

修复在线巡考详情视频直播窗口展示问题

zhangjie 4 yıl önce
ebeveyn
işleme
555c9ca500

+ 12 - 2
src/features/invigilation/OnlinePatrol/PatrolWarningDetail.vue

@@ -235,9 +235,19 @@ export default {
         item.name = item.source;
         return item;
       });
-      console.log(records.map((item) => item.liveUrl));
+      const orderSources = {
+        CLIENT_CAMERA: 1,
+        MOBILE_FIRST: 2,
+        CLIENT_SCREEN: 3,
+        MOBILE_SECOND: 4,
+      };
+
+      records.sort((a, b) => {
+        return orderSources[a.source] - orderSources[b.source];
+      });
+
       this.firstViewVideo = records[0] || {};
-      this.secondViewVideo = records[2] || {};
+      this.secondViewVideo = records[1] || {};
 
       if (records.length) this.initSubscribeVideo();
     },