bug
luohairen
2024-10-30 20c7d1e510b07d48f2855bd07ef3ba5a5a5fbbd2
src/views/exam/exam/components/MarkPaperShow.vue
@@ -51,8 +51,8 @@
      <!-- 简答、计算、分析 -->
      <div v-else-if="qType == 5 || qType == 7 || qType == 8">
        <div class="q-title" v-html="question.title"/>
        <div>
          <el-input v-model="question.answer" type="textarea" rows="5" ></el-input>
        <div class="rich-text-box">
          <div v-html="question.answer"></div>
        </div>
      </div>
      <div class="question-answer-show-item" style="margin-top: 15px">
@@ -90,7 +90,7 @@
      </div>
      <span style="color:#ECAB3C;">{{ '批改:' }}</span>
      <el-input-number size="mini" v-model="question.score" :precision="1" :min="0"
                       :max="parseInt(question.questionScore)" @change="updateRight"></el-input-number>
                       :max="parseFloat(question.questionScore)" @change="updateRight"></el-input-number>
    </div>
    <div v-else>
    </div>
@@ -128,7 +128,7 @@
  methods: {
    updateRight () {
      // 当score变化时,检查它是否等于questionScore
      this.question.right = this.question.score === parseInt(this.question.questionScore)
      this.question.right = this.question.score === parseFloat(this.question.questionScore)
      const foundAnswer = this.answer.find(answer => answer.itemOrder === this.question.itemOrder)
      if (foundAnswer) {
        foundAnswer.right = this.question.right
@@ -188,4 +188,9 @@
  color: #606266
}
.rich-text-box {
  border: 1px solid #ccc; /* 添加边框 */
  padding: 10px ; /* 添加内边距以提供空间 */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
</style>