Selaa lähdekoodia

去掉进度条,设置定时刷新数据

木星 1 viikko sitten
vanhempi
commit
d9e2d9db08
4 muutettua tiedostoa jossa 135 lisäystä ja 284 poistoa
  1. 1 1
      public/config.js
  2. 5 5
      public/ueapp.js
  3. 78 164
      src/components/left.vue
  4. 51 114
      src/components/right.vue

+ 1 - 1
public/config.js

@@ -9,7 +9,7 @@
9 9
 window.g = {
10 10
     // 获取数据请求地址
11 11
     // BASE_API: "https://weizhi.huanghuai.edu.cn/yyzioc-server/",//prod
12
-    BASE_API: "https://782y5867q3.vicp.fun/ioc-server/",//dev
12
+    BASE_API: "https://weizhi.huanghuai.edu.cn/jsioc-server/",//dev
13 13
     // BASE_API: "https://test.lqkj.top//cmioc3-server",
14 14
 
15 15
     // BASE_API: "http://192.168.4.219:12397/ioc-server",

+ 5 - 5
public/ueapp.js

@@ -486,7 +486,7 @@ function addResponseEventListener(name, listener) {
486 486
 function removeResponseEventListener(name) {
487 487
     // console.log('ssss',responseEventListeners);
488 488
     // responseEventListeners.set(name, function () { });
489
-    
489
+
490 490
     responseEventListeners.remove(name);
491 491
 }
492 492
 
@@ -776,7 +776,7 @@ function onWebRtcAnswer(webRTCData) {
776 776
 
777 777
         statsText += `<div>Duration: ${timeFormat.format(runTimeHours)}:${timeFormat.format(runTimeMinutes)}:${timeFormat.format(runTimeSeconds)}</div>`;
778 778
         statsText += `<div>Video Resolution: ${aggregatedStats.hasOwnProperty('frameWidth') && aggregatedStats.frameWidth && aggregatedStats.hasOwnProperty('frameHeight') && aggregatedStats.frameHeight ?
779
-                aggregatedStats.frameWidth + 'x' + aggregatedStats.frameHeight : 'Chrome only'
779
+            aggregatedStats.frameWidth + 'x' + aggregatedStats.frameHeight : 'Chrome only'
780 780
             }</div>`;
781 781
         statsText += `<div>Received (${receivedBytesMeasurement}): ${numberFormat.format(receivedBytes)}</div>`;
782 782
         statsText += `<div>Frames Decoded: ${aggregatedStats.hasOwnProperty('framesDecoded') ? numberFormat.format(aggregatedStats.framesDecoded) : 'Chrome only'}</div>`;
@@ -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: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
936
+        playerElement.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: 100% ; height: 100%; cursor: " + styleCursor + "; " + styleAdditional;
937 937
     }
938 938
 }
939 939
 
@@ -1926,8 +1926,8 @@ function onConfig(config) {
1926 1926
 }
1927 1927
 
1928 1928
 function load(type) {
1929
-    console.log("type",type);
1930
-    
1929
+    console.log("type", type);
1930
+
1931 1931
     if (type == 0) {
1932 1932
         registerHoveringMouseEvents = function () { }
1933 1933
         registerLockedMouseEvents = function () { }

+ 78 - 164
src/components/left.vue

@@ -7,60 +7,34 @@
7 7
       <div class="content">
8 8
         <div id="myChart"></div>
9 9
         <div class="list">
10
-          <div
11
-            class="item"
12
-            v-for="(item, index) in classRoomCount"
13
-            :key="index"
14
-            :style="{
15
-              borderRight:
16
-                index == 0
17
-                  ? '2px solid #0BF'
18
-                  : index == 1
10
+          <div class="item" v-for="(item, index) in classRoomCount" :key="index" :style="{
11
+            borderRight:
12
+              index == 0
13
+                ? '2px solid #0BF'
14
+                : index == 1
19 15
                   ? '2px solid #00EB7D'
20 16
                   : index == 2
21
-                  ? '2px solid #FB0'
22
-                  : '',
23
-            }"
24
-          >
17
+                    ? '2px solid #FB0'
18
+                    : '',
19
+          }">
25 20
             <!-- <i :style="{ backgroundColor: item.color }"></i> -->
26
-            <svg
27
-              xmlns="http://www.w3.org/2000/svg"
28
-              width="14"
29
-              height="14"
30
-              viewBox="0 0 14 14"
31
-              fill="none"
32
-              v-if="index === 0"
33
-            >
21
+            <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none"
22
+              v-if="index === 0">
34 23
               <path
35 24
                 d="M14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM4.55 7C4.55 8.3531 5.6469 9.45 7 9.45C8.3531 9.45 9.45 8.3531 9.45 7C9.45 5.6469 8.3531 4.55 7 4.55C5.6469 4.55 4.55 5.6469 4.55 7Z"
36
-                fill="#00BBFF"
37
-              />
25
+                fill="#00BBFF" />
38 26
             </svg>
39
-            <svg
40
-              v-if="index === 1"
41
-              xmlns="http://www.w3.org/2000/svg"
42
-              width="14"
43
-              height="14"
44
-              viewBox="0 0 14 14"
45
-              fill="none"
46
-            >
27
+            <svg v-if="index === 1" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"
28
+              fill="none">
47 29
               <path
48 30
                 d="M14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM4.55 7C4.55 8.3531 5.6469 9.45 7 9.45C8.3531 9.45 9.45 8.3531 9.45 7C9.45 5.6469 8.3531 4.55 7 4.55C5.6469 4.55 4.55 5.6469 4.55 7Z"
49
-                fill="#00EB7D"
50
-              />
31
+                fill="#00EB7D" />
51 32
             </svg>
52
-            <svg
53
-              v-if="index === 2"
54
-              xmlns="http://www.w3.org/2000/svg"
55
-              width="14"
56
-              height="14"
57
-              viewBox="0 0 14 14"
58
-              fill="none"
59
-            >
33
+            <svg v-if="index === 2" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"
34
+              fill="none">
60 35
               <path
61 36
                 d="M14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM4.55 7C4.55 8.3531 5.6469 9.45 7 9.45C8.3531 9.45 9.45 8.3531 9.45 7C9.45 5.6469 8.3531 4.55 7 4.55C5.6469 4.55 4.55 5.6469 4.55 7Z"
62
-                fill="#FFBB00"
63
-              />
37
+                fill="#FFBB00" />
64 38
             </svg>
65 39
             <div class="descr">
66 40
               <span>{{ item.name }}</span>
@@ -76,13 +50,8 @@
76 50
       </div>
77 51
       <div class="content">
78 52
         <div class="count" v-for="(item, index) in classCount" :key="index">
79
-          <CircleProgress
80
-            :target-value="item.number"
81
-            :color="item.color"
82
-            :text="item.text"
83
-            :index="index"
84
-            text-position="bottom"
85
-          >
53
+          <CircleProgress :target-value="item.number" :color="item.color" :text="item.text" :index="index"
54
+            text-position="bottom">
86 55
             <img :src="leftimg + item.imgnumber + '.png'" alt="" />
87 56
           </CircleProgress>
88 57
           <div class="text">{{ item.text }}</div>
@@ -105,36 +74,21 @@
105 74
           <div class="free-box">
106 75
             <div class="text">
107 76
               空闲中:{{ (100 - getPercentage).toFixed(2) || 0 }}%
108
-              <span class="num"
109
-                >{{ classRoom.length - occupiedClassroomsCount || 0 }}间</span
110
-              >
77
+              <span class="num">{{ classRoom.length - occupiedClassroomsCount || 0 }}间</span>
111 78
             </div>
112 79
           </div>
113 80
         </div>
114
-        <el-progress
115
-          :percentage="getPercentage"
116
-          :show-text="false"
117
-          color="#1BCEFF"
118
-        />
81
+        <el-progress :percentage="getPercentage" :show-text="false" color="#1BCEFF" />
119 82
       </div>
120 83
       <div class="search-container">
121
-        <el-input
122
-          v-model="searchData"
123
-          clearable
124
-          placeholder="请输入大楼名称、教室名称"
125
-        />
84
+        <el-input v-model="searchData" clearable placeholder="请输入大楼名称、教室名称" />
126 85
         <el-button type="primary" :icon="Search" @click="searchHandel" />
127 86
       </div>
128 87
 
129 88
       <div class="content" style="height: 100%; overflow: hidden">
130 89
         <div class="table">
131 90
           <div class="dropdown-container">
132
-            <el-dropdown
133
-              trigger="click"
134
-              @command="clickBuildingsropdown"
135
-              max-height="150"
136
-              popper-class="popper-class"
137
-            >
91
+            <el-dropdown trigger="click" @command="clickBuildingsropdown" max-height="150" popper-class="popper-class">
138 92
               <span class="dropdown-name">
139 93
                 <div class="cureet-text" :title="cureetBuild">{{ cureetBuild }}</div>
140 94
                 <el-icon class="el-icon--right">
@@ -144,20 +98,12 @@
144 98
               </span>
145 99
               <template #dropdown>
146 100
                 <el-dropdown-menu>
147
-                  <el-dropdown-item
148
-                    :command="item.gis_building_code"
149
-                    v-for="(item, index) in buildings"
150
-                    :key="index"
151
-                    >{{ item.building_name }}</el-dropdown-item
152
-                  >
101
+                  <el-dropdown-item :command="item.gis_building_code" v-for="(item, index) in buildings" :key="index">{{
102
+                    item.building_name }}</el-dropdown-item>
153 103
                 </el-dropdown-menu>
154 104
               </template>
155 105
             </el-dropdown>
156
-            <el-dropdown
157
-              trigger="click"
158
-              @command="clickCategoryTypedropdown"
159
-              max-height="150"
160
-            >
106
+            <el-dropdown trigger="click" @command="clickCategoryTypedropdown" max-height="150">
161 107
               <span class="dropdown-name">
162 108
                 {{ category || "全部类型" }}
163 109
                 <el-icon>
@@ -166,20 +112,12 @@
166 112
               </span>
167 113
               <template #dropdown>
168 114
                 <el-dropdown-menu>
169
-                  <el-dropdown-item
170
-                    :command="item.category"
171
-                    v-for="(item, index) in categoryType"
172
-                    :key="index"
173
-                    >{{ item.category }}</el-dropdown-item
174
-                  >
115
+                  <el-dropdown-item :command="item.category" v-for="(item, index) in categoryType" :key="index">{{
116
+                    item.category }}</el-dropdown-item>
175 117
                 </el-dropdown-menu>
176 118
               </template>
177 119
             </el-dropdown>
178
-            <el-dropdown
179
-              trigger="click"
180
-              @command="clickLeafsdropdown"
181
-              max-height="150"
182
-            >
120
+            <el-dropdown trigger="click" @command="clickLeafsdropdown" max-height="150">
183 121
               <span class="dropdown-name">
184 122
                 {{ cureetLeaf }}
185 123
                 <el-icon>
@@ -188,20 +126,12 @@
188 126
               </span>
189 127
               <template #dropdown>
190 128
                 <el-dropdown-menu>
191
-                  <el-dropdown-item
192
-                    :command="item.leaf"
193
-                    v-for="(item, index) in leafs"
194
-                    :key="index"
195
-                    >{{ item.leaf_name }}</el-dropdown-item
196
-                  >
129
+                  <el-dropdown-item :command="item.leaf" v-for="(item, index) in leafs" :key="index">{{ item.leaf_name
130
+                    }}</el-dropdown-item>
197 131
                 </el-dropdown-menu>
198 132
               </template>
199 133
             </el-dropdown>
200
-            <el-dropdown
201
-              trigger="click"
202
-              @command="clickStatusesdropdown"
203
-              max-height="150"
204
-            >
134
+            <el-dropdown trigger="click" @command="clickStatusesdropdown" max-height="150">
205 135
               <span class="dropdown-name">
206 136
                 {{ cureetStatus }}
207 137
                 <el-icon>
@@ -210,12 +140,8 @@
210 140
               </span>
211 141
               <template #dropdown>
212 142
                 <el-dropdown-menu>
213
-                  <el-dropdown-item
214
-                    :command="item.status_code"
215
-                    v-for="(item, index) in statuses"
216
-                    :key="index"
217
-                    >{{ item.status_name }}</el-dropdown-item
218
-                  >
143
+                  <el-dropdown-item :command="item.status_code" v-for="(item, index) in statuses" :key="index">{{
144
+                    item.status_name }}</el-dropdown-item>
219 145
                 </el-dropdown-menu>
220 146
               </template>
221 147
             </el-dropdown>
@@ -227,23 +153,13 @@
227 153
           > -->
228 154
           <!-- <div v-if="classRoomList.length > 0" style="width: 100%; height: 100%"> -->
229 155
           <div class="scroll-container" ref="scrollContainerRef">
230
-            <div
231
-              :style="{
232
-                height: scrollContainerHeight + 'px',
233
-                overflow: 'hidden',
234
-                paddingTop: '10px',
235
-              }"
236
-              v-if="classRoomList.length > 0"
237
-            >
238
-              <scroll
239
-                :content="classRoomList"
240
-                class="vue3-seamless-scroll"
241
-                :hover="true"
242
-                :wheel="true"
243
-                direction="top"
244
-                ref="scrollRef"
245
-                :mask="false"
246
-              >
156
+            <div :style="{
157
+              height: scrollContainerHeight + 'px',
158
+              overflow: 'hidden',
159
+              paddingTop: '10px',
160
+            }" v-if="classRoomList.length > 0">
161
+              <scroll :content="classRoomList" class="vue3-seamless-scroll" :hover="true" :wheel="true" direction="top"
162
+                ref="scrollRef" :mask="false">
247 163
                 <template #default="{ item }">
