Browse Source

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

木星 1 week ago
parent
commit
d9e2d9db08
4 changed files with 135 additions and 284 deletions
  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
 window.g = {
9
 window.g = {
10
     // 获取数据请求地址
10
     // 获取数据请求地址
11
     // BASE_API: "https://weizhi.huanghuai.edu.cn/yyzioc-server/",//prod
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
     // BASE_API: "https://test.lqkj.top//cmioc3-server",
13
     // BASE_API: "https://test.lqkj.top//cmioc3-server",
14
 
14
 
15
     // BASE_API: "http://192.168.4.219:12397/ioc-server",
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
 function removeResponseEventListener(name) {
486
 function removeResponseEventListener(name) {
487
     // console.log('ssss',responseEventListeners);
487
     // console.log('ssss',responseEventListeners);
488
     // responseEventListeners.set(name, function () { });
488
     // responseEventListeners.set(name, function () { });
489
-    
489
+
490
     responseEventListeners.remove(name);
490
     responseEventListeners.remove(name);
491
 }
491
 }
492
 
492
 
@@ -776,7 +776,7 @@ function onWebRtcAnswer(webRTCData) {
776
 
776
 
777
         statsText += `<div>Duration: ${timeFormat.format(runTimeHours)}:${timeFormat.format(runTimeMinutes)}:${timeFormat.format(runTimeSeconds)}</div>`;
777
         statsText += `<div>Duration: ${timeFormat.format(runTimeHours)}:${timeFormat.format(runTimeMinutes)}:${timeFormat.format(runTimeSeconds)}</div>`;
778
         statsText += `<div>Video Resolution: ${aggregatedStats.hasOwnProperty('frameWidth') && aggregatedStats.frameWidth && aggregatedStats.hasOwnProperty('frameHeight') && aggregatedStats.frameHeight ?
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
             }</div>`;
780
             }</div>`;
781
         statsText += `<div>Received (${receivedBytesMeasurement}): ${numberFormat.format(receivedBytes)}</div>`;
781
         statsText += `<div>Received (${receivedBytesMeasurement}): ${numberFormat.format(receivedBytes)}</div>`;
782
         statsText += `<div>Frames Decoded: ${aggregatedStats.hasOwnProperty('framesDecoded') ? numberFormat.format(aggregatedStats.framesDecoded) : 'Chrome only'}</div>`;
782
         statsText += `<div>Frames Decoded: ${aggregatedStats.hasOwnProperty('framesDecoded') ? numberFormat.format(aggregatedStats.framesDecoded) : 'Chrome only'}</div>`;
@@ -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: " + 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
 function load(type) {
1928
 function load(type) {
1929
-    console.log("type",type);
1930
-    
1929
+    console.log("type", type);
1930
+
1931
     if (type == 0) {
1931
     if (type == 0) {
1932
         registerHoveringMouseEvents = function () { }
1932
         registerHoveringMouseEvents = function () { }
1933
         registerLockedMouseEvents = function () { }
1933
         registerLockedMouseEvents = function () { }

+ 78 - 164
src/components/left.vue

@@ -7,60 +7,34 @@
7
       <div class="content">
7
       <div class="content">
8
         <div id="myChart"></div>
8
         <div id="myChart"></div>
9
         <div class="list">
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
                   ? '2px solid #00EB7D'
15
                   ? '2px solid #00EB7D'
20
                   : index == 2
16
                   : index == 2
21
-                  ? '2px solid #FB0'
22
-                  : '',
23
-            }"
24
-          >
17
+                    ? '2px solid #FB0'
18
+                    : '',
19
+          }">
25
             <!-- <i :style="{ backgroundColor: item.color }"></i> -->
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
               <path
23
               <path
35
                 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"
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
             </svg>
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
               <path
29
               <path
48
                 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"
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
             </svg>
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
               <path
35
               <path
61
                 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
                 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
             </svg>
38
             </svg>
65
             <div class="descr">
39
             <div class="descr">
66
               <span>{{ item.name }}</span>
40
               <span>{{ item.name }}</span>
@@ -76,13 +50,8 @@
76
       </div>
50
       </div>
77
       <div class="content">
51
       <div class="content">
78
         <div class="count" v-for="(item, index) in classCount" :key="index">
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
             <img :src="leftimg + item.imgnumber + '.png'" alt="" />
55
             <img :src="leftimg + item.imgnumber + '.png'" alt="" />
87
           </CircleProgress>
56
           </CircleProgress>
88
           <div class="text">{{ item.text }}</div>
57
           <div class="text">{{ item.text }}</div>
@@ -105,36 +74,21 @@
105
           <div class="free-box">
74
           <div class="free-box">
106
             <div class="text">
75
             <div class="text">
107
               空闲中:{{ (100 - getPercentage).toFixed(2) || 0 }}%
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
             </div>
78
             </div>
112
           </div>
79
           </div>
113
         </div>
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
       </div>
82
       </div>
120
       <div class="search-container">
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
         <el-button type="primary" :icon="Search" @click="searchHandel" />
85
         <el-button type="primary" :icon="Search" @click="searchHandel" />
127
       </div>
86
       </div>
128
 
87
 
129
       <div class="content" style="height: 100%; overflow: hidden">
88
       <div class="content" style="height: 100%; overflow: hidden">
130
         <div class="table">
89
         <div class="table">
131
           <div class="dropdown-container">
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
               <span class="dropdown-name">
92
               <span class="dropdown-name">
139
                 <div class="cureet-text" :title="cureetBuild">{{ cureetBuild }}</div>
93
                 <div class="cureet-text" :title="cureetBuild">{{ cureetBuild }}</div>
140
                 <el-icon class="el-icon--right">
94
                 <el-icon class="el-icon--right">
@@ -144,20 +98,12 @@
144
               </span>
98
               </span>
145
               <template #dropdown>
99
               <template #dropdown>
146
                 <el-dropdown-menu>
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
                 </el-dropdown-menu>
103
                 </el-dropdown-menu>
154
               </template>
104
               </template>
155
             </el-dropdown>
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
               <span class="dropdown-name">
107
               <span class="dropdown-name">
162
                 {{ category || "全部类型" }}
108
                 {{ category || "全部类型" }}
163
                 <el-icon>
109
                 <el-icon>
@@ -166,20 +112,12 @@
166
               </span>
112
               </span>
167
               <template #dropdown>
113
               <template #dropdown>
168
                 <el-dropdown-menu>
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
                 </el-dropdown-menu>
117
                 </el-dropdown-menu>
176
               </template>
118
               </template>
177
             </el-dropdown>
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
               <span class="dropdown-name">
121
               <span class="dropdown-name">
184
                 {{ cureetLeaf }}
122
                 {{ cureetLeaf }}
185
                 <el-icon>
123
                 <el-icon>
@@ -188,20 +126,12 @@
188
               </span>
126
               </span>
189
               <template #dropdown>
127
               <template #dropdown>
190
                 <el-dropdown-menu>
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
                 </el-dropdown-menu>
131
                 </el-dropdown-menu>
198
               </template>
132
               </template>
199
             </el-dropdown>
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
               <span class="dropdown-name">
135
               <span class="dropdown-name">
206
                 {{ cureetStatus }}
136
                 {{ cureetStatus }}
207
                 <el-icon>
137
                 <el-icon>
@@ -210,12 +140,8 @@
210
               </span>
140
               </span>
211
               <template #dropdown>
141
               <template #dropdown>
212
                 <el-dropdown-menu>
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
                 </el-dropdown-menu>
145
                 </el-dropdown-menu>
220
               </template>
146
               </template>
221
             </el-dropdown>
147
             </el-dropdown>
@@ -227,23 +153,13 @@
227
           > -->
153
           > -->
228
           <!-- <div v-if="classRoomList.length > 0" style="width: 100%; height: 100%"> -->
154
           <!-- <div v-if="classRoomList.length > 0" style="width: 100%; height: 100%"> -->
229
           <div class="scroll-container" ref="scrollContainerRef">
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
                 <template #default="{ item }">
163
                 <template #default="{ item }">
248
                   <div class="list-item">
164
                   <div class="list-item">
249
                     <div class="class-status-btn-container">
165
                     <div class="class-status-btn-container">
@@ -271,10 +187,7 @@
271
                           <div v-if="item.actual != null">
187
                           <div v-if="item.actual != null">
272
                             实到/应到:{{ item.actual }}/{{ item.expected }}
188
                             实到/应到:{{ item.actual }}/{{ item.expected }}
273
                           </div>
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
                               (item.actual / item.expected).toFixed(2) * 100 ||
192
                               (item.actual / item.expected).toFixed(2) * 100 ||
280
                               0
193
                               0
@@ -292,17 +205,14 @@
292
               <img :src="noData" alt="" srcset="">
205
               <img :src="noData" alt="" srcset="">
293
             </div>
206
             </div>
294
           </div>
207
           </div>
295
-         
208
+
296
         </div>
209
         </div>
297
         <!-- </div> -->
210
         <!-- </div> -->
298
       </div>
211
       </div>
299
     </div>
212
     </div>
300
   </el-aside>
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
       background-color: rgba(245, 246, 248, 0.9);
216
       background-color: rgba(245, 246, 248, 0.9);
307
       border-radius: 10px;
217
       border-radius: 10px;
308
       position: absolute;
218
       position: absolute;
@@ -311,51 +221,37 @@
311
       width: 366px;
221
       width: 366px;
312
       z-index: 999;
222
       z-index: 999;
313
       transform: translateX(-50%);
223
       transform: translateX(-50%);
314
-    "
315
-  >
224
+    ">
316
     <div class="model-detail">
225
     <div class="model-detail">
317
-      <span
318
-        ><span class="title">教室状态: </span>
226
+      <span><span class="title">教室状态: </span>
319
         <span :class="classInfo.online ? 'green' : 'red'">{{
227
         <span :class="classInfo.online ? 'green' : 'red'">{{
320
           classInfo && classInfo.status
228
           classInfo && classInfo.status
321
         }}</span>
229
         }}</span>
322
       </span>
230
       </span>
323
 
231
 
324
-      <span
325
-        ><span class="title">班级: </span>
232
+      <span><span class="title">班级: </span>
326
         <span style="width: 105px; display: inline-flex">{{
233
         <span style="width: 105px; display: inline-flex">{{
327
           classInfo && classInfo.className
234
           classInfo && classInfo.className
328
         }}</span>
235
         }}</span>
329
       </span>
236
       </span>
330
-      <span
331
-        ><span class="title">课程名称: </span>
237
+      <span><span class="title">课程名称: </span>
332
         <span style="width: 94px; display: inline-flex">{{
238
         <span style="width: 94px; display: inline-flex">{{
333
           classInfo && classInfo.courseName
239
           classInfo && classInfo.courseName
334
         }}</span>
240
         }}</span>
335
       </span>
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
         <span style="width: 120px; display: inline-flex">
244
         <span style="width: 120px; display: inline-flex">
343
           {{ classInfo && classInfo.class }}
245
           {{ classInfo && classInfo.class }}
344
         </span>
246
         </span>
345
       </span>
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
     </div>
250
     </div>
355
   </div>
251
   </div>
356
 </template>
252
 </template>
357
 
253
 
358
-<script >
254
+<script>
359
 import * as echarts from "echarts";
255
 import * as echarts from "echarts";
360
 import {
256
 import {
361
   reactive,
257
   reactive,
@@ -590,12 +486,14 @@ export default {
590
     };
486
     };
591
     window.addEventListener("resize", function () {
487
     window.addEventListener("resize", function () {
592
       myChart.value.resize();
488
       myChart.value.resize();
593
-      if(scrollContainerHeight.value){
489
+      if (scrollContainerHeight.value) {
594
         scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
490
         scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
595
 
491
 
596
       }
492
       }
597
     });
493
     });
598
 
494
 
495
+
496
+
599
     // 物联设备类型统计
497
     // 物联设备类型统计
600
     const interDevice = ref([]);
498
     const interDevice = ref([]);
601
 
499
 
@@ -701,6 +599,15 @@ export default {
701
       //获取教室列表数据
599
       //获取教室列表数据
702
       getClassRoomList();
600
       getClassRoomList();
703
       scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
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
     onBeforeUnmount(() => {
613
     onBeforeUnmount(() => {
@@ -774,7 +681,7 @@ export default {
774
     const getPercentage = computed(() => {
681
     const getPercentage = computed(() => {
775
       const total = classRoom.value.length;
682
       const total = classRoom.value.length;
776
       const occupied = occupiedClassroomsCount.value;
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
       classRoomList.value = [];
762
       classRoomList.value = [];
856
       // setTimeout(() => {
763
       // setTimeout(() => {
857
-        classRoomList.value = res.data;
858
-        // scrollRef.value.reset()
764
+      classRoomList.value = res.data;
765
+      // scrollRef.value.reset()
859
       // }, 0);
766
       // }, 0);
860
     };
767
     };
861
     let deviceDialog = ref(true);
768
     let deviceDialog = ref(true);
@@ -922,7 +829,7 @@ export default {
922
 <style scoped lang="scss">
829
 <style scoped lang="scss">
923
 @import "../assets/css/left.scss";
830
 @import "../assets/css/left.scss";
924
 </style>
831
 </style>
925
-<style >
832
+<style>
926
 .classpopover {
833
 .classpopover {
927
   .el-popper__arrow {
834
   .el-popper__arrow {
928
     top: 196px !important;
835
     top: 196px !important;
@@ -945,27 +852,33 @@ export default {
945
   border-radius: 4px !important;
852
   border-radius: 4px !important;
946
 
853
 
947
 }
854
 }
855
+
948
 .el-dropdown-menu {
856
 .el-dropdown-menu {
949
   background: rgba(1, 18, 35, 0.60) !important;
857
   background: rgba(1, 18, 35, 0.60) !important;
950
   border: none !important;
858
   border: none !important;
951
   border-radius: 4px !important;
859
   border-radius: 4px !important;
952
-  padding: 2px  !important;
860
+  padding: 2px !important;
953
 }
861
 }
862
+
954
 .el-dropdown-menu__item {
863
 .el-dropdown-menu__item {
955
   color: rgba(255, 255, 255, 0.72);
864
   color: rgba(255, 255, 255, 0.72);
956
   border-radius: 4px !important;
865
   border-radius: 4px !important;
957
 }
866
 }
867
+
958
 .popper__arrow::after {
868
 .popper__arrow::after {
959
   background: rgba(255, 255, 255, 0.12);
869
   background: rgba(255, 255, 255, 0.12);
960
 }
870
 }
871
+
961
 .el-dropdown-menu__item:not(.is-disabled):hover {
872
 .el-dropdown-menu__item:not(.is-disabled):hover {
962
   background: rgba(255, 255, 255, 0.12);
873
   background: rgba(255, 255, 255, 0.12);
963
   color: rgba(255, 255, 255, 0.75);
874
   color: rgba(255, 255, 255, 0.75);
964
 }
875
 }
876
+
965
 .el-dropdown-menu__item:not(.is-disabled):hover {
877
 .el-dropdown-menu__item:not(.is-disabled):hover {
966
   background: rgba(255, 255, 255, 0.12) !important;
878
   background: rgba(255, 255, 255, 0.12) !important;
967
   color: #fff !important;
879
   color: #fff !important;
968
 }
880
 }
881
+
969
 .el-dropdown-menu__item:not(.is-disabled):focus {
882
 .el-dropdown-menu__item:not(.is-disabled):focus {
970
   background: rgba(255, 255, 255, 0.12) !important;
883
   background: rgba(255, 255, 255, 0.12) !important;
971
   color: #fff !important;
884
   color: #fff !important;
@@ -974,7 +887,8 @@ export default {
974
 .el-popper__arrow {
887
 .el-popper__arrow {
975
   display: none;
888
   display: none;
976
 }
889
 }
977
-.el-input__inner{
890
+
891
+.el-input__inner {
978
   color: #fff !important;
892
   color: #fff !important;
979
 }
893
 }
980
 </style>
894
 </style>

+ 51 - 114
src/components/right.vue

@@ -14,19 +14,13 @@
14
         <div class="list">
14
         <div class="list">
15
           <div class="item_r">
15
           <div class="item_r">
16
             <img :src="d2img" alt="" />
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
               <a>在线</a> <a>{{ equipmentTotal.online }} <span>(个)</span> </a>
18
               <a>在线</a> <a>{{ equipmentTotal.online }} <span>(个)</span> </a>
22
             </div>
19
             </div>
23
           </div>
20
           </div>
24
           <div class="item_r">
21
           <div class="item_r">
25
             <img :src="d3img" alt="" />
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
               <a>离线</a>
24
               <a>离线</a>
31
               <a>{{ equipmentTotal.underline }} <span>(个)</span> </a>
25
               <a>{{ equipmentTotal.underline }} <span>(个)</span> </a>
32
             </div>
26
             </div>
@@ -41,12 +35,7 @@
41
       </div>
35
       </div>
42
       <div class="contentwrap">
36
       <div class="contentwrap">
43
         <div class="count" v-for="(item, index) in interDevice" :key="index">
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
           <img :src="deviceImg + item.icon + '.png'" alt="" />
39
           <img :src="deviceImg + item.icon + '.png'" alt="" />
51
           <div class="text">{{ item?.text }}</div>
40
           <div class="text">{{ item?.text }}</div>
52
         </div>
41
         </div>
@@ -60,130 +49,58 @@
60
 
49
 
61
       <!-- <div class="monitorContent" :style="{ background: `url(${videoBorder})` }"> -->
50
       <!-- <div class="monitorContent" :style="{ background: `url(${videoBorder})` }"> -->
62
       <div class="monitorContent">
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
           <!-- <img src="swiper-left" alt="" srcset=""> -->
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
             <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px">
59
             <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px">
87
               {{ item.title }}
60
               {{ item.title }}
88
             </p>
61
             </p>
89
             <div class="video-container" v-if="videoindex == index">
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
             </div>
64
             </div>
97
           </el-carousel-item>
65
           </el-carousel-item>
98
         </el-carousel>
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
       </div>
69
       </div>
114
     </div>
70
     </div>
115
   </el-aside>
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
     <videoPlay v-bind="videoData" />
76
     <videoPlay v-bind="videoData" />
128
 
77
 
129
     <!-- {{ videoData.src }} -->
78
     <!-- {{ videoData.src }} -->
130
   </el-dialog>
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
       <el-table-column align="center" prop="status" label="设备状态">
86
       <el-table-column align="center" prop="status" label="设备状态">
158
         <template #default="scope">
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
             <div>{{ scope.row.status }}</div>
92
             <div>{{ scope.row.status }}</div>
166
           </div>
93
           </div>
167
         </template>
94
         </template>
168
       </el-table-column>
95
       </el-table-column>
169
       <el-table-column label="操作" align="center">
96
       <el-table-column label="操作" align="center">
170
         <template #default="scope">
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
         </template>
99
         </template>
175
       </el-table-column>
100
       </el-table-column>
176
     </el-table>
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
       <div class="details-container">
104
       <div class="details-container">
188
         <div>设备名称:多媒体设备</div>
105
         <div>设备名称:多媒体设备</div>
189
         <div>设备状态:<span :style="{ online: true }">在线</span></div>
106
         <div>设备状态:<span :style="{ online: true }">在线</span></div>
@@ -195,7 +112,7 @@
195
   </el-dialog>
112
   </el-dialog>
196
 </template>
113
 </template>
197
 
114
 
198
-<script >
115
+<script>
199
 import { reactive, onBeforeMount, ref, nextTick, onMounted } from "vue";
116
 import { reactive, onBeforeMount, ref, nextTick, onMounted } from "vue";
200
 import { ElCarousel, ElCarouselItem } from "element-plus";
117
 import { ElCarousel, ElCarouselItem } from "element-plus";
201
 import "vue3-video-play/dist/style.css";
118
 import "vue3-video-play/dist/style.css";
@@ -216,7 +133,14 @@ export default {
216
     VideoJs,
133
     VideoJs,
217
   },
134
   },
218
   setup() {
135
   setup() {
219
-    onMounted(() => {});
136
+    onMounted(() => {
137
+
138
+      setInterval(() => {
139
+        getDeviceData();
140
+      }, 30000);
141
+
142
+
143
+    });
220
 
144
 
221
     const data = reactive({
145
     const data = reactive({
222
       videoSrc:
146
       videoSrc:
@@ -442,7 +366,7 @@ export default {
442
 <style scoped lang="scss">
366
 <style scoped lang="scss">
443
 @import "../assets/css/right.scss";
367
 @import "../assets/css/right.scss";
444
 </style>
368
 </style>
445
-<style lang="scss" >
369
+<style lang="scss">
446
 .videoDialog {
370
 .videoDialog {
447
   .el-dialog__header {
371
   .el-dialog__header {
448
     height: 49px;
372
     height: 49px;
@@ -471,6 +395,7 @@ export default {
471
     padding: 0 !important;
395
     padding: 0 !important;
472
   }
396
   }
473
 }
397
 }
398
+
474
 .deviceDialog {
399
 .deviceDialog {
475
   border-radius: 4px 4px 0px 0px;
400
   border-radius: 4px 4px 0px 0px;
476
 
401
 
@@ -499,16 +424,19 @@ export default {
499
       }
424
       }
500
     }
425
     }
501
   }
426
   }
427
+
502
   .el-dialog__body {
428
   .el-dialog__body {
503
     // padding: 10px !important;
429
     // padding: 10px !important;
504
     // background-color: rgba(0, 0, 0, 0.5) !important;
430
     // background-color: rgba(0, 0, 0, 0.5) !important;
505
     background: rgba(6, 22, 30, 0.48) !important;
431
     background: rgba(6, 22, 30, 0.48) !important;
506
-    
507
 
432
 
508
-    padding:8px 10px;
433
+
434
+    padding: 8px 10px;
435
+
509
     .el-table {
436
     .el-table {
510
       --el-table-border-color: #253f48;
437
       --el-table-border-color: #253f48;
511
       --el-table-row-hover-bg-color: rgba(0, 0, 0, 0.3);
438
       --el-table-row-hover-bg-color: rgba(0, 0, 0, 0.3);
439
+
512
       .normal {
440
       .normal {
513
         text-align: center;
441
         text-align: center;
514
         /* text/pc/02-55-Regular */
442
         /* text/pc/02-55-Regular */
@@ -520,6 +448,7 @@ export default {
520
         display: flex;
448
         display: flex;
521
         justify-content: center;
449
         justify-content: center;
522
         align-items: center;
450
         align-items: center;
451
+
523
         div {
452
         div {
524
           width: 50px;
453
           width: 50px;
525
           height: 26px;
454
           height: 26px;
@@ -532,6 +461,7 @@ export default {
532
           // padding: 4px 6px;
461
           // padding: 4px 6px;
533
         }
462
         }
534
       }
463
       }
464
+
535
       .error {
465
       .error {
536
         text-align: center;
466
         text-align: center;
537
         /* text/pc/02-55-Regular */
467
         /* text/pc/02-55-Regular */
@@ -543,6 +473,7 @@ export default {
543
         display: flex;
473
         display: flex;
544
         justify-content: center;
474
         justify-content: center;
545
         align-items: center;
475
         align-items: center;
476
+
546
         div {
477
         div {
547
           width: 50px;
478
           width: 50px;
548
           height: 26px;
479
           height: 26px;
@@ -556,18 +487,22 @@ export default {
556
         }
487
         }
557
       }
488
       }
558
     }
489
     }
490
+
559
     .el-table th.el-table__cell {
491
     .el-table th.el-table__cell {
560
       background: rgba(6, 22, 30, 0.48) !important;
492
       background: rgba(6, 22, 30, 0.48) !important;
561
-    
493
+
562
     }
494
     }
495
+
563
     .el-table tr {
496
     .el-table tr {
564
       background: rgba(6, 22, 30, 0.48) !important;
497
       background: rgba(6, 22, 30, 0.48) !important;
565
 
498
 
566
     }
499
     }
500
+
567
     .el-table thead {
501
     .el-table thead {
568
       background: rgba(6, 22, 30, 0.48) !important;
502
       background: rgba(6, 22, 30, 0.48) !important;
569
 
503
 
570
     }
504
     }
505
+
571
     .el-table td.el-table__cell,
506
     .el-table td.el-table__cell,
572
     .el-table th.el-table__cell.is-leaf {
507
     .el-table th.el-table__cell.is-leaf {
573
       border-color: #253f48;
508
       border-color: #253f48;
@@ -604,6 +539,7 @@ export default {
604
     padding: 10px !important;
539
     padding: 10px !important;
605
     background: rgba(6, 22, 30, 0.85) !important;
540
     background: rgba(6, 22, 30, 0.85) !important;
606
     bortder-radius: 4px !important;
541
     bortder-radius: 4px !important;
542
+
607
     .details-container {
543
     .details-container {
608
       color: #fff;
544
       color: #fff;
609
 
545
 
@@ -625,6 +561,7 @@ export default {
625
 .el-tag .el-tag--success {
561
 .el-tag .el-tag--success {
626
   --el-tag-text-color: #000;
562
   --el-tag-text-color: #000;
627
 }
563
 }
564
+
628
 .d-player-video {
565
 .d-player-video {
629
   display: flex;
566
   display: flex;
630
 }
567
 }