|
@@ -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>
|