ソースを参照

Merge branch 'develop' of http://163.228.141.122:3000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 7 ヶ月 前
コミット
75629d55b2

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

@@ -317,7 +317,7 @@
                             <div class="item-btn-toggle">
                                 <template @click.stop v-if="selEvalInfo.savetype.includes('paper')">
                                     <!-- 可调整分数 -->
-                                    <InputNumber v-if="item.type !== 'compose'" :max="item.score + surPlusScore" :min="scoreStep" :step="scoreStep" v-model="item.score" style="display: inline-block ;width: 60px;margin-right: 10px;height: 30px;" @click.stop></InputNumber>
+                                    <InputNumber v-if="item.type !== 'compose'" :max="item.score + surPlusScore" :min="scoreStep" :step="scoreStep" v-model="item.score" style="display: inline-block ;width: 80px;margin-right: 10px;height: 30px;" @click.stop></InputNumber>
                                     <span style="margin-right: 10px;" v-if="item.type === 'compose'">{{ getComposeScore(item) }}</span>
                                     <span style="margin-right: 10px;">{{$t('evaluation.paperList.score')}}</span>
                                 </template>
@@ -1528,6 +1528,9 @@ export default {
                 display: none !important;
             }
         }
+        .item-btn-toggle {
+            width: 20%;
+        }
     }
 }
 

+ 9 - 6
TEAMModelOS/ClientApp/src/view/learnactivity/htByQuMark.vue

@@ -150,15 +150,15 @@
                         </span>
                     </div>
                     <!-- 批注!!! -->
-                    <div class="redundant-mark-btn" v-if="quNoList.length && quNoList[quIndex] && !quNoList[quIndex].disabled" @click="markStuAnswer()">
+                    <!-- <div class="redundant-mark-btn" v-if="quNoList.length && quNoList[quIndex] && !quNoList[quIndex].disabled" @click="markStuAnswer()">
                         <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
-                    </div>
+                    </div> -->
                 </div>
                 <!-- 作答信息显示区域 -->
                 <div class="stu-answer-box">
                     <div>
                         <span class="stu-name">
-                            {{item.name}}
+                            {{item.no}}. &nbsp; {{item.name}}
                         </span>
                         <div class="mark-action-box" v-if="quNoList.length && quNoList[quIndex] && !quNoList[quIndex].disabled">
                             <!-- 查看批注 -->
@@ -178,10 +178,10 @@
                                     </span>
                                 </span>
                             </template>
-                            <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer()">
+                            <!-- <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer()">
                                 <Icon type="md-create" />
                                 <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
-                            </span>
+                            </span> -->
                         </div>
                     </div>
                     <!-- 原始答案 -->
@@ -806,6 +806,8 @@ export default {
     user-select: none;
 }
 .stu-name {
+    font-weight: bold;
+    font-size: larger;
     color: #00ad25;
 }
 .scoring-paper-header {
@@ -992,7 +994,7 @@ export default {
     margin-bottom: 5px;
 }
 .qu-order-tag-active-mark {
-    background-color: #19be6b;
+    background-color: #409EFF;
     color: white;
     box-shadow: 0px 0px 5px #aaa;
     cursor: pointer;
@@ -1004,6 +1006,7 @@ export default {
     margin-bottom: 5px;
 }
 .highlighted-border {
+  background-color: #19be6b;
   border: 2px solid #138d50; /* 深色外框 */
 }
 .qu-order-tag-active-focus {

+ 51 - 35
TEAMModelOS/ClientApp/src/view/learnactivity/tabs/htAnswerTable.vue

@@ -104,7 +104,7 @@
 						<span style="color: #2db7f5">{{ getTotalScore(row.data) }}</span>
 					</template>
 					<template slot-scope="{ row }" slot="name">
-						<span @click="showStuReport(row)" style="color: #2db7f5; cursor: pointer" :title="row.id">{{ row.name }}</span>
+						<span @click="showStuReport(row)" style="float: left; color: #2db7f5; cursor: pointer; font-size: large; font-weight: 600;" :title="row.id">{{ row.no }}.&nbsp;&nbsp;&nbsp;{{ row.name }}</span>
 					</template>
 					<!-- 1: 未作答 2:未评分 3:已评分 4:缺考 5:补考中 -->
 					<template slot-scope="{ row, index }" slot="status">
@@ -755,8 +755,8 @@
 				if(course){
 					course.groupLists.forEach(item =>{
 					this.groupSelectData.push({name: item.name, id: item.id});
-				})
-				this.examIdForMark = course.examId;
+				})				
+				this.examIdForMark = course.examId === null ? course.examId : "";
 				this.subjectIdForMark = course.subjectId;
 
 				}
@@ -768,7 +768,7 @@
 			    this.chooseTarget.push(this.groupSelectValue);			
 				this.targetChange(this.chooseTarget);
 			},