248 164
                   <div class="list-item">
249 165
                     <div class="class-status-btn-container">
@@ -271,10 +187,7 @@
271 187
                           <div v-if="item.actual != null">
272 188
                             实到/应到:{{ item.actual }}/{{ item.expected }}
273 189
                           </div>
274
-                          <div
275
-                            style="margin-left: 8px"
276
-                            v-if="item.actual != null"
277
-                          >
190
+                          <div style="margin-left: 8px" v-if="item.actual != null">
278 191
                             到课率:{{
279 192
                               (item.actual / item.expected).toFixed(2) * 100 ||
280 193
                               0
@@ -292,17 +205,14 @@
292 205
               <img :src="noData" alt="" srcset="">
293 206
             </div>
294 207
           </div>
295
-         
208
+
296 209
         </div>
297 210
         <!-- </div> -->
298 211
       </div>
299 212
     </div>
300 213
   </el-aside>
301 214
 
302
-  <div
303
-    ref="popoverRef"
304
-    v-if="roomVisible"
305
-    style="
215
+  <div ref="popoverRef" v-if="roomVisible" style="
306 216
       background-color: rgba(245, 246, 248, 0.9);
307 217
       border-radius: 10px;
308 218
       position: absolute;
@@ -311,51 +221,37 @@
311 221
       width: 366px;
312 222
       z-index: 999;
313 223
       transform: translateX(-50%);
314
-    "
315
-  >
224
+    ">
316 225
     <div class="model-detail">
317
-      <span
318
-        ><span class="title">教室状态: </span>
226
+      <span><span class="title">教室状态: </span>
319 227
         <span :class="classInfo.online ? 'green' : 'red'">{{
320 228
           classInfo && classInfo.status
321 229
         }}</span>
322 230
       </span>
323 231
 
324
-      <span
325
-        ><span class="title">班级: </span>
232
+      <span><span class="title">班级: </span>
326 233
         <span style="width: 105px; display: inline-flex">{{
327 234
           classInfo && classInfo.className
328 235
         }}</span>
329 236
       </span>
330
-      <span
331
-        ><span class="title">课程名称: </span>
237
+      <span><span class="title">课程名称: </span>
332 238
         <span style="width: 94px; display: inline-flex">{{
333 239
           classInfo && classInfo.courseName
334 240
         }}</span>
335 241
       </span>
336
-      <span
337
-        ><span class="title">应到人数: </span
338
-        >{{ classInfo && classInfo.expected }}</span
339
-      >
340
-      <span
341
-        ><span class="title">教室: </span>
242
+      <span><span class="title">应到人数: </span>{{ classInfo && classInfo.expected }}</span>
243
+      <span><span class="title">教室: </span>
342 244
         <span style="width: 120px; display: inline-flex">
343 245
           {{ classInfo && classInfo.class }}
344 246
         </span>
345 247
       </span>
346
-      <span
347
-        ><span class="title">实到人数: </span
348
-        >{{ classInfo && classInfo.actual }}</span
349
-      >
350
-      <span
351
-        ><span class="title">老师: </span
352
-        >{{ classInfo && classInfo.teacher }}</span
353
-      >
248
+      <span><span class="title">实到人数: </span>{{ classInfo && classInfo.actual }}</span>
249
+      <span><span class="title">老师: </span>{{ classInfo && classInfo.teacher }}</span>
354 250
     </div>
355 251
   </div>
356 252
 </template>
357 253
 
358
-<script >
254
+<script>
359 255
 import * as echarts from "echarts";
360 256
 import {
361 257
   reactive,
@@ -590,12 +486,14 @@ export default {
590 486
     };
591 487
     window.addEventListener("resize", function () {
592 488
       myChart.value.resize();
593
-      if(scrollContainerHeight.value){
489
+      if (scrollContainerHeight.value) {
594 490
         scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
595 491
 
596 492
       }
597 493
     });
598 494
 
495
+
496
+
599 497
     // 物联设备类型统计
600 498
     const interDevice = ref([]);
601 499
 
@@ -701,6 +599,15 @@ export default {
701 599
       //获取教室列表数据
702 600
       getClassRoomList();
703 601
       scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
602
+
603
+      setInterval(() => {
604
+        getClassData();
605
+        //start();
606
+        // 获取教师下拉选择数据
607
+        getClassSelections();
608
+        //获取教室列表数据
609
+        getClassRoomList();
610
+      }, 30000);
704 611
     });
705 612
 
706 613
     onBeforeUnmount(() => {
@@ -774,7 +681,7 @@ export default {
774 681
     const getPercentage = computed(() => {
775 682
       const total = classRoom.value.length;
776 683
       const occupied = occupiedClassroomsCount.value;
777
-      return (((occupied / total) * 100).toFixed(2))=='NaN'?0:(((occupied / total) * 100).toFixed(2)) ;
684
+      return (((occupied / total) * 100).toFixed(2)) == 'NaN' ? 0 : (((occupied / total) * 100).toFixed(2));
778 685
     });
779 686
 
780 687
     // 获取教师下拉选择
@@ -854,8 +761,8 @@ export default {
854 761
       });
855 762
       classRoomList.value = [];
856 763
       // setTimeout(() => {
857
-        classRoomList.value = res.data;
858
-        // scrollRef.value.reset()
764
+      classRoomList.value = res.data;
765
+      // scrollRef.value.reset()
859 766
       // }, 0);
860 767
     };
861 768
     let deviceDialog = ref(true);
@@ -922,7 +829,7 @@ export default {
922 829
 <style scoped lang="scss">
923 830
 @import "../assets/css/left.scss";
924 831
 </style>
925
-<style >
832
+<style>
926 833
 .classpopover {
927 834
   .el-popper__arrow {
928 835
     top: 196px !important;
@@ -945,27 +852,33 @@ export default {
945 852
   border-radius: 4px !important;
946 853
 
947 854
 }
855
+
948 856
 .el-dropdown-menu {
949 857
   background: rgba(1, 18, 35, 0.60) !important;
950 858
   border: none !important;
951 859
   border-radius: 4px !important;
952
-  padding: 2px  !important;
860
+  padding: 2px !important;
953 861
 }
862
+
954 863
 .el-dropdown-menu__item {
955 864
   color: rgba(255, 255, 255, 0.72);
956 865
   border-radius: 4px !important;
957 866
 }
867
+
958 868
 .popper__arrow::after {
959 869
   background: rgba(255, 255, 255, 0.12);
960 870
 }
871
+
961 872
 .el-dropdown-menu__item:not(.is-disabled):hover {
962 873
   background: rgba(255, 255, 255, 0.12);
963 874
   color: rgba(255, 255, 255, 0.75);
964 875
 }
876
+
965 877
 .el-dropdown-menu__item:not(.is-disabled):hover {
966 878
   background: rgba(255, 255, 255, 0.12) !important;
967 879
   color: #fff !important;
968 880
 }
881
+
969 882
 .el-dropdown-menu__item:not(.is-disabled):focus {
970 883
   background: rgba(255, 255, 255, 0.12) !important;
971 884
   color: #fff !important;
@@ -974,7 +887,8 @@ export default {
974 887
 .el-popper__arrow {
975 888
   display: none;
976 889
 }
977
-.el-input__inner{
890
+
891
+.el-input__inner {
978 892
   color: #fff !important;
979 893
 }
980 894
 </style>

+ 51 - 114
src/components/right.vue

@@ -14,19 +14,13 @@
14 14
         <div class="list">
15 15
           <div class="item_r">
16 16
             <img :src="d2img" alt="" />
17
-            <div
18
-              class="percent"
19
-              style="display: flex; justify-content: space-between"
20
-            >
17
+            <div class="percent" style="display: flex; justify-content: space-between">
21 18
               <a>在线</a> <a>{{ equipmentTotal.online }} <span>(个)</span> </a>
22 19
             </div>
23 20
           </div>
24 21
           <div class="item_r">
25 22
             <img :src="d3img" alt="" />
26
-            <div
27
-              class="percent"
28
-              style="display: flex; justify-content: space-between"
29
-            >
23
+            <div class="percent" style="display: flex; justify-content: space-between">
30 24
               <a>离线</a>
31 25
               <a>{{ equipmentTotal.underline }} <span>(个)</span> </a>
32 26
             </div>
@@ -41,12 +35,7 @@
41 35
       </div>
42 36
       <div class="contentwrap">
43 37
         <div class="count" v-for="(item, index) in interDevice" :key="index">
44
-          <countTo
45
-            :startVal="0"
46
-            :endVal="item.number"
47
-            :decimals="0"
48
-            :duration="3000"
49
-          ></countTo>
38
+          <countTo :startVal="0" :endVal="item.number" :decimals="0" :duration="3000"></countTo>
50 39
           <img :src="deviceImg + item.icon + '.png'" alt="" />
51 40
           <div class="text">{{ item?.text }}</div>
52 41
         </div>
@@ -60,130 +49,58 @@
60 49
 
61 50
       <!-- <div class="monitorContent" :style="{ background: `url(${videoBorder})` }"> -->
62 51
       <div class="monitorContent">
63
-        <img
64
-          @click="swiperRef.prev()"
65
-          class="change-left"
66
-          :src="swiperLeft"
67
-          alt=""
68
-          srcset=""
69
-        />
70
-        <el-carousel
71
-          class="swiper-container"
72
-          ref="swiperRef"
73
-          :autoplay="false"
74
-          indicator-position="none"
75
-          @change="monitorchange"
76
-          arrow="never"
77
-        >
52
+        <img @click="swiperRef.prev()" class="change-left" :src="swiperLeft" alt="" srcset="" />
53
+        <el-carousel class="swiper-container" ref="swiperRef" :autoplay="false" indicator-position="none"
54
+          @change="monitorchange" arrow="never">
78 55
           <!-- <img src="swiper-left" alt="" srcset=""> -->
79 56
 
80
-          <el-carousel-item
81
-            v-for="(item, index) in carouselData"
82
-            :key="index"
83
-            @click="lookVideo(item)"
84
-            style="height: 100%"
85
-          >
57
+          <el-carousel-item v-for="(item, index) in carouselData" :key="index" @click="lookVideo(item)"
58
+            style="height: 100%">
86 59
             <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px">
87 60
               {{ item.title }}
88 61
             </p>
89 62
             <div class="video-container" v-if="videoindex == index">
90
-              <VideoJs
91
-                style="height: 100%"
92
-                class="video"
93
-                :videoSrc="item.src"
94
-                autoPlay
95
-              />
63
+              <VideoJs style="height: 100%" class="video" :videoSrc="item.src" autoPlay />
96 64
             </div>
97 65
           </el-carousel-item>
98 66
         </el-carousel>
99
-        <img
100
-          class="video-border"
101
-          style="height: 100%; width: 100%"
102
-          :src="videoBorder"
103
-          alt=""
104
-          srcset=""
105
-        />
106
-        <img
107
-          @click="swiperRef.next()"
108
-          class="change-right"
109
-          :src="swiperRight"
110
-          alt=""
111
-          srcset=""
112
-        />
67
+        <img class="video-border" style="height: 100%; width: 100%" :src="videoBorder" alt="" srcset="" />
68
+        <img @click="swiperRef.next()" class="change-right" :src="swiperRight" alt="" srcset="" />
113 69
       </div>
114 70
     </div>
115 71
   </el-aside>
116 72
 
117 73
   <!-- 视频播放弹框 -->
118
-  <el-dialog
119
-    class="videoDialog"
120
-    v-model="videoDialog"
121
-    :title="dialogTitle"
122
-    width="62%"
123
-    align="center"
124
-    top="8%"
125
-    style="z-index: 2015; padding: 0"
126
-  >
74
+  <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="62%" align="center" top="8%"
75
+    style="z-index: 2015; padding: 0">
127 76
     <videoPlay v-bind="videoData" />
128 77
 
129 78
     <!-- {{ videoData.src }} -->
130 79
   </el-dialog>
131 80
 
132
-  <el-dialog
133
-    custom-class="deviceDialog"
134
-    v-model="deviceDialog"
135
-    title="设备明细"
136
-    width="40%"
137
-    align="left"
138
-    top="30vh"
139
-    style="z-index: 2015; background: rgba(0, 0, 0, 0)"
140
-  >
141
-    <el-table
142
-      :data="deviceDetailsList"
143
-      border
144
-      height="100%"
145
-      style="width: 100%; background: rgba(0, 0, 0, 0)"
146
-    >
147
-      <el-table-column
148
-        align="center"
149
-        type="index"
150
-        label="序号"
151
-      ></el-table-column>
152
-      <el-table-column
153
-        align="center"
154
-        prop="name"
155
-        label="设备名称"
156
-      ></el-table-column>
81
+  <el-dialog custom-class="deviceDialog" v-model="deviceDialog" title="设备明细" width="40%" align="left" top="30vh"
82
+    style="z-index: 2015; background: rgba(0, 0, 0, 0)">
83
+    <el-table :data="deviceDetailsList" border height="100%" style="width: 100%; background: rgba(0, 0, 0, 0)">
84
+      <el-table-column align="center" type="index" label="序号"></el-table-column>
85
+      <el-table-column align="center" prop="name" label="设备名称"></el-table-column>
157 86
       <el-table-column align="center" prop="status" label="设备状态">
158 87
         <template #default="scope">
159
-          <div
160
-            :class="{
161
-              normal: scope.row.status == '正常',
162
-              error: scope.row.status == '异常',
163
-            }"
164
-          >
88
+          <div :class="{
89
+            normal: scope.row.status == '正常',
90
+            error: scope.row.status == '异常',
91
+          }">
165 92
             <div>{{ scope.row.status }}</div>
166 93
           </div>
167 94
         </template>
168 95
       </el-table-column>
169 96
       <el-table-column label="操作" align="center">
170 97
         <template #default="scope">
171
-          <el-button type="primary" size="mini" @click="lookDetails(scope.row)"
172
-            >详情</el-button
173
-          >
98
+          <el-button type="primary" size="mini" @click="lookDetails(scope.row)">详情</el-button>
174 99
         </template>
175 100
       </el-table-column>
176 101
     </el-table>
177
-    <el-dialog
178
-      custom-class="deviceDetailsDialog"
179
-      v-model="isShowDeviceDetails"
180
-      title="详情"
181
-      width="15%"
182
-      align="left"
183
-      top="40vh"
184
-      style="z-index: 2019; background: rgba(0, 0, 0, 0)"
185
-      :modal="false"
186
-    >
102
+    <el-dialog custom-class="deviceDetailsDialog" v-model="isShowDeviceDetails" title="详情" width="15%" align="left"
103
+      top="40vh" style="z-index: 2019; background: rgba(0, 0, 0, 0)" :modal="false">
187 104
       <div class="details-container">
188 105
         <div>设备名称:多媒体设备</div>
189 106
         <div>设备状态:<span :style="{ online: true }">在线</span></div>
@@ -195,7 +112,7 @@
195 112
   </el-dialog>
196 113
 </template>
197 114
 
198
-<script >
115
+<script>
199 116
 import { reactive, onBeforeMount, ref, nextTick, onMounted } from "vue";
200 117
 import { ElCarousel, ElCarouselItem } from "element-plus";
201 118
 import "vue3-video-play/dist/style.css";
@@ -216,7 +133,14 @@ export default {
216 133
     VideoJs,
217 134
   },
218 135
   setup() {
219
-    onMounted(() => {});
136
+    onMounted(() => {
137
+
138
+      setInterval(() => {
139
+        getDeviceData();
140
+      }, 30000);
141
+
142
+
143
+    });
220 144
 
221 145
     const data = reactive({
222 146
       videoSrc:
@@ -442,7 +366,7 @@ export default {
442 366
 <style scoped lang="scss">
443 367
 @import "../assets/css/right.scss";
444 368
 </style>
445
-<style lang="scss" >
369
+<style lang="scss">
446 370
 .videoDialog {
447 371
   .el-dialog__header {
448 372
     height: 49px;
@@ -471,6 +395,7 @@ export default {
471 395
     padding: 0 !important;
472 396
   }
473 397
 }
398
+
474 399
 .deviceDialog {
475 400
   border-radius: 4px 4px 0px 0px;
476 401
 
@@ -499,16 +424,19 @@ export default {
499 424
       }
500 425
     }
501 426
   }
427
+
502 428
   .el-dialog__body {
503 429
     // padding: 10px !important;
504 430
     // background-color: rgba(0, 0, 0, 0.5) !important;
505 431
     background: rgba(6, 22, 30, 0.48) !important;
506
-    
507 432
 
508
-    padding:8px 10px;
433
+
434
+    padding: 8px 10px;
435
+
509 436
     .el-table {
510 437
       --el-table-border-color: #253f48;
511 438
       --el-table-row-hover-bg-color: rgba(0, 0, 0, 0.3);
439
+
512 440
       .normal {
513 441
         text-align: center;
514 442
         /* text/pc/02-55-Regular */
@@ -520,6 +448,7 @@ export default {
520 448
         display: flex;
521 449
         justify-content: center;
522 450
         align-items: center;
451
+
523 452
         div {
524 453
           width: 50px;
525 454
           height: 26px;
@@ -532,6 +461,7 @@ export default {
532 461
           // padding: 4px 6px;
533 462
         }
534 463
       }
464
+
535 465
       .error {
536 466
         text-align: center;
537 467
         /* text/pc/02-55-Regular */
@@ -543,6 +473,7 @@ export default {
543 473
         display: flex;
544 474
         justify-content: center;
545 475
         align-items: center;
476
+
546 477
         div {
547 478
           width: 50px;
548 479
           height: 26px;
@@ -556,18 +487,22 @@ export default {
556 487
         }
557 488
       }
558 489
     }
490
+
559 491
     .el-table th.el-table__cell {
560 492
       background: rgba(6, 22, 30, 0.48) !important;
561
-    
493
+
562 494
     }
495
+
563 496
     .el-table tr {
564 497
       background: rgba(6, 22, 30, 0.48) !important;
565 498
 
566 499
     }
500
+
567 501
     .el-table thead {
568 502
       background: rgba(6, 22, 30, 0.48) !important;
569 503
 
570 504
     }
505
+
571 506
     .el-table td.el-table__cell,
572 507
     .el-table th.el-table__cell.is-leaf {
573 508
       border-color: #253f48;
@@ -604,6 +539,7 @@ export default {
604 539
     padding: 10px !important;
605 540
     background: rgba(6, 22, 30, 0.85) !important;
606 541
     bortder-radius: 4px !important;
542
+
607 543
     .details-container {
608 544
       color: #fff;
609 545
 
@@ -625,6 +561,7 @@ export default {
625 561
 .el-tag .el-tag--success {
626 562
   --el-tag-text-color: #000;
627 563
 }
564
+
628 565
 .d-player-video {
629 566
   display: flex;
630 567
 }