<script lang="ts" setup>
import { Page } from '@vben/common-ui';
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { CircleCheckFilled } from '@element-plus/icons-vue';
const router = useRouter();
const route = useRoute();
const handleClick = () => {
  if(route.path==='/examcompleted'){
  router.replace({ path: '/viewexamin' });

  }else{
  router.replace({ path: '/examManage/myExamPaper/cpn/endexamin/viewexamin' });

  }
};
</script>
<template>
  <Page title="考试完成">
    <div class="exam-completed-container">
      <el-icon class="exam-completed-icon"><CircleCheckFilled /></el-icon>
      <div class="exam-completed-title">考试完成</div>
      <div class="exam-completed-desc">
        请稍后在【我的考试-已考试】中查看成绩。
      </div>
      <el-button class="exam-completed-btn" @click="handleClick"
        >查看结果</el-button
      >
    </div>
  </Page>
</template>
<style lang="scss" scoped>
.exam-completed-container {
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  .exam-completed-icon {
    font-size: 88px;
    color: #52c41a;
  }
  .exam-completed-title {
    font-size: 18px;
    font-weight: 500;
    color: #31373d;
  }
  .exam-completed-desc {
    font-size: 14px;
    font-weight: 400;
    color: #31373d;
  }
  .exam-completed-btn {
    width: 160px;
    height: 40px;
  }
}
</style>
