瀏覽代碼

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

Li 2 年之前
父節點
當前提交
617a6a7c7a

+ 2 - 1
TEAMModelOS.SDK/Models/Service/StudentService.cs

@@ -2028,6 +2028,7 @@ namespace TEAMModelOS.SDK
                                    irs = null,
                                    imei = null,
                                    no = null;
+
                             List<StudentGuardian> guardians = null;
                             int year = 0;
                             //有給pw欄位才進行處理
@@ -2453,7 +2454,7 @@ namespace TEAMModelOS.SDK
                                         if (ret.Status == (int)HttpStatusCode.OK)
                                         {
                                             nonexistentIds.Remove(id);
-                                            retStuds.Add(new { id, tmpData.name, tmpData.picture, tmpData.year, tmpData.no, classId, classNo, className, gradeId, periodId, tmpData.irs });
+                                            retStuds.Add(new { id, tmpData.gender,tmpData.mail,tmpData.imei, tmpData.mobile, tmpData.name, tmpData.picture, tmpData.year, tmpData.no, classId, classNo, className, gradeId, periodId, tmpData.irs });
                                         }
                                         else errorIds.Add(id);
                                     }

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

@@ -1870,7 +1870,7 @@ const LANG_ZH_CN = {
     home: {
         previewStudy: '课前预习',
         classData: '课堂数据',
-        recentRecord: '近期7日课堂记录',
+        recentRecord: '近期课堂记录',
         acCount: '活动概览',
         goingList: '进行中的活动列表',
         scNotice: '学校公告',

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

@@ -1872,7 +1872,7 @@ const LANG_ZH_TW = {
     home: {
         previewStudy: '課前預習',
         classData: '課堂數據',
-        recentRecord: '近期7日課堂記錄',
+        recentRecord: '近期課堂記錄',
         acCount: '活動概覽',
         goingList: '進行中',
         scNotice: '學校公告',

+ 38 - 18
TEAMModelOS/ClientApp/src/view/research-center/ReportPreview.vue

@@ -47,31 +47,32 @@
         </div>
       </div>
       <div class="bar-wrap">
+        <BaseDimensionPie :echartData="dimensionCountArr"></BaseDimensionPie>
         <BaseDimensionBar :echartData="dimensionCountArr"></BaseDimensionBar>
         <div class="comment">
           <span class="title comment-title">{{ $t('totalAnalysis.showAnalysis') }}</span>
-          <p class="content"></p>
+          <p class="content" v-html="analysisText.total"></p>
         </div>
       </div>
       <div class="bar-wrap">
         <BaseTchBar :echartData="tchCountArr"></BaseTchBar>
         <div class="comment">
           <span class="title comment-title">{{ $t('totalAnalysis.showAnalysis') }}</span>
-          <p class="content">{{ analysisText.tch }}</p>
+          <p class="content" v-html="analysisText.tch"></p>
         </div>
       </div>
       <div class="bar-wrap">
         <BaseSubjectBar :echartData="subjectCountArr"></BaseSubjectBar>
         <div class="comment">
           <span class="title comment-title">{{ $t('totalAnalysis.showAnalysis') }}</span>
-          <p class="content">{{ analysisText.subject }}</p>
+          <p class="content" v-html="analysisText.subject"></p>
         </div>
       </div>
       <div class="bar-wrap" v-if="timeUnit !== 'custom'">
         <BaseMonthLine :echartData="timeTrendArr"></BaseMonthLine>
         <div class="comment">
           <span class="title comment-title">{{ $t('totalAnalysis.showAnalysis') }}</span>
-          <p class="content">{{ analysisText.time }}</p>
+          <p class="content" v-html="analysisText.time"></p>
         </div>
       </div>
       <div class="bar-wrap">
@@ -79,10 +80,10 @@
         <BaseLightBar :echartData="lightCountArr"></BaseLightBar>
         <div class="comment">
           <span class="title comment-title">{{ $t('totalAnalysis.showAnalysis') }}</span>
-          <p class="content">{{ analysisText.light }}</p>
+          <p class="content" v-html="analysisText.light"></p>
         </div>
       </div>
-      <div class="bar-wrap">
+      <div class="bar-wrap" v-if="false">
         <p class="table-title">{{ $t('lessonRecord.report.listTitle') }}</p>
         <Table :columns="columns" :data="lessonList">
           <!-- 科技手段分数 -->
@@ -102,6 +103,7 @@
 <script>
 import html2canvas from "html2canvas"
 import BaseDimensionBar from './reportCharts/BaseDimensionBar'
+import BaseDimensionPie from './reportCharts/BaseDimensionPie'
 import BaseTchBar from './reportCharts/BaseTchBar'
 import BaseLightPie from './reportCharts/BaseLightPie'
 import BaseLightRadar from './reportCharts/BaseLightRadar'
@@ -110,11 +112,12 @@ import BaseMonthLine from './reportCharts/BaseMonthLine'
 import BaseSubjectBar from './reportCharts/BaseSubjectBar'
 export default {
   components: {
-    BaseDimensionBar, BaseTchBar, BaseLightPie, BaseLightRadar, BaseMonthLine, BaseLightBar, BaseSubjectBar
+    BaseDimensionBar, BaseDimensionPie, BaseTchBar, BaseLightPie, BaseLightRadar, BaseMonthLine, BaseLightBar, BaseSubjectBar
   },
   data(vm) {
     return {
       analysisText: {
+        total: '',
         tch: '',
         subject: '',
         time: '',
@@ -229,6 +232,8 @@ export default {
 
     console.error(this.dimensionCountArr)
 
+
+
     // 计算每个教师授课数量
     let tchArr = [...new Set(list.map(i => i.tmdname))]
     this.tchCountArr = tchArr.map(i => {
@@ -240,11 +245,13 @@ export default {
     let sortTchCountArr = this.tchCountArr.sort((a, b) => b.count - a.count)
     this.tchCountArr = this.tchCountArr.slice(0, 10) // 只展示前十名教师排行
     if (sortTchCountArr.length > 2) {
-      this.analysisText.tch = `教师应用数量,${this.condRange}共${list.length}节,其中 ${sortTchCountArr[0].name} 老师 ${sortTchCountArr[0].count} 节, ${sortTchCountArr[1].name} 老师 ${sortTchCountArr[1].count} 节,${sortTchCountArr[2].name} 老师 ${sortTchCountArr[2].count} 节,是${this.condRange}应用数据前三。`
+      this.analysisText.tch = `教师应用数量,<span>${this.condRange}</span><span>${list.length}</span>节,其中 <span>${sortTchCountArr[0].name} </span>老师 <span>${sortTchCountArr[0].count}</span> 节,<span> ${sortTchCountArr[1].name} </span>老师<span> ${sortTchCountArr[1].count}</span> 节,<span>${sortTchCountArr[2].name}</span> 老师 <span>${sortTchCountArr[2].count}</span> 节,是<span>${this.condRange}</span>应用数据前三。`
     } else {
-      this.analysisText.tch = `教师应用数量,${this.condRange}共${list.length}节,最多授课是 ${sortTchCountArr[0].name} 老师 ${sortTchCountArr[0].count} 节。`
+      this.analysisText.tch = `教师应用数量,<span>${this.condRange}</span><span>${list.length}</span>节,最多授课是 <span>${sortTchCountArr[0].name} </span>老师 <span>${sortTchCountArr[0].count}</span> 节。`
     }
 
+
+
     // 计算获灯情况
     let greenCount = list.filter(i => i.pLevel === 2 && i.tLevel === 2).length
     let redCount = list.filter(i => i.pLevel === 0 && i.tLevel === 0).length
@@ -256,14 +263,22 @@ export default {
     ]
     let lightMax = Math.max(...this.lightCountArr)
     let lightMaxIndex = this.lightCountArr.indexOf(lightMax)
-    this.analysisText.light = `${this.condRange}数据可以看出,双绿灯 ${greenCount} 节,占 ${(greenCount * 100 / list.length).toFixed(1)}%,单绿灯 ${singleCount} 节,占 ${(singleCount * 100 / list.length).toFixed(1)}%,双红灯 ${redCount} 节,占 ${(redCount * 100 / list.length).toFixed(1)}%。`
+    this.analysisText.light = `<span>${this.condRange}</span>数据可以看出,双绿灯 <span>${greenCount}</span> 节,占 <span>${(greenCount * 100 / list.length).toFixed(1)}%</span>,单绿灯 <span>${singleCount} </span>节,占<span> ${(singleCount * 100 / list.length).toFixed(1)}%</span>,双红灯 <span>${redCount}</span> 节,占 <span>${(redCount * 100 / list.length).toFixed(1)}%</span>。`
     let addTextArr = [
-      `\n本校在【双绿灯】占比数最多,在智慧课堂深度融合常态化开展方面比较好,请继续保持。`,
-      `\n本校在【单绿灯】占比数最多,建议加强双绿灯的融合应用提升`,
-      `\n本校在【双红灯】占比数最多,建议加强双绿灯的融合应用提升`
+      `<span>本校在【双绿灯】占比数最多,在智慧课堂深度融合常态化开展方面比较好,请继续保持。</span>`,
+      `<span>本校在【单绿灯】占比数最多,建议加强双绿灯的融合应用提升</span>`,
+      `<span>本校在【双红灯】占比数最多,建议加强双绿灯的融合应用提升</span>`
     ]
     this.analysisText.light += addTextArr[lightMaxIndex]
 
+    // 总结评语
+    this.analysisText.total = `本次报告共有<span>${list.length}</span>节课例,授课教师<span>${tchArr.length}</span>人,平均每人产生课例<span>${(list.length / tchArr.length).toFixed(1)}</span>节,其中双绿灯课例数<span>${greenCount}</span>节,双红灯课例数据<span>${redCount}</span>节。
+    <span>互动学习</span>(互动学习是指课堂中运用提问机制,进行单选、复选、是非、填充、抢权、抢答等促进师生间互动的学习活动)总共<span>${this.dimensionCountArr[0]}</span>次,平均每节课<span>${(this.dimensionCountArr[0] / list.length).toFixed(1)}</span>次;
+    <span>合作学习</span>(合作学习是指课堂中实施分组机制,进行TBL小组合作学习活动。比如手机HiTA拍照分享合作作品生成、作品分享)总共<span>${this.dimensionCountArr[1]}</span>次,平均每节课<span>${(this.dimensionCountArr[1] / list.length).toFixed(1)}</span>次;
+    <span>测验学习</span>(测验学习是指课堂中运用测验机制,进行题库测验、纸本测验、Excel测验等掌握学生学习成效的活动)总共<span>${this.dimensionCountArr[2]}</span>次,平均每节课<span>${(this.dimensionCountArr[2] / list.length).toFixed(1)}</span>次;
+    <span>任务学习</span>(任务学习是指课堂中运用任务机制,进行图片、声音、物件、档案等促进学生完成任务的学习活动)总共<span>${this.dimensionCountArr[3]}</span>次,平均每节课<span>${(this.dimensionCountArr[3] / list.length).toFixed(1)}</span>次;
+    <span>差异化学习</span>(差异化学习是指课堂中运用差异化机制,根据合作、互动、任务、测验等数据,布置差异化的学习内容)总共<span>${this.dimensionCountArr[4]}</span>次,平均每节课<span>${(this.dimensionCountArr[4] / list.length).toFixed(1)}</span>次。`
+
     // 计算学科统计  
     let subArr = [...new Set(list.map(i => i.subjectName))]
     this.subjectCountArr = subArr.map(i => {
@@ -274,12 +289,12 @@ export default {
     })
     let sortSubCountArr = this.subjectCountArr.sort((a, b) => b.count - a.count)
     if (sortSubCountArr.length > 2) {
-      this.analysisText.subject = `学科应用数量,其中 ${sortSubCountArr[0].name} 学科 ${sortSubCountArr[0].count} 节,${sortSubCountArr[1].name} 学科 ${sortSubCountArr[1].count} 节,${sortSubCountArr[2].name} 学科 ${sortSubCountArr[2].count} 节,是${this.condRange}应用数量前三。\n`
+      this.analysisText.subject = `学科应用数量,其中 <span>${sortSubCountArr[0].name}</span> 学科 <span>${sortSubCountArr[0].count} </span>节,<span>${sortSubCountArr[1].name}</span> 学科 <span>${sortSubCountArr[1].count}</span> 节,<span>${sortSubCountArr[2].name}</span> 学科 <span>${sortSubCountArr[2].count} </span>节,是<span>${this.condRange}</span>应用数量前三。\n`
     } else {
-      this.analysisText.subject = `学科应用数量,最多为 ${sortSubCountArr[0].name} 学科 ${sortSubCountArr[0].count} 节。\n`
+      this.analysisText.subject = `学科应用数量,最多为 <span>${sortSubCountArr[0].name} </span>学科 <span>${sortSubCountArr[0].count} </span>节。\n`
     }
     this.subjectCountArr.forEach(sub => {
-      this.analysisText.subject += `${sub.name} 学科人均 ${(sub.count / [...new Set(list.filter(i => i.subjectName === sub.name).map(j => j.tmdname))].length).toFixed(1)} 节; \n`
+      this.analysisText.subject += `<span>${sub.name}</span> 学科人均 <span>${(sub.count / [...new Set(list.filter(i => i.subjectName === sub.name).map(j => j.tmdname))].length).toFixed(1)}</span> 节; \n`
     })
 
     // 计算开课时间趋势图
@@ -289,7 +304,7 @@ export default {
       let min = Math.min(...this.timeTrendArr.yArr)
       let maxIndex = this.timeTrendArr.yArr.findIndex(i => i === max)
       let minIndex = this.timeTrendArr.yArr.findIndex(i => i === min)
-      this.analysisText.time = `${this.condRange}开课趋势图中,${this.timeTrendArr.xArr[maxIndex]}开课最多,${this.timeTrendArr.xArr[minIndex]}开课最少。`
+      this.analysisText.time = `<span>${this.condRange}</span>开课趋势图中,<span>${this.timeTrendArr.xArr[maxIndex]}</span>开课最多,<span>${this.timeTrendArr.xArr[minIndex]}</span>开课最少。`
       console.error(this.timeTrendArr)
     }
 
@@ -503,7 +518,12 @@ export default {
         font-size: 1rem;
         line-height: 2rem;
         font-weight: bold;
-        color: #ff671a;
+        color: #6b6b6b;
+
+        span {
+          margin: 0 5px;
+          color: #ff671a;
+        }
       }
     }
 

+ 30 - 2
TEAMModelOS/ClientApp/src/view/research-center/reportCharts/BaseDimensionBar.vue

@@ -17,9 +17,19 @@ export default {
   methods: {
     doRender(echartData) {
       let myChart = this.$echarts.init(document.getElementById('dimensionBar'))
+      let colorList = ['#00B389',
+        '#52A8FF',
+        '#E27272',
+        '#FFC53D',
+        '#006EFE',
+        '#F5855F',
+        '#C099FC',
+        '#FFA940',
+        '#29EFC4',
+        '#F8AEA4',]
       let option = {
         title: {
-          text: '常用教学法统计',
+          text: '',
           left: 'center',
           top: '0',
           textStyle: {
@@ -55,7 +65,18 @@ export default {
           bottom: '12%',
           containLabel: true,
         },
-        color: ['#31c2b0'],
+        color: [
+          '#00B389',
+          '#52A8FF',
+          '#E27272',
+          '#FFC53D',
+          '#006EFE',
+          '#F5855F',
+          '#C099FC',
+          '#FFA940',
+          '#29EFC4',
+          '#F8AEA4',
+        ],
         xAxis: {
           type: 'category',
           data: [this.$t('lessonRecord.mgt.interaction'), this.$t('lessonRecord.mgt.cooperation'), this.$t('lessonRecord.mgt.exam'), this.$t('lessonRecord.mgt.task'), this.$t('lessonRecord.mgt.diffential')],
@@ -99,6 +120,13 @@ export default {
               show: true,
               position: 'top'
             },
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return colorList[params.dataIndex]
+                },
+              }
+            },
           },
         ],
       };

+ 118 - 0
TEAMModelOS/ClientApp/src/view/research-center/reportCharts/BaseDimensionPie.vue

@@ -0,0 +1,118 @@
+<template>
+  <div id="dimensionPie" class="lightPie"></div>
+</template>
+<script>
+export default {
+  props: {
+    echartData: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      option: null,
+    }
+  },
+  methods: {
+    doRender(echartData) {
+      let myChart = this.$echarts.init(document.getElementById('dimensionPie'))
+      let option = {
+        title: {
+          text: '常用教学法统计',
+          left: 'center',
+          top: '0',
+          textStyle: {
+            fontWeight: '600',
+            color: '#000',
+            fontFamily: "微軟正黑體",
+            fontSize: 16,
+          },
+        },
+        color: [
+          '#00B389',
+          '#52A8FF',
+          '#E27272',
+          '#FFC53D',
+          '#006EFE',
+          '#F5855F',
+          '#C099FC',
+          '#FFA940',
+          '#29EFC4',
+          '#F8AEA4',
+        ],
+        tooltip: {
+          trigger: 'item',
+        },
+        grid: {
+          left: 20,
+          right: 20,
+          bottom: 0,
+          top: 0,
+        },
+        series: [
+          {
+            name: '数量统计',
+            type: 'pie',
+            radius: ['0', '50%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              formatter: '{name|{b}}\n{num|{c} 次}',
+              rich: {
+                num: {
+                  fontSize: 14,
+                  color: '#999',
+                },
+              },
+              lineHeight: 15,
+            },
+            labelLayout: function (params) {
+              var isLeft = params.labelRect.x < myChart.getWidth() / 2;
+              var points = params.labelLinePoints;
+              // Update the end point.
+              points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
+
+              return {
+                labelLinePoints: points,
+              };
+            },
+            data: [
+              { value: echartData[0], name: this.$t('lessonRecord.mgt.interaction') },
+              { value: echartData[1], name: this.$t('lessonRecord.mgt.cooperation') },
+              { value: echartData[2], name: this.$t('lessonRecord.mgt.exam') },
+              { value: echartData[3], name: this.$t('lessonRecord.mgt.task') },
+              { value: echartData[4], name: this.$t('lessonRecord.mgt.diffential') },
+            ],
+          },
+        ],
+      }
+
+
+      myChart.clear()
+      myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+
+    }
+  },
+  mounted() {
+    this.doRender(this.echartData)
+  },
+
+}
+</script>
+
+<style>
+.lightPie {
+  width: 100%;
+  height: 450px;
+  margin: 0 auto;
+  display: block;
+}
+</style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/research-center/reportCharts/BaseLightPie.vue

@@ -41,7 +41,7 @@ export default {
         },
         series: [
           {
-            name: '访问来源',
+            name: '数量统计',
             type: 'pie',
             radius: ['0', '50%'],
             avoidLabelOverlap: false,

+ 4 - 4
TEAMModelOS/ClientApp/src/view/student-account/stuMgt/StuMgt.vue

@@ -139,6 +139,7 @@
             <RadioGroup v-model="studentInfo.gender">
               <Radio label="M">{{ $t('stuAccount.sit24') }}</Radio>
               <Radio label="F">{{ $t('stuAccount.sit25') }}</Radio>
+              <Radio label="N">N</Radio>
             </RadioGroup>
           </FormItem>
           <div style="display:flex;justify-content: space-between;">
@@ -301,9 +302,6 @@ export default {
         pw: [
           { validator: validatePw, required: true, trigger: 'change' }
         ],
-        gender: [
-          { required: true, message: 'Please select gender', trigger: 'change' }
-        ],
         no: [
           { validator: validateNo, trigger: 'change' }
         ],
@@ -469,6 +467,7 @@ export default {
             "pw": this.studentInfo.pw === '******' ? undefined : this.studentInfo.pw,
             "classId": this.studentInfo.classInfo[1],
             "guardians": this.studentInfo.guardians,
+            "gender": this.studentInfo.gender,
             "imei": this.studentInfo.imei
           }]
           let promise = this.bizType === 'insert' ? this.$api.stuAccount.saveStudent(this.$store.state.userInfo.schoolCode, params) : this.$api.stuAccount.updStudent(this.$store.state.userInfo.schoolCode, params)
@@ -625,12 +624,13 @@ export default {
         this.studentInfo.no = parseInt(student.no)
         this.studentInfo.irs = student.irs
         this.studentInfo.classId = student.classId
-        this.studentInfo.gender = student.gender
+        this.studentInfo.gender = student.gender || 'N'
         this.studentInfo.classInfo = [student.classYear, student.classId]
         this.studentInfo.pw = '******'
         this.studentInfo.year = student.year
         this.studentInfo.guardians = student.guardians
         this.studentInfo.imei = student.imei
+        console.error(this.studentInfo)
         this.addStuStatus = true
       } else {
         if (this.selections.length > 0) {