Переглянути джерело

Merge branch 'develop' into TPE/develop

jeff 1 рік тому
батько
коміт
2f48457c7e

+ 33 - 21
TEAMModelBI/ClientApp/src/view/product/index.vue

@@ -290,17 +290,17 @@
           </el-table-column>  
           </el-table-column>  
           <el-table-column property="name" label="姓名" align="center"/>
           <el-table-column property="name" label="姓名" align="center"/>
           <el-table-column property="id" label="ID" align="center" sortable />
           <el-table-column property="id" label="ID" align="center" sortable />
-          <el-table-column property="schoolCode" label="弱归户" align="center">
+          <el-table-column property="schoolCode" label="弱归户" align="center" sortable>
             <template #default="scope">
             <template #default="scope">
               <div>{{scope.row.schoolCodeW ? scope.row.schoolCodeW:'无'}}</div>
               <div>{{scope.row.schoolCodeW ? scope.row.schoolCodeW:'无'}}</div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column property="schoolCodeW" label="归户" align="center">
+          <el-table-column property="schoolCodeW" label="归户" align="center" sortable>
             <template #default="scope">
             <template #default="scope">
               <div>{{scope.row.schoolCode ? scope.row.schoolCode:'无'}}</div>
               <div>{{scope.row.schoolCode ? scope.row.schoolCode:'无'}}</div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column label="所在地" align="center">
+          <el-table-column label="所在地" property="city" align="center" sortable>
             <template #default="scope">
             <template #default="scope">
               <div>
               <div>
                 <span>{{scope.row.province ?scope.row.province:''}}</span>
                 <span>{{scope.row.province ?scope.row.province:''}}</span>
@@ -1529,25 +1529,37 @@ function tablesrotChange(rule){
   //   datas.sort((a,b)=>{if(b.points && a.points){ return a.points.level -b.points.level >0}else{return false}})
   //   datas.sort((a,b)=>{if(b.points && a.points){ return a.points.level -b.points.level >0}else{return false}})
   // }
   // }
   //积分
   //积分
-  if(rules ==="descending"){
-    datas.sort((a,b)=>{
-      if(b.points && a.points){
-        console.log( b.points.level -a.points.level >0,'进入倒序判断')
-        return b.points.level -a.points.level >0
-      }else{
-        console.log('进入倒序判断error ')
-      }
-    })
-  }else{
-    datas.sort((a,b)=>{
-      if(b.points && a.points){
-        console.log('进入正序判断')
-        return a.points.level -b.points.level >0
-      }else{
-        console.log('进入正序判断error')
-      }
-    })
+  if(rule.prop ==="levels"){
+    rules ==="descending" ? datas.sort((a,b)=>{if(b.points && a.points){return b.level -a.level >0}}):datas.sort((a,b)=>{if(b.points && a.points){return a.level -b.level >0}})
+  }else if(rule.prop ==="id"){
+    rules==='descending' ?  datas.sort((a,b)=>{return b.id -a.id >0}):datas.sort((a,b)=>{return a.id -b.id >0})
+  }else if(rule.prop ==="schoolCode"){
+    rules==='descending' ? datas.sort((a,b)=>{if(a.schoolCode === null){return 1}else if(b.schoolCode=== null){return -1}else{return 0}}):datas.sort((a,b)=>{if(a.schoolCode === null){return 0}else if(b.schoolCode=== null){return 0}else{return -1}})
+  }else if(rule.prop ==="schoolCodeW"){
+    rules==='descending' ? datas.sort((a,b)=>{if(a.schoolCodeW === null){return 1}else if(b.schoolCodeW=== null){return -1}else{return 0}}):datas.sort((a,b)=>{if(a.schoolCodeW === null){return 0}else if(b.schoolCodeW=== null){return 0}else{return -1}})
+  }else if(rule.prop ==="city"){
+    rules==='descending' ? datas.sort((a,b)=>{if(a.province && a.city){return 1}else if(b.province && b.city){return -1}else{return 0}}):datas.sort((a,b)=>{if(a.province && a.city){return 0}else if(b.province && b.city){return 0}else{return -1}})
   }
   }
+
+  // if(rules ==="descending"){
+  //   datas.sort((a,b)=>{
+  //     if(b.points && a.points){
+  //       console.log( b.points.level -a.points.level >0,'进入倒序判断')
+  //       return b.points.level -a.points.level >0
+  //     }else{
+  //       console.log('进入倒序判断error ')
+  //     }
+  //   })
+  // }else{
+  //   datas.sort((a,b)=>{
+  //     if(b.points && a.points){
+  //       console.log('进入正序判断')
+  //       return a.points.level -b.points.level >0
+  //     }else{
+  //       console.log('进入正序判断error')
+  //     }
+  //   })
+  // }
   console.log(datas,'排序后')
   console.log(datas,'排序后')
   teachData.value=JSON.parse(JSON.stringify(datas))
   teachData.value=JSON.parse(JSON.stringify(datas))
 }
 }

+ 1 - 1
TEAMModelBI/ClientApp/src/view/userInquire/details.vue

