Bläddra i källkod

监控样式调整

zy1125 1 år sedan
förälder
incheckning
d45e2f395d
3 ändrade filer med 64 tillägg och 37 borttagningar
  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 245
             .interactclass {
246 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 251
                 .room {
250 252
 

+ 2 - 2
src/components/UeVideo.vue

@@ -1,7 +1,7 @@
1 1
 
2 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 5
   <Login :class="loginShow ? '' : 'hidden'"></Login>
6 6
   <home></home>
7 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 67
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
68 68
                                 <span style="z-index: 99;">{{ item.title }}</span>
69 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 71
                                     <div  class="vue3VideoPlay ">
72 72
                                         <vue3VideoPlay 
73 73
                                     
74 74
                                     width="100%"
75
-                                    height="9vh"
75
+                                    height="8.8vh"
76 76
                                     style=" object-fit: fill"
77 77
                                     :src="item.src"
78 78
                                     :type="videoData.type"
@@ -94,7 +94,7 @@
94 94
                                 <div>
95 95
                                     {{ item.src }}
96 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 98
                                     <div  class="vue3VideoPlay ">
99 99
                                         <vue3VideoPlay 
100 100
                                     
@@ -105,6 +105,7 @@
105 105
                                     :type="videoData.type"
106 106
                                     :autoPlay="true"
107 107
                                     :control="false"
108
+                                    :preload="meta"
108 109
                                    />
109 110
                                     </div>
110 111
                             
@@ -207,7 +208,31 @@ export default ({
207 208
         // 物联设备类型统计
208 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 238
         const getDeviceData = async () => {
@@ -231,47 +256,47 @@ export default ({
231 256
             //截取数组前6项
232 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 298
                 setTimeout(() => {
274
-                    console.log('处理后监控视频数据===',monitor);
299
+                    console.log('处理后监控视频数据===',carouselData.value);
275 300
                 }, 2000);
276 301
 
277 302
             //物联设备统计