Sfoglia il codice sorgente

修改统计图表消失问题

木星 1 mese fa
parent
commit
0a06cfcd79
4 ha cambiato i file con 212 aggiunte e 229 eliminazioni
  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 3
 :root {
4 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 20
 #playerUI {
21 21
 	width: 100%;
22 22
 	position: absolute;
23
-	/*top: 0;
24
-	left: 0;*/
23
+	top: 0;
24
+	left: 0;
25 25
 	z-index: 10;
26 26
 }
27 27
 
28 28
 .statsContainer {
29
-	background-color: rgba(0,0,0,0.8);
29
+	background-color: rgba(0, 0, 0, 0.8);
30 30
 	text-align: left;
31 31
 	display: block;
32 32
 	margin-top: 5px;
@@ -39,39 +39,47 @@ body{
39 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 48
 	position: absolute;
49 49
 	width: 100%;
50 50
 	height: 100%;
51 51
 }
52 52
 
53
-#player{
53
+#player {}
54 54
 
55
-}
56
-
57
-#overlay{
55
+#overlay {
58 56
 	-moz-border-radius-bottomright: 5px;
59 57
 	-moz-border-radius-bottomleft: 5px;
60 58
 	-webkit-border-bottom-right-radius: 5px;
61 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 81
                                   supported by Chrome and Opera */
74
-	
82
+
75 83
 	position: absolute;
76 84
 	padding: 4px;
77 85
 	top: 0;
@@ -82,43 +90,47 @@ video{
82 90
 }
83 91
 
84 92
 .overlay {
85
-    background-color: var(--colour2);
93
+	background-color: var(--colour2);
86 94
 	font-family: var(--buttonFont);
87 95
 	font-weight: lighter;
88 96
 	color: var(--colour4);
89 97
 }
90 98
 
91
-.overlay-shown > #overlaySettings {
99
+.overlay-shown>#overlaySettings {
92 100
 	padding: 50px 4px 4px 4px;
93 101
 	display: block;
94 102
 }
95 103
 
96
-.overlay-shown > div > #overlayButton {
104
+.overlay-shown>div>#overlayButton {
97 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 117
 	cursor: pointer;
106 118
 }
107 119
 
108
-#overlayButton{
120
+#overlayButton {
109 121
 	transition-duration: 250ms;
110 122
 	float: right;
111 123
 	text-align: right;
112 124
 	font-size: 40px;
113 125
 }
114 126
 
115
-#qualityStatus{
127
+#qualityStatus {
116 128
 	float: left;
117 129
 	font-size: 37px;
118 130
 	padding-right: 4px;
119 131
 }
120 132
 
121
-#overlaySettings{
133
+#overlaySettings {
122 134
 	width: 400px;
123 135
 	display: none;
124 136
 }
@@ -139,17 +151,19 @@ video{
139 151
 	color: red;
140 152
 }
141 153
 
142
-#videoMessageOverlay{
154
+#videoMessageOverlay {
143 155
 	z-index: 20;
144
-	color: var(--colour4);;
156
+	color: var(--colour4);
157
+	;
145 158
 	font-size: 1.8em;
146 159
 	position: absolute;
147 160
 	margin: auto;
148
-	font-family: var(--inputFont);;
161
+	font-family: var(--inputFont);
162
+	;
149 163
 	width: 100%;
150 164
 }
151 165
 
152
-#videoPlayOverlay{
166
+#videoPlayOverlay {
153 167
 	z-index: 30;
154 168
 	position: absolute;
155 169
 	color: var(--colour4);
@@ -161,7 +175,7 @@ video{
161 175
 }
162 176
 
163 177
 /* State for element to be clickable */
