<!--阅读理解-->
<style>
  .v_readingComprehensioQuestion {
    width: 100%;
  }

 
  .v_readingComprehensioQuestion .clozeTest_question_tit {
    width: 100%;
    height: 40px;
    background: #F7F8FA;
    padding: 0 20px;
    line-height: 40px;
    font-size: 14px;
    color: #646873;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .v_readingComprehensioQuestion .clozeTest_question_tit i {
    color: #acbfd9;
    cursor: pointer;
  }

</style>
<template>
  <div class="v_readingComprehensioQuestion">
    <template v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0">
      <table class="common_TiTable"  v-for="(item,index) in data.QuestionContentObj" :key="index">
        <thead>
          <tr>
            <th colspan="3" style="text-align:left;">
              <div class="clozeTest_question_tit" @click="showNav(index)">
                <div>
                  第{{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span>
                </div>
                <div>
                </div>
              </div>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td colspan="3">
              <div v-html="item.SubTitle"></div>
            </td>
          </tr>
          <!--选择题-->
          <template
            v-if="item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
            <tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
              <td style="width:40px;text-align:center;">
                <template
                  v-if="item.QuestionKey=='single'||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'">
                  <div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer&&isShowAnswer}">
                    {{subItem.Name}}
                  </div>
                </template>
                <template v-else-if="item.QuestionKey=='multiple'">
                  <div class="Answer_List" :class="{'Is_Answer':subItem.IsAnswer&&isShowAnswer}">
                    {{subItem.Name}}
                  </div>
                </template>
              </td>
              <td>
                <div class="InpDIV" style="border:0;margin-top:-2px;" v-html="subItem.Content">
                </div>
              </td>
              <td style="width:40px;text-align:center;">
              </td>
            </tr>
          </template>
          <!--填空题-->
          <template v-if="item.QuestionKey=='fill-in'">
            <tr v-for="(subItem,subIndex) in item.SubAnwser">
              <td style="width:50px;text-align:center;padding-top:8px;">
                第{{subIndex+1}}空
              </td>
              <td>
                <div class="InpDIV" v-html="subItem.Content" style="border:0;margin-top:-2px;"
                  @click="changeEdit(subIndex)">
                </div>
              </td>
              <td style="width:30px;text-align:center;">
              </td>
            </tr>
          </template>
          <!--判断题-->
          <template v-if="item.QuestionKey=='judge'">
            <tr v-for="(subItem,subIndex) in item.SubAnwser">
              <td style="width:50px;">
                <div class="Answer_List2" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer&&isShowAnswer}">
                  {{subItem.Name}}
                </div>
              </td>
              <td colspan="2" style="text-align:left;vertical-align:middle;">
                {{subItem.Content}}
              </td>
            </tr>
          </template>
          <!--简答题-->
          <template v-if="item.QuestionKey=='short-answer'">
            <tr v-for="(subItem,subIndex) in item.SubAnwser">
              <td colspan="3">
               答案： <div v-html="subItem.Content"></div>
              </td>
            </tr>
          </template>
        </tbody>
      </table>
    </template>
  </div>
</template>
<script>
  export default {
    props: {
      questionObj: {
        type: Object,
      },
      //是否显示答案和解析
      isShowAnswer: {
        type: Boolean,
        default: false,
      }
    },
    data() {
      return {
        data: this.questionObj,
      };
    },

    methods: {

    },
    mounted() {

    },
    watch: {
      isShowAnswer: {
        handler(newValue) {

        },
        deep: true
      },
    }
  };

</script>
