Browse Source

修改统计图表消失问题

木星 1 month ago
parent
commit
0a06cfcd79
4 changed files with 212 additions and 229 deletions
  1. 163 121
      public/player.css
  2. 4 4
      public/ueapp.js
  3. 37 96
      src/components/home.vue
  4. 8 8
      vite.config.js

+ 163 - 121
public/player.css

@@ -2,31 +2,31 @@
2
 
2
 
3
 :root {
3
 :root {
4
 	/*Using colour scheme https://color.adobe.com/TD-Colors---Option-3-color-theme-10394433/*/
4
 	/*Using colour scheme https://color.adobe.com/TD-Colors---Option-3-color-theme-10394433/*/
5
-	--colour1:#2B3A42;
6
-	--colour2:#3F5765;
7
-	--colour3:#BDD4DE;
8
-	--colour4:#EFEFEF;
9
-	--colour5:#FF5035;
10
-	
11
-	--buttonFont:Helvetica;
12
-	--inputFont:Helvetica;
5
+	--colour1: #2B3A42;
6
+	--colour2: #3F5765;
7
+	--colour3: #BDD4DE;
8
+	--colour4: #EFEFEF;
9
+	--colour5: #FF5035;
10
+
11
+	--buttonFont: Helvetica;
12
+	--inputFont: Helvetica;
13
 }
13
 }
14
 
14
 
15
-body{
16
-    margin: 0px;
17
-    background-color: black;
18
-}	
15
+body {
16
+	margin: 0px;
17
+	background-color: black;
18
+}
19
 
19
 
20
 #playerUI {
20
 #playerUI {
21
 	width: 100%;
21
 	width: 100%;
22
 	position: absolute;
22
 	position: absolute;
23
-	/*top: 0;
24
-	left: 0;*/
23
+	top: 0;
24
+	left: 0;
25
 	z-index: 10;
25
 	z-index: 10;
26
 }
26
 }
27
 
27
 
28
 .statsContainer {
28
 .statsContainer {
29
-	background-color: rgba(0,0,0,0.8);
29
+	background-color: rgba(0, 0, 0, 0.8);
30
 	text-align: left;
30
 	text-align: left;
31
 	display: block;
31
 	display: block;
32
 	margin-top: 5px;
32
 	margin-top: 5px;
@@ -39,39 +39,47 @@ body{
39
 	color: lime;
39
 	color: lime;
40
 }
40
 }
41
 
41
 
42
-canvas{
43
-    image-rendering: crisp-edges;
44
-    position: absolute;
42
+canvas {
43
+	image-rendering: crisp-edges;
44
+	position: absolute;
45
 }
45
 }
46
 
46
 
47
-video{
47
+video {
48
 	position: absolute;
48
 	position: absolute;
49
 	width: 100%;
49
 	width: 100%;
50
 	height: 100%;
50
 	height: 100%;
51
 }
51
 }
52
 
52
 
53
-#player{
53
+#player {}
54
 
54
 
55
-}
56
-
57
-#overlay{
55
+#overlay {
58
 	-moz-border-radius-bottomright: 5px;
56
 	-moz-border-radius-bottomright: 5px;
59
 	-moz-border-radius-bottomleft: 5px;
57
 	-moz-border-radius-bottomleft: 5px;
60
 	-webkit-border-bottom-right-radius: 5px;
58
 	-webkit-border-bottom-right-radius: 5px;
61
 	-webkit-border-bottom-left-radius: 5px;
59
 	-webkit-border-bottom-left-radius: 5px;
62
-	border-bottom-right-radius: 5px; /* future proofing */
63
-	border-bottom-left-radius: 5px; /* future proofing */
64
-	-khtml-border-bottom-right-radius: 5px; /* for old Konqueror browsers */
65
-	-khtml-border-bottom-left-radius: 5px; /* for old Konqueror browsers */
66
-	
67
-	-webkit-touch-callout: none; /* iOS Safari */
68
-    -webkit-user-select: none; /* Safari */
69
-     -khtml-user-select: none; /* Konqueror HTML */
70
-       -moz-user-select: none; /* Firefox */
71
-        -ms-user-select: none; /* Internet Explorer/Edge */
72
-            user-select: none; /* Non-prefixed version, currently
60
+	border-bottom-right-radius: 5px;
61
+	/* future proofing */
62
+	border-bottom-left-radius: 5px;
63
+	/* future proofing */
64
+	-khtml-border-bottom-right-radius: 5px;
65
+	/* for old Konqueror browsers */
66
+	-khtml-border-bottom-left-radius: 5px;
67
+	/* for old Konqueror browsers */
68
+
69
+	-webkit-touch-callout: none;
70
+	/* iOS Safari */
71
+	-webkit-user-select: none;
72
+	/* Safari */
73
+	-khtml-user-select: none;
74
+	/* Konqueror HTML */
75
+	-moz-user-select: none;
76
+	/* Firefox */
77
+	-ms-user-select: none;
78
+	/* Internet Explorer/Edge */
79
+	user-select: none;
80
+	/* Non-prefixed version, currently
73
                                   supported by Chrome and Opera */
