|
|
@@ -1,33 +1,35 @@
|
|
|
<template>
|
|
|
<ie-page bg-color="#F6F8FA">
|
|
|
- <ie-navbar title="模拟测试" bg-color="transparent" :placeholder="false" />
|
|
|
+ <ie-navbar title="" bg-color="transparent" :placeholder="false" />
|
|
|
<view class="relative">
|
|
|
<ie-image :is-oss="true" src="/study-bg9.png" custom-class="w-full h-[544rpx] absolute top-0 left-0 z-0" />
|
|
|
- <ie-image :is-oss="true" src="/study-bg10.png" custom-class="w-276 h-175 absolute top-98 left-75 z-1" />
|
|
|
- <view class="mt-196 relative z-2 mx-30">
|
|
|
- <view class="flex items-center justify-end">
|
|
|
- <text class="mr-10 text-30 text-fore-title">考试记录</text>
|
|
|
- <uv-icon name="arrow-right" size="15px" color="#B3B3B3"></uv-icon>
|
|
|
+ <ie-image :is-oss="true" src="/study-bg10.png" custom-class="w-312 h-198 absolute top-75 right-32 z-1"
|
|
|
+ mode="aspectFill" />
|
|
|
+ <view class="relative z-2 mx-30">
|
|
|
+ <view class="pt-126 ml-55">
|
|
|
+ <ie-image :is-oss="true" src="/study-title5.png" customClass="w-264 h-60" />
|
|
|
</view>
|
|
|
- <view class="mt-20 bg-white rounded-15 px-40 pt-50 pb-40">
|
|
|
- <view class="text-36 text-fore-title text-center font-bold">长沙民政职业技术学院</view>
|
|
|
+ <view class="mt-65 bg-white rounded-15 px-40 pt-50 pb-40">
|
|
|
+ <view class="text-36 text-fore-title text-center font-bold">{{ universityInfo.universityName }}</view>
|
|
|
<view class="mt-26 text-32 text-fore-title text-center font-bold">模考须知</view>
|
|
|
<view class="mt-66">
|
|
|
<view class="flex items-center justify-between">
|
|
|
<text class="text-28 text-fore-light">所考专业</text>
|
|
|
- <text class="text-28 text-fore-title">大数据与会计</text>
|
|
|
+ <text class="text-28 text-fore-title">{{ universityInfo.majorName }}</text>
|
|
|
</view>
|
|
|
<view class="mt-40 flex items-center justify-between">
|
|
|
<text class="text-28 text-fore-light">考生类型</text>
|
|
|
- <text class="text-28 text-fore-title">单招(应届普高)</text>
|
|
|
+ <text class="text-28 text-fore-title">
|
|
|
+ <ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.getExamType || '--'" />
|
|
|
+ </text>
|
|
|
</view>
|
|
|
<view class="mt-40 flex items-center justify-between">
|
|
|
<text class="text-28 text-fore-light">考试类型</text>
|
|
|
- <text class="text-28 text-fore-title">职业技能模拟考试</text>
|
|
|
+ <text class="text-28 text-fore-title">{{ subjectInfo.subject }}</text>
|
|
|
</view>
|
|
|
<view class="mt-40 flex items-center justify-between">
|
|
|
<text class="text-28 text-fore-light">考试标准</text>
|
|
|
- <text class="text-28 text-fore-title">90分钟,满分300分</text>
|
|
|
+ <text class="text-28 text-fore-title">{{ examTime }}分钟,满分{{ totalScore }}分</text>
|
|
|
</view>
|
|
|
<view class="mt-40 flex items-center justify-between">
|
|
|
<text class="text-28 text-fore-light">考试题型</text>
|
|
|
@@ -36,15 +38,15 @@
|
|
|
</view>
|
|
|
<view class="mt-36 rounded-15 bg-back px-40 py-36 flex">
|
|
|
<view class="flex-1 text-center">
|
|
|
- <view class="text-40 text-fore-title font-bold">100</view>
|
|
|
+ <view class="text-40 text-fore-title font-bold">{{ questions.length }}</view>
|
|
|
<view class="mt-10 text-28 text-fore-light">题量</view>
|
|
|
</view>
|
|
|
<view class="flex-1 text-center">
|
|
|
- <view class="text-40 text-fore-title font-bold">300</view>
|
|
|
+ <view class="text-40 text-fore-title font-bold">{{ totalScore }}</view>
|
|
|
<view class="mt-10 text-28 text-fore-light">总分</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <ie-button type="primary" custom-class="mt-44" @click="handleStartTest">开始考试</ie-button>
|
|
|
+ <ie-button type="primary" custom-class="mt-44" :disabled="!isReady" @click="handleStartTest">开始考试</ie-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -53,11 +55,48 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { useTransferPage } from '@/hooks/useTransferPage';
|
|
|
-const { transferTo } = useTransferPage();
|
|
|
+import { getOpenExaminee, getPaper } from '@/api/modules/study';
|
|
|
+import { useUserStore } from '@/store/userStore';
|
|
|
+import { EnumDictName } from '@/common/enum';
|
|
|
+import { Study } from '@/types';
|
|
|
+const { prevData, transferTo } = useTransferPage();
|
|
|
+const userStore = useUserStore();
|
|
|
|
|
|
+const isReady = ref(false);
|
|
|
+const totalScore = ref(0);
|
|
|
+const examTime = ref(0);
|
|
|
+const questions = ref<Study.Question[]>([]);
|
|
|
+const universityInfo = computed(() => {
|
|
|
+ return prevData.value.universityInfo;
|
|
|
+});
|
|
|
+const subjectInfo = computed(() => {
|
|
|
+ return prevData.value.subjectInfo;
|
|
|
+});
|
|
|
const handleStartTest = () => {
|
|
|
transferTo('/pagesStudy/pages/simulation-analysis/simulation-analysis')
|
|
|
}
|
|
|
+const loadData = async () => {
|
|
|
+ uni.$ie.showLoading('AI智能出卷中...');
|
|
|
+ const { data } = await getOpenExaminee({
|
|
|
+ paperType: 'Simulated',
|
|
|
+ subjectId: subjectInfo.value.subjectId,
|
|
|
+ directed: true
|
|
|
+ });
|
|
|
+ if (!data) {
|
|
|
+ uni.$ie.hideLoading();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const { examineeId, paperId } = data;
|
|
|
+ const { data: paperData } = await getPaper({ type: 'Simulated', id: paperId });
|
|
|
+ if (paperData) {
|
|
|
+ console.log(paperData)
|
|
|
+ isReady.value = true;
|
|
|
+ }
|
|
|
+ uni.$ie.hideLoading();
|
|
|
+}
|
|
|
+onLoad(() => {
|
|
|
+ loadData();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|