Browse Source

fix 分数计算

Michael Wang 6 năm trước cách đây
mục cha
commit
76686bc956
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      src/features/OnlineExam/OnlineExamOverview.vue

+ 4 - 3
src/features/OnlineExam/OnlineExamOverview.vue

@@ -104,9 +104,10 @@ export default {
       );
       this.paperStruct = paperStruct.data;
 
-      this.paperTotalScore = this.paperStruct.defaultPaper.questionGroupList
-        .map(q => q.groupScore)
-        .reduce((p, c) => p + c);
+      this.paperTotalScore =
+        this.paperStruct.defaultPaper.questionGroupList
+          .map(q => q.groupScore)
+          .reduce((p, c) => p + c * 1000, 0) / 1000;
     } catch (e) {
       this.$Message.error("获取考试概览信息异常");
       this.$router.back();