81
                                   supported by Chrome and Opera */
74
-	
82
+
75
 	position: absolute;
83
 	position: absolute;
76
 	padding: 4px;
84
 	padding: 4px;
77
 	top: 0;
85
 	top: 0;
@@ -82,43 +90,47 @@ video{
82
 }
90
 }
83
 
91
 
84
 .overlay {
92
 .overlay {
85
-    background-color: var(--colour2);
93
+	background-color: var(--colour2);
86
 	font-family: var(--buttonFont);
94
 	font-family: var(--buttonFont);
87
 	font-weight: lighter;
95
 	font-weight: lighter;
88
 	color: var(--colour4);
96
 	color: var(--colour4);
89
 }
97
 }
90
 
98
 
91
-.overlay-shown > #overlaySettings {
99
+.overlay-shown>#overlaySettings {
92
 	padding: 50px 4px 4px 4px;
100
 	padding: 50px 4px 4px 4px;
93
 	display: block;
101
 	display: block;
94
 }
102
 }
95
 
103
 
96
-.overlay-shown > div > #overlayButton {
104
+.overlay-shown>div>#overlayButton {
97
 	transform: rotate(-135deg);
105
 	transform: rotate(-135deg);
98
-	-webkit-transform: rotate(-135deg); /* Safari */
99
-	-moz-transform: rotate(-135deg); /* Firefox */
100
-	-ms-transform: rotate(-135deg); /* IE */
101
-	-o-transform: rotate(-135deg); /* Opera */
106
+	-webkit-transform: rotate(-135deg);
107
+	/* Safari */
108
+	-moz-transform: rotate(-135deg);
109
+	/* Firefox */
110
+	-ms-transform: rotate(-135deg);
111
+	/* IE */
112
+	-o-transform: rotate(-135deg);
113
+	/* Opera */
102
 }
114
 }
103
 
115
 
104
-#overlayButton:hover{
116
+#overlayButton:hover {
105
 	cursor: pointer;
117
 	cursor: pointer;
106
 }
118
 }
107
 
119
 
108
-#overlayButton{
120
+#overlayButton {
109
 	transition-duration: 250ms;
121
 	transition-duration: 250ms;
110
 	float: right;
122
 	float: right;
111
 	text-align: right;
123
 	text-align: right;
112
 	font-size: 40px;
124
 	font-size: 40px;
113
 }
125
 }
114
 
126
 
115
-#qualityStatus{
127
+#qualityStatus {
116
 	float: left;
128
 	float: left;
117
 	font-size: 37px;
129
 	font-size: 37px;
118
 	padding-right: 4px;
130
 	padding-right: 4px;
119
 }
131
 }
120
 
132
 
121
-#overlaySettings{
133
+#overlaySettings {
122
 	width: 400px;
134
 	width: 400px;
123
 	display: none;
135
 	display: none;
124
 }
136
 }
@@ -139,17 +151,19 @@ video{
139
 	color: red;
151
 	color: red;
140
 }
152
 }
141
 
153
 
142
-#videoMessageOverlay{
154
+#videoMessageOverlay {
143
 	z-index: 20;
155
 	z-index: 20;
144
-	color: var(--colour4);;
156
+	color: var(--colour4);
157
+	;
145
 	font-size: 1.8em;
158
 	font-size: 1.8em;
146
 	position: absolute;
159
 	position: absolute;
147
 	margin: auto;
160
 	margin: auto;
148
-	font-family: var(--inputFont);;
161
+	font-family: var(--inputFont);
162
+	;
149
 	width: 100%;
163
 	width: 100%;
150
 }
164
 }
151
 
165
 
152
-#videoPlayOverlay{
166
+#videoPlayOverlay {
153
 	z-index: 30;
167
 	z-index: 30;
154
 	position: absolute;
168
 	position: absolute;
155
 	color: var(--colour4);
169
 	color: var(--colour4);
@@ -161,7 +175,7 @@ video{
161
 }
175
 }
162
 
176
 
163
 /* State for element to be clickable */
177
 /* State for element to be clickable */
