瀏覽代碼

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

zhangjie 4 年之前
父節點
當前提交
555c9ca500
共有 1 個文件被更改,包括 12 次插入2 次删除
  1. 12 2
      src/features/invigilation/OnlinePatrol/PatrolWarningDetail.vue

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

@@ -235,9 +235,19 @@ export default {
         item.name = item.source;
         item.name = item.source;
         return item;
         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.firstViewVideo = records[0] || {};
-      this.secondViewVideo = records[2] || {};
+      this.secondViewVideo = records[1] || {};
 
 
       if (records.length) this.initSubscribeVideo();
       if (records.length) this.initSubscribeVideo();
     },
     },