Browse Source

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

XW 1 year ago
parent
commit
595f397180

+ 30 - 3
TEAMModelBI/ClientApp/src/view/areaServe/setthird.vue

@@ -5,6 +5,7 @@
     </div>
     <div class="setbox-content">
       <el-tabs v-model="activeName" class="demo-tabs">
+        <el-button type="danger"  class="dele-enterprise" @click="deleEnterprisea()"><el-icon><DeleteFilled /></el-icon>删除企业</el-button>
         <el-tab-pane label="基础信息" name="first">
           <div class="set-basics">
             <p class="set-basics-title">
@@ -276,7 +277,7 @@
 <script>
 import { ref, reactive, getCurrentInstance, watch } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { Search } from '@element-plus/icons-vue'
+import { Search,DeleteFilled } from '@element-plus/icons-vue'
 import useClipboard from 'vue-clipboard3'
 export default {
   props: {
@@ -285,7 +286,8 @@ export default {
     }
   },
   components: {
-    Search
+    Search,
+    DeleteFilled
   },
   setup (props, context) {
     console.log(props, context, '父传值')
@@ -617,6 +619,24 @@ export default {
         console.error(e)
       }
     }
+    //删除企业
+    function deleEnterprisea() {
+      ElMessageBox.confirm(
+        '确认删除当前企业吗?',
+        '注意:',
+        {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }
+      )
+        .then(() => {
+          ElMessage({
+            type: 'success',
+            message: 'Delete completed',
+          })
+        })
+     }
     watch(
       props,
       (newsProps) => {
@@ -684,7 +704,8 @@ export default {
       removeUser,
       removeUserarr,
       removeUserList,
-      addschoolAdmin
+      addschoolAdmin,
+      deleEnterprisea
     }
   },
 }
@@ -702,6 +723,12 @@ export default {
 }
 .setbox-content {
   width: 100%;
+  position:relative
+}
+.dele-enterprise{
+  position:absolute;
+  top:1%;
+  right:1%;
 }
 .set-basics {
   width: 100%;

+ 14 - 1
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -5735,6 +5735,8 @@ const LANG_EN_US = {
             trainSystem: 'Research Platform',
             artExam: 'Assessment Activity',
             artExam1: 'Assessment Evaluation',
+            iotBoard: 'Smart Classes IoT Dashboard',
+            areaIotboard: 'Smart Classes IoT Dashboard'
         },
         compt: {
             cusWare: 'Teaching Material',
@@ -7420,7 +7422,7 @@ const LANG_EN_US = {
         subjectTitle: 'Subject Distribution',
     },
     schoolIot: {
-        title: 'IoT Based Statistics',
+        title: 'Auto Collection (IoT) Dashboard of Scholl Smart Classes',
         basics: {
             classnums: 'Used Classrooms',
             classTotals: 'Activate Licenses',
@@ -7460,4 +7462,15 @@ const LANG_EN_US = {
             examination: 'Assessment',
         }
     },
+    areaIot: {
+        title: 'Auto Collection (IoT) Dashboard of Distrcit Smart Classes',
+        classrank: {
+            title: 'Lesson Record Statistics',
+            rank: 'Rank',
+            schoolName: 'School',
+            teachNum: 'Teachers',
+            classNum: 'Classrooms',
+            totalTime: 'Total Time'
+        }
+    }
 }

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

@@ -5734,6 +5734,8 @@ const LANG_ZH_CN = {
             trainSystem: '研修平台',
             artExam: '评测活动',
             artExam1: '评测考核',
+            iotBoard: 'IoT智慧教室看板',
+            areaIotboard: 'IoT智慧教室看板'
         },
         compt: {
             cusWare: '课件',
@@ -7410,7 +7412,7 @@ const LANG_ZH_CN = {
     },
     //学校iot数据看板
     schoolIot: {
-        title: 'iot数据看板',
+        title: '自动化(IoT)学校智慧教室统计看板',
         basics: {
             classnums: '教室数',
             classTotals: '授权总数',
@@ -7450,4 +7452,16 @@ const LANG_ZH_CN = {
             examination:'测验型态',
         }
     },
+    //学区iot
+    areaIot: {
+        title: '自动化(IoT)学区智慧教室统计看板',
+        classrank: {
+            title: '课堂记录统计',
+            rank: '排名',
+            schoolName: '学校',
+            teachNum: '教师数',
+            classNum: '教室数',
+            totalTime: '总时间数'
+        }
+    }
 }

+ 14 - 1
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -5735,6 +5735,8 @@ const LANG_ZH_TW = {
             trainSystem: '研習平臺',
             artExam: '評量活動',
             artExam1: '評量考核',
+            iotBoard: 'IoT智慧教室儀表',
+            areaIotboard: 'IoT智慧教室儀表'
         },
         compt: {
             cusWare: '教材',
@@ -7407,7 +7409,7 @@ const LANG_ZH_TW = {
         subjectTitle: '科目占比',
     },
     schoolIot: {
-        title: 'IoT統計表',
+        title: '自動化(IoT)學校智慧教室運用統計表',
         basics: {
             classnums: '使用教室數',
             classTotals: '啟用授權總數',
@@ -7447,4 +7449,15 @@ const LANG_ZH_TW = {
             examination: '測驗型態',
         }
     },
+    areaIot: {
+        title: '自動化(IoT)學區智慧教室運用統計儀表',
+        classrank: {
+            title: '課堂記錄統計',
+            rank: '排名',
+            schoolName: '學校',
+            teachNum: '教師數',
+            classNum: '教室數',
+            totalTime: '總時間數'
+        }
+    }
 }

+ 4 - 0
TEAMModelOS/ClientApp/src/api/iot.js

@@ -4,4 +4,8 @@ export default {
     getSchooliot:function(data){
         return post('/school/init/get-school-iot', data)
     },
+    //iot面板  学区
+    getAreaiot:function (data) {
+        return post('/school/init/get-area-iot',data)
+     }
 }

+ 2 - 1
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -634,9 +634,10 @@ export default {
               child: [],
               isShow: this.isGlobalSite,
             },
+            //iot
             {
               icon: "iconfont icon-wulianwang",
-              name: 'iot数据看板',
+              name: this.$t("system.menu.iotBoard"),
               router: "/schooliot",
               tag: "",
               role: "admin",

+ 11 - 5
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="main">
+  <div id="main" :style="{fontFamily:fontChange}">
     <Loading v-if="isLoading" :top="300"></Loading>
     <!-- 移动端显示 -->
     <!-- <div class="mobile-box" v-if="isMobile"></div> -->
@@ -93,7 +93,8 @@ export default {
       countDown: 5,
       add: [], //新增功能
       opt: [], //优化功能
-      bug: [] //bug
+      bug: [], //bug
+      fontChange:'Hm',
     }
   },
   created() {
@@ -395,6 +396,8 @@ export default {
 
       // }
     })
+    //处理变量
+   this.fontChange=localStorage.local ==='zh-tw' ? '"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif':localStorage.local ==='zh-cn' ? 'Hm':'Hm'   //7.18日  与杰哥讨论 cn使用Hm  TW使用微软雅黑
   },
   computed: {
     /* 判断是否加入学校 */
@@ -422,8 +425,8 @@ export default {
       return navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
     },
     curLang() {
-      return localStorage.getItem('local') || 'zh-cn'
-    }
+      return this.$store.state.studentWeb.lang
+    },
   },
   watch: {
     $route: {
@@ -449,7 +452,10 @@ export default {
     },
     isLoading(n, o) {
       console.error('loading变化', n, o)
-    }
+    },
+    curLang(value) {
+      this.fontChange=value ==='zh-tw' ? '"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif':value ==='zh-cn' ? 'Hm':'Hm'   //7.18日  与杰哥讨论 cn使用Hm  TW使用微软雅黑
+     }
   },
 }
 </script>

+ 11 - 11
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaLayout.vue

@@ -270,17 +270,17 @@ export default {
           isShow: !this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.$store.state.config.srvAdrType != 'product'
         },
         //学区iot
-        // {
-        //   icon: 'iconfont icon-iot',
-        //   name: '学区Iot看板',
-        //   router: '/area/areaiot',
-        //   tag: '',
-        //   role: '',
-        //   permission: '',
-        //   menuName: 'areaiot',
-        //   child: [],
-        //   isShow: !this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.$store.state.config.srvAdrType != 'product'
-        // },
+        {
+          icon: 'iconfont icon-iot',
+          name: this.$t('system.menu.areaIotboard'),
+          router: '/area/areaiot',
+          tag: '',
+          role: '',
+          permission: '',
+          menuName: 'areaiot',
+          child: [],
+          isShow: !this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.$store.state.config.srvAdrType != 'product'
+        },
         // 研修平台
         {
           icon: 'iconfont icon-basic-setting',

+ 178 - 41
TEAMModelOS/ClientApp/src/view/iot/areaiot.vue

@@ -1,6 +1,7 @@
 <template>
 <div class="schooliotbox">
     <div class="containerbox">
+      <dv-loading v-if="loading">{{ $t('researchCenter.dashboard.loading') }}</dv-loading>
         <!--header-->
             <!--title-->
             <div class="container-title">
@@ -8,7 +9,7 @@
                 <div class="title-center">
                     <dv-decoration-8 class="dv-dec-8" :color="['#568aea', '#000000']" />
                     <div class="title-text">
-                        <span class="title-textbox">{{$t('schoolIot.title')}}</span>
+                        <span class="title-textbox">{{$t('areaIot.title')}}</span>
                         <dv-decoration-6 class="dv-dec-6" :reverse="true" :color="['#50e3c2', '#67a1e5']" />
                     </div>
                     <dv-decoration-8 class="dv-dec-8" :reverse="true" :color="['#568aea', '#000000']" />
@@ -53,17 +54,17 @@
                         </p>
                         </div>
                         <div class="totalclass" v-show="item.key === 'roomnum' || item.key === 'teachnum' || item.key === 'studentnum'">
-                        <div v-if="item.key ==='roomnum'">
+                          <div v-if="item.key ==='roomnum'">
                             <p class="totalclass-total">{{$t('schoolIot.basics.classTotals')}}</p>
-                            <p class="totalclass-num">70</p>
+                            <p class="totalclass-num">{{item.total}}</p>
                         </div>
                         <div v-else-if="item.key ==='teachnum'">
                             <p class="totalclass-total">{{$t('schoolIot.basics.teachTotals')}}</p>
-                            <p class="totalclass-num">70</p>
+                            <p class="totalclass-num">{{item.total}}</p>
                         </div>    
                         <div v-else-if="item.key ==='studentnum'">
                             <p class="totalclass-total">{{$t('schoolIot.basics.studentTotals')}}</p>
-                            <p class="totalclass-num">70</p>
+                            <p class="totalclass-num">{{item.total}}</p>
                         </div>    
                     </div>
                     </div>
@@ -91,13 +92,13 @@
                         <div class="right-box">
                             <!-- <dv-scroll-board :config="config" style="width:100%;height:100%" /> -->
                             <div class="right-box-left">
-                                <BaseCircle  circleId="hiteach" chatName="HiTeach" :percent="45" subTitle="45" totalNum="158"></BaseCircle>
+                                <BaseCircle  circleId="hiteach" chatName="HiTeach" :percent="equipmentData.hiteachPercent" :subTitle="equipmentData.hiteachOnline" :totalNum="equipmentData.hiteachTotal"></BaseCircle>
                             </div>
                             <div class="right-box-left">
-                                <BaseCircle  circleId="hita" chatName="HiTA" :percent="20" subTitle="15" totalNum="60"></BaseCircle>
+                                <BaseCircle  circleId="hita" chatName="HiTA" :percent="equipmentData.hitaPercent" :subTitle="equipmentData.hitaOnline" :totalNum="equipmentData.hitaTotal"></BaseCircle>
                             </div>
                             <div class="right-box-left">
-                                <BaseCircle  circleId="hitachcc" chatName="HiTeach CC" :percent="10" subTitle="23" totalNum="0"></BaseCircle>
+                                <BaseCircle  circleId="hitachcc" chatName="HiTeach CC" :percent="equipmentData.ccPercent" :subTitle="equipmentData.ccOnline" totalNum="0"></BaseCircle>
                             </div>
                         </div>
                     </dv-border-box-11>    
@@ -126,7 +127,7 @@
                                 <div class="data-left">
                                     <BaseCircle  circleId="webirs" chatName="WebIRS" :percent="40" subTitle="45" totalNum="77"></BaseCircle>
                                 </div> -->
-                                <barandLine ></barandLine>
+                                <barandLine :baldata="baldatas"></barandLine>
                             </div>
                             <!-- <dv-decoration-2 :reverse="true" style="width:5px;height:95%;" :dur="5" /> -->
                             <!-- <div class="data-right">
@@ -145,7 +146,7 @@
                         <dv-border-box-12>
                             <div class="innerbox">
                                 <p class="boxtitles">
-                                    <span>课堂记录统计</span>
+                                    <span>{{$t('areaIot.classrank.title')}}</span>
                                     <dv-decoration-3 style="width:200px;height:20px;"/>
                                 </p>
                                 <div class="barbox">
@@ -163,7 +164,7 @@
                                     <dv-decoration-3 style="width:200px;height:20px;"/>
                                 </p>
                                 <div class="barbox">
-                                    <Bar title="学期" :pieData="bars"></Bar>
+                                    <Bar title="学期" :cdata="bars"></Bar>
                                 </div>
                             </div>
                         </dv-border-box-12>    
@@ -180,7 +181,7 @@
 import countTo from 'vue-count-to'
 import BasePie from '@/components/echart/pie/index'
 import YPie from './echarts/pie/index'
-import Bar from './echarts/bar/index'
+import Bar from './echarts/bar/bar'
 import BaseCircle from "./echarts/circle/index";
 import barandLine from './echarts/barandLine/barandLine'
 export default {
@@ -200,39 +201,34 @@ export default {
             month:null,
             week:null,
             day:null
-        },
+      },
+        loading:false,
         weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
         basicaList:[
         // { title: '学校简码', icon: '#icon-xuanzexuexiao-01', value: 'hbcn', key: 'code' },
-        { title: this.$t('schoolIot.basics.classnums'), icon: '#icon-shouhuifangzi', value: 65, key: 'roomnum' },
-        { title: this.$t('schoolIot.basics.teachnums'), icon: '#icon-jiaoshijie', value: 158, key: 'teachnum' },
-        { title: this.$t('schoolIot.basics.studentnums'), icon: '#icon-zongrenshu', value: 7603, key: 'studentnum' },
-        { title: this.$t('schoolIot.basics.studentTime'), icon: '#icon-_shijian_xiaoshuai', value: 450, key: 'participationnum' },
-        { title: this.$t('schoolIot.basics.classroomTotal'), icon: '#icon-ketang', value: 45, key: 'classnum' },
-        { title: this.$t('schoolIot.basics.classroomTime'), icon: '#icon--shijian ', value: 648, key: 'classtime' },
+        { title: this.$t('schoolIot.basics.classnums'), icon: '#icon-shouhuifangzi', value: 0, key: 'roomnum',total:0 },
+        { title: this.$t('schoolIot.basics.teachnums'), icon: '#icon-jiaoshijie', value: 0, key: 'teachnum' ,total:0 },
+        { title: this.$t('schoolIot.basics.studentnums'), icon: '#icon-zongrenshu', value: 0, key: 'studentnum' ,total:0 },
+        { title: this.$t('schoolIot.basics.studentTime'), icon: '#icon-_shijian_xiaoshuai', value: 0, key: 'participationnum' },
+        { title: this.$t('schoolIot.basics.classroomTotal'), icon: '#icon-ketang', value: 0, key: 'classnum' },
+        { title: this.$t('schoolIot.basics.classroomTime'), icon: '#icon--shijian ', value:0, key: 'classtime' },
         ],
         inuseList:[
-        { title: this.$t('schoolIot.classrooming.taskNums'), value: 15, icon: 'iconfont icon-renwu',src:require("@/assets/image/iot/task.png"),class: 'task', textClass: 'task-text' },
-        { title: this.$t('schoolIot.classrooming.productionNums'), value: 10, icon: 'iconfont icon-zuopinzhanshi',src:require("@/assets/image/iot/production.png"),class: 'accomplish', textClass: 'accomplish-text' },
-        { title: this.$t('schoolIot.classrooming.topicNums'), value: 22, icon: 'iconfont icon-xingbiaoti-',src:require("@/assets/image/iot/exam.png"),class: 'topic', textClass: 'topic-text' },
-        { title: this.$t('schoolIot.classrooming.interactionNums'), value: 58, icon: 'iconfont icon-hudongshequ',src:require("@/assets/image/iot/interact.png"),class: 'interaction', textClass: 'interaction-text' },
+        { title: this.$t('schoolIot.classrooming.taskNums'), value: 0, icon: 'iconfont icon-renwu',src:require("@/assets/image/iot/task.png"),class: 'task', textClass: 'task-text' },
+        { title: this.$t('schoolIot.classrooming.productionNums'), value: 0, icon: 'iconfont icon-zuopinzhanshi',src:require("@/assets/image/iot/production.png"),class: 'accomplish', textClass: 'accomplish-text' },
+        { title: this.$t('schoolIot.classrooming.topicNums'), value: 0, icon: 'iconfont icon-xingbiaoti-',src:require("@/assets/image/iot/exam.png"),class: 'topic', textClass: 'topic-text' },
+        { title: this.$t('schoolIot.classrooming.interactionNums'), value: 0, icon: 'iconfont icon-hudongshequ',src:require("@/assets/image/iot/interact.png"),class: 'interaction', textClass: 'interaction-text' },
         ],
         config:{
-            header: ['教师','学校','时间','科目'],
+            header: [this.$t('areaIot.classrank.schoolName'),this.$t('areaIot.classrank.teachNum'),this.$t('areaIot.classrank.classNum'),this.$t('areaIot.classrank.totalTime')],
             data: [
-               ['王老师','东城一小','72Min','语文'],
-               ['李老师','锦江四小','32Min','数学'],
-               ['金老师','川师附小','48Min','英语'],
-               ['周老师','川师附小','54Min','数学'],
-               ['郭老师','川师附小','22Min','音乐'],
-               ['秦老师','锦江外国语小学','18Min','美术'],
-               ['晓老师','锦江四小','72Min','英语'],
-               ['车老师','锦江外国语小学','32Min','数学'],
-               ['王老师','锦江外国语小学','48Min','英语'],
-               ['李老师','锦江四小','54Min','语文'],
+              //  ['王老师','东城一小','72Min','语文'],
+              //  ['李老师','锦江四小','32Min','数学'],
+              //  ['金老师','川师附小','48Min','英语'],
+              //  ['周老师','川师附小','54Min','数学'],
             ],
             index: true,
-            indexHeader:'排名',
+            indexHeader:this.$t('areaIot.classrank.rank'),
             // columnWidth: [200,200,200,200],
             align: ['center'],
             carousel: 'single',
@@ -267,9 +263,22 @@ export default {
         ],
         bars:{
             xdata:[this.$t('schoolIot.morphologyClass.cooperation'), this.$t('schoolIot.morphologyClass.interaction'), this.$t('schoolIot.morphologyClass.task'), this.$t('schoolIot.morphologyClass.differentiation'),  this.$t('schoolIot.morphologyClass.examination')],
-            value:[254, 3254, 1654, 2454, 757,]
+            value:[0, 0, 0, 0, 0,]
         },
-        locals:'',
+        locals: '',
+        //设备统计
+        equipmentData: {
+            hiteachTotal: "0",
+            hiteachOnline: "0",
+            hiteachPercent:0,
+            hitaTotal: "0",
+            hitaOnline: "0",
+            hitaPercent:0,
+            ccOnline: "0",
+            ccPercent:0,
+        },
+        schoolList: [],
+        baldatas: [],
     }
    },
    mounted(){
@@ -277,7 +286,8 @@ export default {
    },
    created(){
      this.locals=localStorage.local
-     console.log(this.locals,'语言')
+     console.log(this.locals, '语言')
+     this.areaInit()
    },
    computed: {
     schoolInfo() {
@@ -303,7 +313,133 @@ export default {
         this.times.year = this.$tools.formatTime(new Date(), 'yyyy-MM-dd')
         this.times.week = this.weekday[new Date().getDay()]
       }, 1000)
-    },
+     },
+    //获取数据
+     areaInit() {
+      let data = { areaId: sessionStorage.getItem('areaId') }
+      this.loading=true
+      //  this.$api.iot.getAreaiot(data).then((res) => {
+      //   console.log(res,'area back')
+      //  })
+       this.$api.areaOverview.getoneselfArea(data).then((res) => {
+        console.log(res,'为取学校code')
+        res.state === 200 ? (this.schoolList=res.schoolInfos,this.getAreaiots()):''
+      })
+     },
+     getAreaiots() {
+       let schoolcodeArr = []
+       this.schoolList.forEach((item) => {schoolcodeArr.push(item.id)})
+       let data = { schoolIds: schoolcodeArr }
+       this.$api.iot.getAreaiot(data).then((res) => {
+        console.log(res,'area iot back')
+          //header基础数据
+          let { classCnt, deviceAuthCnt,tmidCnt,teacherCnt, stuShow, studentCnt, stuLessonLengMin, lessonRecord, lessonLengMin } = res.area
+          this.basicaList[0].value = classCnt
+          this.basicaList[0].total = deviceAuthCnt
+          this.basicaList[1].value= tmidCnt
+          this.basicaList[1].total = teacherCnt
+          this.basicaList[2].value = stuShow
+          this.basicaList[2].total = studentCnt
+          this.basicaList[3].value = stuLessonLengMin
+          this.basicaList[4].value = lessonRecord
+          this.basicaList[5].value = lessonLengMin
+          //课中统计 和 设备统计
+          let { mission, missionFin, item, interact, htcDevTotalCnt, htcDevCnt, htaDevTotalCnt, htaDevCnt, htccDevCnt } = res.area
+          this.inuseList[0].value = mission
+          this.inuseList[1].value = missionFin
+          this.inuseList[2].value = item
+          this.inuseList[3].value = interact
+
+          this.equipmentData.hiteachTotal = htcDevTotalCnt.toString()
+          this.equipmentData.hiteachOnline = htcDevCnt.toString()
+          this.equipmentData.hiteachPercent=Math.round((htcDevCnt/htcDevTotalCnt)*100)
+          this.equipmentData.hitaTotal = htaDevTotalCnt.toString()
+          this.equipmentData.hitaOnline = htaDevCnt.toString()
+          this.equipmentData.hitaPercent=Math.round((htaDevCnt/htaDevTotalCnt)*100)
+          this.equipmentData.ccOnline = htccDevCnt.toString()
+          this.equipmentData.ccPercent = 100
+
+          //多型态课堂
+          let {lTypeCoop,lTypeIact,lTypeMis,lTypeDif,lTypeTst }=res.area
+         this.bars.value = [lTypeCoop, lTypeIact, lTypeMis, lTypeDif, lTypeTst]
+
+         //处理课堂及历程统计
+         let time = new Date()
+          let nowTime = this.timeCycle(time.toLocaleString('en-US',{hour12: false}).split(" "))
+          console.log(nowTime, '时间')
+          let startime = new Date(res.area.sdate);let targettime=new Date(res.area.edate)
+          let weekNum = this.calculateWeekNumber(startime, targettime)
+          console.log(weekNum, '第几周')
+          let totalData = []
+          for (let i = 1; i <= weekNum; i++){
+            totalData.push({week:i,class:0,works:0,topic:0,interaction:0,})
+          }
+          //循环数据
+          res.iotData.forEach(item => {
+            let times = new Date(item.year + '-' + item.month + '-' + item.day)
+            let returnWeek = this.calculateWeekNumber(startime, times)
+            let reresultIndex = totalData.findIndex((item) => { return item.week === returnWeek })
+            console.log(reresultIndex,'下标位置')
+            totalData[reresultIndex].class += item.lessonRecord
+            totalData[reresultIndex].works += item.missionFin
+            totalData[reresultIndex].topic += item.item
+            totalData[reresultIndex].interaction += item.interact
+          });
+          //处理成barandline需要的数据
+          let ultimatelyData = []
+          totalData.forEach((item) => { 
+            let valueData=[item.class,item.works,item.topic,item.interaction]
+            ultimatelyData.push({name:item.week,value:valueData})
+          })
+          console.log(ultimatelyData, '最终数据')
+          this.baldatas = ultimatelyData
+
+         //处理学区课堂记录排名
+         let allSchool = res.school
+         let newArr = []
+         let arrsort = allSchool.sort((a, b) =>  b.lessonLengMin - a.lessonLengMin )
+         console.log(arrsort,'sort')
+         allSchool.forEach((item) => { 
+           let arr = [item.schName, item.tmidCnt, item.classCnt,item.lessonLengMin]
+           newArr.push(arr)
+         })
+         console.log(newArr, '排行帮')
+         let newArrs={
+            header: [this.$t('areaIot.classrank.schoolName'),this.$t('areaIot.classrank.teachNum'),this.$t('areaIot.classrank.classNum'),this.$t('areaIot.classrank.totalTime')],
+            data: [],
+            index: true,
+            indexHeader:this.$t('areaIot.classrank.rank'),
+            // columnWidth: [200,200,200,200],
+            align: ['center'],
+            carousel: 'single',
+            headerBGC:'rgba(19, 25, 47, 0.6)',
+            oddRowBGC:'rgba(19, 25, 47, 0.6)',
+            evenRowBGC:'rgba(19, 25, 47, 0.6)',
+            waitTime:'4000'
+         }
+         newArrs.data=newArr
+        //  this.config.data = newArr
+         this.config = newArrs
+         this.loading=false
+      })
+     },
+     //时间转换
+      timeCycle(times) {
+          let time = times[1]
+          let mdy = times[0]
+          mdy = mdy.split('/')
+          let month = parseInt(mdy[0]);
+          let day = parseInt(mdy[1]);
+          let year = parseInt(mdy[2])
+          return year + '-' + month + '-' + day
+      },
+      //处理时间问题
+      calculateWeekNumber(startDate, targetDate) {
+          const oneDay = 24 * 60 * 60 * 1000; // 一天的毫秒数
+          const daysPassed = Math.round((targetDate - startDate) / oneDay);
+          const weekNumber = Math.ceil((daysPassed + startDate.getDay() + 1) / 7);
+          return weekNumber;
+      },
    }
 }
 </script>
