Pārlūkot izejas kodu

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

liqk 4 gadi atpakaļ
vecāks
revīzija
ede2211d3a
21 mainītis faili ar 574 papildinājumiem un 64 dzēšanām
  1. 9 9
      TEAMModelFunction/TriggerExam.cs
  2. 1 1
      TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs
  3. 173 0
      TEAMModelOS/ClientApp/src/components/evaluation/AnalysisItemTable.vue
  4. 1 1
      TEAMModelOS/ClientApp/src/components/evaluation/ExerciseList.less
  5. 19 6
      TEAMModelOS/ClientApp/src/components/evaluation/ExerciseList.vue
  6. 227 0
      TEAMModelOS/ClientApp/src/components/evaluation/OptionsTable.vue
  7. 5 3
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue
  8. 7 1
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseMyTable.vue
  9. 0 3
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseScoreRateBar.vue
  10. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/totalAnalysis.js
  11. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/totalAnalysis.js
  12. 1 1
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue
  13. 12 1
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseChild.vue
  14. 1 1
      TEAMModelOS/ClientApp/src/view/evaluation/index/CommonExercise.less
  15. 5 2
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue
  16. 28 1
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue
  17. 33 26
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue
  18. 24 4
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue
  19. 16 3
      TEAMModelOS/Controllers/Analysis/AchievementController.cs
  20. 9 1
      TEAMModelOS/Controllers/Analysis/AnalysisController.cs
  21. 1 0
      TEAMModelOS/Controllers/Analysis/StudentAys.cs

+ 9 - 9
TEAMModelFunction/TriggerExam.cs

@@ -341,25 +341,25 @@ namespace TEAMModelFunction
                         examResults.Add(item);
                     }
                     //结算单科单班的标准差和平均分
-                    foreach (ExamResult exam in examResults) {
+                    foreach (ExamClassResult classResult in examClassResults) {
                         //标记单科单班总得分
                         double subScore = 0;
                         //标准差
                         double sPowSum = 0;
-                        var scount = exam.studentIds.Count;
-                        foreach (List<double> sc in exam.studentScores)
+                        var scount = classResult.studentIds.Count;
+                        foreach (List<double> sc in classResult.studentScores)
                         {
                             subScore += sc.Sum();
                         }
-                        foreach (string sid in exam.studentIds)
+                        foreach (string sid in classResult.studentIds)
                         {
-                            double ssc = exam.studentScores[exam.studentIds.IndexOf(sid)].Sum();
+                            double ssc = classResult.studentScores[classResult.studentIds.IndexOf(sid)].Sum();
                             sPowSum += Math.Pow(ssc - scount > 0 ? Math.Round(subScore * 1.0 / scount, 2) : 0, 2);
 
                         }
-                        exam.standard = Math.Round(scount > 0 ? Math.Pow(sPowSum / scount, 0.5) : 0, 2);
-                        exam.average = scount > 0 ? Math.Round(subScore / scount, 2) : 0;
-                        await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(exam, exam.id, new Azure.Cosmos.PartitionKey($"{exam.code}"));
+                        classResult.standard = Math.Round(scount > 0 ? Math.Pow(sPowSum / scount, 0.5) : 0, 2);
+                        classResult.average = scount > 0 ? Math.Round(subScore / scount, 2) : 0;
+                        await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(classResult, classResult.id, new Azure.Cosmos.PartitionKey($"{classResult.code}"));
                     }
                     //记录某次考试所有学生得分总分
                     double score = 0;
@@ -462,7 +462,7 @@ namespace TEAMModelFunction
                     }
                     recorde.Add(optCount);
                 }
