Преглед на файлове

fix: 解决成绩无法显示的问题

yhd12345 преди 3 години
родител
ревизия
8833d6927e
променени са 1 файла, в които са добавени 3 реда и са изтрити 8 реда
  1. 3 8
      src/views/EvalPage/teacherExamDetails.vue

+ 3 - 8
src/views/EvalPage/teacherExamDetails.vue

@@ -194,18 +194,13 @@ export default {
     },
 
     getExamJoiners(){
-      this.$apis.getExamJoinedUsers(39).then(_res => {
+      this.$apis.getExamJoinedUsers(this.examId).then(_res => {
         this.joinedUsers = _res.data.data.result;
-        console.log(this.joinedUsers);
-        this.$apis.getAllReportByExamId(39).then(res => {
-          const that = this;
+        this.$apis.getAllReportByExamId(this.examId).then(res => {
           this.joinedUsers.forEach((user) => {
-            console.log(res.data.data.result);
             res.data.data.result.forEach((report) => {
               if (report.userId === user.id) {
-                that.$set(user, "score", report.score);
-                console.log(user);
-                //todo 注意是否有用
+                user["score"]=report.score;
               }
             });
           });