zy1125 1 рік тому
батько
коміт
d45e2f395d
3 змінених файлів з 64 додано та 37 видалено
  1. 3 1
      src/assets/css/right.scss
  2. 2 2
      src/components/UeVideo.vue
  3. 59 34
      src/components/right.vue

+ 3 - 1
src/assets/css/right.scss

@@ -244,7 +244,9 @@
244
 
244
 
245
             .interactclass {
245
             .interactclass {
246
                 display: flex;
246
                 display: flex;
247
-                justify-content: space-evenly;
247
+                justify-content: space-between;
248
+                width: 93.5%;
249
+                margin-left: 4.5%;
248
 
250
 
249
                 .room {
251
                 .room {
250
 
252
 

+ 2 - 2
src/components/UeVideo.vue

@@ -1,7 +1,7 @@
1
 
1
 
2
 <template>
2
 <template>
3
-  <div  ref="video" id="player"></div>
4
-  <!-- <div style="background-color: rgba(156, 167, 84, 0.667); width: 100vw;height: 100vh;position: absolute;" ></div> -->
3
+  <!-- <div  ref="video" id="player"></div> -->
4
+  <div style="background-color: rgba(156, 167, 84, 0.667); width: 100vw;height: 100vh;position: absolute;" ></div>
5
   <Login :class="loginShow ? '' : 'hidden'"></Login>
5
   <Login :class="loginShow ? '' : 'hidden'"></Login>
6
   <home></home>
6
   <home></home>
7
   <!-- <div @click="toUE" style="position: absolute;top: 5%; left: 50%;background-color: darkcyan;z-index: 200">向UE发信息</div> -->
7
   <!-- <div @click="toUE" style="position: absolute;top: 5%; left: 50%;background-color: darkcyan;z-index: 200">向UE发信息</div> -->

+ 59 - 34
src/components/right.vue

@@ -67,12 +67,12 @@
67
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
67
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
68
                                 <span style="z-index: 99;">{{ item.title }}</span>
68
                                 <span style="z-index: 99;">{{ item.title }}</span>
69
                                 <!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
69
                                 <!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
70
-                                <div v-if="item.src"  style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
70
+                                <div v-if="item.src"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
71
                                     <div  class="vue3VideoPlay ">
71
                                     <div  class="vue3VideoPlay ">
72
                                         <vue3VideoPlay 
72
                                         <vue3VideoPlay 
73
                                     
73
                                     
74
                                     width="100%"
74
                                     width="100%"
75
-                                    height="9vh"
75
+                                    height="8.8vh"
76
                                     style=" object-fit: fill"
76
                                     style=" object-fit: fill"
77
                                     :src="item.src"
77
                                     :src="item.src"
78
                                     :type="videoData.type"
78
                                     :type="videoData.type"
@@ -94,7 +94,7 @@
94
                                 <div>
94
                                 <div>
95
                                     {{ item.src }}
95
                                     {{ item.src }}
96
                                 </div> -->
96
                                 </div> -->
97
-                                <div style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
97
+                                <div style="width: 100%;height: 100%;" @click="lookVideo(item)">
98
                                     <div  class="vue3VideoPlay ">
98
                                     <div  class="vue3VideoPlay ">
99
                                         <vue3VideoPlay 
99
                                         <vue3VideoPlay 
100
                                     
100
                                     
@@ -105,6 +105,7 @@
105
                                     :type="videoData.type"
105
                                     :type="videoData.type"
106
                                     :autoPlay="true"
106
                                     :autoPlay="true"
107
                                     :control="false"
107
                                     :control="false"
108
+                                    :preload="meta"
108
                                    />
109
                                    />
109
                                     </div>
110
                                     </div>
110
                             
111
                             
@@ -207,7 +208,31 @@ export default ({
207
         // 物联设备类型统计
208
         // 物联设备类型统计
208
         let interDevice = ref([])
209
         let interDevice = ref([])
209
         // 智慧教室
210
         // 智慧教室
210
-        let carouselData = ref([])
211
+        let carouselData = ref([
212
+            {
213
+                activeMonitor:{
214
+    "array": [
215
+        {
216
+            "src": "http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8",
217
+            "title": "录播设备"
218
+        },
219
+       
220
+    ],
221
+    "title1": "010431",
222
+    "array1": [
223
+        {
224
+            "src": "http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8",
225
+            "title": "录播设备"
226
+        },
227
+        {
228
+            "src": "http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8",
229
+            "title": "录播设备"
230
+        }
231
+    ],
232
+    "title": "010429"
233
+}
234
+            }
235
+        ])
211
 
236
 
212
         //获取页面数据
237
         //获取页面数据
213
         const getDeviceData = async () => {
238
         const getDeviceData = async () => {
@@ -231,47 +256,47 @@ export default ({
231
             //截取数组前6项
256
             //截取数组前6项
232
             interDevice.value = category.slice(0,6);
257
             interDevice.value = category.slice(0,6);
233
       
258
       
234
-             // 互动教室
235
-             carouselData.value = monitor.slice(0,1);
259
+            //  // 互动教室
260
+            //  carouselData.value = monitor;
236
       
261
       
237
-             carouselData.value.map((res)=>{
238
-                console.log('sadhi2',res.activeMonitor);
262
+            //  carouselData.value.map((res)=>{
263
+            //     console.log('sadhi2',res.activeMonitor);
239
 
264
 
240
-                res.activeMonitor.array.map(array =>{
265
+            //     res.activeMonitor.array.map(array =>{
241
               
266
               
242
-                    //视频转码
243
-                    getvideo({
244
-                    "rtsp": array.src,
245
-                    }).then((res)=>{
246
-                        console.log('sadnuq21',res.data);
247
-                        console.log('sadnuq2121',res.data.httpFlv);
248
-                         array.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
249
-                       // array.src=res.data.httpFlv
250
-                    })
267
+            //         //视频转码
268
+            //         getvideo({
269
+            //         "rtsp": array.src,
270
+            //         }).then((res)=>{
271
+            //             console.log('sadnuq21',res.data);
272
+            //             console.log('sadnuq2121',res.data.httpFlv);
273
+            //              array.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
274
+            //            // array.src=res.data.httpFlv
275
+            //         })
251
 
276
 
252
                     
277
                     
253
-                })
254
-                res.activeMonitor.array1.map(array1 =>{
255
-                    console.log('asdui1231',array1);
256
-                       //视频转码
257
-                       getvideo({
258
-                    "rtsp": array1.src,
259
-                    }).then((res)=>{
260
-                        console.log('sadnuq212123s2',res.data);
261
-                         array1.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
262
-                       // array.src=res.data.httpFlv
263
-                    })
264
-                })
265
-
266
-
267
-            })
278
+            //     })
279
+            //     res.activeMonitor.array1.map(array1 =>{
280
+            //         console.log('asdui1231',array1);
281
+            //            //视频转码
282
+            //            getvideo({
283
+            //         "rtsp": array1.src,
284
+            //         }).then((res)=>{
285
+            //             console.log('sadnuq212123s2',res.data);
286
+            //              array1.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
287
+            //            // array.src=res.data.httpFlv
288
+            //         })
289
+            //     })
290
+
291
+
292
+            // })
268
 
293
 
269
                  
294
                  
270
 
295
 
271
 
296
 
272
 
297
 
273
                 setTimeout(() => {
298
                 setTimeout(() => {
274
-                    console.log('处理后监控视频数据===',monitor);
299
+                    console.log('处理后监控视频数据===',carouselData.value);
275
                 }, 2000);
300
                 }, 2000);
276
 
301
 
277
             //物联设备统计
302
             //物联设备统计