浏览代码

样式调整

zy1125 1 年之前
父节点
当前提交
f9c8dac5ab
共有 3 个文件被更改,包括 134 次插入27 次删除
  1. 81 3
      src/assets/css/home.scss
  2. 32 8
      src/components/home.vue
  3. 21 16
      src/components/right.vue

+ 81 - 3
src/assets/css/home.scss

@@ -25,6 +25,10 @@
25
     overflow: hidden;
25
     overflow: hidden;
26
 }
26
 }
27
 
27
 
28
+
29
+
30
+
31
+
28
 // 点击模型弹出框
32
 // 点击模型弹出框
29
 .modelInfo {
33
 .modelInfo {
30
     position: absolute;
34
     position: absolute;
@@ -34,12 +38,70 @@
34
     backdrop-filter: blur(30.5px);
38
     backdrop-filter: blur(30.5px);
35
     z-index: 8;
39
     z-index: 8;
36
 
40
 
37
-   
41
+    .model-detail2{
42
+            border-top-left-radius: 10px;
43
+    border-top-right-radius: 10px;
44
+    height: 155px;
45
+    overflow: hidden;
46
+
47
+            .listbox2 {
48
+            width: 180px;
49
+            text-align: center;
50
+            height: 30px;
51
+            line-height: 30px;
52
+            font-size: 12px;
53
+            color: #fff;
54
+            background-color: rgba(255, 255, 255, 0.31);
55
+            font-size: 12px;
56
+            font-family: Microsoft YaHei UI;
57
+            font-weight: 700;
58
+       
59
+            .listtitlebox{
60
+             
61
+                
62
+                background-color: rgba(255, 255, 255, 0.18);
63
+                padding-bottom: 20px;
64
+            }
65
+
66
+        }
67
+  
68
+        .listtitle{
69
+           
70
+            width: 100%;
71
+            height: 30px;
72
+            display: flex;
73
+            align-items: center;
74
+
75
+            .name {
76
+                color: #fff;
77
+                margin-left: 5px;
78
+                font-weight: 700;
79
+                padding-left: 8px;
80
+                font-size: 12px;
81
+            }
82
+
83
+            .value {
84
+                font-size: 12px;
85
+                font-family: 400;
86
+                margin-left: 5px;
87
+                color: #ffffffeb;
88
+            }
89
+
90
+        }
91
+    }
92
+
93
+
38
     .model-detail {
94
     .model-detail {
39
         // background-color: #fff;
95
         // background-color: #fff;
40
         border-top-left-radius: 10px;
96
         border-top-left-radius: 10px;
41
         border-top-right-radius: 10px;
97
         border-top-right-radius: 10px;
42
         overflow: hidden;
98
         overflow: hidden;
99
+
100
+        .listbox {
101
+            background-color: rgba(142, 142, 142, 0.18);
102
+            padding-bottom: 8px;
103
+        }
104
+
43
         .list {
105
         .list {
44
             width: 202px;
106
             width: 202px;
45
             text-align: center;
107
             text-align: center;
@@ -51,15 +113,31 @@
51
             font-size: 12px;
113
             font-size: 12px;
52
             font-family: Microsoft YaHei UI;
114
             font-family: Microsoft YaHei UI;
53
             font-weight: 700;
115
             font-weight: 700;
54
-    
116
+
55
 
117
 
56
         }
118
         }
119
+
57
         .listtitle {
120
         .listtitle {
58
             width: 100%;
121
             width: 100%;
59
             height: 30px;
122
             height: 30px;
60
             display: flex;
123
             display: flex;
61
             align-items: center;
124
             align-items: center;
62
-            background-color: rgba(142, 142, 142, 0.18);
125
+
126
+            .name {
127
+                color: #fff;
128
+                margin-left: 5px;
129
+                font-weight: 700;
130
+                padding-left: 8px;
131
+                font-size: 12px;
132
+            }
133
+
134
+            .value {
135
+                font-size: 12px;
136
+                font-family: 400;
137
+                margin-left: 5px;
138
+                color: #ffffffeb;
139
+            }
140
+
63
         }
141
         }
64
 
142
 
65
     }
143
     }

+ 32 - 8
src/components/home.vue

@@ -11,21 +11,38 @@
11
 
11
 
12
         </el-container>
12
         </el-container>
13
         <div ref="popoverRef" id="popoverRef" class="modelInfo" >
13
         <div ref="popoverRef" id="popoverRef" class="modelInfo" >
14
-            <div class="model-detail"  >
15
-                <div v-for="item in classDeviceInfo" >
14
+            <div v-if="orientation=='Left' ||orientation=='Right'" class="model-detail"  >
15
+                <div v-for="item in classDeviceInfo" class="listbox" >
16
                     
16
                     
17
                     <div class="list">
17
                     <div class="list">
18
                     {{ item[0].value }}
18
                     {{ item[0].value }}
19
                     </div>
19
                     </div>
20
                     <div   v-for="item2 in item" class="listtitle">
20
                     <div   v-for="item2 in item" class="listtitle">
21
                         
21
                         
22
-                       <span style="color: #fff;margin-left: 5px; font-weight: 700;padding-left: 8px; "> {{ item2.name }} :</span>
23
-                       <span v-if="item2.value!='在线'" style=" font-family: 100; margin-left: 5px;color: #ffffffeb;">{{ item2.value }}</span>
22
+                       <span class="name"> {{ item2.name }} :</span>
23
+                       <span v-if="item2.value!='在线'" class="value">{{ item2.value }}</span>
24
                        <span v-else style=" font-family: 100; margin-left: 5px;color: #10C383;">{{ item2.value }}</span>
24
                        <span v-else style=" font-family: 100; margin-left: 5px;color: #10C383;">{{ item2.value }}</span>
25
                     </div>
25
                     </div>
26
-                   
27
-      
26
+                </div>
27
+            </div>
28
+            <div v-else class="model-detail2"  >
29
+                <div style="display: flex;">
30
+                    <div v-for="item in classDeviceInfo" class="listbox2"  >
31
+                        
32
+                        <div class="list" style="text-align: center;width: 100%;">
33
+                        {{ item[0].value }}
34
+                        </div>
28
 
35
 
36
+                        <div class="listtitlebox">
37
+                            <div   v-for="item2 in item" class="listtitle">
38
+                        
39
+                        <span class="name"> {{ item2.name }} :</span>
40
+                        <span v-if="item2.value!='在线'" class="value">{{ item2.value }}</span>
41
+                        <span v-else style=" font-family: 100; margin-left: 5px;color: #10C383;">{{ item2.value }}</span>
42
+                     </div>
43
+                        </div>
44
+                        
45
+                    </div>
29
                 </div>
46
                 </div>
30
             </div>
47
             </div>
31
         </div>
48
         </div>
@@ -61,6 +78,7 @@ export default ({
61
     components: { Login, Left, Right, ElScrollbar, ElPagination, ElDialog, videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
78
     components: { Login, Left, Right, ElScrollbar, ElPagination, ElDialog, videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
62
     setup() {
79
     setup() {
63
         const titleDialog = ref("")
80
         const titleDialog = ref("")
81
+        const orientation = ref("")
64
         // 视频数据
82
         // 视频数据
65
         const videoData = reactive({
83
         const videoData = reactive({
66
             width: "100%", //播放器高度
84
             width: "100%", //播放器高度
@@ -190,6 +208,11 @@ export default ({
190
                 return
208
                 return
191
             }
209
             }
192
             clickData.value = json;
210
             clickData.value = json;
211
+
212
+
213
+            orientation.value=clickData.value.direction
214
+
215
+            console.log('看看这个',clickData.value.direction);
193
             if (json.deviceCode) {
216
             if (json.deviceCode) {
194
                 console.log('sadasd',json.deviceCode);
217
                 console.log('sadasd',json.deviceCode);
195
                 let replacedStr = json.deviceCode.replace("/", "A");
218
                 let replacedStr = json.deviceCode.replace("/", "A");
@@ -225,7 +248,7 @@ export default ({
225
                             popoverRef.value.style.left = (json.x - 120) + 'px'
248
                             popoverRef.value.style.left = (json.x - 120) + 'px'
226
                             break;
249
                             break;
227
                         case "Right":
250
                         case "Right":
228
-                            popoverRef.value.style.top = (Number(json.y)) -100+ 'px'
251
+                            popoverRef.value.style.top = (Number(json.y)) -150+ 'px'
229
                             popoverRef.value.style.left = Number(json.x) + 100 + 'px'
252
                             popoverRef.value.style.left = Number(json.x) + 100 + 'px'
230
 
253
 
231
                             break;
254
                             break;
@@ -295,7 +318,8 @@ export default ({
295
             classDeviceInfo,
318
             classDeviceInfo,
296
             mouseClick,
319
             mouseClick,
297
             headImg,
320
             headImg,
298
-            titleDialog
321
+            titleDialog,
322
+            orientation
299
         }
323
         }
300
     },
324
     },
301
 })
325
 })

+ 21 - 16
src/components/right.vue

@@ -64,17 +64,16 @@
64
                     <el-carousel-item v-for="(item, index) in carouselData" :key="index">
64
                     <el-carousel-item v-for="(item, index) in carouselData" :key="index">
65
                         <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}</p>
65
                         <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}</p>
66
                         <div class="interactclass">
66
                         <div class="interactclass">
67
-
68
                             <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">
69
                                 <span style="z-index: 99;">{{ item.title }}</span>
68
                                 <span style="z-index: 99;">{{ item.title }}</span>
70
                                 <!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
69
                                 <!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
71
-                                <div  style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
70
+                                <div v-if="item.src"  style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
72
                                     <div  class="vue3VideoPlay ">
71
                                     <div  class="vue3VideoPlay ">
73
                                         <vue3VideoPlay 
72
                                         <vue3VideoPlay 
74
                                     
73
                                     
75
                                     width="100%"
74
                                     width="100%"
76
                                     height="9vh"
75
                                     height="9vh"
77
-                                    style="  object-fit: fill"
76
+                                    style=" object-fit: fill"
78
                                     :src="item.src"
77
                                     :src="item.src"
79
                                     :type="videoData.type"
78
                                     :type="videoData.type"
80
                                     :autoPlay="true"
79
                                     :autoPlay="true"
@@ -152,7 +151,7 @@ export default ({
152
             muted: false, //静音
151
             muted: false, //静音
153
             webFullScreen: false,
152
             webFullScreen: false,
154
             // speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
153
             // speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
155
-            autoPlay: false, //自动播放
154
+            autoPlay: true, //自动播放
156
             loop: false, //循环播放
155
             loop: false, //循环播放
157
             mirror: false, //镜像画面
156
             mirror: false, //镜像画面
158
             ligthOff: false, //关灯模式
157
             ligthOff: false, //关灯模式
@@ -179,7 +178,16 @@ export default ({
179
         const lookVideo = function (item) {
178
         const lookVideo = function (item) {
180
             videoDialog.value = true;
179
             videoDialog.value = true;
181
             dialogTitle.value = item.title
180
             dialogTitle.value = item.title
182
-            videoData.src = item.scr
181
+            let copysrc=JSON.parse(JSON.stringify(item))
182
+            console.log('sadi2',copysrc);
183
+            // videoData.src = item.scr
184
+            videoData.src = copysrc.src
185
+            console.log('kankna222', videoData.src);
186
+
187
+            
188
+         
189
+            console.log('kankna1',item[src]);
190
+            console.log('看看src===========',videoData.src);
183
             console.log("点击了播放视频", 12312312, "播放路径", item)
191
             console.log("点击了播放视频", 12312312, "播放路径", item)
184
             // getVideoUrl({ "rtsp": item.src }).then((res) => {
192
             // getVideoUrl({ "rtsp": item.src }).then((res) => {
185
             //     console.log("视频处理", res);
193
             //     console.log("视频处理", res);
@@ -222,12 +230,11 @@ export default ({
222
             console.log('sadui12u31',category);
230
             console.log('sadui12u31',category);
223
             //截取数组前6项
231
             //截取数组前6项
224
             interDevice.value = category.slice(0,6);
232
             interDevice.value = category.slice(0,6);
225
-            // 互动教室
226
-            carouselData.value = monitor
227
-
228
-            console.log('处理监控视频数据===',monitor);
229
-
230
-            monitor.map((res)=>{
233
+      
234
+             // 互动教室
235
+             carouselData.value = monitor.slice(0,1);
236
+      
237
+             carouselData.value.map((res)=>{
231
                 console.log('sadhi2',res.activeMonitor);
238
                 console.log('sadhi2',res.activeMonitor);
232
 
239
 
233
                 res.activeMonitor.array.map(array =>{
240
                 res.activeMonitor.array.map(array =>{
@@ -257,11 +264,9 @@ export default ({
257
 
264
 
258
             })
265
             })
259
 
266
 
260
-            setTimeout(() => {
261
-                console.log('sado2');
262
-                // videoshow=true
263
-                // console.log('sadhui21',videoshow);
264
-            }, 3000);
267
+                 
268
+
269
+
265
 
270
 
266
                 setTimeout(() => {
271
                 setTimeout(() => {
267
                     console.log('处理后监控视频数据===',monitor);
272
                     console.log('处理后监控视频数据===',monitor);