Jelajahi Sumber

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

liqk 4 tahun lalu
induk
melakukan
f73d6ec50f

+ 1 - 1
TEAMModelFunction/CourseServiceBus.cs

@@ -23,7 +23,7 @@ namespace TEAMModelFunction
         /// 完善课程变更
         /// </summary>
         /// <data msg>
-        /// "ids":["s111","t111"]//学生
+        /// "ids":["s111","t1111"]//学生
         /// "opt":"join/leave",//状态
         /// "no":"CLASS001"//教室编号
         /// "source":1/2  //学生名单数据来源 1是不同学校的学生账号,2是扫码加入的醍摩豆ID

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

@@ -207,7 +207,6 @@
                         },
                          {
                             type: 'value',
-                            max: 100,
                             min: 0,
                             splitLine: {
                                 show: false,

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

@@ -213,7 +213,7 @@
 				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]

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

@@ -47,22 +47,22 @@ export default {
 				pointLevelKey.push({
 					subjectId:subject.id,
 					levelKey:{
-						level:val.fieldName[subjectIndex].Value,
-						pointList:val.fieldName[subjectIndex].Value,
-						per:val.fieldPer[subjectIndex].Value,
+						level:val.fieldName[subjectIndex].value,
+						pointList:val.fieldName[subjectIndex].value,
+						per:val.fieldPer[subjectIndex].value,
 						wrong:{
-							datas:val.fieldwrong[subjectIndex].Value,
+							datas:val.fieldwrong[subjectIndex].value,
 							keys:val.wrongKey
 						},
 						stupercent:tools.getLevelPercent(val,subjectIndex).stuResult,
 						classpercent:tools.getLevelPercent(val,subjectIndex).classResult
 					},
 					pointKey:{
-						level:val.knowName[subjectIndex].Value,
-						pointList:val.knowName[subjectIndex].Value,
-						per:val.knowPer[subjectIndex].Value,
+						level:val.knowName[subjectIndex].value,
+						pointList:val.knowName[subjectIndex].value,
+						per:val.knowPer[subjectIndex].value,
 						wrong:{
-							datas:val.wrong[subjectIndex].Value,
+							datas:val.wrong[subjectIndex].value,
 							keys:val.wrongKey
 						},
 						stupercent:tools.getKnowPercent(val,subjectIndex).stuResult,

+ 0 - 2
TEAMModelOS/ClientApp/src/utils/kityformula.js

@@ -30,8 +30,6 @@ export default function(editor) {
 						const node = document.getElementById(inputIFrameId)
 						const kfe = node.contentWindow.kfe
 						let latex = kfe.execCommand('get.source')
-						// 去掉空格
-						// latex = latex.replace(/\s/g, '') 
 						// 将latex转换成svg输出
 						const html = window.MathJax.tex2svg(latex,{em: 12, ex: 6})
 						// 匹配输出的svg标签内容直接插入到编辑器中

+ 8 - 8
TEAMModelOS/ClientApp/src/utils/public.js

@@ -659,9 +659,9 @@ export default {
 				stu.name,
 				stu.className,
 				stu.no || '-',
-				val.fScores[subjectIndex].Value[index],
+				val.fScores[subjectIndex].value[index],
 				stu.subjects[subjectIndex].fieldPoint[index],
-				(stu.subjects[subjectIndex].fieldPoint[index] / val.fScores[subjectIndex].Value[index])
+				(stu.subjects[subjectIndex].fieldPoint[index] / val.fScores[subjectIndex].value[index])
 				.toFixed(2)
 			])
 		})
@@ -679,11 +679,11 @@ export default {
 	getLevelPercent(val, subjectIndex) {
 		let stuResult = {}
 		let classResult = {}
-		val.fieldName[subjectIndex].Value.forEach((item, index) => {
+		val.fieldName[subjectIndex].value.forEach((item, index) => {
 			stuResult[item] = this.getLevelStuPercent(val, subjectIndex, index)
 			classResult[item] = this.getLevelClassPercent(val, subjectIndex, index)
 		})
-		stuResult.grade = val.fieldAllPer[subjectIndex].Value
+		stuResult.grade = val.fieldAllPer[subjectIndex].value
 		stuResult.keys = val.knowKey
 		classResult.keys = val.knowkey
 		classResult.className = []
@@ -702,9 +702,9 @@ export default {
 				stu.name,
 				stu.className,
 				stu.no || '-',
-				val.kScores[subjectIndex].Value[index],
+				val.kScores[subjectIndex].value[index],
 				stu.subjects[subjectIndex].point[index],
-				(stu.subjects[subjectIndex].point[index] / val.kScores[subjectIndex].Value[index])
+				(stu.subjects[subjectIndex].point[index] / val.kScores[subjectIndex].value[index])
 				.toFixed(2)
 			])
 		})
@@ -722,11 +722,11 @@ export default {
 	getKnowPercent(val, subjectIndex) {
 		let stuResult = {}
 		let classResult = {}
-		val.knowName[subjectIndex].Value.forEach((item, index) => {
+		val.knowName[subjectIndex].value.forEach((item, index) => {
 			stuResult[item] = this.getKnowStuPercent(val, subjectIndex, index)
 			classResult[item] = this.getKnowClassPercent(val, subjectIndex, index)
 		})
-		stuResult.grade = val.knowAllper[subjectIndex].Value
+		stuResult.grade = val.knowAllper[subjectIndex].value
 		stuResult.keys = val.knowKey
 		classResult.keys = val.knowkey
 		classResult.className = []

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

@@ -24,7 +24,7 @@
     display: none;
 }
 
-.import-student .ivu-table, td.ivu-table-column-center, th.ivu-table-column-center {
+.import-student .ivu-table,.import-student td.ivu-table-column-center, .import-student th.ivu-table-column-center {
     background: none;
     color: #a5a5a5;
     border-bottom: 1px solid #424242;

+ 46 - 13
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue

@@ -14,19 +14,19 @@
 			<span class="component-title" style="margin-top:40px">{{ this.$t('totalAnalysis.classBaseInfo') }}</span>
 		</Row>
 		<Row class-name="component-percents">
-			<div class="percent-item warning-info-item">
+			<div class="percent-item warning-info-item" v-show="isAllSubject">
 				<div class="fl-col-center">
 					<span class="percent-name">{{ this.$t('totalAnalysis.ach_text11') }}</span>
 					<span class="percent-value">{{ currentClass.stuCount || 0 }}</span>
 				</div>
 			</div>
-			<div class="percent-item warning-info-item">
+			<div class="percent-item warning-info-item" v-show="isAllSubject">
 				<div class="fl-col-center">
 					<span class="percent-name">{{ this.$t('totalAnalysis.ach_text8') }}</span>
 					<span class="percent-value">{{ currentClass.lineCount || 0 }}</span>
 				</div>
 			</div>
-			<div class="percent-item">
+			<div class="percent-item" v-show="isAllSubject">
 				<div class="fl-col-center">
 					<span class="percent-name">{{ this.$t('totalAnalysis.ach_text9') }}</span>
 					<span class="percent-value">{{ ((currentClass.lineCount / currentClass.stuCount) * 100).toFixed(1) }}%</span>
@@ -88,6 +88,7 @@
 		},
 		data() {
 			return {
+				isAllSubject:true,
 				scoreRateBarData:{
 					students:[]
 				},
@@ -113,24 +114,24 @@
 						title: this.$t('totalAnalysis.base_name'),
 						key: 'name',
 						fixed: 'left',
-						minWidth: 100
+						minWidth:100
 					},
 					{
 						title: this.$t('totalAnalysis.base_id'),
 						key: 'setNo',
-						minWidth: 120
+						minWidth:100
 					},
 					{
 						title: this.$t('totalAnalysis.ach_table_text2'),
 						sortable: 'custom',
 						key: 'score',
-						minWidth: 100
+						minWidth:100
 					},
 					{
 						title: this.$t('totalAnalysis.ach_table_text8'),
 						key: 'classRank',
-						minWidth: 120,
 						sortable: 'custom',
+						minWidth:200,
 						renderType: function(h, params) {
 						    return h('span',  `${ params.row.classRank } (${ params.row.classPR })`)
 						}
@@ -138,8 +139,8 @@
 					{
 						title: this.$t('totalAnalysis.ach_table_text9'),
 						key: 'gradeRank',
-						minWidth: 120,
 						sortable: 'custom',
+						minWidth:200,
 						renderType: function(h, params) {
 						    return h('span',  `${ params.row.gradeRank } (${ params.row.gradePR })`)
 						}
@@ -191,13 +192,12 @@
 				this.$router.back(-1)
 				this.$parent.isShowQuestions = false
 			},
-
+			
 			/**
 			 * 获取指定科目的表格数据
 			 * @param subjectIndex
 			 */
 			onGetClassTable(subjectIndex) {
-				console.log(this.getAnalysisJson)
 				let result = []
 				let analysisJson = JSON.parse(JSON.stringify(this.getAnalysisJson))
 				let curClassItem = analysisJson.classes.filter(i => i.className === this.className)[0]
@@ -208,11 +208,13 @@
 				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]
 					let stuSubjectItem = subjectIndex === 0 ? null : analysisJson.students.filter(i => i.id === stuId)[0].subjects[subjectIndex - 1]
-					result.push({
+					let studentItemScores = subjectIndex === 0 ? {} : this.getStudentItemScore(stuIndex,analysisJson,subjectIndex - 1)
+					let baseObj = {
 						name: stuItem.name,
 						setNo: stuItem.no,
 						sRate: subjectIndex === 0 ? stuItem.sRate : stuSubjectItem.sRate,
@@ -223,9 +225,40 @@
 						gradeRank: subjectIndex === 0 ? stuItem.gsort : stuSubjectItem.gsort,
 						areaPR: 0,
 						areaRank: 0
-					})
+					}
+					result.push(Object.assign(baseObj,studentItemScores))
 				})
+				console.log(result)
 				this.scoreRateBarData = result
+				
+				if(subjectIndex !== 0){
+					// this.earlyPercentColumns.push
+					let itemsLength = analysisJson.paper[subjectIndex - 1].value
+					let itemsColumns = []
+					itemsLength.forEach((i,index) => {
+						itemsColumns.push({
+							title: '题目' + (index + 1),
+							key: 's' + (index + 1),
+							render:null,
+							sortable: "custom",
+							minWidth:100
+						})
+					})
+					this.earlyPercentColumns.splice(5,this.earlyPercentColumns.length - 5,...itemsColumns)
+				}
+				console.log(this.earlyPercentColumns)
+				
+				
+				return result
+			},
+			
+			/* 获取每个学生每道题目的得分详细表 */
+			getStudentItemScore(stuIndex,analysisJson,subjectIndex){
+				let itemsLength = analysisJson.paper[subjectIndex].value
+				let result = {}
+				itemsLength.forEach((i,index) => {
+					result['s'+ (index + 1)] = analysisJson.students[stuIndex].subjects[subjectIndex].scores[index]
+				})
 				return result
 			},
 
@@ -234,7 +267,6 @@
 			 * @param echartData
 			 */
 			drawLine(echartData) {
-				console.log('预警柱状图', echartData)
 				let that = this
 				let myBar = this.$echarts.init(document.getElementById('stuAverageBar'))
 				var option = {
@@ -468,6 +500,7 @@
 
 			this.$EventBus.$off('onEarlySubjectChange')
 			this.$EventBus.$on('onEarlySubjectChange', index => {
+				this.isAllSubject = index === 0
 				this.onSelectChange(index)
 			})
 		},

+ 2 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/KnowledgeAnalysis/ScoreDetails.vue

@@ -125,7 +125,7 @@
                         key: 'point',
                         sortable: 'custom',
                         renderType: function(h, params) {
-                            return h('span', Number(params.row.point).toFixed(2))
+                            return h('span', Number(params.row.point).toFixed(1))
                         },
                         minWidth: 100
                     },
@@ -135,7 +135,7 @@
                         minWidth: 100,
                         sortable: 'custom',
                         renderType: function(h, params) {
-                            return h('span', Number(params.row.anwPoint).toFixed(2))
+                            return h('span', Number(params.row.anwPoint).toFixed(1))
                         }
                     },
                     {

+ 2 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/LevelAnalysis/ScoreDetails.vue

@@ -120,7 +120,7 @@
 						key: 'point',
 						sortable: 'custom',
 						renderType: function(h, params) {
-							return h('span', Number(params.row.point).toFixed(2))
+							return h('span', Number(params.row.point).toFixed(1))
 						},
 						minWidth: 100
 					},
@@ -130,7 +130,7 @@
 						minWidth: 100,
 						sortable: 'custom',
 						renderType: function(h, params) {
-							return h('span', Number(params.row.anwPoint).toFixed(2))
+							return h('span', Number(params.row.anwPoint).toFixed(1))
 						}
 					},
 					{

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

@@ -69,7 +69,7 @@
 				                <div class="ql-right-items">
 									<!-- 如果是综合题 则需要把小题题序放出来 -->
 									<span v-for="(item,index) in ComposeList" :key="index" style="background-color: none;" class="ql-right-items">
-										<span class="ql-right-item" v-for="(child,childIndex) in item.children" :key="childIndex" @click="handleItemClick(item,$event)" :ref="'indexRef' + (flatList.indexOf(child))"  :data-order="flatList.indexOf(child)">{{getIndexOrder(item)}} - {{ childIndex + 1 }}</span>
+										<span class="ql-right-item" v-for="(child,childIndex) in item.children" :key="childIndex" @click="handleItemClick(item,$event)" :ref="'indexRef' + (flatList.indexOf(child))"  :data-order="flatList.indexOf(child)">{{ fillIndexOrder(flatList.indexOf(child)) }} ({{getIndexOrder(item)}} - {{ childIndex + 1 }})</span>
 									</span>
 				                </div>
 				            </div>
@@ -341,8 +341,7 @@
 					this.flatList = allItems
 					console.log('拉平后的题目',allItems)
 					// 获取当前试题的分析数据
-					let itemAnalysisArr = this.getExerciseList()
-					console.log(JSON.stringify(itemAnalysisArr))
+					// let itemAnalysisArr = this.getExerciseList()
 					this.$nextTick(() => {
 						console.log(this.$refs['indexRef' + (qIndex - 1)][0])
 						setTimeout(() => {
@@ -447,7 +446,7 @@
 				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]
@@ -490,6 +489,12 @@
 				return item => {
 					return this.questionList.indexOf(item) + 1 > 9 ? this.questionList.indexOf(item) + 1 : '0' + (this.questionList.indexOf(item) + 1)
 				}
+			},
+			// 替换题序
+			fillIndexOrder(index){
+				return index => {
+					return index + 1 > 9 ? index + 1 : '0' + (index + 1)
+				}
 			}
         },
         watch: {

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

@@ -171,7 +171,7 @@
 						sortable: true,
 						minWidth: 100,
 						renderType: function(h, params) {
-							return h('span', (Number(params.row.diff) * 100).toFixed(0) + '%')
+							return h('span', Number(params.row.diff).toFixed(2))
 						},
 					},
 					{
@@ -350,7 +350,7 @@
 				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]
@@ -383,7 +383,7 @@
 				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]