闫增涛
2024-10-12 e81c27ae4f00a107b1bf67062c9f008686a8e19f
src/components/examinations/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="examination" v-loading="loading">
    <div v-for="(item, nindex) in cardData" :key="nindex" class="border-box" v-show="item.infoList.length">
    <div v-for="(item, nindex) in cardData" :key="nindex + 'item'" class="border-box" v-show="item.infoList.length">
      <p class="catalogName" :style="{ color: primaryColor }">
        <span v-if="nindex == 0">一、</span>
        <span v-if="nindex == 1">二、</span>
@@ -10,7 +10,7 @@
        <span>{{ item.catalogName }}</span>
      </p>
      <ul>
        <li v-for="(value, index) in item.infoList" :key="value.id" :id="'listItem-' + value.id">
        <li v-for="(value, index) in item.infoList" :key="index + 'value'" :id="'listItem-' + value.id">
          <!-- 标题 -->
          <div class="questionTitle">
            <div class="titleContent">
@@ -40,7 +40,7 @@
              </p>
              <!-- 填空题题干 -->
              <p class="titleText" v-if="value.questionType == 'completion'">
                <span v-for="(itemText, indexText) in value.stem" :key="indexText">
                <span v-for="(itemText, indexText) in value.stem" :key="indexText + 'questionType'">
                  <span v-if="typeof itemText == 'string'" v-html="itemText"></span>
                  <!-- &nbsp; -->
                  <input v-else type="text" class="input" v-model.trim="value.userAnswer[itemText.num]"
@@ -62,7 +62,7 @@
              value.questionType == 'singleChoice' ||
              value.questionType == 'judge'
            " v-model="value.userAnswer">
              <el-radio v-for="content in value.option" :key="content.value" :label="content.value" :class="value.optionStyle == 'Image' ||
              <el-radio v-for="(content,contentIndex) in value.option" :key="contentIndex + 'contentIndex'" :label="content.value" :class="value.optionStyle == 'Image' ||
                value.optionStyle == 'TxtAndImage' ||
                value.optionStyle == 'RichText'
                ? 'optionImg'
@@ -73,8 +73,8 @@
                </p>
                <p class="optionContent" v-else-if="value.optionStyle == 'Image'">
                  {{ content.value }}、<el-image :src="getPublicImage(content.img, 115)" v-show="content.img"
                    :preview-src-list="[getPublicImage(content.img)]" v-if="isReal"></el-image>
                  <img :src="content.img" alt="" v-if="!isReal" class="radio-img" />
                    :preview-src-list="[getPublicImage(content.img)]" v-if="sourceType == 'bits'"></el-image>
                  <img :src="content.img" alt="" v-else class="radio-img" />
                </p>
                <p class="optionContent" v-else-if="value.optionStyle == 'TxtAndImage'">
                  <span> {{ content.value }}、</span><span>{{ content.txt }}</span>
@@ -88,7 +88,7 @@
            <!-- 多选 -->
            <el-checkbox-group :disabled="value.isComplete" v-model="value.userAnswer" class="option"
              v-else-if="value.questionType == 'multipleChoice'">
              <el-checkbox v-for="content in value.option" :key="content.value" :label="content.value"
              <el-checkbox v-for="(content,contentCindex) in value.option" :key="contentCindex + 'contentCindex'" :label="content.value"
                :name="content.text" :class="value.optionStyle == 'Image' ||
                  value.optionStyle == 'TxtAndImage' ||
                  value.optionStyle == 'RichText'
@@ -322,10 +322,6 @@
    },
    page: {
      type: Number,
    },
    isReal: {
      type: Boolean,
      default: true,
    },
    inputBc: {
      type: String,