164
-.clickableState{
178
+.clickableState {
165 179
 	align-items: center;
166 180
 	justify-content: center;
167 181
 	display: flex;
@@ -169,51 +183,52 @@ video{
169 183
 }
170 184
 
171 185
 /* State for element to show text, this is for informational use*/
172
-.textDisplayState{
186
+.textDisplayState {
173 187
 	display: flex;
174 188
 }
175 189
 
176 190
 /* State to hide overlay, WebRTC communication is in progress and or is playing */
177
-.hiddenState{
191
+.hiddenState {
178 192
 	display: none;
179 193
 }
180 194
 
181
-#playButton{
195
+#playButton {
182 196
 	display: inline-block;
183 197
 	height: auto;
184 198
 }
185 199
 
186
-img#playButton{
200
+img#playButton {
187 201
 	max-width: 241px;
188 202
 	width: 10%;
189 203
 }
190 204
 
191
-#UIInteraction{
205
+#UIInteraction {
192 206
 	position: fixed;
193 207
 }
194 208
 
195
-#UIInteractionButtonBoundary{
209
+#UIInteractionButtonBoundary {
196 210
 	padding: 2px;
197 211
 }
198 212
 
199
-#UIInteractionButton{
213
+#UIInteractionButton {
200 214
 	cursor: pointer;
201 215
 }
202 216
 
203
-#hiddenInput{
217
+#hiddenInput {
204 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 221
 	width: 0px;
207 222
 	opacity: 0;
208 223
 }
209 224
 
210
-#editTextButton{
225
+#editTextButton {
211 226
 	position: absolute;
212 227
 	height: 40px;
213 228
 	width: 40px;
214 229
 }
215 230
 