-                info.papers[no].recorde = recorde;
+                info.papers[no].record = recorde;
             }
             catch (Exception ex)
             {

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs

@@ -116,7 +116,7 @@ namespace TEAMModelOS.SDK.Models
         //题目类型
         public List<string> type { get; set; } = new List<string>();
         public List<int> field { get; set; } = new List<int>();
-        public List<Dictionary<string, int>> recorde = new List<Dictionary<string, int>>();
+        public List<Dictionary<string, int>> record { get; set; } = new List<Dictionary<string, int>>();
     }
     /*public class Condition
     {

+ 173 - 0
TEAMModelOS/ClientApp/src/components/evaluation/AnalysisItemTable.vue

@@ -0,0 +1,173 @@
+<template>
+	<div class="analysis-table">
+		<!-- 表格组件 -->
+		<Table border ref="table" :data="tableData" :columns="dataColumns"></Table>
+
+
+
+	</div>
+</template>
+<script>
+	export default {
+		props: {
+			tableDatas: {
+				type: Array,
+				default: () => []
+			},
+
+		},
+		data() {
+			return {
+				tableData: [],
+				dataColumns: [{
+						title: '知识点',
+						key: 'knowledge',
+						align: 'center',
+						width: 150
+					},
+					{
+						title: '落点区域',
+						key: 'areaName',
+						align: 'center'
+					},
+					{
+						title: '配分',
+						key: 'score',
+						align: 'center'
+					},
+					{
+						title: '难易度',
+						key: 'diff',
+						align: 'center'
+					},
+					{
+						title: '鉴别度',
+						key: 'identify',
+						align: 'center',
+						render: function(h, params) {
+							return h('span', (Number(params.row.identify)).toFixed(2))
+						}
+					},
+					{
+						title: '正答率',
+						align: 'center',
+						key: 'classScoreRate'
+					},
+					{
+						title: '高分组正答率',
+						align: 'center',
+						key: 'PH',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.PH)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: '低分组正答率',
+						align: 'center',
+						key: 'PL',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.PL)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R1',
+						align: 'center',
+						key: 'R1',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R1)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R2',
+						key: 'R2',
+						align: 'center',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R2)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R3',
+						align: 'center',
+						key: 'R3',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R3)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R4',
+						align: 'center',
+						key: 'R4',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R4)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R5',
+						align: 'center',
+						key: 'R5',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R5)) * 100).toFixed(0) + '%')
+						}
+					},
+					{
+						title: 'R6',
+						align: 'center',
+						key: 'R6',
+						render: function(h, params) {
+							return h('span', ((Number(params.row.R6)) * 100).toFixed(0) + '%')
+						}
+					}
+				],
+			}
+		},
+		created() {
+			this.tableData = [{
+				"id": "1",
+				"type": "",
+				"areaName": "A",
+				"score": "3",
+				"diff": "0.775",
+				"identify": " 0.44999999999999996",
+				"classScoreRate": "-",
+				"gradeScoreRate": "hbcn0906:92.68,hbcn0910:90,hbcn0909:84.21,hbcn0907:87.18,hbcn0902:89.47,hbcn0908:87.8,hbcn0901:80.56,hbcn0904:89.47,hbcn0911:85.37,hbcn0912:79.49,hbcn0903:85.37,hbcn0905:87.8",
+				"highScoreRate": "-",
+				"lowScoreRate": "-",
+				"knowledgePoint": "-",
+				"R1": " 1",
+				"R2": " 1",
+				"R3": " 0.98",
+				"R4": " 0.85",
+				"R5": " 0.65",
+				"R6": " 0.35",
+				"PH": " 0.99",
+				"PL": " 0.53",
+				"X": "0.231",
+				"Y": "0.83",
+				"knowledge": "字音",
+				"examScoreRate": "83.33",
+			}]
+
+
+		},
+		methods: {
+
+
+		},
+
+		mounted() {
+
+		},
+
+		computed: {
+			exportTableRefs() {
+				return this.$store.state.totalAnalysis.exportTableRefs
+			}
+		},
+
+		watch: {
+
+
+		}
+
+	}
+</script>

+ 1 - 1
TEAMModelOS/ClientApp/src/components/evaluation/ExerciseList.less

@@ -252,7 +252,7 @@
     }
     .explain-title {
       width: 10%;
-      max-width: 78px;
+      max-width: 85px;
       display: inline-block;
       color: rgb(16, 171, 231);
     }

+ 19 - 6
TEAMModelOS/ClientApp/src/components/evaluation/ExerciseList.vue

@@ -31,7 +31,7 @@
 					</div>
 				</div>
 				<div class="exercise-item-children" v-if="item.children.length">
-					<BaseChild :children="item.children"></BaseChild>
+					<BaseChild :children="item.children" :isShowAnalysis="isShowAnalysis"></BaseChild>
 				</div>
 				<transition name="slide" v-if="item.type !== 'compose'">
 					<div v-show="collapseList.indexOf(exerciseList.indexOf(item)) > -1" class="toggle-area">
@@ -73,6 +73,14 @@
 									</div>
 								</div>
 							</div>
+							<div class="item-explain" v-if="isShowAnalysis">
+								<span class="explain-title">【{{ $t('totalAnalysis.showAnalysis') }}】</span>
+								<div class="item-explain-details">
+									<AnalysisItemTable></AnalysisItemTable>
+									</br>
+									<OptionsTable v-if="item.type === 'single' || item.type === 'multiple' || item.type === 'judge'"></OptionsTable>
+								</div>
+							</div>
 						</div>
 						<!-- 如果是综合题 则加载子题渲染组件 -->
 						<!-- <div v-else>
@@ -86,7 +94,7 @@
 					<span class="item-tools-info">{{$t('evaluation.filter.type')}}:{{ exersicesType[item.type] }}</span>
 					<span class="item-tools-info">{{$t('evaluation.filter.diff')}}:{{ exersicesDiff[item.level - 1] }}</span>
 					<span class="item-tools-info">{{$t('evaluation.filter.level')}}:{{ exersicesField[item.field - 1] }}</span>
-					<span class="item-tools-info">{{$t('evaluation.filter.useCount')}}:{{ item.usageCount || 0 }} </span>
+					<span class="item-tools-info">{{$t('evaluation.filter.useCount')}}:{{ item.usageCount || 0 }} {{ $t('unit.text4') }}</span>
 					<!-- <span class="item-tools-info">{{$t('evaluation.updateTime')}}:{{ $tools.formatTime(item.createTime)  || 0 }} </span> -->
 					<Button type="info" v-if="!isAnalysis" :style="{backgroundColor:selectList.map(i => i.id).indexOf(item.id) > -1 ? '#bbbbbb' : '#2db7f5'}"
 					 @click.stop="onSelectItem(item,index)">{{ selectList.map(i => i.id).indexOf(item.id) > -1 ? $t('evaluation.remove') : $t('evaluation.choose')}}</Button>
@@ -102,8 +110,10 @@
 </template>
 <script>
 	import blobTool from "@/utils/blobTool.js";
-
+	import AnalysisItemTable from '@/components/evaluation/AnalysisItemTable'
+	import OptionsTable from '@/components/evaluation/OptionsTable'
 	export default {
+		components:{AnalysisItemTable,OptionsTable},
 		props:{
 			propsList:{
 				type:Array,
@@ -121,7 +131,10 @@
 				type:Boolean,
 				default:false
 			},
-			
+			isShowAnalysis: {
+				type: Boolean,
+				default: false
+			},
 			examScope:{
 				type:String,
 				default:null
@@ -217,9 +230,9 @@
 					);
 					if (exerciseItemDom.length) {
 						this.$emit("pageScroll", exerciseItemDom[0].offsetTop);
-						exerciseItemDom[0].style.border = '3px solid #2db7f5'
+						exerciseItemDom[0].style.border = '2px solid #2db7f5'
 						setTimeout(() => {
-							exerciseItemDom[0].style.border = 'none'
+							exerciseItemDom[0].style.border = '2px solid transparent'
 						},2000)
 					}
 				}

+ 227 - 0
TEAMModelOS/ClientApp/src/components/evaluation/OptionsTable.vue

@@ -0,0 +1,227 @@
+<template>
+	<div class="analysis-table">
+		<!-- 表格组件 -->
+		<Table border ref="table" :data="optionsData" :columns="optionColumns"></Table>
+
+		
+
+	</div>
+</template>
+<script>
+	export default {
+		props: {
+			tableDatas: {
+				type: Array,
+				default: () => []
+			},
+			
+		},
+		data() {
+			return {
+				dataColumns: [
+				    {
+				        title: '知识点',
+				        key: 'knowledgePoint',
+				        align: 'center',
+				        width: 150
+				    },
+				    {
+				        title: '落点区域',
+				        key: 'areaName',
+				        align: 'center'
+				    },
+				    {
+				        title: '配分',
+				        key: 'score',
+				        align: 'center'
+				    },
+				    {
+				        title: '难易度',
+				        key: 'diff',
+				        align: 'center'
+				    },
+				    {
+				        title: '鉴别度',
+				        key: 'identify',
+				        align: 'center',
+				        render: function (h, params) {
+				            return h('span', (Number(params.row.identify)).toFixed(2))
+				        }
+				    },
+				    {
+				        title: '正答率',
+				        align: 'center',
+				        key: 'classScoreRate'
+				    },
+				    {
+				        title: '高分组正答率',
+				        align: 'center',
+				        key: 'PH',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.PH)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: '低分组正答率',
+				        align: 'center',
+				        key: 'PL',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.PL)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R1',
+				        align: 'center',
+				        key: 'R1',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R1)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R2',
+				        key: 'R2',
+				        align: 'center',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R2)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R3',
+				        align: 'center',
+				        key: 'R3',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R3)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R4',
+				        align: 'center',
+				        key: 'R4',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R4)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R5',
+				        align: 'center',
+				        key: 'R5',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R5)) * 100).toFixed(0) + '%')
+				        }
+				    },
+				    {
+				        title: 'R6',
+				        align: 'center',
+				        key: 'R6',
+				        render: function (h, params) {
+				            return h('span', ((Number(params.row.R6)) * 100).toFixed(0) + '%')
+				        }
+				    }
+				],
+				optionColumns: [
+				    {
+				        title: '选项',
+				        key: 'option',
+				        align: 'center',
+				        width: 150
+				    },
+				    {
+				        title: '选答人数',
+				        key: 'num',
+				        align: 'center'
+				    },
+				    {
+				        title: '选答率',
+				        key: 'rate',
+				        align: 'center',
+				        render: (h, params) => {
+				            return h('div', [
+				                h('Progress', {
+				                    props: {
+				                        percent: params.row.rate,
+				                        strokeColor: params.row.isTrue ? '#14db14' : '#b5bcbe'
+				                    }
+				                })
+				            ])
+				        }
+				    },
+				    {
+				        title: '高分组选答率',
+				        align: 'center',
+				        key: 'PH',
+				        render: function (h, params) {
+				            return h('span', params.row.PH + '%')
+				        }
+				    },
+				    {
+				        title: '低分组选答率',
+				        align: 'center',
+				        key: 'PL',
+				        render: function (h, params) {
+				            return h('span', params.row.PL + '%')
+				        }
+				    }
+				],
+			}
+		},
+		created() {
+			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: {
+
+			
+		},
+
+		mounted() {
+			
+		},
+
+		computed: {
+			exportTableRefs() {
+				return this.$store.state.totalAnalysis.exportTableRefs
+			}
+		},
+
+		watch: {
+			
+			
+		}
+
+	}
+</script>
+

+ 5 - 3
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue

@@ -24,6 +24,7 @@
 				let myBar = this.$echarts.init(document.getElementById('stuAverageBar'))
 				var option = {
 					legend: {
+						top: '7%',
 						data: [{
 							name: that.$t('totalAnalysis.ta_chart_text4'),
 							textStyle: {
@@ -58,9 +59,10 @@
 					grid: {
 						show: false,
 						containLabel: true,
-						height: 460,
-						width: '90%',
-						x2: '5%',
+						height: 400,
+						width: '88%',
+						left:'3%',
+						bottom: '12%',
 						tooltip: {
 							show: true,
 							trigger: 'axis', // 触发类型

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

@@ -161,7 +161,13 @@
 				if (filterKey === 'className') {
 					this.originData = filterValue ? this.tableDatas.filter(item => item.className === filterValue) : this
 						.firstData
-				} else if (filterKey === 'score') {
+				}else if(filterKey === 'scatter'){
+					this.originData = filterValue ? this.tableDatas.filter(item => item.scatter === filterValue) : this
+						.firstData
+				}else if(filterKey === 'areaName'){
+					this.originData = filterValue ? this.tableDatas.filter(item => item.areaName === filterValue) : this
+						.firstData
+				}else if (filterKey === 'score') {
 					const ipoint = this.$store.state.totalAnalysis.analysisJson.ipoint
 					const touchScore = this.$store.state.totalAnalysis.analysisJson.touchScore
 					switch (filterValue) {

+ 0 - 3
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseScoreRateBar.vue

@@ -181,7 +181,6 @@
 			
 			/* 根据学生总体数据来换取得分率区间分布数据 */
 			doRender(list) {
-				console.log(list)
 				let sRateArr = list.map(i => i.sRate)
 				let splitArr = [...new Array(10).keys()]
 				let result = new Array(10).fill(0)
@@ -196,13 +195,11 @@
 			}
 		},
 		mounted() {
-			console.log(this.echartsData)
 			this.doRender(this.echartsData)
 			this.drawLine()
 		},
 		watch: {
 			echartsData(val) {
-				console.log(val)
 				this.doRender(val)
 				this.drawLine()
 			},

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/totalAnalysis.js

@@ -5,6 +5,7 @@ export default {
 		tab2:'评测数据',
 	},
 	lostStu:'缺考人数',
+	showAnalysis:'数据分析',
 	allSubjects:'全科',
 	noData:'暂无有效数据返回!',
 	allClasses:'所有班级',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/totalAnalysis.js

@@ -6,6 +6,7 @@ export default {
 		noData:'暫無有效數據返回!'
 	},
 	lostStu:'缺考人數',
+	showAnalysis:'資料分析',
 	allSubjects:'全科',
 	allClasses:'所有班級',
 	all:'全部',

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue

@@ -168,7 +168,7 @@
 					<span class="item-tools-info">{{$t('evaluation.filter.type')}}:{{ exersicesType[item.type] }}</span>
 					<span class="item-tools-info">{{$t('evaluation.filter.diff')}}:{{ exersicesDiff[item.level - 1] }}</span>
 					<span class="item-tools-info">{{$t('evaluation.filter.level')}}:{{ exersicesField[item.field - 1] }}</span>
-					<span class="item-tools-info">{{$t('evaluation.filter.useCount')}}:{{ item.usageCount || 0 }} </span>
+					<span class="item-tools-info">{{$t('evaluation.filter.useCount')}}:{{ item.usageCount || 0 }} {{ $t('unit.text4') }}</span>
 					<span class="item-tools-info">{{$t('evaluation.updateTime')}}:{{ $tools.formatTime(item.createTime)  || 0 }} </span>
 
 					<!--<span class="item-tools-info" style="border:0">更新时间:{{ formatDateTime(new Date(item.createTime * 1000)) }}</span>-->

+ 12 - 1
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseChild.vue

@@ -64,6 +64,12 @@
 							</div>
 						</div>
 					</div>
+					<div class="item-explain" v-if="isShowAnalysis">
+						<span class="explain-title">【{{ $t('totalAnalysis.showAnalysis') }}】</span>
+						<div class="item-explain-details">
+							<OptionsTable></OptionsTable>
+						</div>
+					</div>
 				</div>
 			</transition>
 
@@ -72,9 +78,10 @@
 </template>
 <script>
 	import '@/utils/Math.uuid'
+	import OptionsTable from '@/components/evaluation/OptionsTable'
 	export default {
 		name: 'BaseChild',
-		components: {},
+		components: { OptionsTable },
 		props: {
 			children: {
 				type: Array,
@@ -87,6 +94,10 @@
 			isShowScore: {
 				type: Boolean,
 				default: false
+			},
+			isShowAnalysis: {
+				type: Boolean,
+				default: false
 			}
 		},
 		data() {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/CommonExercise.less

@@ -247,7 +247,7 @@
     }
     .explain-title {
       width: 12%;
-      max-width: 78px;
+      max-width: 85px;
       display: inline-block;
       color: rgb(16, 171, 231);
     }

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

@@ -202,9 +202,12 @@
 				let analysisJson = JSON.parse(JSON.stringify(this.getAnalysisJson))
 				let curClassItem = analysisJson.classes.filter(i => i.className === this.className)[0]
 				let studentIds = curClassItem.studentIds
+				let singleSubjectItem = curClassItem.subjects[subjectIndex - 1]
 				this.currentClass = curClassItem
-				// this.currentClass.standardDeviation = subjectIndex === 0 ? curClassItem.standardDeviation : curClassItem.subjects[subjectIndex - 1].standardDeviation
-				this.classAverage = subjectIndex === 0 ? curClassItem.totalAverage.toFixed(1) : curClassItem.subjects[subjectIndex - 1].average
+				this.currentClass.standardDeviation = subjectIndex === 0 ? curClassItem.standardDeviation : singleSubjectItem.standard
+				this.currentClass.totalAverage = subjectIndex === 0 ? curClassItem.totalAverage : singleSubjectItem.average
+				this.currentClass.csRate = subjectIndex === 0 ? curClassItem.csRate : singleSubjectItem.sRate
+				this.classAverage = subjectIndex === 0 ? curClassItem.totalAverage.toFixed(1) : singleSubjectItem.average
 				// 判断当前选择科目是全科还是单科 赋予不同的值
 				studentIds.forEach((stuId, stuIndex) => {
 					let stuItem = analysisJson.students.filter(i => i.id === stuId)[0]

+ 28 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue

@@ -111,7 +111,34 @@
 					{
 					    title: this.$t('totalAnalysis.sca_table_text6'),
 					    key: 'scatter',
-					    minWidth: 60
+					    minWidth: 60,
+						filters: [
+						    {
+						        label: "A",
+						        value: "A"
+						    },
+						    {
+						        label: "A'",
+						        value: "A'"
+						    },{
+						        label: "B",
+						        value: "B"
+						    },
+						    {
+						        label: "B'",
+						        value: "B'"
+						    },{
+						        label: "C",
+						        value: "C"
+						    },
+						    {
+						        label: "C'",
+						        value: "C'"
+						    }
+						],
+						filterMultiple: false,
+						filterRemote(value, row) {
+						}
 					},
 					{
 					    title: this.$t('totalAnalysis.sca_table_text5'),

+ 33 - 26
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue

@@ -7,7 +7,7 @@
 
             <!-- <span class="btn-back" @click="handleBackTo" ref="btnBack"><Icon type="ios-arrow-back" />{{$t('totalAnalysis.ql_text13')}}</span> -->
             <Loading :top="300" v-show="dataLoading" type="3"></Loading>
-			<ExerciseList :propsList="questionList" :examScope="examScope" isAnalysis  @pageScroll="doScroll" ref="exList"></ExerciseList>
+			<ExerciseList :propsList="questionList" :examScope="examScope" isAnalysis  @pageScroll="doScroll" ref="exList" isShowAnalysis></ExerciseList>
         </div>
 
         <!-- 右侧题目列表题型概览 -->
@@ -111,16 +111,6 @@
                 ConnectorList: [],
                 CorrectList: [],
                 ComposeList: [],
-                typeTransfer: {
-                    'single': '单选',
-                    'multiple': '多选',
-                    'judge': '判断',
-                    'complete': '填空',
-                    'subjective': '主观',
-					'connector': '连线',
-					'correct': '改错',
-                    'compose': '综合'
-                },
                 diffColors: ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
                 dataColumns: [
                     {
@@ -350,7 +340,11 @@
 					})
 					this.flatList = allItems
 					console.log('拉平后的题目',allItems)
+					// 获取当前试题的分析数据
+					let itemAnalysisArr = this.getExerciseList()
+					console.log(JSON.stringify(itemAnalysisArr))
 					this.$nextTick(() => {
+						console.log(this.$refs['indexRef' + (qIndex - 1)][0])
 						setTimeout(() => {
 							this.$refs['indexRef' + (qIndex - 1)][0].click() // 根据路由携带的题序 来触发对应题序的点击事件 完成滚动
 						}, 1000)
@@ -397,9 +391,9 @@
 					let questionList = this.$refs.exList.$el.getElementsByClassName('exercise-item')
 					let itemIndex = this.questionList.indexOf(item)
 					let questionDom = questionList[itemIndex]
-					questionDom.style.border = '3px solid #2db7f5'
+					questionDom.style.border = '2px solid #2db7f5'
 					setTimeout(() => {
-						questionDom.style.border = 'none'
+						questionDom.style.border = '2px solid transparent'
 					},2000)
 					this.doScroll(questionDom.offsetTop)
 					// 伪数组处理统一背景颜色
@@ -408,9 +402,6 @@
 					})
 					// 将当前选中项修改选中色
 					currentSpan.style.background = '#139c51'
-					
-					console.log(itemIndex)
-					console.log(this.$refs.exList)
 					this.$refs.exList.collapseList = [itemIndex]
 				})
                 
@@ -427,7 +418,7 @@
             handleCollapseChange(val) {
                 let questionIndex = val[0]
                 if (questionIndex === '999') return
-                if (questionIndex && this.collapseList.indexOf(questionIndex) === -1 && questionIndex !== '999') {
+                if (questionIndex && this.collapseList.indexOf(questionIndex) === -1) {
                     this.collapseList.push(questionIndex)
                     this.activeCollapseIndex = questionIndex
                 } else if (questionIndex === 0) {
@@ -448,7 +439,27 @@
 					return 0
 				}
                 
-            }
+            },
+			
+			/* 获取所有试题的对应分析数据 */
+			getExerciseList() {
+				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) => {
+					let obj = {}
+					analysisJson.paperKey.forEach((key, index) => {
+						obj[key] = exercise[index]
+					})
+			
+					analysisJson.classes.forEach(classItem => {
+						obj[classItem.className] = classItem.subjects[curSubjectIndex].item[exerciseIndex]
+					})
+					result.push(obj)
+				})
+				return result
+			},
         },
 
         mounted() {
@@ -459,6 +470,8 @@
 			})
 			
 			
