Browse Source

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 1 year ago
parent
commit
a7e163651d

+ 6 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -7647,6 +7647,7 @@ const LANG_EN_US = {
             title: 'Device Statistics',
             deviceTotal: 'Total Devices',
             deviceOnline: 'Used Devices',
+            numAndproportion: 'Quantity and Proportion',
         },
         lessons: {
             title: 'Lesson and Application History Chart',
@@ -7662,6 +7663,11 @@ const LANG_EN_US = {
             task: 'Task',
             differentiation: 'Differentiated',
             examination: 'Assessment',
+        },
+        basicsChat: {
+            title: 'Basic data',
+            roomnum: 'Classrooms',
+            teachnum: 'Teachers',
         }
     },
     areaIot: {

+ 7 - 1
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -3731,7 +3731,7 @@ const LANG_ZH_CN = {
             dashTitle: '选择需要查看的数据看板',
             schoolSummary: '展现学校信息、教学资源和课程动态,学校整体风貌,方便学校领导掌握学校情况',
             teacherSummary: '展示智慧课堂和教学法应用数据情况,关注教学质量与成果,助力学生全面发展',
-            studentSummary: '展示学生五育(德、智、体、美、劳)全面发展,传播优良校风,培育健全人格',
+            studentSummary: '采用系统工具赋能自动采集学生数据,以综合素养及课程标准为导向,实现立德树人,科学评价目标。',
             iotSummary: '统计由智慧教室物联网自动汇总本校的智慧课堂使用数据,且不限于IES云课程',
             cols: '显示列',
             title: '校园大数据',
@@ -7648,6 +7648,7 @@ const LANG_ZH_CN = {
             title: '设备统计',
             deviceTotal: '总设备数',
             deviceOnline: '总上线数',
+            numAndproportion:'数量与占比'
         },
         lessons: {
             title: '课堂及历程统计',
@@ -7663,6 +7664,11 @@ const LANG_ZH_CN = {
             task: '任务型态',
             differentiation: '差异化型态',
             examination: '测验型态',
+        },
+        basicsChat: {
+            title: '基础数据',
+            roomnum: '教室数',
+            teachnum: '教师数',
         }
     },
     //学区iot

+ 6 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -7648,6 +7648,7 @@ const LANG_ZH_TW = {
             title: '裝置統計',
             deviceTotal: '總裝置數',
             deviceOnline: '上線數',
+            numAndproportion: '數量與佔比',
         },
         lessons: {
             title: '課堂與應用歷程統計',
@@ -7663,6 +7664,11 @@ const LANG_ZH_TW = {
             task: '任務型態',
             differentiation: '差異化型態',
             examination: '測驗型態',
+        },
+        basicsChat: {
+            title: '基礎資料',
+            roomnum: '教室數',
+            teachnum: '教師數',
         }
     },
     areaIot: {

+ 67 - 13
TEAMModelOS/ClientApp/src/view/iot/areaiot.vue

@@ -123,7 +123,7 @@
                     </dv-border-box-11>
                 </div>
                 <div class="restsbox-right">
-                    <dv-border-box-11 :title="$t('schoolIot.device.title')">
+                    <dv-border-box-11 title="数量与占比">
                         <!--设备统计-->
                         <!-- <div class="right-box">
                             <div class="right-box-left">
@@ -137,6 +137,9 @@
                             </div>
                         </div> -->
                          <!--设备统计 end-->
+                         <div class="total-solution">
+                            <Bar title="学期" :cdata="bars"></Bar>
+                         </div>
                     </dv-border-box-11>    
                 </div>
              </div>
@@ -147,7 +150,7 @@
                     <dv-border-box-12>
                         <div class="innerbox">
                             <p class="boxtitles">
-                                <span>{{$t('schoolIot.lessons.title')}}</span>
+                                <span>基础数据</span>
                                 <dv-decoration-3 style="width:200px;height:20px;"/>
                             </p>
                             <div class="innerbox-inside">
@@ -163,7 +166,7 @@
                                 <div class="data-left">
                                     <BaseCircle  circleId="webirs" chatName="WebIRS" :percent="40" subTitle="45" totalNum="77"></BaseCircle>
                                 </div> -->
-                                <barandLine :baldata="baldatas"></barandLine>
+                                <specialBarline  :basics="basicsData"></specialBarline>
                             </div>
                             <!-- <dv-decoration-2 :reverse="true" style="width:5px;height:95%;" :dur="5" /> -->
                             <!-- <div class="data-right">
@@ -178,7 +181,7 @@
                     </dv-border-box-12>    
                 </div>
                 <div class="right-integration">
-                    <div class="bottombox-right">
+                    <div class="bottombox-right ranks">
                         <dv-border-box-12>
                             <div class="innerbox">
                                 <p class="boxtitles">
@@ -196,11 +199,12 @@
                         <dv-border-box-12>
                             <div class="innerbox">
                                 <p class="boxtitles">
-                                    <span>{{$t('schoolIot.morphologyClass.title')}}</span>
+                                    <span>{{$t('schoolIot.lessons.title')}}</span>
                                     <dv-decoration-3 style="width:200px;height:20px;"/>
                                 </p>
                                 <div class="barbox">
-                                    <Bar title="学期" :cdata="bars"></Bar>
+                                    <!-- <specialBarline  :basics="basicsData"></specialBarline> -->
+                                    <barandLine :baldata="baldatas"></barandLine>
                                 </div>
                             </div>
                         </dv-border-box-12>    
@@ -220,6 +224,7 @@ import YPie from './echarts/pie/index'
 import Bar from './echarts/bar/bar'
 import BaseCircle from "./echarts/circle/index";
 import barandLine from './echarts/barandLine/barandLine'
+import specialBarline from './echarts/barandLine/specialBarline.vue';
 export default {
    name:'areaiot',
    components: {
@@ -228,7 +233,8 @@ export default {
     YPie,
     Bar,
     BaseCircle,
-    barandLine
+    barandLine,
+    specialBarline
   },
    data(){
     return{
@@ -315,6 +321,15 @@ export default {
         },
         schoolList: [],
         baldatas: [],
+        basicsData:{
+         rooms:[],
+         teachs:[],
+         students:[],
+         classInfo:[],
+         classTimes:[],
+         classStudenttimes:[],
+         weekNums:0,
+      },
     }
    },
     mounted() {
@@ -464,6 +479,35 @@ export default {
          newArrs.data=newArr
         //  this.config.data = newArr
          this.config = newArrs
+         //处理基础数据
+         let basicsTotal=[]
+          for (let i = 1; i <= weekNum; i++){
+            basicsTotal.push({week:i,room:0,teach:0,student:0,class:0,classTime:0,classStudenttime:0,deviceList:[],tmidList:[]})
+          }
+          res.iotData.forEach((item)=>{
+            let times = new Date(item.year + '-' + item.month + '-' + item.day)
+            let returnWeek = this.calculateWeekNumber(startime, times)
+            let reresultIndex = basicsTotal.findIndex((item) => { return item.week === returnWeek })
+            item.deviceList.forEach((itemA)=>{ basicsTotal[reresultIndex].deviceList.push(itemA)})
+            item.tmidList.forEach((itemS)=>{basicsTotal[reresultIndex].tmidList.push(itemS)})
+            basicsTotal[reresultIndex].student +=item.stuShow
+            basicsTotal[reresultIndex].class +=item.lessonRecord
+            basicsTotal[reresultIndex].classTime +=item.lessonLengMin
+            basicsTotal[reresultIndex].classStudenttime +=item.stuLessonLengMin
+          })
+          basicsTotal.forEach((item)=>{
+            item.deviceList=[...new Set(item.deviceList)]
+            item.room=item.deviceList.length
+            item.tmidList=[...new Set(item.tmidList)]
+            item.teach=item.tmidList.length
+          })
+           this.basicsData.rooms= basicsTotal.map(item =>item.room)
+           this.basicsData.teachs=basicsTotal.map(item=>item.teach)
+           this.basicsData.students=basicsTotal.map(item=>item.student)
+           this.basicsData.classInfo=basicsTotal.map(item=>item.class)
+           this.basicsData.classTimes=basicsTotal.map(item=>item.classTime)
+           this.basicsData.classStudenttimes=basicsTotal.map(item=>item.classStudenttime)
+           this.basicsData.weekNums=this.basicsData.rooms.length
          this.loading=false
       })
      },
@@ -679,10 +723,10 @@ export default {
     justify-content: space-between;
 }
 .restsbox-left{
-    width:100%;
+    width:50%;
 }
 .restsbox-right{
-    width:0%;
+    width:50%;
 }
 .left-item{
   width: 21%;
@@ -692,7 +736,7 @@ export default {
   align-items: center;
   border-radius: 5px;
   background-color: rgba(19, 25, 47, 0.6);
-  margin: 4% 2% 1% 2%;
+  margin: 8% 2% 1% 2%;
 }
 .item-img {
   width: 30%;
@@ -757,7 +801,7 @@ export default {
     height:50vh;
 }
 .bottombox-left{
-    width:55%;
+    width:50%;
     display: flex;
 }
 .innerbox{
@@ -777,7 +821,7 @@ export default {
 }
 .bottombox-right{
     width:100%;
-    height:50%;
+    height:60%;
 }
 .data-left,.data-right{
     width:50%;
@@ -842,7 +886,7 @@ export default {
     line-height: 30px !important;
 }
 .right-integration{
-    width:45%;
+    width:50%;
     display: flex;
     flex-wrap: wrap;
 }
@@ -860,6 +904,16 @@ export default {
 .item-nums-special p .timetag{
     margin:0px 10px;
 }
+.total-solution{
+    width:100%;
+    height:73%;
+    margin:0% 2%;
+    background-color: rgba(19, 25, 47, 0.6);
+    margin-top:5%;
+}
+.ranks{
+    height:40% !important;
+}
 </style>
 <style>
 .schooliotbox .topbox  .border-box-content,.schooliotbox .restsbox .border-box-content{

+ 1 - 1
TEAMModelOS/ClientApp/src/view/iot/echarts/bar/bar.vue

@@ -146,7 +146,7 @@
 							top:'15%',
 							left:'7%',
 							right:'3%',
-							bottom:'8%'
+							bottom:'11%'
 						},
 						toolbox: {
 							show: false

+ 15 - 9
TEAMModelOS/ClientApp/src/view/iot/echarts/barandLine/specialBarline.vue

@@ -135,7 +135,7 @@
               textStyle: {
                 color: '#90979c',
               },
-              data: ['教室数','教师数','学生参与人数','课堂总数','课堂总时数','学生参与总时数']
+              data: [this.$t('schoolIot.basicsChat.roomnum'),this.$t('schoolIot.basicsChat.teachnum'),this.$t('schoolIot.basics.studentnums'),this.$t('schoolIot.basics.classroomTotal'),this.$t('schoolIot.basics.classroomTime'),this.$t('schoolIot.basics.studentTime')]
             },
             calculable: true,
             xAxis: [{
@@ -232,7 +232,8 @@
             }],
             series: [
             {
-                name:'教室数',
+                //教室数
+                name:this.$t('schoolIot.basicsChat.roomnum'),
                 type:'bar',
                 barWidth: 10,
                 symbol: 'circle',
@@ -253,7 +254,8 @@
                 data:this.trendData.rooms
             },
             {
-                name:'教师数',
+                //教师数
+                name:this.$t('schoolIot.basicsChat.teachnum'),
                 type:'bar',
                 barWidth: 10,
                 symbol: 'circle',
@@ -275,7 +277,8 @@
                 data:this.transferJson.rooms
             },
             {
-                name:'学生参与人数',
+                //学生参与人次
+                name:this.$t('schoolIot.basics.studentnums'),
                 type:'bar',
                 // stack: '参与人数',
                 barWidth: 10,
@@ -297,7 +300,8 @@
                 data:this.transferJson.students
             },
             {
-                name:'课堂总数',
+                //课堂总数
+                name:this.$t('schoolIot.basics.classroomTotal'),
                 type:'bar',
                 // stack: '参与人数',
                 barWidth: 10,
@@ -318,8 +322,9 @@
                 },
                 data:this.transferJson.class
             },
-            { //作品数量
-            name: '课堂总时数',
+            { 
+            //课堂总时数
+            name:this.$t('schoolIot.basics.classroomTime'),
             type: 'line',
             yAxisIndex: 1,
             // smooth: true, //是否平滑曲线显示
@@ -366,8 +371,9 @@
             },
             data:this.transferJson.classtimes
             },
-            { //作品数量
-            name: '学生参与总时数',
+            { 
+            //学生参与总时数
+            name:this.$t('schoolIot.basics.studentTime'),
             type: 'line',
             yAxisIndex: 1,
             // smooth: true, //是否平滑曲线显示

+ 3 - 4
TEAMModelOS/ClientApp/src/view/iot/schooliot.vue

@@ -94,7 +94,7 @@
                     </dv-border-box-11>
                 </div>
                 <div class="restsbox-right">
-                    <dv-border-box-11 title="数量与占比">
+                    <dv-border-box-11 :title="$t('schoolIot.device.numAndproportion')">
                         <div class="total-solution">
                             <Bar title="学期" :cdata="bars"></Bar>
                         </div>
@@ -118,11 +118,10 @@
              <!--bottom-->
              <div class="bottombox">
                 <div class="bottombox-left">
-                      
                     <dv-border-box-12>
                         <div class="innerbox">
                             <p class="boxtitles">
-                                <span>基础数据</span>
+                                <span>{{$t('schoolIot.basicsChat.title')}}</span>
                                 <dv-decoration-3 style="width:200px;height:20px;"/>
                             </p>
                             <div class="barbox">
@@ -444,7 +443,7 @@ export default {
      },
      goBack() {
       this.$tools.exitFullscreen()
-      this.$router.push('/dashCenter')
+      this.$router.push('/home/homePage')
     },
    }
 }