fuliqi
2024-07-02 11fbb577737ee65f9446bfa60b6cf96954e2390c
src/views/answer/components/QuestionAnswerShow.vue
@@ -1,6 +1,7 @@
<template>
  <div v-loading="qLoading" style="line-height:1.8">
    <div v-if="qType == 1 || qType == 2 || qType == 3 || qType == 4 || qType == 5 || qType == 6">
    <div v-if="qType == 1 || qType == 2 || qType == 3 || qType == 4 || qType == 5 || qType == 6 || qType == 7 || qType == 8">
     <!-- 选择或语音 -->
      <div v-if="qType == 1 || qType == 6">
        <div class="q-title" v-html="question.title" />
        <div class="q-content">
@@ -12,6 +13,7 @@
          </el-radio-group>
        </div>
      </div>
      <!-- 多选 -->
      <div v-else-if="qType == 2">
        <div class="q-title" v-html="question.title" />
        <div class="q-content">
@@ -23,6 +25,7 @@
          </el-checkbox-group>
        </div>
      </div>
      <!-- 判断 -->
      <div v-else-if="qType == 3">
        <div class="q-title" v-html="question.title" style="display: inline;margin-right: 10px" />
        <span style="padding-right: 10px;">(</span>
@@ -33,6 +36,7 @@
        </el-radio-group>
        <span style="padding-left: 10px;">)</span>
      </div>
      <!-- 填空 -->
      <div v-else-if="qType == 4">
        <div class="q-title" v-html="question.title" />
        <div v-if="answer.contentArray !== null">
@@ -42,7 +46,8 @@
          </el-form-item>
        </div>
      </div>
      <div v-else-if="qType == 5">
      <!-- 简答、计算、分析 -->
      <div v-else-if="qType == 5 || qType == 7 || qType == 8">
        <div class="q-title" v-html="question.title" />
        <div>
          <el-input v-model="answer.content" type="textarea" rows="5"></el-input>
@@ -69,10 +74,17 @@
      </div>
      <div class="question-answer-show-item">
        <span class="question-show-item">正确答案:</span>
        <span v-if="qType == 1 || qType == 2 || qType == 5 || qType == 6" v-html="question.correct" class="q-item-span-content" />
        <!-- 选择、多选、简答、语音、计算、分析 -->
        <span v-if="qType == 1 || qType == 2 || qType == 5 || qType == 6 || qType == 7 || qType == 8" v-html="question.correct" class="q-item-span-content" />
        <!-- 判断 -->
        <span v-if="qType == 3" v-html="trueFalseFormatter(question)" class="q-item-span-content" />
        <!-- 填空 -->
        <span v-if="qType == 4">{{ question.correctArray }}</span>
      </div>
      <div v-if = "answer.doRight == null">
        <span style="color:#ECAB3C;">{{'批改:'}}</span>
        <el-input-number size="mini" v-model="answer.score" :precision="1" :min="0" :max="parseInt(question.score)" ></el-input-number>
      </div>
    </div>
    <div v-else>
    </div>