<template>
  <table class="custom-table">
    <tr>
      <td rowspan="2">题型</td>
      <td rowspan="2">题量</td>
      <td rowspan="2">满分</td>
      <td rowspan="2">难度</td>
      <td colspan="3">高难度</td>
      <td colspan="3">中等难度</td>
      <td colspan="3">低难度</td>
    </tr>
    <tr>
      <td>题量</td>
      <td>分值</td>
      <td>%</td>
      <td>题量</td>
      <td>分值</td>
      <td>%</td>
      <td>题量</td>
      <td>分值</td>
      <td>%</td>
    </tr>
    <tr v-for="(item2, index) in props.questions" :key="index">
      <td>
        {{ item2.groupName || "全卷" }}
      </td>
      <td>
        {{ item2.questionCount }}
      </td>
      <td>
        {{ item2.totalScore }}
      </td>
      <td v-round-number>
        {{ item2.difficulty }}
      </td>
      <td>
        {{ item2.difficulityLevel.high.questionCount }}
      </td>
      <td>
        {{ item2.difficulityLevel.high.fullScore }}
      </td>
      <td v-number-to-percent>
        {{ item2.difficulityLevel.high.percent }}
      </td>
      <td>
        {{ item2.difficulityLevel.middle.questionCount }}
      </td>
      <td>
        {{ item2.difficulityLevel.middle.fullScore }}
      </td>
      <td v-number-to-percent>
        {{ item2.difficulityLevel.middle.percent }}
      </td>
      <td>
        {{ item2.difficulityLevel.low.questionCount }}
      </td>
      <td>
        {{ item2.difficulityLevel.low.fullScore }}
      </td>
      <td v-number-to-percent>
        {{ item2.difficulityLevel.low.percent }}
      </td>
    </tr>
  </table>
</template>

<script setup lang="ts">
import { SASQuestionGroup } from "@/types";

const props = defineProps<{ questions: SASQuestionGroup[] }>();
</script>
