Explorar el Código

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

liqk hace 4 años
padre
commit
acc8bb3a05

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseEntryBar.vue

@@ -203,7 +203,7 @@
                                     fontFamily: 'Microsoft YaHei'
                                 }
                             }
-                        },,
+                        },
                          {
                             type: 'value',
                             max: 100,

+ 228 - 225
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue

@@ -1,222 +1,225 @@
 <template>
-    <div id="stuAverageBar"></div>
+	<div id="stuAverageBar"></div>
 </template>
 
 <script>
-    export default {
-        name: 'hello',
-        props: ['echartData', 'exerciseIndex'],
-        data() {
-            return {
-                echartDatas: [],
-				gradeSeries:[],
-				gradeLengend:[],
-                currentExerciseIndex: 0
-            }
-        },
-        created() {
-        },
-        methods: {
-            drawLine(echartData, exerciseIndex) {
-				console.log('年级得分率图表数据',echartData)
+	export default {
+		name: 'hello',
+		props: ['echartData', 'exerciseIndex'],
+		data() {
+			return {
+				echartDatas: [],
+				gradeSeries: [],
+				gradeLengend: [],
+				colorArr: ['#ff9f7f', '#37d2da', '#d4e676', '#ff9f7f', '#d4e676', '#ff9f7f', '#fb7293'],
+				currentExerciseIndex: 0
+			}
+		},
+		created() {},
+		methods: {
+			drawLine(echartData, exerciseIndex) {
+				console.log('年级得分率图表数据', echartData)
 				console.log(this.gradeSeries)
-                let that = this
-                let myBar = this.$echarts.init(document.getElementById('stuAverageBar'))
-                var option = {
-                    legend: {
-                        data: [{
-                            name: that.$t('totalAnalysis.ta_chart_text4'),
-                            textStyle: {
-                                color: '#fff'
-                            }
-                        }].concat(this.gradeLengend)
+				let that = this
+				let myBar = this.$echarts.init(document.getElementById('stuAverageBar'))
+				var option = {
+					legend: {
+						data: [{
+							name: that.$t('totalAnalysis.ta_chart_text4'),
+							textStyle: {
+								color: '#fff'
+							}
+						}].concat(this.gradeLengend)
 
-                    },
-                    tooltip: {
-                        show: true, // 是否显示提示框,默认为true
-                        trigger: 'axis', // 数据项图形触发
-                        axisPointer: {
-                            // 指示样式
-                            type: 'shadow',
-                            axis: 'auto',
-                            shadowStyle: {
-                                color: 'rgba(128,128,128,0.1)'
-                            }
-                        },
-                        padding: 5,
-                        textStyle: {
-                            color: '#fff'
-                        },
-                        formatter: function(params) {
-                            let result = params[0].name
-                            for (let i = 0; i < params.length; i++) {
-                                result += '<br>' + params[i].marker + params[i].seriesName + ':' + params[i].data + '%'
-                            }
-                            return result
-                        }
-                    },
-                    grid: {
-                        show: false,
-                        containLabel: true,
-                        height: 460,
-                        width: '90%',
-                        x2: '5%',
-                        tooltip: {
-                            show: true,
-                            trigger: 'axis', // 触发类型
-                            textStyle: {
-                                color: '#666'
-                            }
-                        }
-                    },
-                    dataZoom: [{
-                        'show': true,
-                        'height': 10,
-                        'xAxisIndex': [
-                            0
-                        ],
-                        bottom: 30,
-                        'start': 0,
-                        'end': 100,
-                        handleIcon: 'M512 497.821538m-418.264615 0a418.264615 418.264615 0 1 0 836.52923 0 418.264615 418.264615 0 1 0-836.52923 0Z',
-                        handleSize: '160%',
-                        handleStyle: {
-                            color: '#d3dee5'
+					},
+					tooltip: {
+						show: true, // 是否显示提示框,默认为true
+						trigger: 'axis', // 数据项图形触发
+						axisPointer: {
+							// 指示样式
+							type: 'shadow',
+							axis: 'auto',
+							shadowStyle: {
+								color: 'rgba(128,128,128,0.1)'
+							}
+						},
+						padding: 5,
+						textStyle: {
+							color: '#fff'
+						},
+						formatter: function(params) {
+							let result = params[0].name
+							for (let i = 0; i < params.length; i++) {
+								result += '<br>' + params[i].marker + params[i].seriesName + ':' + params[i].data + '%'
+							}
+							return result
+						}
+					},
+					grid: {
+						show: false,
+						containLabel: true,
+						height: 460,
+						width: '90%',
+						x2: '5%',
+						tooltip: {
+							show: true,
+							trigger: 'axis', // 触发类型
+							textStyle: {
+								color: '#666'
+							}
+						}
+					},
+					dataZoom: [{
+						'show': true,
+						'height': 10,
+						'xAxisIndex': [
+							0
+						],
+						bottom: 30,
+						'start': 0,
+						'end': 100,
+						handleIcon: 'M512 497.821538m-418.264615 0a418.264615 418.264615 0 1 0 836.52923 0 418.264615 418.264615 0 1 0-836.52923 0Z',
+						handleSize: '160%',
+						handleStyle: {
+							color: '#d3dee5'
+
+						},
+						textStyle: {
+							color: '#fff'
+						},
+						borderColor: '#90979c'
+					}, {
+						'type': 'inside',
+						'show': true,
+						'height': 15,
+						'start': 0,
+						'end': 100
+					}],
+					xAxis: {
+						show: true,
+						offset: 0,
+						type: 'category',
+						axisLabel: {
+							show: true,
+							inside: false,
+							margin: 15,
+							color: '#989898'
+						},
+						data: echartData.map(item => item.className)
+					},
+					yAxis: {
+						show: true,
+						type: 'value',
+						min: 0,
+						max: 100,
+						axisLabel: {
+							show: true,
+							inside: false,
+							rotate: 0,
+							margin: 8,
+							color: '#989898',
+							formatter: '{value} %',
+							fontSize: 12,
+							fontFamily: 'Microsoft YaHei'
+						},
+						splitLine: {
+							show: true,
+							lineStyle: {
+								color: '#4c504a',
+								width: 0.5,
+								type: 'solid'
+							}
+						}
+					},
+					series: [{
+						name: that.$t('totalAnalysis.ta_chart_text4'),
+						type: 'bar',
+						itemStyle: {
+							normal: { // 渐变色
+								color: '#66cccc'
+							},
+							width: 20
+						},
+						markPoint: {
+							data: [{
+									type: 'max',
+									name: '最大值'
+								},
+								{
+									type: 'min',
+									name: '最小值'
+								}
+							]
+						},
+						barMaxWidth: 40,
+						data: echartData.map(item => item.classScoreRate)
+					}].concat(this.gradeSeries)
+				}
 
-                        },
-                        textStyle: {
-                            color: '#fff'
-                        },
-                        borderColor: '#90979c'
-                    }, {
-                        'type': 'inside',
-                        'show': true,
-                        'height': 15,
-                        'start': 0,
-                        'end': 100
-                    }],
-                    xAxis: {
-                        show: true,
-                        offset: 0,
-                        type: 'category',
-                        axisLabel: {
-                            show: true,
-                            inside: false,
-                            margin: 15,
-                            color: '#989898'
-                        },
-                        data: echartData.map(item => item.className)
-                    },
-                    yAxis: {
-                        show: true,
-                        type: 'value',
-                        min: 0,
-                        max: 100,
-                        axisLabel: {
-                            show: true,
-                            inside: false,
-                            rotate: 0,
-                            margin: 8,
-                            color: '#989898',
-                            formatter: '{value} %',
-                            fontSize: 12,
-                            fontFamily: 'Microsoft YaHei'
-                        },
-                        splitLine: {
-                            show: true,
-                            lineStyle: {
-                                color: '#4c504a',
-                                width: 0.5,
-                                type: 'solid'
-                            }
-                        }
-                    },
-                    series: [
-                        {
-                            name: that.$t('totalAnalysis.ta_chart_text4'),
-                            type: 'bar',
-                            itemStyle: {
-                                normal: { // 渐变色
-                                    color: '#66cccc'
-                                },
-                                width: 20
-                            },
-                            markPoint: {
-                                data: [
-                                    { type: 'max', name: '最大值' },
-                                    { type: 'min', name: '最小值' }
-                                ]
-                            },
-							barMaxWidth:40,
-                            data: echartData.map(item => item.classScoreRate)
-                        }
-                    ].concat(this.gradeSeries)
-                }
+				// 绘制图表
+				myBar.setOption(option)
+				window.addEventListener('resize', function() {
+					myBar.resize()
+				})
+			},
 
-                // 绘制图表
-                myBar.setOption(option)
-                window.addEventListener('resize', function() {
-                    myBar.resize()
-                })
-            },
-			
-			doAddGradeSeries(analysisJson,curSubjectIndex,echartsData){
+			doAddGradeSeries(analysisJson, curSubjectIndex, echartsData) {
 				this.gradeSeries = []
 				this.gradeLengend = []
-				analysisJson.grades.forEach(grade => {
+				analysisJson.grades.forEach((grade, gradeIndex) => {
 					let seriesItem = {
-					    name: grade.gradeName,
-					    type: 'line',
-					    itemStyle: {
-					        color: '#ff33cc',
-					        width: 0
-					    },
-					    symbol: 'none',
-					    lineStyle: {
-					        type: 'dashed',
-					        width: 0
-					    },
-					    markLine: {
-					        data: [
-					            { type: 'average' }
-					        ],
-					        lineStyle: {
-					            color: '#ff33cc',
-					            type: 'dashed'
-					        }
-					    },
-					    data: [grade.subjects[curSubjectIndex].item[this.currentExerciseIndex]]
+						name: grade.gradeName + '得分率',
+						type: 'line',
+						itemStyle: {
+							color: this.colorArr[gradeIndex],
+							width: 0
+						},
+						symbol: 'none',
+						lineStyle: { 
+							type: 'dashed',
+							width: 0
+						},
+						markLine: {
+							data: [{
+								type: 'average'
+							}],
+							lineStyle: {
+								color: this.colorArr[gradeIndex],
+								type: 'dashed'
+							}
+						},
+						data: new Array(analysisJson.classes.length).fill(grade.subjects[curSubjectIndex].item[this.currentExerciseIndex])
 					}
 					this.gradeSeries.push(seriesItem)
 					this.gradeLengend.push({
-						name: grade.gradeName,
+						name: grade.gradeName + '得分率',
 						textStyle: {
-						    color: '#fff'
+							color: '#fff'
 						}
 					})
 					console.log(this.gradeLengend)
 					console.log(this.gradeSeries[0].data)
-					
+
 				})
-				
+
 				this.drawLine(echartsData)
 			},
-			
+
 			// 调整图表所需数据结构格式
 			renderData(data) {
 				console.log(this.currentExerciseIndex)
 				let analysisJson = JSON.parse(JSON.stringify(this.getAnalysisJson))
 				let curSubjectIndex = analysisJson.subjects.map(i => i.name).indexOf(this.$store.state.totalAnalysis.currentSubject)
 				let result = []
-				analysisJson.paper[curSubjectIndex].Value.forEach((exercise,exerciseIndex) => {
+				analysisJson.paper[curSubjectIndex].Value.forEach((exercise, exerciseIndex) => {
 					let obj = {}
 					analysisJson.paperKey.forEach((key, index) => {
 						obj[key] = exercise[index]
 					})
 					result.push(obj)
 				})
-				
-				
+
+
 				let echartsData = []
 				analysisJson.classes.forEach((classItem, classIndex) => {
 					echartsData.push({
@@ -224,53 +227,53 @@
 						classScoreRate: classItem.subjects[curSubjectIndex].item[this.currentExerciseIndex]
 					})
 				})
-				
-				this.doAddGradeSeries(analysisJson,curSubjectIndex,echartsData)
+
+				this.doAddGradeSeries(analysisJson, curSubjectIndex, echartsData)
 			},
 
-            // 监听变化处理重新渲染
-            doRender(data) {
-                let analysisJson = data
-                if (!analysisJson) return
+			// 监听变化处理重新渲染
+			doRender(data) {
+				let analysisJson = data
+				if (!analysisJson) return
 				let exerciseData = analysisJson.grades[0].item
-                this.gradeRate = exerciseData[this.currentExerciseIndex]
-                this.drawLine(data)
-            }
-        },
-        mounted() {
-            if (this.getAnalysisJson) {
-                this.renderData(this.getAnalysisJson)
-            }
-        },
-        computed: {
-            // 获取最新柱状图数据
-            getAnalysisJson() {
-                return this.$store.state.totalAnalysis.analysisJson
-            }
-        },
-        watch: {
-            getAnalysisJson(val) {
-                if (!val) return
-                this.doRender(val)
-            },
+				this.gradeRate = exerciseData[this.currentExerciseIndex]
+				this.drawLine(data)
+			}
+		},
+		mounted() {
+			if (this.getAnalysisJson) {
+				this.renderData(this.getAnalysisJson)
+			}
+		},
+		computed: {
+			// 获取最新柱状图数据
+			getAnalysisJson() {
+				return this.$store.state.totalAnalysis.analysisJson
+			}
+		},
+		watch: {
+			getAnalysisJson(val) {
+				if (!val) return
+				this.doRender(val)
+			},
 
-            exerciseIndex(val) {
-                if (val) {
-                    this.currentExerciseIndex = +val - 1 // 拿到当前所选择的题号 确认数据下标
-                    this.renderData(this.getAnalysisJson)
-                }
-            }
+			exerciseIndex(val) {
+				if (val) {
+					this.currentExerciseIndex = +val - 1 // 拿到当前所选择的题号 确认数据下标
+					this.renderData(this.getAnalysisJson)
+				}
+			}
 
-        }
-    }
+		}
+	}
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped>
-    #stuAverageBar {
-        width: 100%;
-        height: 600px;
-        margin: 0 auto;
-        display: block;
-    }
+	#stuAverageBar {
+		width: 100%;
+		height: 600px;
+		margin: 0 auto;
+		display: block;
+	}
 </style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/CreatePaper.vue

@@ -64,7 +64,7 @@
 									<ManualCreate :questionList="questionList" :subjectCode="propSubject" :periodCode="propPeriod" :selQue="evaluationInfo.item" @goToPreview="goToPreview"
 									 @selectedQuestion="getSelectedQuestion"></ManualCreate>
 								</TabPane>
-								<TabPane label="导入说明" name="import" v-if="evaluationInfo.createType == 'import'" :index="3" tab="createTest">
+								<TabPane :label="evaluationInfo.item.length ? '重新导入' : '导入试题'" name="import" v-if="evaluationInfo.createType == 'import'" :index="3" tab="createTest">
 									<BaseImport @importFinish="onImportFinish"></BaseImport>
 								</TabPane>
 								<TabPane label="试题预览" name="preview" :index="4" tab="createTest">

+ 14 - 11
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue

@@ -24,37 +24,37 @@
                         <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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </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)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                         </div>
                     </div>
@@ -67,12 +67,9 @@
     import BaseLine from '@/components/student-analysis/total/BaseLine.vue'
     import BaseRateLine from '@/components/student-analysis/total/BaseRateLine.vue'
     import ExerciseList from '@/components/evaluation/ExerciseList.vue'
-    import Loading from '@/common/Loading.vue'
-    // import questions from '@/static/questions.json'
-    import { setTimeout } from 'timers'
     export default {
         components: {
-            BaseRateLine, BaseLine, Loading,ExerciseList
+            BaseRateLine, BaseLine,ExerciseList
         },
         data() {
             return {
@@ -429,7 +426,13 @@
             // 获取最新试题数据
             getExerciseData() {
                 return this.$store.state.totalAnalysis.exerciseData
-            }
+            },
+			// 替换题序
+			getIndexOrder(){
+				return item => {
+					return this.questionList.indexOf(item) + 1 > 9 ? this.questionList.indexOf(item) + 1 : '0' + (this.questionList.indexOf(item) + 1)
+				}
+			}
         },
         watch: {
             getScrollTop(val) {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.css

@@ -25,7 +25,7 @@
 }
 
 .scatter-container .index-wrap {
-    display:flex;
+    display:unset;
     flex-wrap:wrap;
 	justify-content: center;
 	align-items: center;

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

@@ -49,7 +49,7 @@
         <Row>
             <span class="component-title">
                 <span>{{$t('totalAnalysis.ta_title2')}}</span> 
-				<div class="index-wrap" style="display: inline-block;">
+				<div class="index-wrap" style="display: unset">
 				    <span v-for="(item,index) in exerciseIndexList"
 				          :key="index"
 						  :title="index"
@@ -162,7 +162,10 @@
                         title: this.$t('totalAnalysis.ta_table_text5'),
                         key: 'diff',
                         sortable: true,
-                        minWidth: 100
+                        minWidth: 100,
+						renderType: function(h, params) {
+						    return h('span', (Number(params.row.diff) * 100).toFixed(0) + '%')
+						},
                     },
                     {
                         title: this.$t('totalAnalysis.ta_table_text6'),

+ 63 - 39
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -92,6 +92,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 "examScoreRate"
             };
             ExamInfo info = null;
+            double ipoint = 0;
             Dictionary<string, dynamic> gpoint = new Dictionary<string, dynamic>();
             List<KeyValuePair<string, List<List<string>>>> subjectPaperDatas = new List<KeyValuePair<string, List<List<string>>>>();
             List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>> classSubjectPaperDatas = new List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>>();
@@ -177,7 +178,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     subjectPaperDatas.Add(subjectData);
                     classSubjectPaperDatas.Add(classSubjectData);
                     subjectScatter.Add(DoSubjectScatter(examResult));
-                    //gpoint = DoKnowledgePoint(examResult,info);
+                    gpoint = DoKnowledgePoint(examResult,info);
                     //获取一张试卷的满分
                     paperScore.Add(examResult.subjectId, examResult.paper.point.Sum());
                     List<double> StuSubjectTotals = new List<double>();
@@ -227,7 +228,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 }
                 //处理进线分数
                 gradeTotal.Sort((s1, s2) => { return s2.CompareTo(s1); });
-                double ipoint = gradeTotal[personCount];
+                ipoint = gradeTotal[personCount];
                 //以班级为单位
                 foreach (string classId in info.targetClassIds)
                 {
@@ -277,7 +278,7 @@ namespace TEAMModelOS.Controllers.Analysis
                         //标准差
                         powSum += Math.Pow(x.total - totalAverage, 2);
                         //进线人数
-                        if (x.total > ipoint) { 
+                        if (x.total >= ipoint) { 
                             lineCount++; 
                         }
                         //班级全科的pr
@@ -407,12 +408,12 @@ namespace TEAMModelOS.Controllers.Analysis
             
             }
             var sub = info.subjects.Select(x => new { id = x.id, name = x.name });
-            return Ok(new { students, classes, grades , paper= subjectPaperDatas, subjects=sub, scatterKey = scatterKey,paperKey=paperKey, pointKey = gpoint });
+            return Ok(new { students, classes, grades , paper= subjectPaperDatas, subjects=sub, scatterKey = scatterKey,paperKey=paperKey, pointKey = gpoint, ipoint = ipoint });
         }
 
         private static (KeyValuePair<string,List<List<string>>>, KeyValuePair<string, List<KeyValuePair<string, List<double>>>>,   Dictionary<string, List<double>>) DoExerciseScatteres(ExamResult e,  List<string > paperKey) 
         {
-            List<double> examAnswer = new List<double>();
+            List<int> examAnswer = new List<int>();
             List<string> examPersent = new List<string>();
             for (int n = 0; n < e.paper.point.Count; n++)
             {
@@ -475,8 +476,16 @@ namespace TEAMModelOS.Controllers.Analysis
                     classdatas.Add(new KeyValuePair<string, List<double>>(c.id, persent));
                     if (gradeItemScore.ContainsKey(c.gradeId))
                     {
-                        int index = 0;
-                        gradeItemScore[c.gradeId].ForEach(x => { x = x + answerCount[index]; index += 1; });
+                        
+                        var we = gradeItemScore[c.gradeId];
+                        
+                        List<int> count = we;
+                        for (int index =0;index<count.Count;index++) {
+                            count[index] = count[index] + answerCount[index];
+                             
+                        }
+                        gradeItemScore[c.gradeId] = count;
+                       // gradeItemScore[c.gradeId].ForEach(x => { x = x + answerCount[index]; index += 1; });
                         gradeItemStuCount[c.gradeId]= gradeItemStuCount[c.gradeId] + peopleCount;
                     }
                     else {
@@ -706,8 +715,39 @@ namespace TEAMModelOS.Controllers.Analysis
             List<List<double>> result = new List<List<double>>();
             List<ClassRange> classes = new List<ClassRange>();
             List<string> ids = new List<string>();
-                //定位试卷信息
-                int index = 0;
+
+            //求单个知识点所占分数
+            List<string> per = new List<string>();
+            List<string> gper = new List<string>();
+            List<string> knowPer = new List<string>();
+            List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
+            Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
+            Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
+            Dictionary<string, object> classMap = new Dictionary<string, object>();
+            Dictionary<string, object> wrongMap = new Dictionary<string, object>();
+            HashSet<string> className = new HashSet<string>();
+            List<List<string>> wrongPersent = new List<List<string>>();
+            List<string> key = new List<string>
+            {
+                "id",
+                "className",
+                "seatNO",
+                "point",
+                "anwPoint",
+                "persent"
+            };
+            List<string> keyWrong = new List<string>
+            {
+                "name",
+                "point",
+                "itemNO",
+                "persent",
+                "wrong",
+                "rhw",
+                "rlw"
+            };
+            //定位试卷信息
+            int index = 0;
                 foreach (ExamSubject subject in info.subjects)
                 {
                     if (subject.id.Equals(exam.subjectId))
@@ -719,6 +759,8 @@ namespace TEAMModelOS.Controllers.Analysis
                         index++;
                     }
                 }
+            if (info.papers[index].knowledge != null && info.papers[index].knowledge.Count > 0)
+            {
                 info.papers[index].knowledge.ForEach(k =>
                 {
                     k.ForEach(e =>
@@ -726,10 +768,21 @@ namespace TEAMModelOS.Controllers.Analysis
                         knowledge.Add(e);
                     });
                 });
+            }
+            else {
+                return knowledgeALL;
+            }
+            if (info.papers[index].field != null && info.papers[index].field.Count > 0)
+            {
                 info.papers[index].field.ForEach(f =>
                 {
                     area.Add(f.ToString());
                 });
+            }
+            else {
+                return knowledgeALL;
+            }
+                
                 double Qnum = 0;
                 point = info.papers[index].point;
                 result = exam.studentScores;
@@ -820,36 +873,7 @@ namespace TEAMModelOS.Controllers.Analysis
                     double fieldPersent = fieldPoint / TotalPoint;
                     fper.Add(fieldPersent.ToString("0.00"));
                 }
-                //求单个知识点所占分数
-                List<string> per = new List<string>();
-                List<string> gper = new List<string>();
-                List<string> knowPer = new List<string>();
-                List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
-                Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
-                Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
-                Dictionary<string, object> classMap = new Dictionary<string, object>();
-                Dictionary<string, object> wrongMap = new Dictionary<string, object>();
-                HashSet<string> className = new HashSet<string>();
-                List<List<string>> wrongPersent = new List<List<string>>();
-                List<string> key = new List<string>
-            {
-                "id",
-                "className",
-                "seatNO",
-                "point",
-                "anwPoint",
-                "persent"
-            };
-                List<string> keyWrong = new List<string>
-            {
-                "name",
-                "point",
-                "itemNO",
-                "persent",
-                "wrong",
-                "rhw",
-                "rlw"
-            };
+               
                 for (int k = 0; k < knowledgeName.Count; k++)
                 {
                     List<string> knowledgeClass = new List<string>();