zy1125 1 рік тому
батько
коміт
875ab33840
2 змінених файлів з 21 додано та 13 видалено
  1. 2 2
      public/config.js
  2. 19 11
      src/components/right.vue

+ 2 - 2
public/config.js

@@ -1,6 +1,6 @@
1 1
 window.g = {
2 2
     // 获取数据请求地址
3
-    // BASE_API: "https://test.lqkj.top//cmioc3-server",
4
-    BASE_API: "http://192.168.4.219:12397/ioc-server",
3
+    BASE_API: "https://test.lqkj.top//cmioc3-server",
4
+    // BASE_API: "http://192.168.4.219:12397/ioc-server",
5 5
     UE_IP: "http://192.168.4.159"
6 6
 };

+ 19 - 11
src/components/right.vue

@@ -61,14 +61,14 @@
61 61
             </div>
62 62
 
63 63
             <div class="monitorContent">
64
-                <el-carousel class="monitor">
65
-                    <el-carousel-item v-for="(item, index) in carouselData" :key="index">
64
+                <el-carousel class="monitor" :interval="8000" @change="monitorchange">
65
+                    <el-carousel-item v-for="(item, index2) in carouselData" :key="index2">
66 66
                         <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}</p>
67
-                        <div class="interactclass">
67
+                        <div class="interactclass" >
68 68
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
69 69
                                 <span style="z-index: 99;">{{ item.title }}</span>
70
-                                <!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
71
-                                <div v-if="item.src"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
70
+                            
71
+                                <div v-if="item.src &&videoindex==index2"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
72 72
                                     <div  class="vue3VideoPlay ">
73 73
                                         <vue3VideoPlay 
74 74
                                     
@@ -91,11 +91,8 @@
91 91
                         <div class="interactclass">
92 92
                             <div class="room" v-for="(item, index) in item.activeMonitor.array1" :key="index">
93 93
                                 <span  style="z-index: 99;">{{ item.title }}</span>
94
-                                <!-- <br>
95
-                                <div>
96
-                                    {{ item.src }}
97
-                                </div> -->
98
-                                <div style="width: 100%;height: 100%;" @click="lookVideo(item)">
94
+               
95
+                                <div v-if="item.src &&videoindex==index2"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
99 96
                                     <div  class="vue3VideoPlay ">
100 97
                                         <vue3VideoPlay 
101 98
                                     
@@ -174,6 +171,15 @@ export default ({
174 171
         //视频播放弹框
175 172
         const videoDialog = ref(false)
176 173
 
174
+        //播放视频索引
175
+        const videoindex = ref(0)
176
+        const monitorchange = function (val) {
177
+            console.log('ssbadbuasd',val);
178
+           setTimeout(() => {
179
+            videoindex.value=val
180
+           }, 500);
181
+        }
182
+
177 183
         // const  videoshow = ref(true)
178 184
         const dialogTitle = ref("")
179 185
         // 播放视频
@@ -303,7 +309,9 @@ export default ({
303 309
             d2img,
304 310
             d3img,
305 311
             deviceImg,
306
-            dialogTitle
312
+            dialogTitle,
313
+            monitorchange,
314
+            videoindex
307 315
         }
308 316
     },
309 317
 })