wenhongquan пре 1 година
родитељ
комит
bb6aaf7e48
1 измењених фајлова са 14 додато и 5 уклоњено
  1. 14 5
      ruoyi-ui-vue3/src/views/device/sensordash/video.vue

+ 14 - 5
ruoyi-ui-vue3/src/views/device/sensordash/video.vue

@@ -26,8 +26,10 @@
       </el-col>
       <el-col :span="18"  v-if="isvideoshow">
         <div style="height: 100%;">
-           <div id="container" style="margin-top: 0px;width:100%;height:80vh"></div>
+           <!-- <div id="container" style="margin-top: 0px;width:100%;height:80vh"></div> -->
            <!-- <iframe id="FrameID" :key="currenturl" style="width: 100%;height:100%" :src="currenturl"/> -->
+           <div v-if="currenturl==''||currenturl==null" id="container" style="margin-top: 0px;width:100%;height:80vh"></div>
+          <iframe v-if="currenturl!=''&&currenturl!=null" id="FrameID" :key="currenturl" style="width: 100%;height:100%" :src="currenturl"/>
         </div>
       </el-col>
       <el-col :span="18" v-if="!isvideoshow">
@@ -131,9 +133,16 @@ const handleClick = (node) => {
     searchform.value.id = node.id
   }
 
-  setTimeout(() => {
+  isvideoshow.value = true;
+
+
+  if (node.remark != null && node.remark != "") {
+    currenturl.value = node.remark;
+  } else {
+
+     setTimeout(() => {
       var $container = document.getElementById('container');
-   jessibuca = new Jessibuca({
+      jessibuca = new Jessibuca({
             container: $container,
             videoBuffer: 0.2, // 缓存时长
             isResize: false,
@@ -155,8 +164,8 @@ const handleClick = (node) => {
    },);
          jessibuca.play(node.voiceOutCode);
     }, 1000);
-  currenturl.value = node.remark;
-  isvideoshow.value = true;
+
+  }