@@ -1153,7 +1153,7 @@ watch(()=>transferNum.value,(newnum)=>{
     width:75%;
     width:75%;
     border-radius: 5px;
     border-radius: 5px;
     box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 8px;
     box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 8px;
-    padding: 1%;
+    padding: 1% 0.5%;
 }
 }
 .heartmap-label{
 .heartmap-label{
     display: flex;
     display: flex;

+ 62 - 43
TEAMModelBI/ClientApp/src/view/userInquire/iot.vue

@@ -40,14 +40,14 @@
                 <div class="item-num">{{item.value}}</div>
                 <div class="item-num">{{item.value}}</div>
                 <span class="item-title">{{item.name}}</span>
                 <span class="item-title">{{item.name}}</span>
               </div>
               </div>
-            </div>
+            </div> -->
             <div class="power-box">
             <div class="power-box">
-              <p class="apparatus-title">课堂与授权</p>
+              <p class="inuse-title">课堂与授权</p>
               <div class="power-item" v-for="(item,index) in powerList.class" :key="index">
               <div class="power-item" v-for="(item,index) in powerList.class" :key="index">
                 <div class="item-num">{{item.value}}</div>
                 <div class="item-num">{{item.value}}</div>
                 <span class="item-title">{{item.name}}</span>
                 <span class="item-title">{{item.name}}</span>
               </div>
               </div>
-            </div> -->
+            </div>
           </div>
           </div>
           <div class="minxinbox">
           <div class="minxinbox">
             <div class="lessons-box">
             <div class="lessons-box">
@@ -488,10 +488,13 @@
     { icon: '#icon--caozuorizhi', title: 'IES课程', content: '使用IES课程', state: true, value: 0 },
     { icon: '#icon--caozuorizhi', title: 'IES课程', content: '使用IES课程', state: true, value: 0 },
     { icon: '#icon--caozuorizhi', title: 'webIrs', content: '使用webIrs', state: true, value: 0 },
     { icon: '#icon--caozuorizhi', title: 'webIrs', content: '使用webIrs', state: true, value: 0 },
     { icon: '#icon--caozuorizhi', title: 'IRS', content: '使用IRS', state: true, value: 0 },
     { icon: '#icon--caozuorizhi', title: 'IRS', content: '使用IRS', state: true, value: 0 },
-    { icon: '#icon--caozuorizhi', title: 'HiTA', content: '使用HiTA', state: false, value: 0 },
-    { icon: '#icon--caozuorizhi', title: 'HaBoard', content: '使用HaBoard', state: false, value: 0 },
-    { icon: '#icon--caozuorizhi', title: 'IES5资源', content: '使用IES5资源', state: true, value: 0 },
-    { icon: '#icon--caozuorizhi', title: 'T指数', content: '课程T绿灯数', state: true, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'HiTA', content: '使用文字云', state: false, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'HaBoard', content: '使用ClouDAS', state: false, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'GPT', content: '使用GPT', state: false, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'IES5测验', content: '使用IES5卷测验', state: true, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'Excel测验', content: '使用Excel卷测验', state: true, value: 0 },
+    { icon: '#icon--caozuorizhi', title: '纸本测验', content: '使用纸本测验', state: true, value: 0 },
+    { icon: '#icon--caozuorizhi', title: 'T课堂', content: '符合T课堂数', state: true, value: 0 },
   ])
   ])
   let inuseList = ref([
   let inuseList = ref([
     { title: '学习任务数', value: 15, icon: '#icon-renwu', percent: '41.2%', class: 'task', textClass: 'task-text' },
     { title: '学习任务数', value: 15, icon: '#icon-renwu', percent: '41.2%', class: 'task', textClass: 'task-text' },
@@ -504,7 +507,8 @@
     { name: '互动型态课堂', value: 20, percent: '30%', class: 'accomplish', textClass: 'accomplish-text' },
     { name: '互动型态课堂', value: 20, percent: '30%', class: 'accomplish', textClass: 'accomplish-text' },
     { name: '任务型态课堂', value: 20, percent: '10%', class: 'topic', textClass: 'topic-text' },
     { name: '任务型态课堂', value: 20, percent: '10%', class: 'topic', textClass: 'topic-text' },
     { name: '差异化形态课堂', value: 20, percent: '5%', class: 'interaction', textClass: 'interaction-text' },
     { name: '差异化形态课堂', value: 20, percent: '5%', class: 'interaction', textClass: 'interaction-text' },
-    { name: '测验型态课堂', value: 30, percent: '15%', class: 'testclass', textClass: 'testclass-text' },
+    { name: '协作型态课堂', value: 30, percent: '15%', class: 'testclass', textClass: 'testclass-text' },
+    { name: '互评型态课堂', value: 30, percent: '15%', class: 'testclass', textClass: 'testclass-text' },
     { name: '无型态课堂', value: 0, percent: '0%', class: 'noneclass', textClass: 'noneclassclass-text' },
     { name: '无型态课堂', value: 0, percent: '0%', class: 'noneclass', textClass: 'noneclassclass-text' },
     { name: '未上课', value: 0, percent: '0%', class: 'noneclass', textClass: 'noneclassclass-text' },
     { name: '未上课', value: 0, percent: '0%', class: 'noneclass', textClass: 'noneclassclass-text' },
   ])
   ])
@@ -557,7 +561,7 @@
           }
           }
         },
         },
         boundaryGap: true, // 坐标轴两边是否留白
         boundaryGap: true, // 坐标轴两边是否留白
-        data: ['合作', '互动', '任务', '差异化', '测验', '无型态', '未上课']
+        data: ['合作', '互动', '任务', '差异化', '协作','互评', '无型态', '未上课']
       },
       },
       yAxis: [
       yAxis: [
         {
         {
@@ -616,7 +620,7 @@
               }
               }
             }
             }
           },
           },
-          barMaxWidth: '20%',
+          barMaxWidth: '15%',
         }
         }
       ]
       ]
     }
     }
@@ -657,14 +661,24 @@
     basicaList.value[3].value = lessonLengMin
     basicaList.value[3].value = lessonLengMin
   
   
     //处理课中使用数据
     //处理课中使用数据
-    let { useIES, useWebIrs, useDeviceIrs, useHita, useHaboard, useIES5Resource, tGreen } = propsbox.detailsData
-    lessonsList.value[0].value = useIES
-    lessonsList.value[1].value = useWebIrs
-    lessonsList.value[2].value = useDeviceIrs
-    lessonsList.value[3].value = useHita
-    lessonsList.value[4].value = useHaboard
-    lessonsList.value[5].value = useIES5Resource
-    lessonsList.value[6].value = tGreen
+    let { useIES, useWebIrs, useDeviceIrs, useHita, useHaboard, useIES5Resource, tGreen,useWordCloud,useClouDAS,useGPT,useIesTest,useExcelTest,usePaperTest,tLesson } = propsbox.detailsData
+    lessonsList.value[0].value = useIES ?useIES:0
+    lessonsList.value[1].value = useWebIrs ? useWebIrs:0
+    lessonsList.value[2].value = useDeviceIrs ? useDeviceIrs:0
+    //由hita 调整为 文字云
+    lessonsList.value[3].value = useWordCloud ?useWordCloud:0
+    //由HaBoard 调整为 ClouDAS
+    lessonsList.value[4].value = useClouDAS ? useClouDAS:0
+    //增加使用GPT
+    lessonsList.value[5].value = useGPT ?useGPT:0
+    //由IES5资源调整为 使用IES5卷测验
+    lessonsList.value[6].value = useIesTest ? useIesTest:0
+    //新增Excel
+    lessonsList.value[7].value=useExcelTest ? useExcelTest:0
+    //新增纸本
+    lessonsList.value[8].value=usePaperTest ?usePaperTest:0
+    //符合T课堂数
+    lessonsList.value[9].value=tLesson ? tLesson:0
   
   
     //授权占比
     //授权占比
     // let { deviceCnt, deviceNoAuth, deviceAuth, lessonCnt928, lessonCntId, lessonCntDevice, lessonCntIdDevice } = propsbox.detailsData
     // let { deviceCnt, deviceNoAuth, deviceAuth, lessonCnt928, lessonCntId, lessonCntDevice, lessonCntIdDevice } = propsbox.detailsData