@@ -335,7 +471,7 @@ export default {
     background-repeat: no-repeat;
 }
 .title-textbox{
-    font-size: 28px;
+    font-size: 24px;
     font-weight: bold;
     position: absolute;
     letter-spacing: 3px;
@@ -348,7 +484,8 @@ export default {
     bottom: 15px;
     left: 50%;
     transform: translate(-50%);
-    width: 80%;
+    width: 100%;
+    line-height: 24px;
 }
 .schooliotbox .dv-dec-10{
     width:33.3%;

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

@@ -11,6 +11,7 @@
 		data() {
 			return {
 				options: {},
+				barIsdata: {}
 			};
 		},
 		components: {
@@ -26,15 +27,17 @@
 				default: () => ({})
 			},
 			barData: {
-				type: Array,
-				default: () => []
+				type: Object,
+				default: () => ({})
 			}
 		},
 		watch: {
 			cdata: {
 				handler(newData) {
+					console.log(newData,'调用bar')
 					var that = this
-					var trafficWay = this.barData
+					if (newData.value) {
+					var trafficWay = this.cdata
 					var data = [];
 					var color = [
 						// '#0090ff',
@@ -75,17 +78,18 @@
                                         color: '#00b0ff',            //当值是0时不显示
 										distance: 5,
                                         formatter: function(params) {
-                                            if (params.value > 0) {
-                                                return params.value;
-                                             } else {
-                                                return ' ';
-                                             }
+                                            // if (params.value > 0) {
+                                            //     return params.value;
+                                            //  } else {
+                                            //     return ' ';
+											// }
+											return params.value;
                                         },
 										textStyle:{
 											fontSize: 14
 										}
 								},
-						data: [254, 3254, 1654, 2454, 757, 2011, 1211]
+						data: trafficWay.value
     				}];
 					this.options = {
 						color: color,
@@ -101,7 +105,7 @@
 						// 	}
 						// },
 						xAxis: {
-							data: [this.$t('schoolIot.morphologyClass.cooperation'), this.$t('schoolIot.morphologyClass.interaction'), this.$t('schoolIot.morphologyClass.task'), this.$t('schoolIot.morphologyClass.differentiation'),  this.$t('schoolIot.morphologyClass.examination')],
+							data:trafficWay.xdata,
 							axisLine: {
 								lineStyle: {
 									color: '#0177d4'
@@ -139,7 +143,7 @@
 							trigger: 'item',
 						},
 						grid: {
-							top:'7%',
+							top:'10%',
 							left:'7%',
 							right:'3%',
 							bottom:'15%'
@@ -149,10 +153,19 @@
 						},
 						series: seriesOption
 					};
+					}
 				},
 				immediate: true,
 				deep: true
 			},
+			barData: {
+				handler(newvalue) {
+					console.log(newvalue, '变化1111')
+					newvalue.value ? this.barIsdata=newvalue:''
+				},
+				immediate: true,
+				deep: true 
+			}
 		},
 	}
 </script>

