闫增涛
2024-10-22 c718c815aef6ecb4175dc8ea7902a4adf0287714
src/components/examinations/index.vue
@@ -33,12 +33,11 @@
              </span>
              <!-- 听力进度条 -->
              <!-- <answerAudioPlayer :audioUrl="value.src" v-show="item.name == '听力题'" /> -->
              <!-- 仅文字 -->
              <p
                class="titleText text-fl"
                v-if="
                  value.stemStyle == 'Txt' && value.questionType != 'completion'
                  value.stemStyle == 'Txt' && value.questionType != 'completion' &&  value.questionType !='dropdown'
                "
                :id="value.id"
                v-html="value.stem.stemTxt"
@@ -73,6 +72,7 @@
                  <span
                    v-if="typeof itemText == 'string'"
                    v-html="itemText"
                    class="input-txt"
                  ></span>
                  <input
                    v-else
@@ -91,6 +91,32 @@
                v-html="value.stem.stemTxt"
                v-cloak
              ></p>
              <!-- 下拉选择题 -->
              <p class="titleText" v-if="value.questionType == 'dropdown'">
                <span
                  v-for="(itemText, indexText) in value.stem"
                  :key="indexText + 'questionType'"
                >
                  <span
                    v-if="typeof itemText == 'string'"
                    v-html="itemText"
                    class="input-txt"
                  ></span>
                  <el-select
                    v-else
                    v-model="value.userAnswer"
                    :disabled="value.isComplete"
                  >
                    <el-option
                      v-for="(citem,cindex) in value.option"
                      :key="cindex + 'dropdown'"
                      :label="citem"
                      :value="citem"
                    >
                    </el-option>
                  </el-select>
                </span>
              </p>
            </div>
            <img
              :src="value.isCollect ? isHeart : heart"
@@ -249,7 +275,6 @@
            <div class="analysis" v-if="value.isComplete">
              <el-collapse
                v-model="value.isUnfold"
                @change="handleChange(value)"
                accordion
                v-if="value.questionType != 'shortAnswer'"
              >
@@ -350,8 +375,8 @@
                  ></div>
                  <div v-else>暂无数据</div>
                </el-collapse-item>
                <!-- 主观题 -->
              </el-collapse>
              <!-- 主观题 -->
              <el-collapse v-else v-model="value.isUnfold" accordion>
                <el-collapse-item :name="value.id" class="objective">
                  <template #title>
@@ -567,6 +592,7 @@
  methods: {
    // 获取不受保护的图片
    getPublicImage(md5, width, height) {
      if(!md5) return
      if(md5.includes('http')) return md5
      let src = null;
      if (md5) {
@@ -656,9 +682,9 @@
            }
          } else if (
            citem.questionType == "singleChoice" ||
            citem.questionType == "judge"
            citem.questionType == "judge" ||
            citem.questionType == 'dropdown'
          ) {
            if (citem.id == "63825") console.log("i", item);
            citem.isRight = citem.answer == citem.userAnswer;
          } else if (citem.questionType == "shortAnswer") {
            // 简答 翻译
@@ -868,6 +894,12 @@
</script>
<style lang="less" >
  .titleText img {
    max-width: 80%;
  }
</style>
<style lang="less" scoped>
.catalogName {
  text-indent: 1em !important;
@@ -1020,11 +1052,14 @@
      font-size: 16px;
      line-height: 32px;
      color: #000;
      .input-txt {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
      }
      span {
        display: inline-block;
        font-size: 16px;
        // line-height: 26px;
        color: #000;
        font-weight: 400;
        margin-top: 6px;