Explorar o código

答题界面完善

ChengYuXuan %!s(int64=5) %!d(string=hai) anos
pai
achega
e96c99a9ab
Modificáronse 2 ficheiros con 8 adicións e 7 borrados
  1. 7 6
      src/views/exam/ExamPane.vue
  2. 1 1
      src/views/exam/PersonalResult.vue

+ 7 - 6
src/views/exam/ExamPane.vue

@@ -38,7 +38,6 @@
             </div>
             <v-progress-linear
               :value="((currentQuestionIndex + 1) / objectiveQuestionNum) * 100"
-              :buffer-value="100"
               class="my-3"
             ></v-progress-linear>
             <div class="d-flex justify-space-around">
@@ -60,11 +59,10 @@
             </div>
             <v-progress-linear
               :value="
-                (currentQuestionIndex -
-                  codeQuestionStartIndex / codeQuestionNum) *
+                ((currentQuestionIndex - codeQuestionStartIndex + 1) /
+                  codeQuestionNum) *
                   100
               "
-              :buffer-value="100"
               class="my-3"
             ></v-progress-linear>
             <div
@@ -161,7 +159,9 @@
         <v-card class="questionCard" v-else>
           <div v-if="!fetchingStem">
             <blank-pane
-              v-if="questionType() === 'blank'"
+              v-if="
+                questionType() === 'blank' || questionType() === 'short_answer'
+              "
               :question="currentQuestion"
               @saveAnswer="saveObjectiveAnswer"
             >
@@ -375,12 +375,13 @@ export default Vue.extend({
             this.questionIds[this.currentQuestionIndex]
           )
         ) {
-          //TODO 提示未答?
+          //TODO 是否需要提示未答?
         }
         this.questionStartTime = dayjs().format(TIME_FORMAT)
 
         this.currentQuestionIndex++
         this.fetchQuestionStem(this.currentQuestionIndex)
+        this.$vuetify.goTo(0)
       } else {
         this.finished = true
       }

+ 1 - 1
src/views/exam/PersonalResult.vue

@@ -109,7 +109,7 @@ export default Vue.extend({
       skillOption: (null as unknown) as BarChartOption,
       gradeOption: (null as unknown) as PieChartOption,
       rankOption: (null as unknown) as GaugeChartOption,
-      totalScore: 100,
+      totalScore: 0,
       examEnded: false,
       loadingText: ''
     }