Browse Source

活動評量追加顯示決賽

jeff 9 months ago
parent
commit
0016920cb2

+ 10 - 1
TEAMModelOS.SDK/Models/Service/JointService.cs

@@ -33,7 +33,7 @@ namespace TEAMModelOS.SDK.Models.Service
                 List<JointEventGroupBase> stuLists = new List<JointEventGroupBase>();
                 //取得JointCourse ※examType == "custom" 之後再處理
                 List<JointEventGroupDb> jointCourses = new List<JointEventGroupDb>();
-                if (!jointExam.examType.Equals("custom")) //老師報名名單
+                if (!jointExam.examType.Equals("custom")) //熱身賽:老師報名名單
                 {
                     string jointCourseSql = $"SELECT * FROM c WHERE c.jointEventId = '{jointExam.jointEventId}' AND c.jointGroupId = '{jointExam.jointGroupId}' AND ( IS_DEFINED(c.type) = false OR c.type = 'regular' )";
                     if (!string.IsNullOrWhiteSpace(creatorId)) jointCourseSql += $" AND c.creatorId = '{creatorId}' ";
@@ -42,6 +42,15 @@ namespace TEAMModelOS.SDK.Models.Service
                         jointCourses.Add(item);
                     }
                 }
+                else //決賽:決賽名單
+                {
+                    string jointCourseSql = $"SELECT * FROM c WHERE c.jointEventId = '{jointExam.jointEventId}' AND c.jointGroupId = '{jointExam.jointGroupId}' AND IS_DEFINED(c.type) = true AND c.type = 'custom' ";
+                    if (!string.IsNullOrWhiteSpace(creatorId)) jointCourseSql += $" AND c.creatorId = '{creatorId}' ";
+                    await foreach (var item in client.GetContainer("TEAMModelOS", Constant.Teacher).GetItemQueryIteratorSql<JointEventGroupDb>(queryText: jointCourseSql, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"JointCourse") }))
+                    {
+                        jointCourses.Add(item);
+                    }
+                }
                 //評量資料生成 ExamInfo actExamInfo ※一個課程一個Exam
                 List<ExamInfo> examList = new List<ExamInfo>();
                 foreach (JointEventGroupDb jointCourse in jointCourses)

+ 1 - 2
TEAMModelOS/ClientApp/src/view/htcommunity/htMgtExam.vue

@@ -333,7 +333,7 @@ export default {
 		// 時程頁籤設定
 		//this.propSchedules.push({id:"","name":"All"});
 		this.$route.params.data.schedule.forEach(item => {
-			if (item.type === "exam" && item.examType == "regular") {
+            if (item.type === "exam" && (item.examType == "regular" || item.examType == "custom")) {
 				this.propSchedules.push(item);
 			}
 		});
@@ -674,7 +674,6 @@ export default {
 		},
 		// 點擊左側個人評量列表項目的動作
 		selectEvaluation(index) {
-			debugger
 			this.checkScoreSave(this.toEvaluation, index);
 			this.$EventBus.$emit("onEvaChange", this.htEvaListShow[index]);
 		},