@@ -684,25 +698,23 @@
     inuseList.value[3].value = interact
     inuseList.value[3].value = interact
   
   
     //处理多形态课堂
     //处理多形态课堂
-    let { lTypeCoop, lTypeIact, lTypeMis, lTypeTst, lTypeDif, lTypeNone,lessonLeng0} = propsbox.detailsData
+    let { lTypeCoop, lTypeIact, lTypeMis, lTypeTst, lTypeDif, lTypeNone,lessonLeng0,learnCoop,learnPeer} = propsbox.detailsData
     let totalNum = [lTypeCoop, lTypeIact, lTypeMis, lTypeTst, lTypeDif].reduce((prev, cur) => { return prev + cur }, 0)
     let totalNum = [lTypeCoop, lTypeIact, lTypeMis, lTypeTst, lTypeDif].reduce((prev, cur) => { return prev + cur }, 0)
     echartData.value.total = totalNum
     echartData.value.total = totalNum
     console.log(totalNum)
     console.log(totalNum)
     classType.value[0].value = lTypeCoop
     classType.value[0].value = lTypeCoop
-    classType.value[0].percent = lTypeCoop === 0 ? 0 : (lTypeCoop / totalNum).toFixed(2) * 100
     classType.value[1].value = lTypeIact
     classType.value[1].value = lTypeIact
-    classType.value[1].percent = lTypeIact === 0 ? 0 : (lTypeIact / totalNum).toFixed(2) * 100
     classType.value[2].value = lTypeMis
     classType.value[2].value = lTypeMis
-    classType.value[2].percent = lTypeMis === 0 ? 0 : (lTypeMis / totalNum).toFixed(2) * 100
-    classType.value[3].value = lTypeTst
-    classType.value[3].percent = lTypeTst === 0 ? 0 : (lTypeTst / totalNum).toFixed(2) * 100
-    classType.value[4].value = lTypeDif
-    classType.value[4].percent = lTypeDif === 0 ? 0 : (lTypeDif / totalNum).toFixed(2) * 100
-    classType.value[4].value = lTypeNone
-    classType.value[5].value = lessonLeng0 ? lessonLeng0:0
+    classType.value[3].value = lTypeDif
+    //由测试改为 协作
+    classType.value[4].value = learnCoop
+    //新增互评
+    classType.value[5].value = learnPeer
+    classType.value[6].value = lTypeNone
+    classType.value[7].value = lessonLeng0 ? lessonLeng0:0
   
   
     //echarts占比
     //echarts占比
-    echartData.value.xlines.series[0].data = [lTypeCoop, lTypeIact, lTypeMis, lTypeTst, lTypeDif, lTypeNone, classType.value[5].value]
+    echartData.value.xlines.series[0].data = [lTypeCoop, lTypeIact, lTypeMis, lTypeDif,learnCoop,learnPeer, lTypeNone, classType.value[5].value]
     // echartData.value.xlines.series[1].data = [classType.value[1].percent]
     // echartData.value.xlines.series[1].data = [classType.value[1].percent]
     // echartData.value.xlines.series[2].data = [classType.value[2].percent]
     // echartData.value.xlines.series[2].data = [classType.value[2].percent]
     // echartData.value.xlines.series[3].data = [classType.value[3].percent]
     // echartData.value.xlines.series[3].data = [classType.value[3].percent]
