<template>
  <div>
    <!-- <div class="tw-flex tw-justify-end tw-mb-2">
      <a-button @click="openModal">说明</a-button>
    </div> -->

    <a-table
      style="width: 100%; overflow-x: scroll"
      rowKey="id"
      :columns="columns"
      :data-source="props.questions"
      :pagination="{ pageSize: 200, hideOnSinglePage: true }"
    ></a-table>
  </div>
</template>

<script setup lang="ts">
// import EventBus from "@/plugins/eventBus";
import { SASQuestion } from "@/types";

const props = defineProps<{ questions: SASQuestion[] }>();

const columns = [
  {
    title: "大题号",
    dataIndex: "mainNumber",
    width: 50,
  },
  {
    title: "小题号",
    dataIndex: "subNumber",
    width: 50,
  },
  {
    title: "满分",
    dataIndex: "totalScore",
    width: 80,
  },
  {
    title: "最高分",
    dataIndex: "maxScore",
    width: 80,
  },
  {
    title: "最低分",
    dataIndex: "minScore",
    width: 80,
  },
  {
    title: "平均分",
    dataIndex: "avgScore",
    width: 80,
  },
  {
    title: "标准差",
    dataIndex: "stdev",
    width: 80,
  },
  {
    title: "差异系数",
    dataIndex: "coefficient",
    width: 100,
  },
  {
    title: "难度",
    dataIndex: "difficulty",
    width: 80,
  },
  {
    title: "区分度",
    dataIndex: "discrimination",
    width: 80,
  },
  {
    title: "零分人数",
    dataIndex: "zeroCount",
    width: 100,
  },
  {
    title: "满分人数 ",
    dataIndex: "fullCount",
    width: 100,
  },
  {
    title: "有效卷数",
    dataIndex: "effectiveCount",
    width: 100,
  },
];

// function openModal() {
//   EventBus.emit("SHOW_SETTING", "DESCRIBE060");
// }
</script>
