闫增涛
2024-05-08 99554e0613bd5d8b0230ebfbf66524686e030acb
src/components/examinations/index.vue
copy from src/view/components/examinations/index.vue copy to src/components/examinations/index.vue
File was copied from src/view/components/examinations/index.vue
@@ -1,7 +1,14 @@
<template>
  <div class="examination" v-loading="loading">
    <div v-for="(item, nindex) in cardList" :key="nindex">
      <h1>{{ item.catalogName }}</h1>
      <p class="catalogName">
        <span v-if="nindex == 0">一、</span>
        <span v-if="nindex == 1">二、</span>
        <span v-if="nindex == 2">三、</span>
        <span v-if="nindex == 3">四、</span>
        <span v-if="nindex == 4">五、</span>
        <span>{{ item.catalogName }}</span>
      </p>
      <ul>
        <li
          v-for="(value, index) in item.infoList"
@@ -11,7 +18,7 @@
          <!-- 标题 -->
          <div class="questionTitle">
            <div class="titleContent">
              <span class="questionNum">{{ index + 1 }}、</span>
              <span class="questionNum" :style="{marginTop:value.questionType == 'completion' ? '12px' : '0'}">{{ index + 1 }}、</span>
              <!-- 听力进度条 -->
              <!-- <answerAudioPlayer :audioUrl="value.src" v-show="item.name == '听力题'" /> -->
              <!-- 题干 -->
@@ -249,7 +256,7 @@
                          >
                        </p>
                      </div>
                      <p class="difficulty">
                      <p class="difficulty" v-if="value.difficulty">
                        <span style="color: #333">难度等级:</span>
                        <el-rate
                          v-model="value.difficulty"
@@ -347,7 +354,7 @@
    <div class="bottom-btn" v-if="!loading">
      <el-button>保存</el-button>
      <el-button>提交</el-button>
      <el-button @click="openAnswers">提交</el-button>
      <el-button @click="redo">重做</el-button>
      <el-button @click="openAnswers">查看答案</el-button>
    </div>
@@ -365,6 +372,9 @@
      cardList: [],
      loading: false,
    };
  },
  mounted() {
    this.getIdPathList()
  },
  methods: {
    // 数组转为字符串方法
@@ -414,6 +424,7 @@
      // }
    },
    openAnswers() {
      this.$data.loading = true
      for (let index = 0; index < this.cardList.length; index++) {
        const item = this.cardList[index];
        for (let cindex = 0; cindex < item.infoList.length; cindex++) {
@@ -421,6 +432,7 @@
          citem.isComplete = true;
        }
      }
      this.$data.loading = false
    },
    watchParsing(data) {
      data.isUnfold = !data.isUnfold;
@@ -432,13 +444,14 @@
        path: "*",
        queryType: "*",
        productId: this.config.bookId,
        cmsPath: this.$props.productLinkPath,
        cmsPath: '24080\\63791\\63792\\63807',
        pading: {
          start: 0,
          size: 999,
        },
      };
      this.MG.store.getProductDetail(query).then(async (res) => {
        console.log(this.$props.productLinkPath,res.datas.cmsDatas[0].datas);
        const idPathList = res.datas.cmsDatas[0].datas;
        await this.getQuestionList(idPathList);
      });
@@ -672,8 +685,16 @@
</script>
<style lang="less" scoped>
.catalogName {
  color: #00aeef;
  text-indent: 1em !important;
  font-size: 24px;
}
.examination {
  min-height: 100px;
  ul {
    list-style:none ;
  }
}
p {
  margin-top: 0em;
@@ -759,10 +780,12 @@
      line-height: 32px;
      color: #000;
      span {
        display: inline-block;
        font-size: 14px;
        line-height: 26px;
        // line-height: 26px;
        color: #000;
        font-weight: 400;
        margin-top: 6px;
      }
      .el-input {
        width: 150px;
@@ -778,6 +801,9 @@
        border-right: 0 !important ;
        border-bottom: 1px solid #000 !important;
        border-radius: 0 !important;
      }
      /deep/ .el-input.is-disabled .el-input__inner {
        background-color: #fff;
      }
      /dee/ p {
        display: flex;
@@ -800,7 +826,8 @@
.option {
  .el-radio,
  .el-checkbox {
    min-height: 32px;
    // min-height: 32px;
    height: min-content;
    display: flex;
    align-items: center;
    min-width: 45%;
@@ -812,6 +839,7 @@
    }
  }
  .optionContent {
    margin: 0;
    display: flex;
    align-items: center;
    line-height: 26px;
@@ -819,7 +847,7 @@
  }
}
.analysis {
  margin-top: 20px;
  margin: 20px 0;
}
.el-collapse {
  width: 100%;
@@ -827,7 +855,8 @@
/** 解析 */
.objective {
  /deep/ .el-collapse-item__header {
    width: 95%;
    min-height: 48px;
    height: min-content;
    padding: 0 20px;
    font-size: 14px;
    background-color: #f4f4f4;
@@ -836,10 +865,15 @@
      height: 100%;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      .headerConent {
        height: 100%;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        p {
          margin-bottom: 0;
        }
        .el-image {
          width: 9px;
          height: 9px;
@@ -1117,5 +1151,9 @@
  margin-top: 50px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  .el-button {
    margin-top: 10px;
  }
}
</style>