@@ -769,7 +781,7 @@ onMounted(() => {
     padding-top: 1%;
     padding-top: 1%;
   }
   }
   .contentbox {
   .contentbox {
-    width: 98%;
+    width: 100%;
     /* padding: 1% 1%; */
     /* padding: 1% 1%; */
     /* background: rgb(250, 250, 250); */
     /* background: rgb(250, 250, 250); */
     /* height: 85vh; */
     /* height: 85vh; */
@@ -796,6 +808,7 @@ onMounted(() => {
     display: flex;
     display: flex;
     flex-wrap: nowrap;
     flex-wrap: nowrap;
     justify-content: space-between;
     justify-content: space-between;
+    line-height: 40px;
   }
   }
   .apparatusAndpower {
   .apparatusAndpower {
     width: 100%;
     width: 100%;
@@ -806,14 +819,14 @@ onMounted(() => {
   }
   }
   .apparatus-box,
   .apparatus-box,
   .power-box {
   .power-box {
-    width: 32%;
+    width: 50%;
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
     background: #fff;
     background: #fff;
     margin: 0.5%;
     margin: 0.5%;
     border-radius: 5px;
     border-radius: 5px;
     display: flex;
     display: flex;
-    justify-content: space-between;
-    /* align-items: center; */
+    justify-content: space-around;
+    align-items: center;
     flex-wrap: wrap;
     flex-wrap: wrap;
   }
   }
   .apparatus-item {
   .apparatus-item {
@@ -826,21 +839,22 @@ onMounted(() => {
   }
   }
   .power-item {
   .power-item {
     width: 23%;
     width: 23%;
-    margin: 0% 1%;
+    height:80px;
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
     background: #fff;
     background: #fff;
     border-radius: 5px;
     border-radius: 5px;
     margin: 1%;
     margin: 1%;
+    line-height: 40px;
   }
   }
   .apparatus-title {
   .apparatus-title {
-    font-size: 16px;
-    margin-bottom: 5px;
-    border-bottom: 1px dashed #e9e9e9;
-    line-height: 40px;
     width: 100%;
     width: 100%;
     background: #dfe6e9;
     background: #dfe6e9;
-    color: #fff;
+    margin-bottom: 5px;
+    line-height: 25px;
+    border-bottom: 1px dashed #e9e9e9;
+    font-size: 16px;
     font-weight: bold;
     font-weight: bold;
+    color: #fff;
   }
   }
   .inuse-title {
   .inuse-title {
     width: 100%;
     width: 100%;
@@ -867,6 +881,7 @@ onMounted(() => {
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
     background: #fff;
     background: #fff;
     margin: 0.5%;
     margin: 0.5%;
+    align-items: center;
   }
   }
   .item-title-images {
   .item-title-images {
     width: 100%;
     width: 100%;
@@ -907,7 +922,7 @@ onMounted(() => {
     border-radius: 5px;
     border-radius: 5px;
     background: #fff;
     background: #fff;
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
-    margin: 0.5% 1%;
+    margin: 0.5%;
     overflow: hidden;
     overflow: hidden;
     overflow-y: auto;
     overflow-y: auto;
   }
   }
@@ -976,7 +991,7 @@ onMounted(() => {
     color: #007fff;
     color: #007fff;
   }
   }
   .inuse-left {
   .inuse-left {
-    width: 100%;
+    width: 50%;
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
     background: #fff;
     background: #fff;
     margin: 0.5%;
     margin: 0.5%;
@@ -986,13 +1001,14 @@ onMounted(() => {
     align-items: center;
     align-items: center;
     flex-wrap: wrap;
     flex-wrap: wrap;
   }
   }
+
   .inuse-right {
   .inuse-right {
     width: 49.5%;
     width: 49.5%;
     margin-left: 0%;
     margin-left: 0%;
     border-radius: 5px;
     border-radius: 5px;
     background: #fff;
     background: #fff;
     box-shadow: 0 2px 5px #e9e9e9;
     box-shadow: 0 2px 5px #e9e9e9;
-    margin: 0.5% 0%;
+    margin: 0.5%;
     /* margin-left: 1%; */
     /* margin-left: 1%; */
     position: relative;
     position: relative;
   }
   }
@@ -1006,7 +1022,7 @@ onMounted(() => {
     border-radius: 5px;
     border-radius: 5px;
     /* box-shadow: 0 2px 5px #e9e9e9; */
     /* box-shadow: 0 2px 5px #e9e9e9; */
     border: 1px solid #e9e9e9;
     border: 1px solid #e9e9e9;
-    margin: 0.5%;
+    margin: 1%;
   }
   }
   .inuseicon {
   .inuseicon {
     width: 1.6em;
     width: 1.6em;
@@ -1226,6 +1242,9 @@ onMounted(() => {
   .noneclassclass-text {
   .noneclassclass-text {
     color: #95a5a6 !important;
     color: #95a5a6 !important;
   }
   }
+  .lessons-item:last-child{
+    margin-bottom: 1%;
+  }
   @media screen and (max-width: 1400px) {
   @media screen and (max-width: 1400px) {
     .basicadata-item {
     .basicadata-item {
       line-height: 30px !important;
       line-height: 30px !important;

+ 27 - 1
TEAMModelBI/Controllers/BITmid/TmidController.cs

@@ -504,7 +504,7 @@ namespace TEAMModelBI.Controllers.BITmid
                                 string id = doc.GetProperty("id").GetString();
                                 string id = doc.GetProperty("id").GetString();
                                 if (doc.TryGetProperty("hiteach_data", out var elementHiteachData))
                                 if (doc.TryGetProperty("hiteach_data", out var elementHiteachData))
                                 {
                                 {
-                                    tmidDic[id].sokrates.hiteach_data = elementHiteachData.ToObject<object>();
+                                    tmidDic[id].sokrates.hiteach_data = elementHiteachData.ToObject<TmidSokratesHiteach>();
                                 }
                                 }
                                 if (doc.TryGetProperty("user_channels", out var elementUserChannels))
                                 if (doc.TryGetProperty("user_channels", out var elementUserChannels))
                                 {
                                 {
@@ -781,6 +781,32 @@ namespace TEAMModelBI.Controllers.BITmid
             public object hiteach_data { get; set; }
             public object hiteach_data { get; set; }
             public object user_channels { get; set; }
             public object user_channels { get; set; }
         }
         }
+        public class TmidSokratesHiteach
+        {
+            public TmidSokratesHiteachItem total { get; set; }
+            public TmidSokratesHiteachItem this_year { get; set; }
+            public TmidSokratesHiteachItem this_month { get; set; }
+            public TmidSokratesHiteachItem this_week { get; set; }
+        }
+        public class TmidSokratesHiteachItem
+        {
+            public string start_date { get; set; } = "";
+            public string end_date { get; set; } = "";
+            public string t_data { get; set; } = "0";
+            public string duration { get; set; } = "0";
+            public string attendance { get; set; } = "0";
+            public string interaction { get; set; } = "0";
+            public string t_green { get; set; } = "0";
+            public string learning_duration { get; set; } = "0";
+            public string all_total { get; set; } = "0";
+            public string double_green_light { get; set; } = "0";
+            public string public_count { get; set; } = "0";
+            public string material_count { get; set; } = "0";
+            public string personal_comment { get; set; } = "0";
+            public string comment_count { get; set; } = "0";
+            public string watchHistory { get; set; } = "0";
+            public string sokrates_summary { get; set; } = "0";
+        }
         private class TmidBenefits
         private class TmidBenefits
         {
         {
             public List<object> hiteach { get; set; }
             public List<object> hiteach { get; set; }

+ 3 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperTest.vue

@@ -1002,7 +1002,9 @@
                         multipleRule: this.getExamInfo.multipleRule, //阅卷规则
                         multipleRule: this.getExamInfo.multipleRule, //阅卷规则
                         paperId: this.getExamInfo.id, //试卷id
                         paperId: this.getExamInfo.id, //试卷id
                         code: codes,
                         code: codes,
-                        scode: this.getItemTitle.scode
+                        scode: this.getItemTitle.scode,
+                        paperAns: this.getExamInfo.answers,
+                        point: this.getExamInfo.point
                     }
                     }
                     if(this.getItemTitle.type === "Art") {
                     if(this.getItemTitle.type === "Art") {
                         req.scode = `Exam-${codes}`
                         req.scode = `Exam-${codes}`

+ 96 - 116
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/AnswerBox.vue

@@ -84,7 +84,7 @@
                         </template>
                         </template>
                     </div>
                     </div>
                     <template v-if="practiceType === 3 || practiceType === 4">
                     <template v-if="practiceType === 3 || practiceType === 4">
-                        <div v-if="quesInfo.type === 'judge' || quesInfo.type === 'single'  || quesInfo.type === 'multiple'" style="margin-left: 15px;">
+                        <div v-if="quesType.includes(quesInfo.type)" style="margin-left: 15px;">
                             <!-- <p>选项:</p> -->
                             <!-- <p>选项:</p> -->
                             <div v-for="(item, index) in quesInfo.option" :key="index">
                             <div v-for="(item, index) in quesInfo.option" :key="index">
                                 <div>
                                 <div>
@@ -119,7 +119,7 @@
                     </template>
                     </template>
                     <div v-html="quesInfo.question"></div>
                     <div v-html="quesInfo.question"></div>
                     
                     
-                    <div style="font-weight: 100; margin-top: 10px;" v-if="(quesInfo.type === 'single' || quesInfo.type === 'multiple' || quesInfo.type === 'judge') && showOption">
+                    <div style="font-weight: 100; margin-top: 10px;" v-if="quesType.includes(quesInfo.type) && showOption">
                         <p>{{ $t('answerSheet.tip7') }}:</p>
                         <p>{{ $t('answerSheet.tip7') }}:</p>
                         <div v-for="(item, index) in quesInfo.option" :key="index">
                         <div v-for="(item, index) in quesInfo.option" :key="index">
                             <!-- <Icon type="md-arrow-dropright" /> -->
                             <!-- <Icon type="md-arrow-dropright" /> -->
@@ -143,7 +143,7 @@
                     <Button class="common-button" style="background: #84ba48" @click="goTo(3, 4)">{{ $t("studentWeb.wrongQues.answer.button2") }}</Button>
                     <Button class="common-button" style="background: #84ba48" @click="goTo(3, 4)">{{ $t("studentWeb.wrongQues.answer.button2") }}</Button>
                 </div>
                 </div>
                 <div v-if="practiceType === 3 || practiceType === 4" :class="['button-ans', quesType.includes(quesInfo.type) ? '' : 'editor-box', quesInfo.pid ? 'parent-editor' : '']">
                 <div v-if="practiceType === 3 || practiceType === 4" :class="['button-ans', quesType.includes(quesInfo.type) ? '' : 'editor-box', quesInfo.pid ? 'parent-editor' : '']">
-                    <template v-if="quesInfo.type === 'judge' || quesInfo.type === 'single'  || quesInfo.type === 'multiple'">
+                    <template v-if="quesType.includes(quesInfo.type)">
                         <div v-for="(item, index) in quesInfo.option" :key="index" :tabIndex="index"
                         <div v-for="(item, index) in quesInfo.option" :key="index" :tabIndex="index"
                             :class="['code-block', isChecked(item.code) ? 'code-block-active' : '']"
                             :class="['code-block', isChecked(item.code) ? 'code-block-active' : '']"
                             @click="onAnswerCheck(item, index)" :style="{'cursor': practiceType === 3 ? 'pointer' : 'no-drop',}"
                             @click="onAnswerCheck(item, index)" :style="{'cursor': practiceType === 3 ? 'pointer' : 'no-drop',}"
@@ -169,8 +169,8 @@
                     <Button v-if="practiceType === 4" class="common-button only-button" style="background: #84ba48" @click="goTo(0)">{{ $t("studentWeb.wrongQues.answer.button6") }}</Button>
                     <Button v-if="practiceType === 4" class="common-button only-button" style="background: #84ba48" @click="goTo(0)">{{ $t("studentWeb.wrongQues.answer.button6") }}</Button>
                 </div>
                 </div>
                 <div v-if="practiceType === 5" class="button-ans">
                 <div v-if="practiceType === 5" class="button-ans">
-                    <Button class="common-button rest-button" style="background: #84ba48" @click="goTo(mode === 'wrong' ? 2 : 1)">{{ $t("studentWeb.wrongQues.answer.button7") }}</Button>
                     <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">{{ $t("studentWeb.wrongQues.answer.button8") }}</Button>
                     <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">{{ $t("studentWeb.wrongQues.answer.button8") }}</Button>
+                    <Button class="common-button rest-button" style="background: #84ba48" @click="goTo(mode === 'wrong' ? 2 : 1)">{{ $t("studentWeb.wrongQues.answer.button7") }}</Button>
                 </div>
                 </div>
             </div>
             </div>
             <div v-if="practiceType === 6" :class="['question-content', 'quertion-area', 'quertion-settlement', statisticsObj.ids.length ? '' : 'no-ok-text']">
             <div v-if="practiceType === 6" :class="['question-content', 'quertion-area', 'quertion-settlement', statisticsObj.ids.length ? '' : 'no-ok-text']">
@@ -413,24 +413,24 @@ export default {
                     let sas = await this.getSas(this.courseNow.scope)
                     let sas = await this.getSas(this.courseNow.scope)
                     let code = this.courseNow.scope === 'school' ? (this.userInfo.scope === 'student' ? this.userInfo.azp : this.userInfo.sub) : this.courseNow.teacherId
                     let code = this.courseNow.scope === 'school' ? (this.userInfo.scope === 'student' ? this.userInfo.azp : this.userInfo.sub) : this.courseNow.teacherId
                     let courId = this.courseNow.scope === 'school' ? (this.$route.params.subjectId || this.courseNow.subject.id) : this.courseNow.id
                     let courId = this.courseNow.scope === 'school' ? (this.$route.params.subjectId || this.courseNow.subject.id) : this.courseNow.id
-                    res.error.forEach(item => {
-                        let actId = params.errorItems.find(errItem => errItem.qId === item.items.id).activityId
-
-                        let examInfo = item.items.exercise
-                        examInfo.id = item.items.id
-                        examInfo.question = item.items.item[0].question
-                        examInfo.option = item.items.item[0].option
+                    this.qsAll.forEach(item => {
+                        let info = res.error.find(err => item.qId === err.items.id)
+                        if(!info) return
+                        let examInfo = info.items.exercise
+                        examInfo.id = info.items.id
+                        examInfo.question = info.items.item[0].question
+                        examInfo.option = info.items.item[0].option
                         examInfo.parentInfo = undefined
                         examInfo.parentInfo = undefined
-                        examInfo.pid = item.items.pid
+                        examInfo.pid = info.items.pid
                         examInfo.showAns = []
                         examInfo.showAns = []
-                        examInfo.qamode = item.qamode
-                        examInfo.attachments = item.attachments.map(attach => {
-                            return sas.url + "/" + code + '/exam/' + actId + '/paper/' + courId + '/' + attach + '?' + sas.sas
+                        examInfo.qamode = info.qamode
+                        examInfo.attachments = info.attachments.map(attach => {
+                            return sas.url + "/" + code + '/exam/' + item.activityId + '/paper/' + courId + '/' + attach + '?' + sas.sas
                         })
                         })
                         if(examInfo.type === 'judge') {
                         if(examInfo.type === 'judge') {
                             examInfo.option = [{code: "A", value: this.$t("ability.true")}, {code: "B", value: this.$t("ability.false")}]
                             examInfo.option = [{code: "A", value: this.$t("ability.true")}, {code: "B", value: this.$t("ability.false")}]
                         }
                         }
-                        if(examInfo.type === 'judge' || examInfo.type === 'single'  || examInfo.type === 'multiple') {
+                        if(this.quesType.includes(examInfo.type)) {
                             let showAns = examInfo.option.filter(option => {
                             let showAns = examInfo.option.filter(option => {
                                 return examInfo.answer.includes(option.code)
                                 return examInfo.answer.includes(option.code)
                             })
                             })
@@ -464,6 +464,11 @@ export default {
                         this.quesContent.push(examInfo)
                         this.quesContent.push(examInfo)
                         this.quesLevel[examInfo.level - 1]++
                         this.quesLevel[examInfo.level - 1]++
                     })
                     })
+                } else {
+                    this.$Message.error(this.$t('studentWeb.wrongQues.message2'))
+                    setTimeout(() => {
+                        this.$router.go(-1)
+                    }, 2500)
                 }
                 }
             }).finally(() => {
             }).finally(() => {
                 this.quesInfo = this.quesContent[this.nowIndex]
                 this.quesInfo = this.quesContent[this.nowIndex]
@@ -632,35 +637,29 @@ export default {
                 // 3:keyCode(99、51),key(3)...
                 // 3:keyCode(99、51),key(3)...
                 // enter:keyCode(13),key(Enter)
                 // enter:keyCode(13),key(Enter)
                 let keyCodecustom = [49, 50, 51, 52, 97, 98, 99, 100]
                 let keyCodecustom = [49, 50, 51, 52, 97, 98, 99, 100]
-                // 询问
-                if(this.practiceType === 2) {
-                    if(keyCodecustom.includes(e.keyCode)) {
-                        this.goTo(3, Number(e.key))
-                    }
-                }
-                // 作答
-                else if(this.practiceType === 3) {
-                    // 判断题型,多选需要持续加
-                    if(e.keyCode === 13) {
-                        this.goTo(4)
-                    }
-                    /* if(e.keyCode > 48 && e.keyCode < 57) {
-                        let index = e.key
-                        this.onAnswerCheck(this.quesInfo.option[], index)
-                    } */
-                    // 数字键盘
-                    if(e.keyCode > 96 && e.keyCode < (97 + this.quesInfo.option.length)) {
-                        let index = Number(e.key) - 1
-                        this.onAnswerCheck(this.quesInfo.option[index])
-                    }
-                }
-                // 提交
-                else if(this.practiceType === 4) {
-                    if(e.keyCode === 13) {
-                        this.goTo(0)
-                    }
+                switch(this.practiceType) {
+                    case 2:
+                        if(keyCodecustom.includes(e.keyCode)) {
+                            this.goTo(3, Number(e.key))
+                        }
+                        break
+                    case 3:
+                        // 判断题型,多选需要持续加
+                        if(e.keyCode === 13) {
+                            this.goTo(4)
+                        }
+                        // 数字键盘
+                        if(e.keyCode > 96 && e.keyCode < (97 + this.quesInfo.option.length)) {
+                            let index = Number(e.key) - 1
+                            this.onAnswerCheck(this.quesInfo.option[index])
+                        }
+                        break
+                    case 4:
+                        if(e.keyCode === 13) {
+                            this.goTo(0)
+                        }
+                        break
                 }
                 }
-                
             }
             }
         },
         },
         // 下一步该做什么
         // 下一步该做什么
@@ -672,6 +671,7 @@ export default {
                     setTimeout(() => {
                     setTimeout(() => {
                         this.$router.go(-1)
                         this.$router.go(-1)
                     }, 2500)
                     }, 2500)
+                    return
                 }
                 }
                 if(type != 4) {
                 if(type != 4) {
                     this.nowIndex += 1
                     this.nowIndex += 1
@@ -683,58 +683,14 @@ export default {
                 return
                 return
             }
             }
             let time = new Date().getTime()
             let time = new Date().getTime()
-            if(type === 3) {
-                this.exerciseInfo[this.nowIndex].confidenceLevel = confidence
-                this.exerciseInfo[this.nowIndex].startTime = time
-                let conType = `confidenceLevel${confidence}`
-                this.statisticsObj[conType] ++
-                // 不会的题目需要加入数组,便于统计时计算复习题目数量
-                if(confidence === 1) this.statisticsObj.ids.indexOf(this.exerciseInfo[this.nowIndex].qId) > -1 ? false : this.statisticsObj.ids.push(this.exerciseInfo[this.nowIndex].qId)
-            } else if(type === 4) {
-                // 客观题做对错判断,  主观题不判断=>改为默认正确
-                let objectiveTypes = ["single", "multiple", "judge"]
-                let corre = null
-                if(objectiveTypes.includes(this.quesInfo.type)) {
-                    if(this.quesInfo.type != "multiple") {
-                        if(this.checkedAnswerList[0] == this.quesInfo.answer[0]) {
-                            corre = 1
-                        } else {
-                            corre = 0
-                        }
-                    }
-                    // 多选
-                    else {
-                        let answer = this.quesInfo.answer
-                        let q = 0
-                        this.checkedAnswerList.map(item => {
-                            for (let i = 0; i < answer.length; i++) {
-                                if(item == answer[i]) {
-                                    q += 1
-                                    break
-                                }
-                            }
-                        })
-                        if(answer.length === q) {
-                            corre = 1
-                        } else {
-                            corre = 0
-                        }
-                    }
-                    this.exerciseInfo[this.nowIndex].correctness = corre
-                } else {
-                    this.exerciseInfo[this.nowIndex].correctness = 1
-                }
-                this.exerciseInfo[this.nowIndex].correctness ? this.statisticsObj.right++ : this.statisticsObj.wrong++
-                // 答错题目加入数组,计算复习数量
-                if(!this.exerciseInfo[this.nowIndex].correctness) this.statisticsObj.ids.indexOf(this.exerciseInfo[this.nowIndex].qId) > -1 ? false : this.statisticsObj.ids.push(this.exerciseInfo[this.nowIndex].qId)
-                this.exerciseInfo[this.nowIndex].endTime = time
-            }
-            if(type) {
-                // 没有作答点击提交
-                if(type === 4 && !this.checkedAnswerList.length) {
-                    this.$Message.warning(this.$t("studentWeb.queNaire.noAns5"))
-                } else if(type === 3) {
-                    // this.practiceType = this.quesType.includes(this.quesInfo.type) ? type : 4
+            switch(type) {
+                case 3:
+                    this.exerciseInfo[this.nowIndex].confidenceLevel = confidence
+                    this.exerciseInfo[this.nowIndex].startTime = time
+                    let conType = `confidenceLevel${confidence}`
+                    this.statisticsObj[conType] ++
+                    // 不会的题目需要加入数组,便于统计时计算复习题目数量
+                    if(confidence === 1) this.statisticsObj.ids.indexOf(this.exerciseInfo[this.nowIndex].qId) > -1 ? false : this.statisticsObj.ids.push(this.exerciseInfo[this.nowIndex].qId)
                     if(this.quesType.includes(this.quesInfo.type)) {
                     if(this.quesType.includes(this.quesInfo.type)) {
                         this.practiceType = type
                         this.practiceType = type
                     } else {
                     } else {
@@ -742,30 +698,54 @@ export default {
                         this.exerciseInfo[this.nowIndex].correctness = 1
                         this.exerciseInfo[this.nowIndex].correctness = 1
                         this.exerciseInfo[this.nowIndex].endTime = time + 1
                         this.exerciseInfo[this.nowIndex].endTime = time + 1
                     }
                     }
-                } else {
-                    this.practiceType = type
-                }
-            } else {
-                // 根据做题进度进入(学习/休息)界面
-                if(this.nowIndex === (this.quesContent.length - 1)) {
-                    // 第一次练习完成
-                    /* if(!this.isExce) {
-                        this.isOkk = true
-                        clearInterval(this.timeAlarmTWO)
-                    } else { */
+                    break
+                case 4:
+                    // 没有作答点击提交
+                    if(!this.checkedAnswerList.length) {
+                        this.$Message.warning(this.$t("studentWeb.queNaire.noAns5"))
+                        break
+                    }
+                    let corre = null
+                    // 客观题做对错判断  主观题不判断=>改为默认正确
+                    if(this.quesType.includes(this.quesInfo.type)) {
+                        if(this.quesInfo.type != "multiple") {
+                            corre = this.checkedAnswerList[0] === this.quesInfo.answer[0] ? 1 : 0
+                        } else {// 多选
+                            let answer = this.quesInfo.answer
+                            let q = 0
+                            this.checkedAnswerList.map(item => {
+                                for (let i = 0; i < answer.length; i++) {
+                                    if(item == answer[i]) {
+                                        q += 1
+                                        break
+                                    }
+                                }
+                            })
+                            corre = answer.length === q ? 1 : 0
+                        }
+                        this.exerciseInfo[this.nowIndex].correctness = corre
+                    } else {
+                        this.exerciseInfo[this.nowIndex].correctness = 1
+                    }
+                    this.exerciseInfo[this.nowIndex].correctness ? this.statisticsObj.right++ : this.statisticsObj.wrong++
+                    // 答错题目加入数组,计算复习数量
+                    if(!this.exerciseInfo[this.nowIndex].correctness) this.statisticsObj.ids.indexOf(this.exerciseInfo[this.nowIndex].qId) > -1 ? false : this.statisticsObj.ids.push(this.exerciseInfo[this.nowIndex].qId)
+                    this.exerciseInfo[this.nowIndex].endTime = time
+                    console.log('题目作答状态', this.nowIndex, this.quesInfo.question, this.exerciseInfo[this.nowIndex].correctness, this.statisticsObj.right, this.statisticsObj.wrong);
+                case 0:
+                    // 根据做题进度进入(学习/休息)界面
+                    if(this.nowIndex === (this.quesContent.length - 1)) {
                         // 第二次练习直接退出
                         // 第二次练习直接退出
                         this.quitTest()
                         this.quitTest()
-                    // }
-                } else {
-                    this.checkedAnswerList = []
-                    // 做10题休息
-                    if((this.nowIndex + 1) % 10) {
-                        this.practiceType = this.mode === 'wrong' ? 2 : 1
                     } else {
                     } else {
-                        this.practiceType = 5
+                        this.checkedAnswerList = []
+                        // 做10题休息
+                        this.practiceType = ((this.nowIndex + 1) % 10) ? (this.mode === 'wrong' ? 2 : 1) : 5
+                        this.nowIndex += 1
                     }
                     }
-                    this.nowIndex += 1
-                }
+                    break
+                default:
+                    this.practiceType = type
             }
             }
         },
         },
         //打开提示信息
         //打开提示信息

+ 9 - 7
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -843,12 +843,14 @@ namespace TEAMModelOS.Controllers
             //学校编码
             //学校编码
             //if (!request.TryGetProperty("school", out JsonElement school)) return BadRequest();            
             //if (!request.TryGetProperty("school", out JsonElement school)) return BadRequest();            
             if (!request.TryGetProperty("answer", out JsonElement answer)) return BadRequest();
             if (!request.TryGetProperty("answer", out JsonElement answer)) return BadRequest();
+            if (!request.TryGetProperty("paperAns", out JsonElement paperAns)) return BadRequest();
+            if (!request.TryGetProperty("point", out JsonElement point)) return BadRequest();
             //if (!request.TryGetProperty("studentId", out JsonElement studentId)) return BadRequest();
             //if (!request.TryGetProperty("studentId", out JsonElement studentId)) return BadRequest();
             if (!request.TryGetProperty("subjectId", out JsonElement subjectId)) return BadRequest();
             if (!request.TryGetProperty("subjectId", out JsonElement subjectId)) return BadRequest();
             if (!request.TryGetProperty("classIds", out JsonElement classId)) return BadRequest();
             if (!request.TryGetProperty("classIds", out JsonElement classId)) return BadRequest();
             if (!request.TryGetProperty("multipleRule", out JsonElement multipleRule)) return BadRequest();
             if (!request.TryGetProperty("multipleRule", out JsonElement multipleRule)) return BadRequest();
             //if (!request.TryGetProperty("answers ", out JsonElement tandardAnswer)) return BadRequest();
             //if (!request.TryGetProperty("answers ", out JsonElement tandardAnswer)) return BadRequest();
-            if (!request.TryGetProperty("paperId", out JsonElement paperId)) return BadRequest();
+            //if (!request.TryGetProperty("paperId", out JsonElement paperId)) return BadRequest();
             //根据不同评测的类型返回对应的编码
             //根据不同评测的类型返回对应的编码
             if (!request.TryGetProperty("code", out JsonElement code)) return BadRequest();
             if (!request.TryGetProperty("code", out JsonElement code)) return BadRequest();
             if (!request.TryGetProperty("scode", out JsonElement scode)) return BadRequest();
             if (!request.TryGetProperty("scode", out JsonElement scode)) return BadRequest();
@@ -964,7 +966,7 @@ namespace TEAMModelOS.Controllers
                 }
                 }
 
 
                 ExamClassResult classResult = new ExamClassResult();
                 ExamClassResult classResult = new ExamClassResult();
-                List<PaperSimple> standerAnswers = new List<PaperSimple>();
+               /* List<PaperSimple> standerAnswers = new List<PaperSimple>();
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(
                     queryText: $"select A0.point,A0.answers from c join A0 in c.papers where c.id = '{id}'and A0.id = '{paperId}'",
                     queryText: $"select A0.point,A0.answers from c join A0 in c.papers where c.id = '{id}'and A0.id = '{paperId}'",
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{scode}") }))
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{scode}") }))
@@ -977,16 +979,16 @@ namespace TEAMModelOS.Controllers
                             standerAnswers.Add(obj.ToObject<PaperSimple>());
                             standerAnswers.Add(obj.ToObject<PaperSimple>());
                         }
                         }
                     }
                     }
-                }
+                }*/
                 List<List<string>> ans = answer.ToObject<List<List<string>>>();
                 List<List<string>> ans = answer.ToObject<List<List<string>>>();
-                List<List<string>> standard = new List<List<string>>();
-                List<double> points = new List<double>();
+                List<List<string>> standard = paperAns.ToObject<List<List<string>>>();
+                List<double> points = point.ToObject<List<double>>();
                 int rule = int.Parse(multipleRule.ToString());
                 int rule = int.Parse(multipleRule.ToString());
-                foreach (PaperSimple simple in standerAnswers)
+               /* foreach (PaperSimple simple in standerAnswers)
                 {
                 {
                     standard = simple.answers;
                     standard = simple.answers;
                     points = simple.point;
                     points = simple.point;
-                }
+                }*/
                 List<Task<string>> tasks = new List<Task<string>>();
                 List<Task<string>> tasks = new List<Task<string>>();
                 foreach (ExamClassResult result in examClassResults)
                 foreach (ExamClassResult result in examClassResults)
                 {
                 {

+ 3 - 3
TEAMModelOS/Controllers/School/SchoolController.cs

@@ -2112,9 +2112,9 @@ namespace TEAMModelOS.Controllers
                 int dateToYear = (!edate.Item1.Equals(0)) ? edate.Item1 : datetime.Year;
                 int dateToYear = (!edate.Item1.Equals(0)) ? edate.Item1 : datetime.Year;
                 int dateToMonth = (!edate.Item2.Equals(0)) ? edate.Item2 : datetime.Month;
                 int dateToMonth = (!edate.Item2.Equals(0)) ? edate.Item2 : datetime.Month;
                 int dateToDay = (!edate.Item3.Equals(0)) ? edate.Item3 : datetime.Day;
                 int dateToDay = (!edate.Item3.Equals(0)) ? edate.Item3 : datetime.Day;
-                //教室數(今年)
+                //教室數
                 int classCnt = 0;
                 int classCnt = 0;
-                string sql = $"SELECT VALUE COUNT(c.id) FROM c WHERE c.year = {studyYear}";
+                string sql = $"SELECT VALUE COUNT(c.id) FROM c";
                 await foreach (int items in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetItemQueryIterator<int>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Class-{_schoolId}") }))
                 await foreach (int items in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetItemQueryIterator<int>(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Class-{_schoolId}") }))
                 {
                 {
                     classCnt = items;
                     classCnt = items;
@@ -2126,7 +2126,7 @@ namespace TEAMModelOS.Controllers
                 {
                 {
                     teacherCnt = items;
                     teacherCnt = items;
                 }
                 }
-                //學生數(今年) 用學段篩選
+                //學生數 用學段篩選 未畢業
                 int studentCnt = 0;              
                 int studentCnt = 0;              
                 string sql_studentCnt = $"SELECT count(1) as stus FROM c where c.periodId = '{periodId}' and (c.graduate = 0 OR IS_DEFINED(c.graduate) = false) ";
                 string sql_studentCnt = $"SELECT count(1) as stus FROM c where c.periodId = '{periodId}' and (c.graduate = 0 OR IS_DEFINED(c.graduate) = false) ";
                 await foreach (var items in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(queryText: sql_studentCnt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base-{_schoolId}") }))
                 await foreach (var items in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(queryText: sql_studentCnt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base-{_schoolId}") }))