164
-.clickableState{
178
+.clickableState {
165
 	align-items: center;
179
 	align-items: center;
166
 	justify-content: center;
180
 	justify-content: center;
167
 	display: flex;
181
 	display: flex;
@@ -169,51 +183,52 @@ video{
169
 }
183
 }
170
 
184
 
171
 /* State for element to show text, this is for informational use*/
185
 /* State for element to show text, this is for informational use*/
172
-.textDisplayState{
186
+.textDisplayState {
173
 	display: flex;
187
 	display: flex;
174
 }
188
 }
175
 
189
 
176
 /* State to hide overlay, WebRTC communication is in progress and or is playing */
190
 /* State to hide overlay, WebRTC communication is in progress and or is playing */
177
-.hiddenState{
191
+.hiddenState {
178
 	display: none;
192
 	display: none;
179
 }
193
 }
180
 
194
 
181
-#playButton{
195
+#playButton {
182
 	display: inline-block;
196
 	display: inline-block;
183
 	height: auto;
197
 	height: auto;
184
 }
198
 }
185
 
199
 
186
-img#playButton{
200
+img#playButton {
187
 	max-width: 241px;
201
 	max-width: 241px;
188
 	width: 10%;
202
 	width: 10%;
189
 }
203
 }
190
 
204
 
191
-#UIInteraction{
205
+#UIInteraction {
192
 	position: fixed;
206
 	position: fixed;
193
 }
207
 }
194
 
208
 
195
-#UIInteractionButtonBoundary{
209
+#UIInteractionButtonBoundary {
196
 	padding: 2px;
210
 	padding: 2px;
197
 }
211
 }
198
 
212
 
199
-#UIInteractionButton{
213
+#UIInteractionButton {
200
 	cursor: pointer;
214
 	cursor: pointer;
201
 }
215
 }
202
 
216
 
203
-#hiddenInput{
217
+#hiddenInput {
204
 	position: absolute;
218
 	position: absolute;
205
-	left: -10%;   /* Although invisible, push off-screen to prevent user interaction. */
219
+	left: -10%;
220
+	/* Although invisible, push off-screen to prevent user interaction. */
206
 	width: 0px;
221
 	width: 0px;
207
 	opacity: 0;
222
 	opacity: 0;
208
 }
223
 }
209
 
224
 
210
-#editTextButton{
225
+#editTextButton {
211
 	position: absolute;
226
 	position: absolute;
212
 	height: 40px;
227
 	height: 40px;
213
 	width: 40px;
228
 	width: 40px;
214
 }
229
 }
215
 
230
 
216
-.settings-text{
231
+.settings-text {
217
 	color: var(--colour4);
232
 	color: var(--colour4);
218
 	vertical-align: middle;
233
 	vertical-align: middle;
219
 	font-size: 18px;
234
 	font-size: 18px;
@@ -221,18 +236,18 @@ img#playButton{
221
 	display: inline-block;
236
 	display: inline-block;
222
 }
237
 }
223
 
238
 
224
-.overlay-button{
239
+.overlay-button {
225
 	line-height: 1.1;
240
 	line-height: 1.1;
226
 	padding: 1px 6px;
241
 	padding: 1px 6px;
227
 }
242
 }
228
 
243
 
229
-.btn-overlay{
244
+.btn-overlay {
230
 	float: right;
245
 	float: right;
231
 	vertical-align: middle;
246
 	vertical-align: middle;
232
 	display: inline-block;
247
 	display: inline-block;
233
 }
248
 }
234
 
249
 
235
-.btn-flat{
250
+.btn-flat {
236
 	background: var(--colour4);
251
 	background: var(--colour4);
237
 	border: 2px solid var(--colour5);
252
 	border: 2px solid var(--colour5);
238
 	font-weight: bold;
253
 	font-weight: bold;
@@ -244,106 +259,133 @@ img#playButton{
244
 	height: 20px;
259
 	height: 20px;
245
 }
260
 }
246
 
261
 
247
-.btn-flat:disabled{
262
+.btn-flat:disabled {
248
 	background: var(--colour4);
263
 	background: var(--colour4);
249
 	border-color: var(--colour3);
264
 	border-color: var(--colour3);
250
 	color: var(--colour3);
265
 	color: var(--colour3);
251
 	cursor: default;
266
 	cursor: default;
252
 }
267
 }
253
 
268
 
254
-.btn-flat:active{
269
+.btn-flat:active {
255
 	border-color: var(--colour2);
270
 	border-color: var(--colour2);
256
 	color: var(--colour2);
271
 	color: var(--colour2);
257
 }
272
 }
258
 
273
 
