浏览代码

Merge branch 'develop3.0' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0

李思淳 5 年之前
父节点
当前提交
940168e6a9

+ 1 - 1
TEAMModelOS.Service/Models/Evaluation/Models/ExamPaper.cs

@@ -17,6 +17,6 @@ namespace TEAMModelOS.Service.Models.Evaluation.Models
         [PartitionKey]
         public string code { get; set; }
         public List<ItemInfo> item { get; set; }       
-        //public string Subject { get; set; }
+        public string Subject { get; set; }
     }
 }

+ 1 - 0
TEAMModelOS.Service/Models/Evaluation/Models/SimpleExam.cs

@@ -21,6 +21,7 @@ namespace TEAMModelOS.Service.Model.Evaluation.Models
         public string Name { get; set; }
         public string Time { get; set; }
         [PartitionKey]
+        public string SubjectCode { get; set; }
         public string Subject { get; set; }
 
         public List<Dictionary<string, int[]>> Classes { get; set; }

+ 3 - 14
TEAMModelOS/ClientApp/src/common/UploadFile.vue

@@ -102,7 +102,7 @@
               ).then(
                 res => {
                   //fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/compress${file.name}`
-                  fileInfo['compressUrl'] = this.urlString + '/' + this.pathName + this.sasString + '/' + this.pathName + '/compress' + file.name
+                  fileInfo['compressUrl'] = this.urlString  + '/' + this.pathName + '/compress' + file.name
                   this.$emit("successData", fileInfo)
                 },
                 err => {
@@ -119,10 +119,6 @@
           video.setAttribute("crossOrigin",'*')
           video.setAttribute("src", fileInfo.blobUrl + this.sasString)
           video.addEventListener('loadeddata', () => {
-            console.log(video.width)
-            console.log(video.height)
-            console.log(video.videoWidth)
-            console.log(video.videoHeight)
             let canvas = document.createElement('canvas')
             canvas.width = 300
             canvas.height = 300 * video.videoHeight / video.videoWidth
@@ -143,7 +139,7 @@
             ).then(
               res => {
                 //fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${posterName}`
-                fileInfo['compressUrl'] = this.urlString + '/' + this.pathName + this.sasString + '/' + this.pathName + '/' + posterName
+                fileInfo['compressUrl'] = this.urlString + '/' + this.pathName + '/' + posterName
                 this.$emit("successData", fileInfo)
               },
               err => {
@@ -162,7 +158,7 @@
         let fileItem = {}
         fileItem['fileName'] = file.name
         //fileItem['blobUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${file.name}`
-        fileItem['blobUrl'] = this.urlString + '/' + this.pathName + this.sasString + '/' + this.pathName + '/'+ file.name
+        fileItem['blobUrl'] = this.urlString + '/' + this.pathName + '/'+ file.name
         fileItem['extension'] = file.name.substring(file.name.lastIndexOf('.') + 1)
         fileItem['size'] = file.size
         fileItem['status'] = 0
@@ -207,12 +203,6 @@
                 this.uploadedList[index]['sha1Code'] = str
                 if (this.uploadedList[index].type == 'picture' || this.uploadedList[index].type == 'video') {
                   this.compressFile(file,this.uploadedList[index])
-                  //if (this.uploadedList[index].type == 'video') {
-                  //  console.log('bug is here!!!')
-                  //} else {
-                  //  this.compressFile(file,this.uploadedList[index])
-                  //}
-                  
                 } else {
                   this.$emit("successData", this.uploadedList[index])
                 }
@@ -220,7 +210,6 @@
                 console.log(e)
               }
             }
-            
           },
           err => {
             fileItem['status'] = 2

+ 1 - 1
TEAMModelOS/ClientApp/src/filters/http.js

@@ -1,7 +1,7 @@
 import axios from 'axios'
 import { Message } from 'view-design'
 import router from '@/router/index'
-axios.defaults.timeout = 10000 // 设置超时时长
+axios.defaults.timeout = 30000 // 设置超时时长
 axios.defaults.baseURL = ''
 
 // http request 拦截器

文件差异内容过多而无法显示
+ 1389 - 0
TEAMModelOS/ClientApp/src/static/questions.json


+ 3 - 3
TEAMModelOS/ClientApp/src/store/module/totalAnalysis.js

@@ -2,14 +2,14 @@
 import apiTools from '@/api'
 import tools from '@/utils/public.js'
 import examList from '@/static/examList.json' // 模拟评测数据
-import questions from '@/static/questionList.json' // 模拟题目数据
+import questions from '@/static/questions.json' // 模拟题目数据
 import filter from '@/static/filter.json' // 模拟题目数据
 
 export default {
     state: {
         scrollTop: 0,
         examList: examList,
-        questions: questions,
+        questions: questions.item,
         filterData: filter,
         subjectList: [],
 
@@ -173,7 +173,7 @@ export default {
         getKnowledgeData(context) {
             let params = {
                 //Subject: context.state.currentSubject
-                Subject: 'Subject_Math'
+                Subject: '数学'
             }
             return new Promise((r, j) => {
                 if (context.state.knowledgeData) {

+ 0 - 12
TEAMModelOS/ClientApp/src/utils/azure-storage-blob.js

@@ -6,19 +6,15 @@
     if (typeof define === 'function' && define.amd) {
 
         // AMD
-
-        console.log('AMD')
         //define(['jquery', 'underscore'], factory);
     } else if (typeof exports === 'object') {
 
         // Node, CommonJS之类的
-        console.log('Node, CommonJS之类的')
         //module.exports = factory(require('jquery'), require('underscore'));
 
     } else {
 
         // 浏览器全局变量(root 即 window)
-        console.log('浏览器全局变量(root 即 window)')
         //root.returnExports = factory(root.jQuery, root._);
 
     }
@@ -17176,8 +17172,6 @@
      * @returns {Promise<BlobUploadCommonResponse>}
      */
     function uploadBrowserDataToBlockBlob(aborter, browserData, blockBlobURL, options) {
-        console.log('----------')
-        console.log(options)
         return __awaiter(this, void 0, void 0, function () {
             var browserBlob;
             return __generator(this, function (_a) {
@@ -17247,11 +17241,8 @@
                         if (size <= options.maxSingleShotSize) {
                             return [2 /*return*/, blockBlobURL.upload(aborter, blobFactory(0, size), size, options)];
                         }
-                        console.log(options)
                         let test = 10 * 1024 * 1024
                         numBlocks = Math.floor((size - 1) / test) + 1;
-                        //numBlocks = Math.floor((size - 1) / options.blockSize) + 1;
-                        console.log(numBlocks)
                         if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {
                             throw new RangeError("The buffer's size is too big or the BlockSize is too small;" +
                                 ("the number of blocks must be <= " + BLOCK_BLOB_MAX_BLOCKS));
@@ -17294,9 +17285,6 @@
                         for (i = 0; i < numBlocks; i++) {
                             _loop_1(i);
                         }
-                        
-                        console.log('blockList')
-                        console.log(blockList.length)
                         return [4 /*yield*/, batch.do()];
                     case 1:
                         _a.sent();

+ 1 - 1
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseSyllabus.vue

@@ -37,7 +37,7 @@
             <NoData v-show="volumes.length == 0" style="margin-top:100px;" fontSize="18px"></NoData>
           </vuescroll>
         </div>
-        <div slot="right" class="demo-split-pane" style="padding-top:15px;padding-lef t:20px;overflow:auto;height: 100%;">
+        <div slot="right" class="demo-split-pane" style="padding-top:15px;padding-left:20px;overflow:auto;height: 100%;">
           <vuescroll>
             <p class="syllabus-title">2.1 等差数列求和</p>
             <div class="syllabus-point">

+ 3 - 2
TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue

@@ -648,8 +648,9 @@
 
         },
         mounted() {
-            this.getStandardList()
-            this.getSchoolPoints()
+          //this.getStandardList()
+          this.list = questions.result.data
+            //this.getSchoolPoints()
             // this.getAllPoints();
         },
         computed: {

+ 65 - 57
TEAMModelOS/ClientApp/src/view/student-account/Index.less

@@ -8,74 +8,82 @@
 @second-fontSize:16px;
 
 .sc {
-    &-container {
-        width: 100%;
-        height: 100%;
-        background-color: @first-bgColor;
-        padding-top: 10px;
+  &-container {
+    width: 100%;
+    height: 100%;
+    background-color: @first-bgColor;
+    padding-top: 10px;
+
+    .item-tools .ivu-icon {
+      cursor: pointer;
+
+      &:first-child {
+        margin-right: 20px;
+      }
     }
+  }
 
-    &-menu {
-        height: 45px;
-        width: ~"calc(100%-50px)";
-        width: ~"-webkit-calc(100%-50px)";
-        width: ~"-moz-calc(100%-50px)";
-        border-bottom: 1px solid @borderColor;
-        /*border-top: 1px solid @borderColor;*/
-        padding: 0px 35px 0px 15px;
-        /*margin-left: 35px;*/
-        box-sizing: content-box;
-        -webkit-box-sizing: content-box;
-        -moz-box-sizing: content-box;
-        background-color: @second-bgColor;
+  &-menu {
+    height: 45px;
+    width: ~"calc(100%-50px)";
+    width: ~"-webkit-calc(100%-50px)";
+    width: ~"-moz-calc(100%-50px)";
+    border-bottom: 1px solid @borderColor;
+    /*border-top: 1px solid @borderColor;*/
+    padding: 0px 35px 0px 15px;
+    /*margin-left: 35px;*/
+    box-sizing: content-box;
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    background-color: @second-bgColor;
 
-        &-left {
-            float: left;
-            line-height: 45px;
-            height: 45px;
-            width: 49%;
-        }
+    &-left {
+      float: left;
+      line-height: 45px;
+      height: 45px;
+      width: 49%;
+    }
 
-        &-right {
-            float: right;
-            line-height: 45px;
-            height: 45px;
-            width: 50%;
+    &-right {
+      float: right;
+      line-height: 45px;
+      height: 45px;
+      width: 50%;
 
-            ul {
-                list-style: none;
-                color: @second-textColor;
-                width: 100%;
+      ul {
+        list-style: none;
+        color: @second-textColor;
+        width: 100%;
 
-                li {
-                    height: 45px;
-                    line-height: 45px;
-                    display: inline-block;
-                    margin-left: 30px;
-                    float: right;
-                    cursor: pointer;
-                }
+        li {
+          height: 45px;
+          line-height: 45px;
+          display: inline-block;
+          margin-left: 30px;
+          float: right;
+          cursor: pointer;
+        }
 
-                span {
-                    margin-left: 8px;
-                    display: inline-block;
-                }
-            }
+        span {
+          margin-left: 8px;
+          display: inline-block;
         }
+      }
     }
+  }
 
-    &-content {
-        width: 100%;
-        height: ~"calc(100% - 80px)";
-        /*padding-left: 35px;*/
-    }
+  &-content {
+    width: 100%;
+    height: ~"calc(100% - 80px)";
+    /*padding-left: 35px;*/
+  }
 
-    &-text-no-select {
-        -webkit-user-select: none;
-        -moz-user-select: none;
-        -ms-user-select: none;
-        user-select: none;
-    }
+  &-text-no-select {
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+  }
 }
 
 .item-tools{

+ 1 - 6
TEAMModelOS/ClientApp/src/view/student-account/IndexIview.less

@@ -91,12 +91,7 @@
 th[rowspan="1"] {
     display: none;
 }
-.item-tools .ivu-icon{
-    cursor:pointer;
-    &:first-child{
-        margin-right:20px;
-    }
-}
+
 .ivu-table-tip td{
     background:#383838;
 }

+ 3 - 0
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.css

@@ -152,6 +152,7 @@
 
 .ql-right-box {
     width: 15%;
+    height:100%;
     position:fixed;
     right:20px;
     top:232px;
@@ -167,6 +168,8 @@
 
     .ql-right-box .ql-right-list {
         width: 100%;
+        max-height:70%;
+        overflow-y:scroll;
         padding: 20px;
         margin-top: 20px;
         background: #525252;

+ 84 - 79
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue

@@ -17,8 +17,8 @@
 
                     </div>
                     <div class="item-question-score">
-                        <span class="item-type">{{question.questionType}}</span>
-                        <span class="item-type" style="background: #05b454;">{{question.score}}{{$t('totalAnalysis.ql_text8')}}</span>
+                        <span class="item-type">{{question.type}}</span>
+                        <span class="item-type" style="background: #05b454;">{{question.score || 5}}{{$t('totalAnalysis.ql_text8')}}</span>
                     </div>
                 </div>
                 <div class="item-option-wrap">
@@ -28,7 +28,7 @@
                 </div>
 
                 <!-- 如果是组合题 -->
-                <div v-if="question.children.length">
+                <!--<div v-if="question.children.length">
                     <div v-for="(childQuestion,childIndex) in question.children" :key="childIndex">
                         <div class="item-question" style="margin-top:20px;">
                             <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
@@ -49,7 +49,7 @@
                             <div v-html="childQuestion.explain"></div>
                         </div>
                     </div>
-                </div>
+                </div>-->
 
                 <Collapse simple @on-change="handleCollapseChange" v-model="activeCollapseIndex">
                     <Panel :name="index+'answer'">
@@ -73,10 +73,10 @@
                             <Table :columns="dataColumns" :data="tableData.filter((item,index2) => index2 === index)"></Table>
                             <Table :columns="optionColumns" :data="optionsData" style="margin-top:20px"></Table>
                             <!-- 每个题目的数据分析折线图 -->
-                            <div class="analysis-charts">
+                            <!--<div class="analysis-charts">
                                 <BaseLine :ids="'myLine' + index" :echartsData="tableData[index]"></BaseLine>
                                 <BaseRateLine :ids="'myRateLine' + index" :echartsData="optionsData"></BaseRateLine>
-                            </div>
+                            </div>-->
                         </div>
                     </Panel>
                 </Collapse>
@@ -90,42 +90,44 @@
                 {{$t('totalAnalysis.ql_text1')}} :<span>100 {{$t('totalAnalysis.ql_text8')}}</span>
             </div>
             <div class="ql-right-list">
-                <div class="ql-right-part" v-if="SingleList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text2')}}({{sumArr(SingleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
-                    </div>
-                </div>
-                <div class="ql-right-part" v-if="MultipleList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text3')}}({{sumArr(MultipleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                <vuescroll>
+                    <div class="ql-right-part" v-if="SingleList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text2')}}({{sumArr(SingleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
                     </div>
-                </div>
-                <div class="ql-right-part" v-if="JudgeList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text4')}}({{sumArr(JudgeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                    <div class="ql-right-part" v-if="MultipleList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text3')}}({{sumArr(MultipleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
                     </div>
-                </div>
-                <div class="ql-right-part" v-if="CompleteList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text5')}}({{sumArr(CompleteList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                    <div class="ql-right-part" v-if="JudgeList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text4')}}({{sumArr(JudgeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
                     </div>
-                </div>
-                <div class="ql-right-part" v-if="SubjectiveList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text6')}}({{sumArr(SubjectiveList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                    <div class="ql-right-part" v-if="CompleteList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text5')}}({{sumArr(CompleteList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
                     </div>
-                </div>
-                <div class="ql-right-part" v-if="ComposeList.length">
-                    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text7')}}({{sumArr(ComposeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
-                    <div class="ql-right-items">
-                        <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                    <div class="ql-right-part" v-if="SubjectiveList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text6')}}({{sumArr(SubjectiveList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
                     </div>
-                </div><div style="margin-top:30px">注:标红题号为班级易错题目</div>
+                    <div class="ql-right-part" v-if="ComposeList.length">
+                        <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text7')}}({{sumArr(ComposeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
+                        <div class="ql-right-items">
+                            <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                        </div>
+                    </div><div style="margin-top:30px">注:标红题号为班级易错题目</div>
+                </vuescroll>
             </div>
         </div>
     </div>
@@ -134,6 +136,7 @@
 <script>
     import BaseLine from '@/components/student-analysis/total/BaseLine.vue'
     import BaseRateLine from '@/components/student-analysis/total/BaseRateLine.vue'
+    import questions from '@/static/questions.json'
     import { setTimeout } from 'timers'
     export default {
         components: {
@@ -287,7 +290,8 @@
         },
         created() {
             this.rightTableData = this.$store.state.totalAnalysis.classList
-            this.questionList = this.$store.state.totalAnalysis.questions
+            this.questionList = questions.item
+            console.log(this.questionList)
             this.SingleList = this.questionList.filter(item => item.type === 'Single')
             this.MultipleList = this.questionList.filter(item => item.type === 'Multiple')
             this.JudgeList = this.questionList.filter(item => item.type === 'Judge')
@@ -306,43 +310,43 @@
             // console.log(JSON.stringify(testScatter));
 
             // 数据分析表格数据
-            let knowledgeArr = testScatter.map(item => item.tableData)
-            this.tableData = knowledgeArr
+            //let knowledgeArr = testScatter.map(item => item.tableData)
+            //this.tableData = knowledgeArr
 
-            this.optionsData = [
-                {
-                    option: 'A',
-                    isTrue: false,
-                    num: 12,
-                    rate: 40,
-                    PH: 10,
-                    PL: 60
-                },
-                {
-                    option: 'B',
-                    isTrue: false,
-                    num: 6,
-                    rate: 20,
-                    PH: 10,
-                    PL: 23
-                },
-                {
-                    option: 'C',
-                    isTrue: true,
-                    num: 9,
-                    rate: 30,
-                    PH: 70,
-                    PL: 10
-                },
-                {
-                    option: 'D',
-                    isTrue: false,
-                    num: 3,
-                    rate: 10,
-                    PH: 10,
-                    PL: 7
-                }
-            ]
+            //this.optionsData = [
+            //    {
+            //        option: 'A',
+            //        isTrue: false,
+            //        num: 12,
+            //        rate: 40,
+            //        PH: 10,
+            //        PL: 60
+            //    },
+            //    {
+            //        option: 'B',
+            //        isTrue: false,
+            //        num: 6,
+            //        rate: 20,
+            //        PH: 10,
+            //        PL: 23
+            //    },
+            //    {
+            //        option: 'C',
+            //        isTrue: true,
+            //        num: 9,
+            //        rate: 30,
+            //        PH: 70,
+            //        PL: 10
+            //    },
+            //    {
+            //        option: 'D',
+            //        isTrue: false,
+            //        num: 3,
+            //        rate: 10,
+            //        PH: 10,
+            //        PL: 7
+            //    }
+            //]
         },
 
         methods: {
@@ -361,7 +365,7 @@
 
             // 点击右边题序 获取到题目DOM 进行滚动操作
             handleItemClick(item, e) {
-                let parentVm = this.$root.$children[0]
+                let parentVm = this.$parent.$parent.$parent
                 let currentSpan = e.target || e
                 let allList = document.getElementsByClassName('ql-right-item')
                 let questionList = document.getElementsByClassName('ql-item')
@@ -388,7 +392,7 @@
             // 点击返回
             handleBackTo() {
                 this.$refs.btnBack.style.display = 'none'
-                this.$root.$children[0].isShowQuestions = false
+                this.$parent.$parent.$parent.isShowQuestions = false
                 this.$router.back(-1)
             },
 
@@ -411,17 +415,18 @@
 
             // 返回题目区域总分 字符串换算
             sumArr(arr) {
-                return eval(arr.join('+'))
+                //return eval(arr.join('+'))
             }
         },
 
         mounted() {
-            let parentVm = this.$root.$children[0]
+            let parentVm = this.$parent.$parent.$parent
             parentVm.isShowQuestions = true
             let that = this
 
+
             if (this.$route.query.QIndex) {
-                let index = this.$route.query.QIndex - 1
+                let index = +this.$route.query.QIndex - 1
                 let allList = document.getElementsByClassName('ql-right-item')
                 this.handleCollapseChange([index.toString()])
                 this.activeCollapseIndex.push(index + 'answer')

+ 4 - 4
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue

@@ -18,28 +18,28 @@
                     <span>A</span>
                     <span class="scatter-explain" :title="$t('totalAnalysis.ta_text6')">{{$t('totalAnalysis.ta_text6')}}</span>
                     <span>{{A1List.length}}</span>
-                    <div class="index-box"><span v-for="(item,index) in A1List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
+                    <div class="index-box"><span v-for="(item,index) in A1List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item.id)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
                 </div>
                 <Divider />
                 <div class="scatter-table-line">
                     <span>A-</span>
                     <span class="scatter-explain" :title="$t('totalAnalysis.ta_text7')">{{$t('totalAnalysis.ta_text7')}}</span>
                     <span>{{A2List.length}}</span>
-                    <div class="index-box"><span v-for="(item,index) in A2List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
+                    <div class="index-box"><span v-for="(item,index) in A2List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item.id)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
                 </div>
                 <Divider />
                 <div class="scatter-table-line">
                     <span>B</span>
                     <span class="scatter-explain" :title="$t('totalAnalysis.ta_text8')">{{$t('totalAnalysis.ta_text8')}}</span>
                     <span>{{B1List.length}}</span>
-                    <div class="index-box"><span v-for="(item,index) in B1List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
+                    <div class="index-box"><span v-for="(item,index) in B1List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item.id)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
                 </div>
                 <Divider />
                 <div class="scatter-table-line">
                     <span>B-</span>
                     <span class="scatter-explain" :title="$t('totalAnalysis.ta_text9')">{{$t('totalAnalysis.ta_text9')}}</span>
                     <span>{{B2List.length}}</span>
-                    <div class="index-box"><span v-for="(item,index) in B2List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
+                    <div class="index-box"><span v-for="(item,index) in B2List" :key="index" class="scatter-exercise-index" @click="handleIndexClick(item.id)">{{Number(item.id) > 9 ? item.id : '0' + item.id}}</span></div>
                 </div>
             </div>
             </Col>

+ 2 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue

@@ -104,7 +104,7 @@
                     '诊断测验': '#baecff',
                     '全国测验': '#00ff8a'
                 },
-                scrollTopssss: 0
+                scrollTopssss: 0,
             }
         },
         created() {
@@ -264,6 +264,7 @@
         },
         mounted() {
 
+
             let examIndex = this.$route.query.index
 
             // 如果路由跳转到成绩分析页面带有考试序号参数则跳转到当前考试

+ 20 - 11
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -26,14 +26,14 @@
       </div>
       <div class="content-file-list-box">
         <div class="content-file-filter">
-          <CheckboxGroup v-model="model" style="display:inline-block;margin-left:38px;margin-top:13px;">
-            <Checkbox :label="item" v-for="(item ,index) in contentTypes[0]" v-show="activeTypeIndex === 1" :class="activeTypeIndex === 1 ? 'animated fadeIn' : 'animated fadeOut'">
+          <CheckboxGroup v-model="model" style="display:inline-block;margin-left:38px;margin-top:13px;" @on-change="filterFileByExtension">
+            <Checkbox :label="item" v-for="(item ,index) in contentTypes[0]" v-if="activeTypeIndex === 1" :class="activeTypeIndex === 1 ? 'animated fadeIn' : 'animated fadeOut'">
               <span>{{item}}</span>
             </Checkbox>
-            <Checkbox :label="item" v-for="(item ,index) in contentTypes[1]" v-show="activeTypeIndex === 2" :class="activeTypeIndex === 2 ? 'animated fadeIn' : 'animated fadeOut'">
+            <Checkbox :label="item" v-for="(item ,index) in contentTypes[1]" v-if="activeTypeIndex === 2" :class="activeTypeIndex === 2 ? 'animated fadeIn' : 'animated fadeOut'">
               <span>{{item}}</span>
             </Checkbox>
-            <Checkbox :label="item" v-for="(item ,index) in contentTypes[2]" v-show="activeTypeIndex === 3" :class="activeTypeIndex === 3 ? 'animated fadeIn' : 'animated fadeOut'">
+            <Checkbox :label="item" v-for="(item ,index) in contentTypes[2]" v-if="activeTypeIndex === 3" :class="activeTypeIndex === 3 ? 'animated fadeIn' : 'animated fadeOut'">
               <span>{{item}}</span>
             </Checkbox>
 
@@ -167,7 +167,7 @@
           {
             title: '操作',
             slot: 'action',
-            width: 180,
+            width: 210,
             align: 'center'
           },
           {
@@ -297,6 +297,18 @@
       bindKnowledge(index) {
         this.bindStatus = true
       },
+      filterFileByExtension(filter) {
+        console.log(this.model)
+        if (filter.length === 0) {
+          this.fileListShow = this.searchBefore
+        } else {
+          let searchResult = this.searchBefore.filter(item => {
+            return this.model.indexOf(item.extension.toUpperCase()) !== -1
+          })
+
+          this.fileListShow = searchResult
+        }
+      },
       getSasStr() {
         this.$api.uploadFile.getContainerSAS().then(
           (res) => {
@@ -305,7 +317,6 @@
               this.urlString = res.result.data.Url
               //this.uploadUrl = 'https://teammodelostest.blob.core.chinacloudapi.cn/spatest/' + this.demoLoginInfo.TEAMModelId.replace('#','')
               this.uploadUrl = this.urlString + '/' + this.demoLoginInfo.TEAMModelId.replace('#', '')
-              console.log(this.uploadUrl)
             } else {
               alert("API error!")
             }
@@ -429,9 +440,8 @@
           (res) => {
             if (res.error == null) {
               this.$Message.success('文件上传成功!')
-              this.fileListShow.concat (this.uploadFileList)
-              this.fileList.concat (this.uploadFileList)
-              this.activeTypeIndex = 0
+              this.fileList.unshift(...this.uploadFileList)
+              this.selectFileType(this.activeTypeIndex)
               this.uploadFileList = []
             }
           },
@@ -489,13 +499,12 @@
           this.fileListShow = this.fileList;
           this.searchBefore = this.fileList
         } else if (index == 0) {
-          //this.fileListShow.length = 0
-          //this.searchBefore.length = 0;
           this.fileListShow = this.schoolFileList;
           this.searchBefore = this.schoolFileList
         }
       },
       selectFileType(index) {
+        this.model = []
         this.activeTypeIndex = index
         let type = this.contentTypeList[index].type;
         let files = [];

+ 109 - 71
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -25,7 +25,7 @@ namespace TEAMModelOS.Controllers.Analysis
 
         private readonly IAzureCosmosDBRepository azureCosmosDBRepository;
         private readonly IAchievementService achievementService;
-        public AchievementController(  IAchievementService _achievementService , IAzureCosmosDBRepository _azureCosmosDBRepository)
+        public AchievementController(IAchievementService _achievementService, IAzureCosmosDBRepository _azureCosmosDBRepository)
         {
             azureCosmosDBRepository = _azureCosmosDBRepository;
             achievementService = _achievementService;
@@ -41,7 +41,7 @@ namespace TEAMModelOS.Controllers.Analysis
             {
                 { "schoolCode", "Habook" }
             };
-            List<Student> students = await azureCosmosDBRepository.FindByDict<Student> (stuMap);
+            List<Student> students = await azureCosmosDBRepository.FindByDict<Student>(stuMap);
             Console.WriteLine(DateTimeOffset.Now.Second);
             List<Dictionary<string, object>> examList = new List<Dictionary<string, object>>();
             HashSet<string> classList = new HashSet<string>();
@@ -74,7 +74,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 keys.Add("score");
                 //初始化进行人数
                 double iPersons = 0;
-                if (exams.IsNotEmpty()) {
+                if (exams.IsNotEmpty())
+                {
                     int classLen = exams[0].Classes.Count;
                     for (int cls = 0; cls < classLen; cls++)
                     {
@@ -95,8 +96,10 @@ namespace TEAMModelOS.Controllers.Analysis
                 //初始化总分
                 int sumPoint = 0;
                 int sumperson = exams[0].Ids.Count;
-                for (int i = 0; i < exams[0].Ids.Count; i++) {
-                    if (exams[0].Ids[i].Equals("0")) {
+                for (int i = 0; i < exams[0].Ids.Count; i++)
+                {
+                    if (exams[0].Ids[i].Equals("0"))
+                    {
                         sumperson--;
                     }
                 }
@@ -124,8 +127,8 @@ namespace TEAMModelOS.Controllers.Analysis
                     Dictionary<string, object> detail = new Dictionary<string, object>
                     {
                         { "name", e.Subject }
-                    };                   
-                    subjects.Add(e.Subject);                  
+                    };
+                    subjects.Add(e.Subject);
                     List<string> ClassAverage = new List<string>();
                     {
                         /*{ "id", e.Id },
@@ -149,7 +152,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     e.Classes.ForEach(c =>
                     {
                         List<List<string>> classPRL = new List<List<string>>();
-                       
+
                         //初始化班级总分
                         int classPoint = 0;
                         //初始化班级缺考人数
@@ -189,16 +192,16 @@ namespace TEAMModelOS.Controllers.Analysis
                                     classCount++;
                                 }
                             }
-                            
+
                             //每个班级实际参考人数
                             counts = value[1] - value[0] - classCount + 1;
                             points = Convert.ToDouble(classPoint) / counts;
-                            ClassAverage.Add(points.ToString("0.00"));                          
+                            ClassAverage.Add(points.ToString("0.00"));
                             person.Add(counts + "");
-                            
+
                         }
                         passPoint = Convert.ToDouble(passCount) / counts;
-                        passList.Add(passPoint.ToString("0.00"));                       
+                        passList.Add(passPoint.ToString("0.00"));
                         //classPRM.Add(classPRL);
                         classIndex += 1;
                     });
@@ -226,12 +229,12 @@ namespace TEAMModelOS.Controllers.Analysis
                     //班级及格率
                     passALL.Add(passList);
                     //年级及格率
-                    
+
                     double gradePass = Convert.ToDouble(gradeCount) / peopleCount;
                     gradeList.Add(gradePass.ToString("0.00"));
                     //passALL.Add(gradeList);
                     //区级及格率
-                    
+
                     //passALL.Add(areaList);
                     //获取进线人数
                     iPersons = peopleCount * 0.4;
@@ -286,7 +289,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     //values[4] = values
                     sp.Add(values);
                 }
-                achievementService.ReName(sp,idToName,classToName,students);           
+                achievementService.ReName(sp, idToName, classToName, students);
                 //处理人数为整
                 string ip = iPersons.ToString("0");
                 //初始化进线分数
@@ -297,7 +300,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 foreach (List<string> rank in sp)
                 {
                     int index = rankScore.IndexOf(int.Parse(rank[3]));
-                    rank[2] = (index+1) + "";
+                    rank[2] = (index + 1) + "";
                 }
                 //排除成绩为零的选手
                 for (int i = sp.Count - 1; i >= 0; i--)
@@ -329,7 +332,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 //记录各个班级进线率占比
                 List<string> persent = new List<string>();
                 int m = 0;
-                foreach (List<int> points in subSum) {
+                foreach (List<int> points in subSum)
+                {
                     List<string> detail = new List<string>();
                     keyLine.ForEach(x =>
                     {
@@ -337,8 +341,10 @@ namespace TEAMModelOS.Controllers.Analysis
                     });
                     double sum = points.Count;
                     int j = 0;
-                    for (int i = 0; i < points.Count; i++) {
-                        if (points[i] > ipoint) {
+                    for (int i = 0; i < points.Count; i++)
+                    {
+                        if (points[i] > ipoint)
+                        {
                             j++;
                         }
                     }
@@ -355,7 +361,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 persent.Sort(delegate (string s1, string s2) { return int.Parse(s2).CompareTo(int.Parse(s1)); });
                 //存放班级的年级排名
                 List<string> ranks = new List<string>();
-                foreach (List<string> des in datas) {
+                foreach (List<string> des in datas)
+                {
                     int index = persent.IndexOf(des[4]);
                     des[0] = (index + 1).ToString();
                     ranks.Add((index + 1).ToString());
@@ -372,14 +379,15 @@ namespace TEAMModelOS.Controllers.Analysis
                     "overAverageRate",
                     "gradeRank"
                 };
-                int n = 0;               
+                int n = 0;
                 foreach (List<int> points in subSum)
                 {
                     double sum = 0;
                     List<string> classInfo = new List<string>();
                     classInfo.Add(className[n]);
                     classInfo.Add(points.Count.ToString());
-                    foreach (int point in points) {
+                    foreach (int point in points)
+                    {
                         sum += point;
 
                     }
@@ -390,7 +398,8 @@ namespace TEAMModelOS.Controllers.Analysis
                     cAverage.Add(Aver.ToString());
                     //标准差
                     double powSum = 0;
-                    foreach (int point in points) {
+                    foreach (int point in points)
+                    {
                         powSum += Math.Pow(point - Aver, 2);
                     }
                     var pow = Math.Pow(powSum / points.Count, 0.5);
@@ -413,7 +422,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 early.Add("keys", keyWarning);
                 early.Add("datas", earlyWarning);
                 AclassAverage = achievementService.GetAverage(exams, gAverage, cAverage, subSum);
-                List<Dictionary<string, object>> rankPR = achievementService.GetPR(exams,subSum,students);
+                List<Dictionary<string, object>> rankPR = achievementService.GetPR(exams, subSum, students);
 
                 entryLineBar.Add("keys", keyLine);
                 entryLineBar.Add("datas", datas);
@@ -444,7 +453,8 @@ namespace TEAMModelOS.Controllers.Analysis
              return info;
          }*/
         [HttpPost("PointAnalysis")]
-        public async Task<BaseJosnRPCResponse> PointAnalysis(JosnRPCRequest<Dictionary<string, object>> request) {
+        public async Task<BaseJosnRPCResponse> PointAnalysis(JosnRPCRequest<Dictionary<string, object>> request)
+        {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             List<Dictionary<string, object>> scatterAnalysis = new List<Dictionary<string, object>>();
             //Dictionary<string, object> scatterAnalysis = new Dictionary<string, object>();
@@ -469,7 +479,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 "scatter"
             };
             //key.Add("areaName");
-            if (exams.IsNotEmpty()) {
+            if (exams.IsNotEmpty())
+            {
                 //提取班级信息
                 List<Dictionary<string, int[]>> classToName = exams[0].Classes;
                 //提取学生ID信息
@@ -538,7 +549,8 @@ namespace TEAMModelOS.Controllers.Analysis
                                 info.Add(wrong + "");
                                 int[] str = strive[i];
                                 string striveAll = "";
-                                foreach (int n in str) {
+                                foreach (int n in str)
+                                {
                                     striveAll += n.ToString() + ",";
                                 }
                                 int[] care = careful[i];
@@ -641,9 +653,9 @@ namespace TEAMModelOS.Controllers.Analysis
                         { "name", e.Subject }
                     };
                     Dictionary<string, object> classPersent = new Dictionary<string, object>();
-                    List<List<string>> classdatas = new List<List<string>>();                   
+                    List<List<string>> classdatas = new List<List<string>>();
                     try
-                    {                        
+                    {
                         e.Classes.ForEach(c =>
                         {
                             //初始化每题得分情况
@@ -681,17 +693,19 @@ namespace TEAMModelOS.Controllers.Analysis
                                             }
                                         }
                                     }
-                                    else {
+                                    else
+                                    {
                                         qCount++;
                                     }
-                                    
+
                                     peopleCount = value[1] - value[0] + 1 - qCount;
-                                }                                
+                                }
                             }
-                            foreach (int p in answerCount) {
+                            foreach (int p in answerCount)
+                            {
                                 var t = Math.Floor(Math.Round(decimal.Parse((p / peopleCount).ToString("0.000")), 2) * 100);
                                 persent.Add(t.ToString());
-                                
+
                             }
                             classdatas.Add(persent);
                         });
@@ -758,7 +772,7 @@ namespace TEAMModelOS.Controllers.Analysis
 
 
                         }
-                        subject.Add("keys",key);
+                        subject.Add("keys", key);
                         subject.Add("datas", datas);
                         exerciseScatter.Add(subject);
 
@@ -768,7 +782,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         builder.Data(exams);
                         Console.WriteLine("---------------------" + ex.Message + "--------------------------");
                     }
-                   
+
                 });
                 builder.Data(exerciseScatter);
             }
@@ -799,7 +813,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 {
                     i.points.ForEach(o =>
                     {
-                        knowledge.Add(o);                       
+                        knowledge.Add(o);
                     });
                     area.Add(i.field);
 
@@ -810,13 +824,14 @@ namespace TEAMModelOS.Controllers.Analysis
             //确定高分组 低分组人数
             List<List<int>> re = exams[0].Result;
             List<double> resultSum = new List<double>();
-            foreach (List<int> data in re) {
+            foreach (List<int> data in re)
+            {
                 resultSum.Add(data.Sum());
             }
             //确定高分组 最低分数
             resultSum.Sort(delegate (double s1, double s2) { return s2.CompareTo(s1); });
-            for (int i = resultSum.Count -1; i >= 0; i--)
-            {               
+            for (int i = resultSum.Count - 1; i >= 0; i--)
+            {
                 if (resultSum[i] == 0)
                 {
                     resultSum.Remove(resultSum[i]);
@@ -828,7 +843,8 @@ namespace TEAMModelOS.Controllers.Analysis
             resultSum.Sort(delegate (double s1, double s2) { return s1.CompareTo(s2); });
             double rhlCount = resultSum.Count * 0.27;
             double rhl = resultSum[int.Parse(rhwCount.ToString("0"))];
-            exams.ForEach(e => {
+            exams.ForEach(e =>
+            {
                 point = e.Point;
                 result = e.Result;
                 classes = e.Classes;
@@ -844,7 +860,7 @@ namespace TEAMModelOS.Controllers.Analysis
             {
                 areaName.Add(cla);
             }
-            
+
             //初始化年级总分
             double total = 0;
             //处理年级单个知识点得分率
@@ -852,7 +868,8 @@ namespace TEAMModelOS.Controllers.Analysis
             {
                 total += grade.Sum();
             }
-            foreach (string id in ids) {
+            foreach (string id in ids)
+            {
                 if (!id.Equals("0"))
                 {
                     Qnum++;
@@ -861,7 +878,7 @@ namespace TEAMModelOS.Controllers.Analysis
             //试卷总分
             double TotalPoint = point.Sum();
             //计算认知层次占比
-            
+
             List<string> fper = new List<string>();
             for (int a = 0; a < areaName.Count; a++)
             {
@@ -879,7 +896,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     });
                 });
                 double fieldPersent = fieldPoint / TotalPoint;
-                fper.Add(fieldPersent .ToString("0.00"));
+                fper.Add(fieldPersent.ToString("0.00"));
             }
             //求单个知识点所占分数
             List<string> per = new List<string>();
@@ -911,7 +928,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 "rhw",
                 "rlw"
             };
-            for (int k = 0; k < knowledgeName.Count; k++) {                
+            for (int k = 0; k < knowledgeName.Count; k++)
+            {
                 List<string> knowledgeClass = new List<string>();
                 List<List<string>> stuPersent = new List<List<string>>();
                 double OnePoint = 0;
@@ -934,7 +952,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     p.item.ForEach(i =>
                     {
                         if (i.points.Contains(knowledgeName[k]))
-                        { 
+                        {
 
                             OnePoint += 1 / Convert.ToDouble(i.points.Count) * point[n];
                             itemNo.Add((n + 1).ToString());
@@ -944,7 +962,8 @@ namespace TEAMModelOS.Controllers.Analysis
                     });
                     valuew[1] = OnePoint.ToString();
                     string itemNos = "";
-                    foreach (string index in itemNo) {
+                    foreach (string index in itemNo)
+                    {
                         itemNos += index + ",";
                     }
                     valuew[2] = itemNos[0..^1];
@@ -953,7 +972,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 int rhlC = 0;
                 foreach (string id in ids)
                 {
-                    if (id.Equals("0")) {
+                    if (id.Equals("0"))
+                    {
                         m++;
                         continue;
                     }
@@ -962,8 +982,10 @@ namespace TEAMModelOS.Controllers.Analysis
                     {
                         values.Add("-");
                     });
-                    foreach (Student info in students) {
-                        if (info.studentId .Equals(id)) {
+                    foreach (Student info in students)
+                    {
+                        if (info.studentId.Equals(id))
+                        {
                             values[2] = info.seatNo.ToString();
                             break;
                         }
@@ -977,12 +999,12 @@ namespace TEAMModelOS.Controllers.Analysis
                     {
                         int n = 0;
                         double anwPoint = 0;
-                        double po = 0;                       
+                        double po = 0;
                         p.item.ForEach(i =>
-                        {                          
-                           if (i.points.Contains(knowledgeName[k]))
+                        {
+                            if (i.points.Contains(knowledgeName[k]))
                             {
-                                
+
                                 //Dictionary<string, double> mapkeyItem = new Dictionary<string, double>();
                                 //OnePoint += 1 / Convert.ToDouble(i.points.Count) * point[n];
                                 //当前知识点在该题占比多少
@@ -993,7 +1015,8 @@ namespace TEAMModelOS.Controllers.Analysis
                                 po += point[n] * ePoint;
                                 //知识点所占分数
                                 poG += point[n] * ePoint;
-                                if (result[m][n] == 0 && statuCount == 0) {
+                                if (result[m][n] == 0 && statuCount == 0)
+                                {
                                     statuCount++;
                                     wrongCount++;
                                     if (result[m].Sum() >= rhw)
@@ -1004,16 +1027,16 @@ namespace TEAMModelOS.Controllers.Analysis
                                     {
                                         rhlC++;
                                     }
-                                }                               
-                            }                               
+                                }
+                            }
                             n++;
-                        });                       
+                        });
                         double stuPser = anwPoint / po;
                         values[3] = po.ToString();
                         values[4] = anwPoint.ToString();
                         values[5] = stuPser.ToString("0.00");
                         //stuItem.Add(values);
-                    });                    
+                    });
                     stuPersent.Add(values);
                     m++;
                 }
@@ -1030,7 +1053,8 @@ namespace TEAMModelOS.Controllers.Analysis
 
                 //知识点占比
                 double persent = OnePoint / TotalPoint;
-                foreach (Dictionary<string, int[]> map in classes) {
+                foreach (Dictionary<string, int[]> map in classes)
+                {
                     //map.Keys
                     //ValueCollection va = map.Values;
                     List<string> classPoints = new List<string>();
@@ -1040,12 +1064,13 @@ namespace TEAMModelOS.Controllers.Analysis
                     foreach (KeyValuePair<string, int[]> kvp in map)
                     {
                         className.Add(kvp.Key);
-                        for (int n = kvp.Value[0];n< kvp.Value[1];n++) {
+                        for (int n = kvp.Value[0]; n < kvp.Value[1]; n++)
+                        {
 
                             paper.ForEach(p =>
                             {
                                 int x = 0;
-                                
+
                                 p.item.ForEach(i =>
                                 {
                                     if (i.points.Contains(knowledgeName[k]))
@@ -1057,15 +1082,15 @@ namespace TEAMModelOS.Controllers.Analysis
                                     }
                                     x++;
                                 });
-                                
+
                             });
 
-                        }                       
+                        }
                     }
                     double classPser = anwCPoint / cpo;
-                    knowledgeClass.Add(classPser.ToString("0.00"));                    
-                }                
-                classMap.Add(knowledgeName[k], knowledgeClass);          
+                    knowledgeClass.Add(classPser.ToString("0.00"));
+                }
+                classMap.Add(knowledgeName[k], knowledgeClass);
                 per.Add(persent.ToString("0.00"));
 
             }
@@ -1075,7 +1100,7 @@ namespace TEAMModelOS.Controllers.Analysis
             wrongMap.Add("keys", keyWrong);
             wrongMap.Add("datas", wrongPersent);
             knowledgeALL.Add("pointList", knowledgeName);
-            knowledgeALL.Add("per", per);            
+            knowledgeALL.Add("per", per);
             knowledgeALL.Add("level", areaName);
             knowledgeALL.Add("fper", fper);
             knowledgeALL.Add("stupercent", knowledgeMap);
@@ -1084,6 +1109,19 @@ namespace TEAMModelOS.Controllers.Analysis
             builder.Data(knowledgeALL);
 
             return builder.build();
-        }       
-    } 
+        }
+        [HttpPost("levelAnalysis")]
+        public async Task<BaseJosnRPCResponse> LevelAnalysis(JosnRPCRequest<Dictionary<string, object>> request)
+        {
+            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
+            List<ExamPaper> paper = await azureCosmosDBRepository.FindByDict<ExamPaper>(request.@params);
+            List<SimpleExam> exams = await azureCosmosDBRepository.FindByDict<SimpleExam>(request.@params);
+            Dictionary<string, object> stuMap = new Dictionary<string, object>
+            {
+                { "schoolCode", "Habook" }
+            };
+            List<Student> students = await azureCosmosDBRepository.FindByDict<Student>(stuMap);
+            return null;
+        }
+    }
 }

+ 62 - 0
TEAMModelOS/JsonFile/Core/BaseDataDefault.json

@@ -120,6 +120,68 @@
     "lang": "zh-TW",
     "name": "中國台灣",
     "alias": "繁體中文",
+    "grades": [
+      {
+        "gradeCode": "1",
+        "gradeName": "一年級",
+        "alias": "小学一年级"
+      },
+      {
+        "gradeCode": "2",
+        "gradeName": "二年級",
+        "alias": "小学二年级"
+      },
+      {
+        "gradeCode": "3",
+        "gradeName": "三年級",
+        "alias": "小学三年级"
+      },
+      {
+        "gradeCode": "4",
+        "gradeName": "四年級",
+        "alias": "小学四年级"
+      },
+      {
+        "gradeCode": "5",
+        "gradeName": "五年級",
+        "alias": "小学五年级"
+      },
+      {
+        "gradeCode": "6",
+        "gradeName": "六年級",
+        "alias": "五四制初中一年级,六三制小学六年级"
+      },
+      {
+        "gradeCode": "7",
+        "gradeName": "七年級",
+        "alias": "五四制初中二年级,六三制初中一年级"
+      },
+      {
+        "gradeCode": "8",
+        "gradeName": "八年級",
+        "alias": "五四制初中三年级,六三制小学二年级"
+      },
+      {
+        "gradeCode": "9",
+        "gradeName": "九年級",
+        "alias": "五四制初中四年级,六三制小学三年级"
+      },
+      {
+        "gradeCode": "10",
+        "gradeName": "十年級",
+        "alias": "高中一年级"
+      },
+      {
+        "gradeCode": "11",
+        "gradeName": "十一年級",
+        "alias": "高中二年级"
+      },
+      {
+        "gradeCode": "12",
+        "gradeName": "十二年級",
+        "alias": "高中三年级"
+      }
+    ],
     "subjects": [
       {
         "subjectCode": "Subject_Chinese",