+			
+			
 
         },
 
@@ -469,8 +482,8 @@
                 return top
             },
             // 获取最新试题数据
-            getExerciseData() {
-                return this.$store.state.totalAnalysis.exerciseData
+            getAnalysisJson() {
+            	return this.$store.state.totalAnalysis.analysisJson
             },
 			// 替换题序
 			getIndexOrder(){
@@ -488,12 +501,6 @@
                 // box.style.top = this.scrollTop >= 129 ? '100px' : (t + 'px')
                 // btnBack.style.top = this.scrollTop >= 129 ? (this.scrollTop - 152) + 'px' : '0px'
             },
-            // 渲染最新试题统计数据
-            getExerciseData(val) {
-                if (!val) return
-                this.tableData = JSON.parse(JSON.stringify(val))
-                console.log(this.tableData)
-            }
         }
     }
 </script>

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

@@ -137,7 +137,27 @@
 					{
 						title: this.$t('totalAnalysis.sca_table_text6'),
 						key: 'areaName',
-						minWidth: 100
+						minWidth: 100,
+						filters: [
+						    {
+						        label: "A",
+						        value: "A"
+						    },
+						    {
+						        label: "A'",
+						        value: "A'"
+						    },{
+						        label: "B",
+						        value: "B"
+						    },
+						    {
+						        label: "B'",
+						        value: "B'"
+						    }
+						],
+						filterMultiple: false,
+						filterRemote(value, row) {
+						}
 					},
 					{
 						title: this.$t('totalAnalysis.ta_table_text4'),
@@ -158,7 +178,7 @@
 						title: this.$t('totalAnalysis.ta_table_text6'),
 						key: 'identify',
 						renderType: function(h, params) {
-							return h('span', Number(params.row.identify).toFixed(0))
+							return h('span', Number(params.row.identify).toFixed(2))
 						},
 						minWidth: 120
 					},