+ 12 - 7
TEAMModelOS/ClientApp/src/view/iot/schooliot.vue

@@ -1,6 +1,7 @@
 <template>
 <div class="schooliotbox">
     <div class="containerbox">
+      <dv-loading v-if="loading">{{ $t('researchCenter.dashboard.loading') }}</dv-loading>
         <!--header-->
             <!--title-->
             <div class="container-title">
@@ -147,7 +148,7 @@
                                 <dv-decoration-3 style="width:200px;height:20px;"/>
                             </p>
                             <div class="barbox">
-                                <Bar title="学期" :pieData="bars"></Bar>
+                                <Bar title="学期" :cdata="bars"></Bar>
                             </div>
                         </div>
                     </dv-border-box-12>    
@@ -162,7 +163,7 @@
 <script>
 import BasePie from '@/components/echart/pie/index';
 import countTo from 'vue-count-to';
-import Bar from './echarts/bar/index';
+import Bar from './echarts/bar/bar';
 import barandLine from './echarts/barandLine/barandLine';
 import BaseCircle from "./echarts/circle/index";
 import YPie from './echarts/pie/index';
@@ -263,7 +264,8 @@ export default {
             value:[0, 0, 0, 0, 0,]
         },
       locals: '',
-      baldatas:[],
+      baldatas: [],
+      loading:false,
     }
    },
    mounted(){
@@ -297,7 +299,8 @@ export default {
     },
     init(){
         let userdatas = this.$store.state.user
-        let data={schoolId:userdatas.schoolCode,periodId:userdatas.curPeriod.id}
+        let data = { schoolId: userdatas.schoolCode }
+        this.loading=true
         this.$api.iot.getSchooliot(data).then((res)=>{
           console.log(res, 'iot back')
           //header基础数据
@@ -361,7 +364,8 @@ export default {
             ultimatelyData.push({name:item.week,value:valueData})
           })
           console.log(ultimatelyData, '最终数据')
-          this.baldatas=ultimatelyData
+          this.baldatas = ultimatelyData
+          this.loading=false
         })
      },
      //时间转换