-			showStuReport(data) {
+			showStuReport(data) {				
 				console.log(data);
 				// 学生未作答,不能查看
 				if (data.status === 1) {
@@ -942,32 +942,40 @@
 			 */
 			checkScoreSave(fn) {
 				if (this.$refs["byStuMark"]?.isUpd || this.$refs["byQuMark"]?.isUpd) {
-					this.$Modal.confirm({
-						title: this.$t("learnActivity.score.saveScoreTitle"),
-						content: this.$t("learnActivity.score.saveScoreContent"),
-						okText: this.$t("learnActivity.mark.yes"),
-						cancelText: this.$t("learnActivity.mark.no"),
-						onOk: () => {
-							if (this.$refs["byStuMark"].isUpd) {
-								this.$refs["byStuMark"].saveScore();
-								this.$refs["byStuMark"].isComplete = false;
-								if (fn) fn();
-							} else {
-								this.$refs["byQuMark"].saveScore();
-								if (fn) fn();
-							}
-						},
-						onCancel: () => {
-							if (this.$refs["byStuMark"].isUpd) {
-								this.$refs["byStuMark"].isUpd = false;
-								this.$refs["byStuMark"].isComplete = false;
-								if (fn) fn();
-							} else {
-								this.$refs["byQuMark"].preSaveList = {};
-								if (fn) fn();
-							}
-						}
-					});
+					// this.$Modal.confirm({
+					// 	title: this.$t("learnActivity.score.saveScoreTitle"),
+					// 	content: this.$t("learnActivity.score.saveScoreContent"),
+					// 	okText: this.$t("learnActivity.mark.yes"),
+					// 	cancelText: this.$t("learnActivity.mark.no"),
+					// 	onOk: () => {
+					// 		if (this.$refs["byStuMark"].isUpd) {
+					// 			this.$refs["byStuMark"].saveScore();
+					// 			this.$refs["byStuMark"].isComplete = false;
+					// 			if (fn) fn();
+					// 		} else {
+					// 			this.$refs["byQuMark"].saveScore();
+					// 			if (fn) fn();
+					// 		}
+					// 	},
+					// 	onCancel: () => {
+					// 		if (this.$refs["byStuMark"].isUpd) {
+					// 			this.$refs["byStuMark"].isUpd = false;
+					// 			this.$refs["byStuMark"].isComplete = false;
+					// 			if (fn) fn();
+					// 		} else {
+					// 			this.$refs["byQuMark"].preSaveList = {};
+					// 			if (fn) fn();
+					// 		}
+					// 	}
+					// });
+					if (this.$refs["byStuMark"] && this.$refs["byStuMark"].isUpd) {
+						this.$refs["byStuMark"].saveScore();
+						this.$refs["byStuMark"].isComplete = false;
+						if (fn) fn();
+					} else {
+						this.$refs["byQuMark"].saveScore();
+						if (fn) fn();
+					}
 				} else {
 					if (this.$refs["byStuMark"]) this.$refs["byStuMark"].isComplete = false;
 					this.$refs["byQuMark"] && (this.$refs["byQuMark"].preSaveList = {});
@@ -976,8 +984,13 @@
 			},
 			toggleScoreStatus() {				
 				this.checkScoreSave(this.handleScoreStatus);
-				// 批閱儲存之後刷新資料
-				this.getStudentAnswer();		
+				//批閱儲存之後刷新資料  延遲等待儲存完成
+				this.tableLoading = true;
+				setTimeout(() => {
+					this.getStudentAnswer();	
+				},500)
+				//this.getStudentAnswer();
+					
 			},
 			handleScoreStatus() {
 				this.isMarkView = !this.isMarkView;
@@ -1305,6 +1318,7 @@
 								minWidth: 80
 							};
 							this.tableColumn.push(data);
+							//debugger
 							defSocre.push(-1);
 						}
 						let students = classStu.students;
@@ -1317,7 +1331,7 @@
 							let { status, statusText, statusColor } = this.getStatusInfo([], -1);
 							score.status = status;
 							score.statusText = statusText;
-							score.statusColor = statusColor;
+							score.statusColor = statusColor;													
 							this.studentScore.push(score);
 						}
 						this.pageChange(1);
@@ -1448,7 +1462,7 @@
 										h(
 											"p",
 											{
-												class: "table-qu-no"
+												class: this.quNoList[i].disabled === true ? "" : "table-qu-no"
 											},
 											this.quNoList[i] ? this.quNoList[i].label : ""
 										),
@@ -1469,6 +1483,7 @@
 							minWidth: 70
 						};
 						this.tableColumn.push(data);
+						//debugger
 					}
 					let ans = [];
 					for (let i = 0; i < studentAns.studentIds.length; i++) {
@@ -1476,6 +1491,7 @@
 							let score = {};
 							if (studentAns.studentIds[i] == studentData.students[k].id) {
 								score.name = studentData.students[k].name;
+								score.no = studentData.students[k].no;
 								score.type = studentData.students[k].type;
 								score.id = studentAns.studentIds[i];
 								score.data = studentAns.studentScores[i];
@@ -1495,7 +1511,7 @@
 									}									
 								}																											
 								score.statusText = statusText;