259
-.btn-flat:focus{
274
+.btn-flat:focus {
260
 	outline: none;
275
 	outline: none;
261
 }
276
 }
277
+
262
 /*** Toggle Switch styles ***/
278
 /*** Toggle Switch styles ***/
263
 .tgl-switch {
279
 .tgl-switch {
264
-  float: right;
265
-  vertical-align: middle;
266
-  display: inline-block;
280
+	float: right;
281
+	vertical-align: middle;
282
+	display: inline-block;
267
 }
283
 }
268
 
284
 
269
 .tgl-switch .tgl {
285
 .tgl-switch .tgl {
270
-	display:none;
286
+	display: none;
271
 }
287
 }
272
 
288
 
273
-.tgl, .tgl:after, .tgl:before, .tgl *, .tgl *:after, .tgl *:before, .tgl + .tgl-slider {
274
-  -webkit-box-sizing: border-box;
275
-          box-sizing: border-box;
289
+.tgl,
290
+.tgl:after,
291
+.tgl:before,
292
+.tgl *,
293
+.tgl *:after,
294
+.tgl *:before,
295
+.tgl+.tgl-slider {
296
+	-webkit-box-sizing: border-box;
297
+	box-sizing: border-box;
276
 }
298
 }
277
-.tgl::-moz-selection, .tgl:after::-moz-selection, .tgl:before::-moz-selection, .tgl *::-moz-selection, .tgl *:after::-moz-selection, .tgl *:before::-moz-selection, .tgl + .tgl-slider::-moz-selection {
278
-  background: none;
299
+
300
+.tgl::-moz-selection,
301
+.tgl:after::-moz-selection,
302
+.tgl:before::-moz-selection,
303
+.tgl *::-moz-selection,
304
+.tgl *:after::-moz-selection,
305
+.tgl *:before::-moz-selection,
306
+.tgl+.tgl-slider::-moz-selection {
307
+	background: none;
279
 }
308
 }
280
-.tgl::selection, .tgl:after::selection, .tgl:before::selection, .tgl *::selection, .tgl *:after::selection, .tgl *:before::selection, .tgl + .tgl-slider::selection {
281
-  background: none;
309
+
310
+.tgl::selection,
311
+.tgl:after::selection,
312
+.tgl:before::selection,
313
+.tgl *::selection,
314
+.tgl *:after::selection,
315
+.tgl *:before::selection,
316
+.tgl+.tgl-slider::selection {
317
+	background: none;
282
 }
318
 }
283
 
319
 
284
 .tgl-slider {
320
 .tgl-slider {
285
-	float:right;
321
+	float: right;
286
 }
322
 }
287
 
323
 
288
-.tgl + .tgl-slider {
289
-  outline: 0;
290
-  display: block;
291
-  width: 40px;
292
-  height: 18px;
293
-  position: relative;
294
-  cursor: pointer;
295
-  -webkit-user-select: none;
296
-     -moz-user-select: none;
297
-      -ms-user-select: none;
298
-          user-select: none;
324
+.tgl+.tgl-slider {
325
+	outline: 0;
326
+	display: block;
327
+	width: 40px;
328
+	height: 18px;
329
+	position: relative;
330
+	cursor: pointer;
331
+	-webkit-user-select: none;
332
+	-moz-user-select: none;
333
+	-ms-user-select: none;
334
+	user-select: none;
299
 }
335
 }
300
 
336
 
301
-.tgl + .tgl-slider:after, .tgl + .tgl-slider:before {
302
-  position: relative;
303
-  display: block;
304
-  content: "";
305
-  width: 50%;
306
-  height: 100%;
337
+.tgl+.tgl-slider:after,
338
+.tgl+.tgl-slider:before {
339
+	position: relative;
340
+	display: block;
341
+	content: "";
342
+	width: 50%;
343
+	height: 100%;
307
 }
344
 }
308
-.tgl + .tgl-slider:after {
309
-  left: 0;
345
+
346
+.tgl+.tgl-slider:after {
347
+	left: 0;
310
 }
348
 }
311
-.tgl + .tgl-slider:before {
312
-  display: none;
349
+
350
+.tgl+.tgl-slider:before {
351
+	display: none;
313
 }
352
 }
314
 
353
 
315
-.tgl-flat + .tgl-slider {
316
-  padding: 2px;
317
-  -webkit-transition: all .2s ease;
318
-  transition: all .2s ease;
319
-  background: #fff;
320
-  border: 3px solid var(--colour4);
321
-  border-radius: 2em;
354
+.tgl-flat+.tgl-slider {
355
+	padding: 2px;
356
+	-webkit-transition: all .2s ease;
357
+	transition: all .2s ease;
358
+	background: #fff;
359
+	border: 3px solid var(--colour4);
360
+	border-radius: 2em;
322
 }
361
 }
