|
@@ -46,16 +46,79 @@
|
46
|
46
|
</div>
|
47
|
47
|
<div class="left-center">
|
48
|
48
|
<div class="title" :style="{ background: `url(${frame})` }">
|
49
|
|
- <div class="text">本周课程统计</div>
|
|
49
|
+ <div class="text">教室统计</div>
|
50
|
50
|
</div>
|
51
|
51
|
<div class="content">
|
52
|
|
- <div class="count" v-for="(item, index) in classCount" :key="index">
|
|
52
|
+ <div class="content-item">
|
|
53
|
+ <div class="content-item-header">
|
|
54
|
+ <div class="item-header-title">多媒体教室总数</div>
|
|
55
|
+ <div class="item-header-total-num">
|
|
56
|
+ <countTo :startVal="0" :endVal="summaryStatistic.mdeiaClassroomCount" :decimals="0" :duration="3000">
|
|
57
|
+ </countTo>
|
|
58
|
+ <span>间</span>
|
|
59
|
+ </div>
|
|
60
|
+ </div>
|
|
61
|
+ <div class="content-item-body">
|
|
62
|
+ <img class="body-left-icon" src="/public/img/duomeiti-left-icon.png" alt="" srcset="" />
|
|
63
|
+ <div class="body-right-text">
|
|
64
|
+ <div class="total-box">
|
|
65
|
+ <div>总物联数量</div>
|
|
66
|
+ <div class="num1">
|
|
67
|
+ <countTo :startVal="0" :endVal="summaryStatistic.mediaClassroomDeviceCount" :decimals="0"
|
|
68
|
+ :duration="3000">
|
|
69
|
+ </countTo><span>个</span>
|
|
70
|
+ </div>
|
|
71
|
+ </div>
|
|
72
|
+ <div class="online-box">
|
|
73
|
+ <div>在线物联数量</div>
|
|
74
|
+ <div class="num2">
|
|
75
|
+ <countTo :startVal="0" :endVal="summaryStatistic.mediaClassroomOnlineDeviceCount" :decimals="0"
|
|
76
|
+ :duration="3000">
|
|
77
|
+ </countTo><span>个</span>
|
|
78
|
+ </div>
|
|
79
|
+ </div>
|
|
80
|
+ </div>
|
|
81
|
+
|
|
82
|
+ </div>
|
|
83
|
+ </div>
|
|
84
|
+ <div class="content-item">
|
|
85
|
+ <div class="content-item-header">
|
|
86
|
+ <div class="item-header-title">智慧教室总数</div>
|
|
87
|
+ <div class="item-header-total-num">
|
|
88
|
+ <countTo :startVal="0" :endVal="summaryStatistic.wiseClassroomCount" :decimals="0" :duration="3000">
|
|
89
|
+ </countTo><span>间</span>
|
|
90
|
+ </div>
|
|
91
|
+ </div>
|
|
92
|
+ <div class="content-item-body">
|
|
93
|
+ <img class="body-left-icon" src="/public/img/zhihuijiaoshi-left-icon.png" alt="" srcset="" />
|
|
94
|
+ <div class="body-right-text">
|
|
95
|
+ <div class="total-box">
|
|
96
|
+ <div>总物联数量</div>
|
|
97
|
+ <div class="num1">
|
|
98
|
+ <countTo :startVal="0" :endVal="summaryStatistic.wiseClassroomDeviceCount" :decimals="0"
|
|
99
|
+ :duration="3000">
|
|
100
|
+ </countTo><span>个</span>
|
|
101
|
+ </div>
|
|
102
|
+ </div>
|
|
103
|
+ <div class="online-box">
|
|
104
|
+ <div>在线物联数量</div>
|
|
105
|
+ <div class="num2">
|
|
106
|
+ <countTo :startVal="0" :endVal="summaryStatistic.wiseClassroomOnlineDeviceCount" :decimals="0"
|
|
107
|
+ :duration="3000">
|
|
108
|
+ </countTo><span>个</span>
|
|
109
|
+ </div>
|
|
110
|
+ </div>
|
|
111
|
+ </div>
|
|
112
|
+
|
|
113
|
+ </div>
|
|
114
|
+ </div>
|
|
115
|
+ <!-- <div class="count" v-for="(item, index) in classCount" :key="index">
|
53
|
116
|
<CircleProgress :target-value="item.number" :color="item.color" :text="item.text" :index="index"
|
54
|
117
|
text-position="bottom">
|
55
|
118
|
<img :src="leftimg + item.imgnumber + '.png'" alt="" />
|
56
|
119
|
</CircleProgress>
|
57
|
120
|
<div class="text">{{ item.text }}</div>
|
58
|
|
- </div>
|
|
121
|
+ </div> -->
|
59
|
122
|
</div>
|
60
|
123
|
</div>
|
61
|
124
|
|
|
@@ -275,7 +338,7 @@ import {
|
275
|
338
|
ElIcon,
|
276
|
339
|
} from "element-plus";
|
277
|
340
|
import { Search, ArrowDown } from "@element-plus/icons-vue";
|
278
|
|
-import { getClass, classSelections, queryClassroom } from "../request/api";
|
|
341
|
+import { getClass, classSelections, queryClassroom, summaryStatisticV3Api } from "../request/api";
|
279
|
342
|
import CircleProgress from "./CircleProgress.vue";
|
280
|
343
|
|
281
|
344
|
import {
|
|
@@ -288,6 +351,9 @@ import Scroll from "./ScrollView.vue";
|
288
|
351
|
// import { callUIInteraction } from "../webrtcVideo";
|
289
|
352
|
import Tag from "./Tag.vue";
|
290
|
353
|
|
|
354
|
+import axios from 'axios'
|
|
355
|
+import { CountTo } from "vue3-count-to";
|
|
356
|
+
|
291
|
357
|
|
292
|
358
|
export default {
|
293
|
359
|
name: "Histogram",
|
|
@@ -299,7 +365,7 @@ export default {
|
299
|
365
|
ElCarouselItem,
|
300
|
366
|
CircleProgress,
|
301
|
367
|
Tag,
|
302
|
|
-
|
|
368
|
+ CountTo,
|
303
|
369
|
Vue3SeamlessScroll,
|
304
|
370
|
VerticalScroll,
|
305
|
371
|
Scroll,
|
|
@@ -632,6 +698,8 @@ export default {
|
632
|
698
|
getClassSelections();
|
633
|
699
|
//获取教室列表数据
|
634
|
700
|
getClassRoomList();
|
|
701
|
+ getSummaryStatisticV3()
|
|
702
|
+
|
635
|
703
|
}, 30000);
|
636
|
704
|
};
|
637
|
705
|
onMounted(() => {
|
|
@@ -640,6 +708,9 @@ export default {
|
640
|
708
|
getClassSelections();
|
641
|
709
|
//获取教室列表数据
|
642
|
710
|
getClassRoomList();
|
|
711
|
+ // 获取教师统计数据
|
|
712
|
+ getSummaryStatisticV3()
|
|
713
|
+ summaryStatisticV3Api
|
643
|
714
|
scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
|
644
|
715
|
|
645
|
716
|
clearTimeoutTimer();//清除定时器
|
|
@@ -648,6 +719,22 @@ export default {
|
648
|
719
|
|
649
|
720
|
|
650
|
721
|
});
|
|
722
|
+ let summaryStatistic = ref({
|
|
723
|
+ mdeiaClassroomCount: 0,
|
|
724
|
+ mediaClassroomOnlineDeviceCount: 0,
|
|
725
|
+ mediaClassroomDeviceCount: 0,
|
|
726
|
+ wiseClassroomCount: 0,
|
|
727
|
+ wiseClassroomDeviceCount: 0,
|
|
728
|
+ wiseClassroomOnlineDeviceCount: 0
|
|
729
|
+ });
|
|
730
|
+ const getSummaryStatisticV3 = () => {
|
|
731
|
+ axios.get("https://weizhi.huanghuai.edu.cn/ioc-server/summaryStatisticV3/1").then(res => {
|
|
732
|
+ console.log("教室统计数据s", res)
|
|
733
|
+ if (res.data.code == 200) {
|
|
734
|
+ summaryStatistic.value = res.data.data.wiseClassroom
|
|
735
|
+ }
|
|
736
|
+ })
|
|
737
|
+ }
|
651
|
738
|
|
652
|
739
|
onBeforeUnmount(() => {
|
653
|
740
|
clearTimeout(timer.value);
|
|
@@ -656,46 +743,8 @@ export default {
|
656
|
743
|
clearTimeout(timer.value);
|
657
|
744
|
});
|
658
|
745
|
|
659
|
|
- function testMove() {
|
660
|
|
- clearTimeout(timer.value);
|
661
|
|
- }
|
662
|
|
- function MarqueeTest() {
|
663
|
|
- return;
|
664
|
|
- let test1 = testMain.value;
|
665
|
|
-
|
666
|
|
- //判断组件是否渲染完成
|
667
|
|
- if (test1.offsetHeight == 0) {
|
668
|
|
- test1 = testMain.value;
|
669
|
|
- } else {
|
670
|
|
- //如果列表数量过少不进行滚动
|
671
|
|
- // console.log("test1", test1.childNodes)
|
672
|
|
- if (test1.childNodes.length < 6) {
|
673
|
|
- clearTimeout(timer.value);
|
674
|
|
- return;
|
675
|
|
- }
|
676
|
|
- //组件进行滚动
|
677
|
|
- test1.scrollTop += 1;
|
678
|
|
-
|
679
|
|
- //判断滚动条是否滚动到底部
|
680
|
|
- if (test1.scrollTop == test1.scrollHeight - test1.clientHeight) {
|
681
|
|
- //获取组件第一个节点
|
682
|
|
- let a = test1.childNodes[0];
|
683
|
|
- //删除节点
|
684
|
|
- test1.removeChild(a);
|
685
|
|
- //将该节点拼接到组件最后
|
686
|
|
- test1.append(a);
|
687
|
|
- }
|
688
|
|
- }
|
689
|
|
- }
|
690
|
746
|
|
691
|
|
- // 定时刷新教师统计数据
|
692
|
|
- let classRoomInterval = ref(null);
|
693
|
|
- const starttimeInterval = () => {
|
694
|
|
- clearTimeout(classRoomInterval.value);
|
695
|
|
- classRoomInterval.value = setInterval(() => {
|
696
|
|
- getClassData();
|
697
|
|
- }, 5000);
|
698
|
|
- };
|
|
747
|
+
|
699
|
748
|
|
700
|
749
|
// 占用教室数量
|
701
|
750
|
const occupiedClassroomsCount = computed(() => {
|
|
@@ -710,7 +759,7 @@ export default {
|
710
|
759
|
return (((occupied / total) * 100).toFixed(2)) == 'NaN' ? 0 : (((occupied / total) * 100).toFixed(2));
|
711
|
760
|
});
|
712
|
761
|
|
713
|
|
- // 获取教师下拉选择
|
|
762
|
+ // 获取教室下拉选择
|
714
|
763
|
let buildings = ref({});
|
715
|
764
|
let categoryType = ref({});
|
716
|
765
|
let leafs = ref({});
|
|
@@ -806,7 +855,6 @@ export default {
|
806
|
855
|
classRoom,
|
807
|
856
|
interDevice,
|
808
|
857
|
handleRoom,
|
809
|
|
- testMove,
|
810
|
858
|
testMain,
|
811
|
859
|
popoverRef,
|
812
|
860
|
classRoomCount,
|
|
@@ -848,7 +896,8 @@ export default {
|
848
|
896
|
scrollContainerHeight,
|
849
|
897
|
scrollContainerRef,
|
850
|
898
|
noData,
|
851
|
|
- isShhow
|
|
899
|
+ isShhow,
|
|
900
|
+ summaryStatistic
|
852
|
901
|
};
|
853
|
902
|
},
|
854
|
903
|
};
|