Forráskód Böngészése

修改音频作答题的展示方式

lideyin 6 éve
szülő
commit
130f42f2cd
1 módosított fájl, 25 hozzáadás és 22 törlés
  1. 25 22
      src/modules/oe/views/examPaperDetail.vue

+ 25 - 22
src/modules/oe/views/examPaperDetail.vue

@@ -29,36 +29,24 @@
     >
       <div style="font-size: 16px;font-weight: bold;">
         {{ toChineseNumber(index + 1) }}、{{ questionGroup.groupName }}({{
-          questionGroup.groupScore
+        questionGroup.groupScore
         }}分)
       </div>
       <div>{{ questionGroup.score }}</div>
       <!-- 遍历大题下的小题 -->
-      <div
-        v-for="(questionWrapper, index) in questionGroup.questionWrapperList"
-        :key="index"
-      >
-        <div
-          v-for="(question, index) in questionWrapper.questionList"
-          :key="index"
-        >
+      <div v-for="(questionWrapper, index) in questionGroup.questionWrapperList" :key="index">
+        <div v-for="(question, index) in questionWrapper.questionList" :key="index">
           <div style="display: flex;flex-direction:row;">
             <div v-html="restoreAudio(question.body)"></div>
           </div>
-          <div
-            v-for="(questionUnit, index) in question.questionUnitList"
-            :key="index"
-          >
+          <div v-for="(questionUnit, index) in question.questionUnitList" :key="index">
             <div style="display: flex;flex-direction:row;">
               <div>{{ questionUnit.order }}、</div>
               <div v-html="restoreAudio(questionUnit.body)"></div>
               <span>({{ questionUnit.questionScore }}分)</span>
             </div>
 
-            <div
-              v-for="(option, index) in questionUnit.quesOptions"
-              :key="index"
-            >
+            <div v-for="(option, index) in questionUnit.quesOptions" :key="index">
               <div style="display: flex;flex-direction:row;">
                 <div>{{ option.letter }}.</div>
                 <div v-html="restoreAudio(option.body)"></div>
@@ -66,14 +54,16 @@
             </div>
 
             <div>
-              <div
-                style="display: flex;flex-direction:row;color: green;font-weight: bold;"
-              >
+              <div style="display: flex;flex-direction:row;color: green;font-weight: bold;">
                 <div>标准答案:</div>
                 <span v-html="questionUnit.correctAnswer"></span>
               </div>
-              <div style="color: blue;font-weight: bold;">
-                学生答案:<span v-html="questionUnit.studentAnswer"></span>
+              <div
+                v-if="questionUnit.answerType!=='SINGLE_AUDIO'"
+                style="color: blue;font-weight: bold;"
+              >
+                学生答案:
+                <span v-html="questionUnit.studentAnswer"></span>
                 <i
                   class="el-icon-check"
                   v-show="
@@ -87,6 +77,19 @@
                   "
                 ></i>
               </div>
+              <div
+                v-if="questionUnit.answerType==='SINGLE_AUDIO' && questionUnit.studentAnswer!=null && questionUnit.studentAnswer!=''"
+              >
+                <div
+                  style="float:left;color: blue;font-weight: bold;height:54px;line-height:54px;margin-right:10px;"
+                >学生答案:</div>
+                <audio
+                  style="height:54px;"
+                  v-if="questionUnit.answerType==='SINGLE_AUDIO' && questionUnit.studentAnswer!=null && questionUnit.studentAnswer!=''"
+                  :src="questionUnit.studentAnswer"
+                  controls
+                ></audio>
+              </div>
             </div>
           </div>
         </div>