323
 
362
 
324
-.tgl-flat + .tgl-slider:after {
325
-  -webkit-transition: all .2s ease;
326
-  transition: all .2s ease;
327
-  background: var(--colour4);
328
-  content: "";
329
-  border-radius: 1em;
363
+.tgl-flat+.tgl-slider:after {
364
+	-webkit-transition: all .2s ease;
365
+	transition: all .2s ease;
366
+	background: var(--colour4);
367
+	content: "";
368
+	border-radius: 1em;
330
 }
369
 }
331
 
370
 
332
-.tgl-flat:checked + .tgl-slider {
333
-  border: 3px solid var(--colour5);
371
+.tgl-flat:checked+.tgl-slider {
372
+	border: 3px solid var(--colour5);
334
 }
373
 }
335
 
374
 
336
-.tgl-flat:checked + .tgl-slider:after {
337
-  left: 50%;
338
-  background: var(--colour5);
375
+.tgl-flat:checked+.tgl-slider:after {
376
+	left: 50%;
377
+	background: var(--colour5);
339
 }
378
 }
379
+
340
 /*** Toggle Switch styles ***/
380
 /*** Toggle Switch styles ***/
341
 
381
 
342
-#encoderSettings, #webRTCSettings {
382
+#encoderSettings,
383
+#webRTCSettings {
343
 	margin: 10px 0px;
384
 	margin: 10px 0px;
344
 }
385
 }
345
 
386
 
346
-#encoderParamsContainer, #webrtcParamsContainer {
387
+#encoderParamsContainer,
388
+#webrtcParamsContainer {
347
 	padding-left: 5%;
389
 	padding-left: 5%;
348
 }
390
 }
349
 
391
 

+ 4 - 4
public/ueapp.js

@@ -901,7 +901,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
901
         styleHeight = window.innerHeight;
901
         styleHeight = window.innerHeight;
902
         styleTop = 0;
902
         styleTop = 0;
903
         styleLeft = 0;
903
         styleLeft = 0;
904
-        playerElement.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
904
+        playerElement.style = "top: " + 0 + "px; left: " + 0 + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
905
     } else if (windowAspectRatio < playerAspectRatio) {
905
     } else if (windowAspectRatio < playerAspectRatio) {
906
         // Window height is the constraining factor so to keep aspect ratio change width appropriately
906
         // Window height is the constraining factor so to keep aspect ratio change width appropriately
907
         styleWidth = Math.floor(window.innerHeight / videoAspectRatio);
907
         styleWidth = Math.floor(window.innerHeight / videoAspectRatio);
@@ -909,7 +909,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
909
         styleTop = 0;
909
         styleTop = 0;
910
         styleLeft = Math.floor((window.innerWidth - styleWidth) * 0.5);
910
         styleLeft = Math.floor((window.innerWidth - styleWidth) * 0.5);
911
         //Video is now 100% of the playerElement, so set the playerElement style
911
         //Video is now 100% of the playerElement, so set the playerElement style
912
-        playerElement.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
912
+        playerElement.style = "top: " + 0 + "px; left: " + 0 + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
913
     } else {
913
     } else {
914
         // Window width is the constraining factor so to keep aspect ratio change height appropriately
914
         // Window width is the constraining factor so to keep aspect ratio change height appropriately
915
         styleWidth = window.innerWidth;
915
         styleWidth = window.innerWidth;
@@ -917,7 +917,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
917
         styleTop = Math.floor((window.innerHeight - styleHeight) * 0.5);
917
         styleTop = Math.floor((window.innerHeight - styleHeight) * 0.5);
918
         styleLeft = 0;
918
         styleLeft = 0;
919
         //Video is now 100% of the playerElement, so set the playerElement style
919
         //Video is now 100% of the playerElement, so set the playerElement style
920
-        playerElement.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
920
+        playerElement.style = "top: " + 0 + "px; left: " + 0 + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
921
     }
921
     }
922
 }
922
 }
923
 
923
 
@@ -933,7 +933,7 @@ function resizePlayerStyleToActualSize(playerElement) {
933
         styleTop = (Top > 0) ? Top : 0;
933
         styleTop = (Top > 0) ? Top : 0;
934
         styleLeft = (Left > 0) ? Left : 0;
934
         styleLeft = (Left > 0) ? Left : 0;
935
         //Video is now 100% of the playerElement, so set the playerElement style
935
         //Video is now 100% of the playerElement, so set the playerElement style
936
-        playerElement.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: 100% ; height: 100%; cursor: " + styleCursor + "; " + styleAdditional;
936
+        playerElement.style = "top: " + 0 + "px; left: " + 0 + "px; width: 100% ; height: 100%; cursor: " + styleCursor + "; " + styleAdditional;
937
     }