216
-.settings-text{
231
+.settings-text {
217 232
 	color: var(--colour4);
218 233
 	vertical-align: middle;
219 234
 	font-size: 18px;
@@ -221,18 +236,18 @@ img#playButton{
221 236
 	display: inline-block;
222 237
 }
223 238
 
224
-.overlay-button{
239
+.overlay-button {
225 240
 	line-height: 1.1;
226 241
 	padding: 1px 6px;
227 242
 }
228 243
 
229
-.btn-overlay{
244
+.btn-overlay {
230 245
 	float: right;
231 246
 	vertical-align: middle;
232 247
 	display: inline-block;
233 248
 }
234 249
 
235
-.btn-flat{
250
+.btn-flat {
236 251
 	background: var(--colour4);
237 252
 	border: 2px solid var(--colour5);
238 253
 	font-weight: bold;
@@ -244,106 +259,133 @@ img#playButton{
244 259
 	height: 20px;
245 260
 }
246 261
 
247
-.btn-flat:disabled{
262
+.btn-flat:disabled {
248 263
 	background: var(--colour4);
249 264
 	border-color: var(--colour3);
250 265
 	color: var(--colour3);
251 266
 	cursor: default;
252 267
 }
253 268
 
254
-.btn-flat:active{
269
+.btn-flat:active {
255 270
 	border-color: var(--colour2);
256 271
 	color: var(--colour2);
257 272
 }
258 273
 
259
-.btn-flat:focus{
274
+.btn-flat:focus {
260 275
 	outline: none;
261 276
 }
277
+
262 278
 /*** Toggle Switch styles ***/
263 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 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 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 380
 /*** Toggle Switch styles ***/
341 381
 
342
-#encoderSettings, #webRTCSettings {
382
+#encoderSettings,
383
+#webRTCSettings {
343 384
 	margin: 10px 0px;
344 385
 }
345 386
 
346
-#encoderParamsContainer, #webrtcParamsContainer {
387
+#encoderParamsContainer,
388
+#webrtcParamsContainer {
347 389
 	padding-left: 5%;
348 390
 }
349 391
 

+ 4 - 4
public/ueapp.js

@@ -901,7 +901,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
901 901
         styleHeight = window.innerHeight;
902 902
         styleTop = 0;
903 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 905
     } else if (windowAspectRatio < playerAspectRatio) {
906 906
         // Window height is the constraining factor so to keep aspect ratio change width appropriately
907 907
         styleWidth = Math.floor(window.innerHeight / videoAspectRatio);
@@ -909,7 +909,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
909 909
         styleTop = 0;
910 910
         styleLeft = Math.floor((window.innerWidth - styleWidth) * 0.5);
911 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 913
     } else {
914 914
         // Window width is the constraining factor so to keep aspect ratio change height appropriately
915 915
         styleWidth = window.innerWidth;
@@ -917,7 +917,7 @@ function resizePlayerStyleToFillWindow(playerElement) {
917 917
         styleTop = Math.floor((window.innerHeight - styleHeight) * 0.5);
918 918
         styleLeft = 0;
919 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 933
         styleTop = (Top > 0) ? Top : 0;
934 934
         styleLeft = (Left > 0) ? Left : 0;
935 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 2
   <!-- <div class="container" > -->
3 3
   <Header />
4 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 9
   <right v-if="isShowRight"></right>
7
-  <div
8
-    ref="linedomRef"
9
-    style="
10
+  <div ref="linedomRef" style="
10 11
       width: 1px;
11 12
       height: 1px;
12 13
       position: absolute;
13 14
       z-index: 228;
14 15
       background: #ccc;
15
-    "
16
-  ></div>
16
+    "></div>
17 17
 
18 18
   <!-- </el-container> -->
19 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 21
       <div v-for="item in classDeviceInfo" class="listbox">
25 22
         <div class="list">
26 23
           {{ item[0].value }}
27 24
         </div>
28 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 27
             <span class="name"> {{ item2.name }} :</span>
34 28
             <span v-if="item2.value != '在线'" class="value">{{
35 29
               item2.value
36 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 32
           </div>
43 33
         </div>
44 34
       </div>
@@ -54,17 +44,8 @@
54 44
             <div v-for="item2 in item" class="listtitle">
55 45
               <div v-if="item2.name !== '设备名称'">
56 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 49
               </div>
69 50
             </div>
70 51
           </div>
@@ -74,84 +55,41 @@
74 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 60
     <videoPlay v-bind="videoData" @play="onPlay" />
87 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 69
       <el-table-column align="center" prop="heart_status" label="设备状态">
117 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 75
             <div>{{ scope.row.heart_status == 0 ? "在线" : "异常" }}</div>
125 76
           </div>
126 77
         </template>
127 78
       </el-table-column>
128 79
       <el-table-column label="操作" align="center">
129 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 82
         </template>
134 83
       </el-table-column>
135 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 87
       <div class="details-container">
147 88
         <div>设备名称:{{ deviceDetails.device_name }}</div>
148 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 93
         </div>
156 94
         <div>位置:{{ deviceDetails.teach_name }}</div>
157 95
         <div>型号:{{ deviceDetails.device_type_name }}</div>
@@ -217,6 +155,9 @@ export default {
217 155
     const orientation = ref("");
218 156
     const isShowLeft = ref(true);
219 157
     const isShowRight = ref(true);
158
+
159
+
160
+
220 161
     // 视频数据
221 162
     const videoData = reactive({
222 163
       width: "100%", //播放器高度
@@ -479,7 +420,7 @@ export default {
479 420
 
480 421
       if (JSON.parse(data).MainServiceName == "JianKong") {
481 422
         getVideoUrl({ rtsp: JSON.parse(data).MonitorURL }).then((res) => {
482
-            videoData.src = res.data.httpFlv;
423
+          videoData.src = res.data.httpFlv;
483 424
           // videoData.src =
484 425
           //   "https://weizhi.huanghuai.edu.cn/jk/hls/9159eba9-b4c6-4a4b-a8ff-a1dd94c88bae.m3u8";
485 426
           videoDialog.value = true;
@@ -493,9 +434,9 @@ export default {
493 434
       }
494 435
       if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
495 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 442
     const windowSize = function () {
@@ -542,7 +483,7 @@ export default {
542 483
       deviceDialog,
543 484
       deviceDetails,
544 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 25
   build: {
26 26
     minify: 'terser',
27 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 38
   plugins: [
39 39
     vue(),
@@ -56,7 +56,7 @@ export default defineConfig({
56 56
         })]
57 57
     }
58 58
   },
59
-    configureWebpack: (config) => {
59
+  configureWebpack: (config) => {
60 60
     console.log("config");
61 61
     config.module.rules.push(
62 62
       {