-								score.statusColor = statusColor;
+								score.statusColor = statusColor;								
 								this.studentScore.push(score);
 							}
 						}

+ 8 - 5
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -2543,8 +2543,11 @@ namespace TEAMModelOS.Controllers
         }
         //学生端查询评测列表
         [ProducesDefaultResponseType]
+#if !DEBUG
         [Authorize(Roles = "IES")]
         [AuthToken(Roles = "student,teacher,admin")]
+#endif
+
         [HttpPost("find-summary-by-student")]
         public async Task<IActionResult> findSummaryStudent(JsonElement request)
         {
@@ -2672,7 +2675,7 @@ namespace TEAMModelOS.Controllers
                     }
                 }
 
-                var queryResult = $"select c.id,c.code,c.studentIds,c.subjectId,c.studentAnswers,c.studentScores,c.average,c.sum,c.mark,c.krate,c.frate,c.info.id as cId from c where c.examId ='{id}' and c.pk = 'ExamClassResult' ";
+                var queryResult = $"select c.id,c.code,c.studentIds,c.subjectId,c.studentAnswers,c.studentScores,c.average,c.status,c.sum,c.mark,c.krate,c.frate,c.info.id as cId from c where c.examId ='{id}' and c.pk = 'ExamClassResult' ";
                 List<ExamClassResult> classResults = new List<ExamClassResult>();
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIteratorSql<ExamClassResult>(queryText: queryResult,
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{school}") }))
@@ -2870,10 +2873,10 @@ namespace TEAMModelOS.Controllers
                             }
                             n++;
                         }
-                        count += result.studentIds.Count;
+                        count += result.status.Where(c => c == 0).Count();
                     }
                     double per = count > 0 ? Math.Round(score / count, 2) : 0;
-                    akp.Add(allScore > 0 ? Math.Round(per / allScore, 2) : 0);
+                    akp.Add(allScore > 0 ? Math.Round(per * 1.0 / allScore, 4) : 0);
                 }
 
                 //处理认知层次
@@ -2907,11 +2910,11 @@ namespace TEAMModelOS.Controllers
                                 }
                                 n++;
                             }
-                            count += result.studentIds.Count;
+                            count += result.status.Where(c => c == 0).Count();
                         }
                     }
                     double per = count > 0 ? Math.Round(score / count, 2) : 0;
-                    afp.Add(allScore > 0 ? Math.Round(per / allScore, 2) : 0);
+                    afp.Add(allScore > 0 ? Math.Round(per * 1.0 / allScore, 4) : 0);
                 }
                 know.Add((knowledges, kp, ckp, akp));
                 filed.Add((fields, fp, cfp, afp));