<script lang="ts" setup>
import { Page } from '@vben/common-ui';
import { useRouter } from 'vue-router';
import { useTabs } from '@vben/hooks';
const { closeCurrentTab } = useTabs();
const router = useRouter();
const examinformation = {
  ExamName: '考试名称 1',
  TotalExamScore: '100',
  Passingscore: '60',
  Examduration: '30分钟',
  ExamInstructions: '这是考试说明',
};
const handlclick = async () => {
  await closeCurrentTab();
  router.push({
    path: '/examManage/myExamPaper/cpn/startexamin/index',
  });
};
</script>
<template>
  <Page title="考试信息">
    <div class="examinformation">
      <div class="examinformation_item">
        <div class="examinformation_item_left">考试名称</div>
        <div class="examinformation_item_right">
          {{ examinformation.ExamName }}
        </div>
      </div>
      <div class="examinformation_item">
        <div class="examinformation_item_left">考试总分</div>
        <div class="examinformation_item_right">
          {{ examinformation.TotalExamScore }}
        </div>
      </div>
      <div class="examinformation_item">
        <div class="examinformation_item_left">及格分数</div>
        <div class="examinformation_item_right">
          {{ examinformation.Passingscore }}
        </div>
      </div>
      <div class="examinformation_item">
        <div class="examinformation_item_left">考试时长</div>
        <div class="examinformation_item_right">
          {{ examinformation.Examduration }}
        </div>
      </div>
      <div class="examinformation_item">
        <div class="examinformation_item_left">考试说明</div>
        <div class="examinformation_item_right">
          {{ examinformation.ExamInstructions }}
        </div>
      </div>
    </div>
    <div class="btn">
      <el-button style="flex: 1">返 回</el-button>
      <el-button style="flex: 1" type="primary" @click="handlclick"
        >开 始 考 试</el-button
      >
    </div>
  </Page>
</template>
<style lang="scss" scoped>
.examinformation {
  width: 100%;
  height: 180px;
  border: 1px solid #d4d6d9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  .examinformation_item {
    flex: 1;
    border-bottom: 1px solid #d4d6d9;
    display: flex;
    justify-content: space-between;
    color: #31373d;
    font-size: 14px;
    .examinformation_item_left {
      background-color: #f2f3f5;
      width: 240px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: end;
      box-sizing: border-box;
      padding-right: 16px;
    }
    .examinformation_item_right {
      border-left: 1px solid #d4d6d9;
      flex: 1;
      font-weight: 400;
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding-left: 16px;
    }
    &:last-child {
      border-bottom: none;
    }
  }
}
.btn {
  width: 352px;
  height: 40px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin: 24px auto;
}
</style>