937
     }
938
 }
938
 }
939
 
939
 

+ 37 - 96
src/components/home.vue

@@ -2,43 +2,33 @@
2
   <!-- <div class="container" > -->
2
   <!-- <div class="container" > -->
3
   <Header />
3
   <Header />
4
   <img class="bg-shadow" :src="bgShadow" alt="" srcset="">
4
   <img class="bg-shadow" :src="bgShadow" alt="" srcset="">
5
-  <Left v-if="isShowLeft" ref="childRef" @childMethod="childMethod"></Left>
5
+  <div v-show="isShowLeft">
6
+    <Left ref="childRef" @childMethod="childMethod"></Left>
7
+  </div>
8
+
6
   <right v-if="isShowRight"></right>
9
   <right v-if="isShowRight"></right>
7
-  <div
8
-    ref="linedomRef"
9
-    style="
10
+  <div ref="linedomRef" style="
10
       width: 1px;
11
       width: 1px;
11
       height: 1px;
12
       height: 1px;
12
       position: absolute;
13
       position: absolute;
13
       z-index: 228;
14
       z-index: 228;
14
       background: #ccc;
15
       background: #ccc;
15
-    "
16
-  ></div>
16
+    "></div>
17
 
17
 
18
   <!-- </el-container> -->
18
   <!-- </el-container> -->
19
   <div ref="popoverRef" id="popoverRef" class="modelInfo">
19
   <div ref="popoverRef" id="popoverRef" class="modelInfo">
20
-    <div
21
-      v-if="orientation == 'Left' || orientation == 'Right'"
22
-      class="model-detail"
23
-    >
20
+    <div v-if="orientation == 'Left' || orientation == 'Right'" class="model-detail">
24
       <div v-for="item in classDeviceInfo" class="listbox">
21
       <div v-for="item in classDeviceInfo" class="listbox">
25
         <div class="list">
22
         <div class="list">
26
           {{ item[0].value }}
23
           {{ item[0].value }}
27
         </div>
24
         </div>
28
         <div v-for="item2 in item" class="listtitle">
25
         <div v-for="item2 in item" class="listtitle">
29
-          <div
30
-            v-if="item2.name !== '设备名称'"
31
-            style="height: 30px; display: flex; align-items: center"
32
-          >
26
+          <div v-if="item2.name !== '设备名称'" style="height: 30px; display: flex; align-items: center">
33
             <span class="name"> {{ item2.name }} :</span>
27
             <span class="name"> {{ item2.name }} :</span>
34
             <span v-if="item2.value != '在线'" class="value">{{
28
             <span v-if="item2.value != '在线'" class="value">{{
35
               item2.value
29
               item2.value
36
             }}</span>
30
             }}</span>
37
-            <span
38
-              v-else
39
-              style="font-family: 100; margin-left: 5px; color: #10c383"
40
-              >{{ item2.value }}</span
41
-            >
31
+            <span v-else style="font-family: 100; margin-left: 5px; color: #10c383">{{ item2.value }}</span>
42
           </div>
32
           </div>
43
         </div>
33
         </div>
44
       </div>
34
       </div>
@@ -54,17 +44,8 @@
54
             <div v-for="item2 in item" class="listtitle">
44
             <div v-for="item2 in item" class="listtitle">
55
               <div v-if="item2.name !== '设备名称'">
45
               <div v-if="item2.name !== '设备名称'">
56
                 <span class="name"> {{ item2.name }} :</span>
46
                 <span class="name"> {{ item2.name }} :</span>
57
-                <span
58
-                  v-if="item2.value != '在线'"
59
-                  class="value"
60
-                  style="font-weight: 400"
61
-                  >{{ item2.value }}</span
62
-                >
63
-                <span
64
-                  v-else
65
-                  style="font-family: 100; margin-left: 5px; color: #10c383"
66
-                  >{{ item2.value }}</span
67
-                >
47
+                <span v-if="item2.value != '在线'" class="value" style="font-weight: 400">{{ item2.value }}</span>
48
+                <span v-else style="font-family: 100; margin-left: 5px; color: #10c383">{{ item2.value }}</span>
68
               </div>
49
               </div>
69
             </div>
50
             </div>
70
           </div>
51
           </div>