@@ -412,7 +416,7 @@ export default {
     background-repeat: no-repeat;
 }
 .title-textbox{
-    font-size: 28px;
+    font-size: 24px;
     font-weight: bold;
     position: absolute;
     letter-spacing: 3px;
@@ -425,7 +429,8 @@ export default {
     bottom: 15px;
     left: 50%;
     transform: translate(-50%);
-    width: 80%;
+    width: 100%;
+    line-height: 24px;
 }
 .schooliotbox .dv-dec-10{
     width:33.3%;

+ 7 - 1
TEAMModelOS/ClientApp/src/view/login/Index.vue

@@ -293,7 +293,7 @@
 </style>
 
 <template>
-  <div class="login-main-wrap">
+  <div class="login-main-wrap" :style="{fontFamily:fontChange}">
     <div class="login-img-wrap">
       <!-- <img src="@/assets/login/1-3.png" class="login-main-img"> -->
       <!-- 轮播区域 -->
@@ -494,6 +494,7 @@ export default {
           { required: true, message: () => this.$t('error.required'), trigger: 'blur' },
         ],
       },
+      fontChange:'Hm',
     }
   },
   computed: {
@@ -559,6 +560,11 @@ export default {
       this.SSOLogin(this.userOauth.code)
     }
   },
+  mounted(){
+    const userLanguage = navigator.language || navigator.userLanguage;
+    console.log(userLanguage, '当前浏览器语系');
+    userLanguage === 'zh-TW' ? this.fontChange='"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif':'Hm'
+  },
   methods: {
     //根据IDtoken获取账号信息
     getIdInfo(result) {