zhangjie 1 год назад
Родитель
Сommit
1bf5ce63aa

+ 1 - 1
src/modules/course/api.js

@@ -100,7 +100,7 @@ export const exportTargetReport = (datas) => {
 };
 // 报告管理-报告数据发生变化
 export const targetReportChangeCheck = (datas) => {
-  return $post("/api/admin/course/degree/report/change", datas);
+  return $postParam("/api/admin/course/degree/report/change", datas);
 };
 
 // 文档管理 ------------------->

+ 18 - 0
src/modules/course/components/TargetReportDetail.vue

@@ -375,6 +375,7 @@ import {
   targetReportDetail,
   exportTargetReport,
   targetReportSave,
+  targetReportChangeCheck,
 } from "../api";
 import { downloadByApi } from "@/plugins/download";
 import { calcSum } from "@/plugins/utils";
@@ -452,6 +453,7 @@ export default {
       this.parseStudentScoreTable(examStudentList);
     },
     async initData() {
+      await this.checkChange();
       const data = await targetReportDetail({
         examId: this.course.examId,
         courseCode: this.course.courseCode,
@@ -459,6 +461,22 @@ export default {
       });
       this.buildData(data);
     },
+    async checkChange() {
+      const res = await targetReportChangeCheck({
+        examId: this.course.examId,
+        courseCode: this.course.courseCode,
+        paperNumber: this.course.paperNumber,
+      });
+
+      if (res.courseTargetChange) {
+        this.$notify.warning("课程目标与已保存不一致,请重新设置权重!");
+      }
+      if (res.evaluationChange) {
+        this.$notify.warning(
+          "评价方式与已保存不一致,请重新设置权重及导入新的平时成绩!"
+        );
+      }
+    },
     parsePaperStructs(questionInfo) {
       if (!questionInfo || !questionInfo.length) return;
 

+ 4 - 1
src/modules/exam/components/createExamAndPrintTask/InfoPrintTask.vue

@@ -244,7 +244,10 @@
     <modify-exam-student
       ref="ModifyExamStudent"
       :disabled-ids="disabledStudentIds"
-      :course-code="infoExamTask.courseCode"
+      :filter-params="{
+        courseCode: infoExamTask.courseCode,
+        examId: infoExamTask.examId,
+      }"
       :show-student="showStudent"
       :object-types="objectTypes"
       :selected-ids="IS_MODEL2 ? model2ClassIds : null"

+ 11 - 6
src/modules/exam/components/createExamAndPrintTask/ModifyExamStudent.vue

@@ -110,9 +110,14 @@ export default {
         return [];
       },
     },
-    courseCode: {
-      type: String,
-      default: "",
+    filterParams: {
+      type: Object,
+      default() {
+        return {
+          courseCode: "",
+          examId: "",
+        };
+      },
     },
     objectTypes: {
       type: Array,
@@ -153,7 +158,7 @@ export default {
         examObjectType: examObjectType || this.examObjectType,
       };
       if (datas.examObjectType === "TEACH_CLAZZ_STUDENT")
-        datas.courseCode = this.courseCode;
+        datas = { ...datas, ...this.filterParams };
       const data = await uploadOrFindExamTaskStudent(datas);
       this.dataTree[datas.examObjectType] = this.parseStudentData(data);
     },
@@ -284,9 +289,9 @@ export default {
         this.examObjectType = this.objectTypeList[0].value;
       }
 
-      if (this.basicCourseCode !== this.courseCode) {
+      if (this.basicCourseCode !== this.filterParams.courseCode) {
         this.clearSelectedExamObjectType();
-        this.basicCourseCode = this.courseCode;
+        this.basicCourseCode = this.filterParams.courseCode;
         await this.getStudents(this.examObjectType);
       }