@@ -350,9 +370,9 @@
 				this.renderClassColumns(analysisJson)
 				this.exerciseIndexList = exerciseList.map(item => item.id)
 				this.A1List = exerciseList.filter(item => item.areaName === 'A')
-				this.A2List = exerciseList.filter(item => item.areaName === 'A-')
+				this.A2List = exerciseList.filter(item => item.areaName === "A'")
 				this.B1List = exerciseList.filter(item => item.areaName === 'B')
-				this.B2List = exerciseList.filter(item => item.areaName === 'B-')
+				this.B2List = exerciseList.filter(item => item.areaName === "B'")
 				this.tableData = JSON.parse(JSON.stringify(exerciseList))
 				this.getScatterData()
 				console.log('最新试题数据', this.tableData)

+ 16 - 3
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -2880,10 +2880,10 @@ namespace TEAMModelOS.Controllers.Analysis
                                     });
                                     ex.studentScores = newScores;
                                     int index = 0;
-                                    List<Task<string>> tasks = new List<Task<string>>();
-                                    List<List<string>> answers = new List<List<string>>();
+                                    List<Task<string>> tasks = new List<Task<string>>();                                    
                                     foreach (List<string> an in examClass.studentAnswers)
                                     {
+                                        List<List<string>> answers = new List<List<string>>();
                                         //List<List<string>> stuAns = new List<List<string>>();
                                         an.ForEach(aa =>
                                         {
@@ -2907,12 +2907,18 @@ namespace TEAMModelOS.Controllers.Analysis
                                                         case '4':
                                                             ans.Add("D");
                                                             break;
+                                                        case '5':
+                                                            ans.Add("E");
+                                                            break;
+                                                        case '6':
+                                                            ans.Add("F");
+                                                            break;
                                                         default:
                                                             ans.Add("");
                                                             break;
                                                     }
-                                                    answers.Add(ans);
                                                 }
+                                                answers.Add(ans);
                                             }
                                             else
                                             {
@@ -2930,6 +2936,12 @@ namespace TEAMModelOS.Controllers.Analysis
                                                     case "4":
                                                         ans.Add("D");
                                                         break;
+                                                    case "5":
+                                                        ans.Add("E");
+                                                        break;
+                                                    case "6":
+                                                        ans.Add("F");
+                                                        break;
                                                     default:
                                                         ans.Add("");
                                                         break;
@@ -2941,6 +2953,7 @@ namespace TEAMModelOS.Controllers.Analysis
                                         string FileName = ex.examId + "/" + ex.subjectId + "/" + examClass.studentIds[index];
                                         string blob =  FileName + "/" + "ans.json";
                                         tasks.Add(_azureStorage.UploadFileByContainer(ex.school.ToString(), answers.ToJsonString(), "exam", FileName + "/" + "ans.json"));
+                                        ex.studentAnswers[index].Clear();
                                         ex.studentAnswers[index].Add(blob);
                                         index++;
                                     }