@@ -74,84 +55,41 @@
74
   </div>
55
   </div>
75
 
56
 
76
   <!-- 视频播放弹框 -->
57
   <!-- 视频播放弹框 -->
77
-  <el-dialog
78
-    class="videoDialog"
79
-    v-model="videoDialog"
80
-    :title="titleDialog"
81
-    width="62%"
82
-    align="center"
83
-    top="7%"
84
-    style="padding: 0"
85
-  >
58
+  <el-dialog class="videoDialog" v-model="videoDialog" :title="titleDialog" width="62%" align="center" top="7%"
59
+    style="padding: 0">
86
     <videoPlay v-bind="videoData" @play="onPlay" />
60
     <videoPlay v-bind="videoData" @play="onPlay" />
87
   </el-dialog>
61
   </el-dialog>
88
 
62
 
89
-  <el-dialog
90
-    class="deviceDialog"
91
-    v-model="deviceDialog"
92
-    title="设备明细"
93
-    width="40%"
94
-    align="left"
95
-    top="30vh"
96
-    style="z-index: 2015; background: rgba(0, 0, 0, 0); padding: 0px"
97
-  >
98
-    <el-table
99
-      :data="deviceDetailsList"
100
-      border
101
-      :resizable="false"
102
-      height="350px"
103
-      style="width: 100%; background: rgba(0, 0, 0, 0)"
104
-    >
105
-      <el-table-column
106
-        align="center"
107
-        type="index"
108
-        label="序号"
109
-        width="100px"
110
-      ></el-table-column>
111
-      <el-table-column
112
-        align="center"
113
-        prop="device_name"
114
-        label="设备名称"
115
-      ></el-table-column>
63
+  <el-dialog class="deviceDialog" v-model="deviceDialog" title="设备明细" width="40%" align="left" top="30vh"
64
+    style="z-index: 2015; background: rgba(0, 0, 0, 0); padding: 0px">
65
+    <el-table :data="deviceDetailsList" border :resizable="false" height="350px"
66
+      style="width: 100%; background: rgba(0, 0, 0, 0)">
67
+      <el-table-column align="center" type="index" label="序号" width="100px"></el-table-column>
68
+      <el-table-column align="center" prop="device_name" label="设备名称"></el-table-column>
116
       <el-table-column align="center" prop="heart_status" label="设备状态">
69
       <el-table-column align="center" prop="heart_status" label="设备状态">
117
         <template #default="scope">
70
         <template #default="scope">
118
-          <div
119
-            :class="{
120
-              normal: scope.row.heart_status == 0,
121
-              error: scope.row.heart_status == 1,
122
-            }"
123
-          >
71
+          <div :class="{
72
+            normal: scope.row.heart_status == 0,
73
+            error: scope.row.heart_status == 1,
74
+          }">
124
             <div>{{ scope.row.heart_status == 0 ? "在线" : "异常" }}</div>
75
             <div>{{ scope.row.heart_status == 0 ? "在线" : "异常" }}</div>
125
           </div>
76
           </div>
126
         </template>
77
         </template>
127
       </el-table-column>
78
       </el-table-column>
128
       <el-table-column label="操作" align="center">
79
       <el-table-column label="操作" align="center">
129
         <template #default="scope">
80
         <template #default="scope">
130
-          <el-button type="primary" size="mini" @click="lookDetails(scope.row)"
131
-            >详情</el-button
132
-          >
81
+          <el-button type="primary" size="mini" @click="lookDetails(scope.row)">详情</el-button>
133
         </template>
82
         </template>
134
       </el-table-column>
83
       </el-table-column>
135
     </el-table>
84
     </el-table>
136
-    <el-dialog
137
-      class="deviceDetailsDialog"
138
-      v-model="isShowDeviceDetails"
139
-      title="详情"
140
-      width="15%"
141
-      align="left"
142
-      top="40vh"
143
-      style="z-index: 2019; background: rgba(0, 0, 0, 0); padding: 0px"
144
-      :modal="false"
145
-    >
85
+    <el-dialog class="deviceDetailsDialog" v-model="isShowDeviceDetails" title="详情" width="15%" align="left" top="40vh"
86
+      style="z-index: 2019; background: rgba(0, 0, 0, 0); padding: 0px" :modal="false">
146
       <div class="details-container">
87
       <div class="details-container">
147
         <div>设备名称:{{ deviceDetails.device_name }}</div>
88
         <div>设备名称:{{ deviceDetails.device_name }}</div>
148
         <div>
89
         <div>
