소스 검색

group and mark action bug fix

zhangjie 4 년 전
부모
커밋
89386f65d3
2개의 변경된 파일14개의 추가작업 그리고 8개의 파일을 삭제
  1. 13 8
      src/modules/grading/GradingGroupManage.vue
  2. 1 0
      src/modules/mark/MarkDetail.vue

+ 13 - 8
src/modules/grading/GradingGroupManage.vue

@@ -80,10 +80,13 @@ export default {
     }
   },
   mounted() {
-    this.getGroupList();
-    this.getMarkUserList();
+    this.initData();
   },
   methods: {
+    initData() {
+      this.getGroupList();
+      this.getMarkUserList();
+    },
     async getGroupList() {
       this.groups = await gradingGroupList(this.subjectId);
     },
@@ -98,12 +101,13 @@ export default {
       if (this.isSubmit) return;
       const hasNoneGroup = this.groups.some(group => !group.markers.length);
       if (hasNoneGroup) {
-        this.$Modal.confirm({
-          content: "当前分组列表中存在空组,确定要保存空组吗?",
-          onOk: () => {
-            this.save();
-          }
-        });
+        this.$Message.error("当前分组列表中存在空组!");
+        // this.$Modal.confirm({
+        //   content: "当前分组列表中存在空组,确定要保存空组吗?",
+        //   onOk: () => {
+        //     this.save();
+        //   }
+        // });
         return;
       }
       this.save();
@@ -120,6 +124,7 @@ export default {
         return;
       }
       this.$Message.success("保存成功!");
+      this.initData();
     },
     toAddGroup() {
       this.groups.push({

+ 1 - 0
src/modules/mark/MarkDetail.vue

@@ -432,6 +432,7 @@ export default {
       data.title = this.IS_ADMIN ? data.examNumber : `NO.${data.sn}`;
       this.papers = [data];
       this.total = 1;
+      this.selectPaper(0);
     },
     searchGradeChangeList(applyChangeLevelStatus) {
       this.applyChangeLevelStatus = applyChangeLevelStatus;