+ 9 - 1
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -276,6 +276,7 @@ namespace TEAMModelOS.Controllers.Analysis
                             StudentSubject subject = new StudentSubject
                             {
                                 id = examResult.subjectId,
+                                scores = examResult.studentScores[examResult.studentIds.IndexOf(stuid)],
                                 name = info.subjects.Where(x => x.id == examResult.subjectId).FirstOrDefault().name,
                                 point = stuPerDatas.Where(x => x.Key == examResult.subjectId).SelectMany(va=>va.Value).Where(stu=>stu.Key==stuid).Select(pi => pi.Value).First(),
                                 fieldPoint = fieldStuPerDatas.Where(x => x.Key == examResult.subjectId).SelectMany(va => va.Value).Where(stu => stu.Key == stuid).Select(pi => pi.Value).First()
@@ -688,7 +689,14 @@ namespace TEAMModelOS.Controllers.Analysis
                         values.Add("-");
                     });
                     values[0] = (k + 1).ToString();
-                    values[1] =  "";
+                    if (e.paper.type.Count > 0)
+                    {
+                        values[1] = e.paper.type[k].ToString();
+                    }
+                    else {
+                        values[1] = "";
+                    }
+                    
                     values[2] = topic[k].ToString();
                     values[3] = e.paper.point[k].ToString();
 /*                    List<string> sk = new List<string>();

+ 1 - 0
TEAMModelOS/Controllers/Analysis/StudentAys.cs

@@ -35,5 +35,6 @@ namespace TEAMModelOS.Controllers.Analysis
         public int csort { get; set; }
         public int gsort { get; set; }
         public double sRate { get; set; }
+        public List<double> scores { get; set; }
     }
 }