소스 검색

fixed #309

ali 2 년 전
부모
커밋
6cac66eeb6
1개의 변경된 파일과 16개의 추가작업 그리고 1개의 파일을 삭제
  1. 16 1
      src/components/Widgets/Test/ShowTestGradeForGrader/ShowTestGradeForGrader.vue

+ 16 - 1
src/components/Widgets/Test/ShowTestGradeForGrader/ShowTestGradeForGrader.vue

@@ -23,9 +23,13 @@
             {{ toShamsi(answerBook.attending_start_time) }}
           </div>
           <div class="col-md-4 col-12">
-            {{ answerBook.test_info.test_questions_info.list.length }}
+            {{ answerBook.answer_sheet_info.list.length }}
             سوال
           </div>
+          <div class="col-md-4 col-12">
+            نمره نهایی
+            {{ totalScore }}
+          </div>
         </div>
       </q-banner>
       <q-list separator>
@@ -197,6 +201,17 @@ export default {
       timerInterval: null
     }
   },
+  computed: {
+    totalScore () {
+      let totalScore = 0
+      this.scores.forEach(item => {
+        if (item.score) {
+          totalScore += item.score
+        }
+      })
+      return totalScore
+    }
+  },
   mounted () {
     this.getAnswerBook()
     this.mounted = true