149
-          设备状态:<span
150
-            :style="{
151
-              color: deviceDetails.heart_status == 0 ? '#30fcaa' : '#ff352e',
152
-            }"
153
-            >{{ deviceDetails.heart_status == 0 ? "在线" : "异常" }}</span
154
-          >
90
+          设备状态:<span :style="{
91
+            color: deviceDetails.heart_status == 0 ? '#30fcaa' : '#ff352e',
92
+          }">{{ deviceDetails.heart_status == 0 ? "在线" : "异常" }}</span>
155
         </div>
93
         </div>
156
         <div>位置:{{ deviceDetails.teach_name }}</div>
94
         <div>位置:{{ deviceDetails.teach_name }}</div>
157
         <div>型号:{{ deviceDetails.device_type_name }}</div>
95
         <div>型号:{{ deviceDetails.device_type_name }}</div>
@@ -217,6 +155,9 @@ export default {
217
     const orientation = ref("");
155
     const orientation = ref("");
218
     const isShowLeft = ref(true);
156
     const isShowLeft = ref(true);
219
     const isShowRight = ref(true);
157
     const isShowRight = ref(true);
158
+
159
+
160
+
220
     // 视频数据
161
     // 视频数据
221
     const videoData = reactive({
162
     const videoData = reactive({
222
       width: "100%", //播放器高度
163
       width: "100%", //播放器高度
@@ -479,7 +420,7 @@ export default {
479
 
420
 
480
       if (JSON.parse(data).MainServiceName == "JianKong") {
421
       if (JSON.parse(data).MainServiceName == "JianKong") {
481
         getVideoUrl({ rtsp: JSON.parse(data).MonitorURL }).then((res) => {
422
         getVideoUrl({ rtsp: JSON.parse(data).MonitorURL }).then((res) => {
482
-            videoData.src = res.data.httpFlv;
423
+          videoData.src = res.data.httpFlv;
483
           // videoData.src =
424
           // videoData.src =
484
           //   "https://weizhi.huanghuai.edu.cn/jk/hls/9159eba9-b4c6-4a4b-a8ff-a1dd94c88bae.m3u8";
425
           //   "https://weizhi.huanghuai.edu.cn/jk/hls/9159eba9-b4c6-4a4b-a8ff-a1dd94c88bae.m3u8";
485
           videoDialog.value = true;
426
           videoDialog.value = true;
@@ -493,9 +434,9 @@ export default {
493
       }
434
       }
494
       if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
435
       if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
495
         console.log("看看这个-------", Boolean(JSON.parse(data).PutAwayState));
436
         console.log("看看这个-------", Boolean(JSON.parse(data).PutAwayState));
496
-        
497
-        isShowLeft.value = JSON.parse(data).PutAwayState=="true" ? true: false;
498
-        isShowRight.value = JSON.parse(data).PutAwayState=="true" ? true: false;
437
+
438
+        isShowLeft.value = JSON.parse(data).PutAwayState == "true" ? true : false;
439
+        isShowRight.value = JSON.parse(data).PutAwayState == "true" ? true : false;
499
       }
440
       }
500
     };
441
     };
501
     const windowSize = function () {
442
     const windowSize = function () {
@@ -542,7 +483,7 @@ export default {
542
       deviceDialog,
483
       deviceDialog,
543
       deviceDetails,
484
       deviceDetails,
544
       isShowLeft,
485
       isShowLeft,
545
-      isShowRight,
486
+      isShowRight
546
     };
487
     };
547
   },
488
   },
548
 };
489
 };

+ 8 - 8
vite.config.js

@@ -25,15 +25,15 @@ export default defineConfig({
25
   build: {
25
   build: {
26
     minify: 'terser',
26
     minify: 'terser',
27
     terserOptions: {
27
     terserOptions: {
28
-        compress: {
29
-            //生产环境时移除console
30
-            drop_console: true,
31
-            drop_debugger: true,
32
-        }
28
+      compress: {
29
+        //生产环境时移除console
30
+        drop_console: true,
31
+        drop_debugger: true,
32
+      }
33
     }
33
     }
34
   },
34
   },
35
-  server:{
36
-    host:'0.0.0.0',
35
+  server: {
36
+    host: '0.0.0.0',
37
   },
37
   },
38
   plugins: [
38
   plugins: [
39
     vue(),
39
     vue(),
@@ -56,7 +56,7 @@ export default defineConfig({
56
         })]
56
         })]
57
     }
57
     }
58
   },
58
   },
59
-    configureWebpack: (config) => {
59
+  configureWebpack: (config) => {
60
     console.log("config");
60
     console.log("config");
61
     config.module.rules.push(
61
     config.module.rules.push(
62
       {
62
       {