Kaynağa Gözat

对口升学模拟测试接口对接

shmily1213 1 hafta önce
ebeveyn
işleme
d3aab5866b

+ 2 - 2
src/api/modules/study.ts

@@ -1,6 +1,6 @@
 import { ApiResponse, ApiResponseList } from "@/types";
 import flyio from "../flyio";
-import { Batch, ClassKnowledgeRecord, DirectedSchool, Examinee, ExamPaper, ExamPaperSubmit, GetExamPaperRequestDTO, Knowledge, KnowledgeListRequestDTO, KnowledgeRecord, OpenExamineeRequestDTO, PaperWork, PaperWorkRecord, PaperWorkRecordDetail, PaperWorkRecordQuery, PracticeHistory, PracticeRecord, SimulatedRecord, SimulationExamSubject, SimulationTestInfo, StudentExamRecord, StudentPlanStudyRecord, StudentVideoRecord, StudyPlan, Subject, SubjectListRequestDTO, TeachClass, VHSPaperListRequestDTO, VideoStudy } from "@/types/study";
+import { Batch, ClassKnowledgeRecord, DirectedSchool, Examinee, ExamPaper, ExamPaperSubmit, GetExamPaperRequestDTO, Knowledge, KnowledgeListRequestDTO, KnowledgeRecord, OpenExamineeRequestDTO, PaperWork, PaperWorkRecord, PaperWorkRecordDetail, PaperWorkRecordQuery, PracticeHistory, PracticeRecord, SimulatedRecord, SimulationExamSubject, SimulationTestInfo, StudentExamRecord, StudentPlanStudyRecord, StudentVideoRecord, StudyPlan, Subject, SubjectListRequestDTO, TeachClass, VHSPaper, VHSPaperListRequestDTO, VideoStudy } from "@/types/study";
 import { EnumPaperWorkState } from "@/common/enum";
 
 /**
@@ -122,7 +122,7 @@ export function getExamineeResult(examineeId: number) {
  * @returns 
  */
 export function getVHSPaperList(params: VHSPaperListRequestDTO) {
-  return flyio.get('/front/paper/list', params) as Promise<ApiResponse<any[]>>;
+  return flyio.get('/front/paper/list', params) as Promise<ApiResponse<VHSPaper[]>>;
 }
 
 /**

+ 12 - 3
src/components/ie-page/ie-page.vue

@@ -1,9 +1,12 @@
 <template>
   <view class="ie-page theme-ie"
-    :class="[safeAreaInsetBottom ? 'safe-area-inset-bottom' : '', { 'is-fixed': fixHeight }]"
+    :class="[safeAreaInsetBottom ? 'safe-area-inset-bottom' : '', { 'is-fixed': fixHeight, 'has-tabbar': $slots.tabbar }]"
     :style="{ backgroundColor: bgColor }">
     <view class="ie-page-content">
-      <slot></slot>
+      <view v-if="fixHeight" class="absolute inset-0 flex flex-col">
+        <slot></slot>
+      </view>
+      <slot v-else></slot>
     </view>
     <view class="ie-page-popup">
       <vip-popup ref="vipPopupRef" />
@@ -102,10 +105,16 @@ onUnload(() => {
   @apply relative z-100 h-[50px];
 }
 
-.is-fixed {
+.is-fixed{
   height: 1px;
 }
 
+.is-fixed.has-tabbar {
+  .ie-page-content {
+    min-height: calc(100% - 50px);
+  }
+}
+
 .ie-fixed-bottom {
   box-shadow: 0 -2px 8px 0 rgba(0, 0, 0, 0.05);
 }

+ 0 - 1
src/composables/useExam.ts

@@ -651,7 +651,6 @@ export const useExam = () => {
   watch([() => currentIndex.value, () => currentQuestion.value?.activeSubIndex], (val) => {
     const qs = questionList.value[val[0]];
     virtualCurrentIndex.value = qs.index + qs.offset + val[1];
-    console.log(virtualCurrentIndex.value, 777)
   }, {
     immediate: false
   });

+ 78 - 0
src/pagesMain/pages/volunteer/components/ie-voluntary.vue

@@ -0,0 +1,78 @@
+<template>
+  <view>
+    <ie-image :is-oss="true" src="/volunteer/page-bg.png" custom-class="w-full h-auto absolute top-0 left-0 -z-1" />
+    <ie-image :is-oss="true" src="/volunteer/title-right.png" custom-class="w-400 h-auto absolute top-100 right-0" />
+    <view class="pt-200 ml-30">
+      <ie-image :is-oss="true" src="/volunteer/title.png" custom-class="w-fit h-140 bg-back" mode="heightFix" />
+    </view>
+    <view class="relative">
+      <ie-image :is-oss="true" src="/volunteer/volunteer-bg.png" custom-class="w-full h-220" mode="scaleToFill" />
+      <view class="text-28 text-white absolute top-40 left-60">我的信息</view>
+      <view
+        class="px-46 h-1/2 absolute left-0 right-0 top-1/2 -translate-y-1/2 flex items-center justify-between box-border pt-50 text-24 text-primary">
+        <text>姓名:{{ userStore.nickName }}</text>
+        <text>省份:{{ userStore.getLocation || '--' }}</text>
+        <text>类别:<ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.getExamType || '--'" /></text>
+      </view>
+    </view>
+    <view class="mx-26">
+      <view class="mb-20 shadow-card px-30 py-20 bg-white rounded-8 flex items-center justify-between gap-x-30"
+        v-for="item in menu" :key="item.title" @click="handleClick(item)">
+        <ie-image :is-oss="true" :src="item.icon" custom-class="w-96 h-96 rounded-full" mode="aspectFill" />
+        <view class="flex-1">
+          <view class="text-28 text-fore-title">{{ item.title }}</view>
+          <view class="mt-8 text-22 text-fore-light">{{ item.desc }}</view>
+        </view>
+        <uv-icon name="arrow-right" size="16" color="#B2B2B2" />
+      </view>
+    </view>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import { useUserStore } from '@/store/userStore';
+import { useTransferPage } from '@/hooks/useTransferPage';
+import { EnumDictName } from '@/common/enum';
+const { transferTo } = useTransferPage();
+const userStore = useUserStore();
+type MenuItem = {
+  title: string;
+  desc: string;
+  icon: string;
+  pagePath: string;
+};
+const menu: MenuItem[] = [
+  {
+    title: '院校录取概率测试',
+    desc: '输入院校专业,精准测算录取结果',
+    icon: '/volunteer/single.png',
+    pagePath: '/pagesOther/pages/ie/entry-single/entry-single'
+  },
+  // {
+  //   title: '模拟志愿分析',
+  //   desc: '精准分析你的志愿表',
+  //   icon: '/volunteer/analysis.png',
+  //   pagePath: '/pagesOther/pages/ie/entry-analysis/entry-analysis'
+  // },
+  // {
+  //   title: 'AI志愿',
+  //   desc: '精准推荐合理志愿,生成志愿表',
+  //   icon: '/volunteer/ai.png',
+  //   pagePath: '/pagesOther/pages/ie/entry-ai/entry-ai'
+  // },
+  {
+    title: '测职业技能分',
+    desc: '结合院校录取规则,快速测算',
+    icon: '/volunteer/calculate.png',
+    pagePath: '/pagesOther/pages/ie/entry-calculate/entry-calculate'
+  }
+];
+const handleClick = async (item: MenuItem) => {
+  const isLogin = await userStore.checkLogin();
+  if (isLogin) {
+    transferTo(item.pagePath);
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 9 - 0
src/pagesMain/pages/volunteer/components/vhs-voluntary.vue

@@ -0,0 +1,9 @@
+<template>
+  <view class="h-full">
+    <voluntary-index />
+  </view>
+</template>
+<script lang="ts" setup>
+import VoluntaryIndex from '@/pagesOther/pages/voluntary/index/index.vue'
+</script>
+<style lang="scss" scoped></style>

+ 81 - 0
src/pagesMain/pages/volunteer/volunteer copy.vue

@@ -0,0 +1,81 @@
+<template>
+  <ie-page>
+    <ie-image :is-oss="true" src="/volunteer/page-bg.png" custom-class="w-full h-auto absolute top-0 left-0 -z-1" />
+    <ie-image :is-oss="true" src="/volunteer/title-right.png" custom-class="w-400 h-auto absolute top-100 right-0" />
+    <view class="pt-200 ml-30">
+      <ie-image :is-oss="true" src="/volunteer/title.png" custom-class="w-fit h-140 bg-back" mode="heightFix" />
+    </view>
+    <view class="relative">
+      <ie-image :is-oss="true" src="/volunteer/volunteer-bg.png" custom-class="w-full h-220" mode="scaleToFill" />
+      <view class="text-28 text-white absolute top-40 left-60">我的信息</view>
+      <view
+        class="px-46 h-1/2 absolute left-0 right-0 top-1/2 -translate-y-1/2 flex items-center justify-between box-border pt-50 text-24 text-primary">
+        <text>姓名:{{ userStore.nickName }}</text>
+        <text>省份:{{ userStore.getLocation || '--' }}</text>
+        <text>类别:<ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.getExamType || '--'" /></text>
+      </view>
+    </view>
+    <view class="mx-26">
+      <view class="mb-20 shadow-card px-30 py-20 bg-white rounded-8 flex items-center justify-between gap-x-30"
+        v-for="item in menu" :key="item.title" @click="handleClick(item)">
+        <ie-image :is-oss="true" :src="item.icon" custom-class="w-96 h-96 rounded-full" mode="aspectFill" />
+        <view class="flex-1">
+          <view class="text-28 text-fore-title">{{ item.title }}</view>
+          <view class="mt-8 text-22 text-fore-light">{{ item.desc }}</view>
+        </view>
+        <uv-icon name="arrow-right" size="16" color="#B2B2B2" />
+      </view>
+    </view>
+    <template #tabbar>
+      <ie-tabbar :active="1" />
+    </template>
+  </ie-page>
+</template>
+
+<script lang="ts" setup>
+import { useUserStore } from '@/store/userStore';
+import { useTransferPage } from '@/hooks/useTransferPage';
+import { EnumDictName } from '@/common/enum';
+const { transferTo } = useTransferPage();
+const userStore = useUserStore();
+type MenuItem = {
+  title: string;
+  desc: string;
+  icon: string;
+  pagePath: string;
+};
+const menu: MenuItem[] = [
+  {
+    title: '院校录取概率测试',
+    desc: '输入院校专业,精准测算录取结果',
+    icon: '/volunteer/single.png',
+    pagePath: '/pagesOther/pages/ie/entry-single/entry-single'
+  },
+  // {
+  //   title: '模拟志愿分析',
+  //   desc: '精准分析你的志愿表',
+  //   icon: '/volunteer/analysis.png',
+  //   pagePath: '/pagesOther/pages/ie/entry-analysis/entry-analysis'
+  // },
+  // {
+  //   title: 'AI志愿',
+  //   desc: '精准推荐合理志愿,生成志愿表',
+  //   icon: '/volunteer/ai.png',
+  //   pagePath: '/pagesOther/pages/ie/entry-ai/entry-ai'
+  // },
+  {
+    title: '测职业技能分',
+    desc: '结合院校录取规则,快速测算',
+    icon: '/volunteer/calculate.png',
+    pagePath: '/pagesOther/pages/ie/entry-calculate/entry-calculate'
+  }
+];
+const handleClick = async (item: MenuItem) => {
+  const isLogin = await userStore.checkLogin();
+  if (isLogin) {
+    transferTo(item.pagePath);
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 5 - 27
src/pagesMain/pages/volunteer/volunteer.vue

@@ -1,31 +1,7 @@
 <template>
-  <ie-page>
-    <ie-image :is-oss="true" src="/volunteer/page-bg.png" custom-class="w-full h-auto absolute top-0 left-0 -z-1" />
-    <ie-image :is-oss="true" src="/volunteer/title-right.png" custom-class="w-400 h-auto absolute top-100 right-0" />
-    <view class="pt-200 ml-30">
-      <ie-image :is-oss="true" src="/volunteer/title.png" custom-class="w-fit h-140 bg-back" mode="heightFix" />
-    </view>
-    <view class="relative">
-      <ie-image :is-oss="true" src="/volunteer/volunteer-bg.png" custom-class="w-full h-220" mode="scaleToFill" />
-      <view class="text-28 text-white absolute top-40 left-60">我的信息</view>
-      <view
-        class="px-46 h-1/2 absolute left-0 right-0 top-1/2 -translate-y-1/2 flex items-center justify-between box-border pt-50 text-24 text-primary">
-        <text>姓名:{{ userStore.nickName }}</text>
-        <text>省份:{{ userStore.getLocation || '--' }}</text>
-        <text>类别:<ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.getExamType || '--'" /></text>
-      </view>
-    </view>
-    <view class="mx-26">
-      <view class="mb-20 shadow-card px-30 py-20 bg-white rounded-8 flex items-center justify-between gap-x-30"
-        v-for="item in menu" :key="item.title" @click="handleClick(item)">
-        <ie-image :is-oss="true" :src="item.icon" custom-class="w-96 h-96 rounded-full" mode="aspectFill" />
-        <view class="flex-1">
-          <view class="text-28 text-fore-title">{{ item.title }}</view>
-          <view class="mt-8 text-22 text-fore-light">{{ item.desc }}</view>
-        </view>
-        <uv-icon name="arrow-right" size="16" color="#B2B2B2" />
-      </view>
-    </view>
+  <ie-page :fix-height="userStore.isVHS">
+    <vhs-voluntary v-if="userStore.isVHS" />
+    <ie-voluntary v-else />
     <template #tabbar>
       <ie-tabbar :active="1" />
     </template>
@@ -33,6 +9,8 @@
 </template>
 
 <script lang="ts" setup>
+import VhsVoluntary from './components/vhs-voluntary.vue';
+import IeVoluntary from './components/ie-voluntary.vue';
 import { useUserStore } from '@/store/userStore';
 import { useTransferPage } from '@/hooks/useTransferPage';
 import { EnumDictName } from '@/common/enum';

+ 1 - 1
src/pagesOther/pages/voluntary/index/components/score-step.vue

@@ -58,7 +58,7 @@ const {handleForward, onBeforeForward} = useInjectVoluntaryAssistant()
 const scoreForm = ref(null)
 
 const goVoluntaryList = () => {
-    transferTo('/pages/voluntary/list/list')
+    transferTo('/pagesOther/pages/voluntary/list/list')
 }
 
 onBeforeForward(async () => {

+ 33 - 37
src/pagesOther/pages/voluntary/index/index.vue

@@ -1,40 +1,37 @@
 <template>
-    <view class="page-content">
-        <mx-nav-bar v-bind="navBinding"/>
-        <view ref="container" class="flex-1 min-h-1">
-            <swiper :current="currentStep" disable-touch :style="{height: height+'px'}">
-                <swiper-item>
-                    <score-step/>
-                </swiper-item>
-                <swiper-item>
-                    <batch-step/>
-                </swiper-item>
-                <swiper-item>
-                    <cart-step/>
-                </swiper-item>
-            </swiper>
-        </view>
-    </view>
+  <view ref="container" class="h-full">
+    <swiper :current="currentStep" disable-touch class="h-full">
+      <swiper-item class="h-full">
+        <score-step />
+      </swiper-item>
+      <swiper-item>
+        <batch-step />
+      </swiper-item>
+      <swiper-item>
+        <cart-step />
+      </swiper-item>
+    </swiper>
+  </view>
 </template>
 
 <script setup>
-import {ref} from 'vue';
-import {useProvideTransfer} from "@/hooks/useTransfer";
-import {useProvideVoluntaryStep} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryStepInjection";
-import {useProvideVoluntaryData} from "@/hooks/useVoluntaryDataInjection";
-import {useProvideVoluntaryForm} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryFormInjection";
-import {useProvideVoluntaryCart} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
-import {useProvideVoluntaryAssistant} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryAssistantInjection";
+import { ref } from 'vue';
+import { useProvideTransfer } from "@/hooks/useTransfer";
+import { useProvideVoluntaryStep } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryStepInjection";
+import { useProvideVoluntaryData } from "@/hooks/useVoluntaryDataInjection";
+import { useProvideVoluntaryForm } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryFormInjection";
+import { useProvideVoluntaryCart } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
+import { useProvideVoluntaryAssistant } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryAssistantInjection";
 import ScoreStep from "@/pagesOther/pages/voluntary/index/components/score-step.vue";
-import {useElementSize} from "@vueuse/core";
-import {useProvideUserSnapshot} from "@/pagesOther/pages/ie/hooks/useUserSnapshotInjection";
+// import {useElementSize} from "@vueuse/core";
+import { useProvideUserSnapshot } from "@/pagesOther/pages/ie/hooks/useUserSnapshotInjection";
 import BatchStep from "@/pagesOther/pages/voluntary/index/components/batch-step.vue";
 import CartStep from "@/pagesOther/pages/voluntary/index/components/cart-step.vue";
-import {useProvideVoluntaryMajorHighlight} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorHighlightInjection";
-import {useProvideVoluntaryHeader} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryHeaderInjection";
+import { useProvideVoluntaryMajorHighlight } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorHighlightInjection";
+import { useProvideVoluntaryHeader } from "@/pagesOther/pages/voluntary/hooks/useVoluntaryHeaderInjection";
 
 useProvideUserSnapshot()
-const {transferTo} = useProvideTransfer()
+const { transferTo } = useProvideTransfer()
 const stepSvc = useProvideVoluntaryStep()
 const dataSvc = useProvideVoluntaryData()
 const formSvc = useProvideVoluntaryForm()
@@ -42,19 +39,18 @@ const cartSvc = useProvideVoluntaryCart()
 const highlightSvc = useProvideVoluntaryMajorHighlight()
 useProvideVoluntaryHeader()
 
-const {currentStep} = stepSvc
+const { currentStep } = stepSvc
 const container = ref(null) // swiper必须指定明确的高度,所以多包了一层
-const {height} = useElementSize(container)
+// const {height} = useElementSize(container)
 
-const assistantSvc = useProvideVoluntaryAssistant(stepSvc, dataSvc, formSvc, cartSvc, highlightSvc, height)
-const {navBinding, onComplete, resetAll} = assistantSvc
+const assistantSvc = useProvideVoluntaryAssistant(stepSvc, dataSvc, formSvc, cartSvc, highlightSvc)
+const { navBinding, onComplete, resetAll } = assistantSvc
 
 onComplete((id) => {
-    transferTo('/pages/voluntary/detail/detail', {id})
-    currentStep.value = 0
-    resetAll()
+  transferTo('/pages/voluntary/detail/detail', { id })
+  currentStep.value = 0
+  resetAll()
 })
 </script>
 
-<style scoped lang="scss">
-</style>
+<style scoped lang="scss"></style>

+ 2 - 1
src/pagesStudy/components/hunan-exam-item.vue

@@ -44,11 +44,12 @@ const handleDetail = () => {
   } else {
     transferTo('/pagesStudy/pages/exam-start/exam-start', {
       data: {
-        name: '模拟考试-' + props.data.subjectName,
+        // name: '模拟考试-' + props.data.subjectName,
         paperType: EnumPaperType.SIMULATED,
         readonly: false,
         simulationInfo: {
           examineeId: props.data.id,
+          name: '模拟考试-' + props.data.subjectName,
         }
       }
     });

+ 12 - 5
src/pagesStudy/components/henan-exam-item.vue → src/pagesStudy/components/vhs-exam-item.vue

@@ -1,19 +1,19 @@
 <template>
   <view class="bg-white rounded-5">
     <view class="px-30 pt-32 pb-20">
-      <view class="text-28 text-fore-title font-bold ellipsis-2">河南省 2026 年普通高校对口招生考试语文全真模拟试卷</view>
+      <view class="text-28 text-fore-title font-bold ellipsis-2">{{ data.paperName }}</view>
       <view class="flex items-center gap-16 mt-20">
         <view class="tag-item bg-[#FFFBEB] text-[#F97316]">语文</view>
-        <view class="tag-item bg-back text-fore-light">公共课</view>
+        <view class="tag-item bg-back text-fore-light">{{ data.subjectId === 0 ? '公共课' : '专业课' }}</view>
       </view>
     </view>
     <uv-line color="#F6F8FA" />
     <view class="px-30 py-20 flex items-center justify-between">
       <view class="text-24 text-fore-light">
         <text>共</text>
-        <text class="text-primary">36</text>
+        <text class="text-primary">{{ data.number }}</text>
         <text>道题,总分</text>
-        <text class="text-primary">100</text>
+        <text class="text-primary">{{ data.fenshu }}</text>
         <text>分</text>
       </view>
       <view class="px-20 py-8 bg-primary border border-solid border-primary rounded-full text-24 text-white" @click="handleStartExam">开始考试</view>
@@ -21,9 +21,16 @@
   </view>
 </template>
 <script lang="ts" setup>
+import { Study } from '@/types';
 
+const props = defineProps<{
+  data: Study.VHSPaper;
+}>();
+const emit = defineEmits<{
+  (e: 'startExam', data: Study.VHSPaper): void;
+}>();
 const handleStartExam = () => {
-  console.log('开始考试');
+  emit('startExam', props.data);
 }
 
 </script>

+ 1 - 1
src/pagesStudy/pages/exam-start/components/exam-navbar.vue

@@ -44,7 +44,7 @@ const isPractice = computed(() => {
 });
 const pageTitle = computed(() => {
   if (examPageOptions) {
-    const { name, readonly, paperType } = examPageOptions;
+    const { readonly, paperType } = examPageOptions;
     if (readonly) {
       return readonlyTitleMap[paperType as keyof typeof readonlyTitleMap];
     }

+ 24 - 16
src/pagesStudy/pages/exam-start/components/exam-subtitle.vue

@@ -8,34 +8,42 @@
   </view>
 </template>
 <script lang="ts" setup>
+import { useUserStore } from '@/store/userStore';
 import { Transfer } from '@/types';
 import { EXAM_PAGE_OPTIONS, EXAM_DATA } from '@/types/injectionSymbols';
 import { useExam } from '@/composables/useExam';
 
+const userStore = useUserStore();
 const examPageOptions = inject(EXAM_PAGE_OPTIONS) || {} as Transfer.ExamAnalysisPageOptions;
 const examData = inject(EXAM_DATA) || {} as ReturnType<typeof useExam>;
 const { virtualCurrentIndex, virtualTotalCount } = examData;
 
 const pageSubtitle = computed(() => {
-  if (!examPageOptions || !examPageOptions.practiceInfo) {
-    return '知识点练习';
-  }
-  const { practiceInfo: { isVHS, directed, questionType, name } } = examPageOptions;
-  let titlePrefix = '';
-  if (isVHS) {
-    if (questionType === 0) {
-      titlePrefix = '知识点练习';
-    } else if (questionType === 2) {
-      titlePrefix = '必刷题';
-    }
-  } else {
-    if (directed) {
-      titlePrefix = '定向刷题';
+  if (examPageOptions && examPageOptions.practiceInfo) {
+
+    const { practiceInfo: { directed, questionType, name } } = examPageOptions;
+    let titlePrefix = '';
+    if (userStore.isVHS) {
+      if (questionType === 0) {
+        titlePrefix = '知识点练习';
+      } else if (questionType === 2) {
+        titlePrefix = '必刷题';
+      }
     } else {
-      titlePrefix = '全量刷题';
+      if (directed) {
+        titlePrefix = '定向刷题';
+      } else {
+        titlePrefix = '全量刷题';
+      }
     }
+    return titlePrefix + '-' + name;
+  } else if (examPageOptions && examPageOptions.simulationInfo) {
+    const { simulationInfo: { name } } = examPageOptions;
+    return name || '模拟考试';
   }
-  return titlePrefix + '-' + name;
+
+
+  return '知识点练习';
 });
 </script>
 <style lang="scss" scoped></style>

+ 34 - 4
src/pagesStudy/pages/exam-start/exam-start.vue

@@ -171,7 +171,7 @@ const handleSubmit = (tempSave: boolean = false) => {
   const msg = tempSave ? '保存中...' : '提交中...';
   uni.$ie.showLoading(msg);
   setTimeout(async () => {
-    const params = {
+    const params: Study.ExamPaperSubmit = {
       ...paperData.value,
       questions: questionList.value.map(item => {
         return {
@@ -190,7 +190,7 @@ const handleSubmit = (tempSave: boolean = false) => {
       // examineeId: examineerData.value.examineeId,
       isDone: tempSave ? isAllDone.value : true,
       duration: practiceDuration.value
-    } as Study.ExamPaperSubmit;
+    };
     console.log('提交试卷参数', params)
     await commitExamineePaper(params);
     if (isSimulationExam.value || isTestExam.value) {
@@ -268,6 +268,7 @@ const restoreQuestion = (savedQuestion: Study.ExamineeQuestion[], fullQuestion:
   }
   return fullQuestion;
 }
+// 1、加载知识点练习数据
 const loadPracticeData = async () => {
   const { paperType, readonly, practiceInfo } = prevData.value;
   let data: Study.Examinee | null = null;
@@ -285,7 +286,6 @@ const loadPracticeData = async () => {
       params.questionType = practiceInfo?.questionType;
     } else {
       params.directed = practiceInfo?.directed || false;
-      params.questionType = practiceInfo?.questionType || 0;
     }
     const res = await getOpenExaminee(params);
     data = res.data || {};
@@ -300,6 +300,7 @@ const loadPracticeData = async () => {
   totalExamTime.value = Number.MAX_SAFE_INTEGER;
   combinePaperData(data, paperType);
 }
+// 2、加载模拟考试数据
 const loadExamData = async () => {
   const { paperType, readonly, simulationInfo } = prevData.value;
   let data: Study.Examinee;
@@ -320,6 +321,31 @@ const loadExamData = async () => {
     combinePaperData(data, paperType);
   }
 }
+// 3、加载对口升学试卷数据
+const loadVHSPaperData = async () => {
+  const { paperType, readonly, simulationInfo } = prevData.value;
+  let data: Study.Examinee;
+  if (simulationInfo?.examineeId) {
+    if (readonly) {
+      const res = await getExamineeResult(simulationInfo.examineeId);
+      data = res.data;
+    } else {
+      const params = {
+        paperType: paperType,
+        relateId: simulationInfo?.examineeId,
+      } as Study.OpenExamineeRequestDTO;
+      const res = await getOpenExaminee(params);
+      data = res.data || {};
+    }
+    if (!data) {
+      uni.$ie.hideLoading();
+      transferBack();
+      return;
+    }
+    totalExamTime.value = data.paperInfo?.time || Number.MAX_SAFE_INTEGER;
+    combinePaperData(data, paperType);
+  }
+}
 const combinePaperData = async (examinee: Study.Examinee, paperType: EnumPaperType) => {
   examineeId.value = examinee.examineeId;
   if (examinee.paperId) {
@@ -379,7 +405,11 @@ const loadData = async () => {
   if (paperType === EnumPaperType.PRACTICE || paperType === EnumPaperType.COURSE) {
     loadPracticeData();
   } else if (paperType === EnumPaperType.SIMULATED || paperType === EnumPaperType.TEST) {
-    loadExamData();
+    if (paperType === EnumPaperType.SIMULATED && userStore.isVHS) {
+      loadVHSPaperData();
+    } else {
+      loadExamData();
+    }
   }
 };
 onLoad(() => {

+ 0 - 0
src/pagesStudy/pages/index/compoentns/hunan-exam.vue → src/pagesStudy/pages/index/compoentns/ie-exam.vue


+ 23 - 6
src/pagesStudy/pages/index/compoentns/henan-exam.vue → src/pagesStudy/pages/index/compoentns/vhs-exam.vue

@@ -13,29 +13,46 @@
       </view>
 
       <view class="px-30 pb-24 bg-back flex flex-col gap-20 sticky z-1 " :style="{ top: baseStickyTop + 20 + 'px' }">
-        <henan-exam-item v-for="(item, index) in list" :key="index" :data="item" />
+        <vhs-exam-item v-for="(item, index) in list" :key="index" :data="item" @start-exam="handleStartExam" />
       </view>
     </view>
   </view>
 </template>
 <script lang="ts" setup>
-import HenanExamItem from '@/pagesStudy/components/henan-exam-item.vue';
+import VhsExamItem from '@/pagesStudy/components/vhs-exam-item.vue';
+import { useTransferPage } from '@/hooks/useTransferPage';
 import { useNavbar } from '@/hooks/useNavbar';
 import { getVHSPaperList } from '@/api/modules/study';
-import { Study } from '@/types';
+import { Study, Transfer } from '@/types';
+import { EnumPaperType } from '@/common/enum';
 
+const { transferTo } = useTransferPage();
 const { baseStickyTop } = useNavbar();
-const list = [1, 1, 1, 1, 1, 1, 1, 1]
+const list = ref<Study.VHSPaper[]>([]);
 const current = ref(0);
 const handleChange = (index: number) => {
   current.value = index;
+  loadData();
 }
 const loadData = async () => {
   const { data } = await getVHSPaperList({
     subjectId: current.value
   });
-  console.log(data)
-  // list.value = data;
+  list.value = data;
+}
+const handleStartExam = (data: Study.VHSPaper) => {
+  const pageOptions: Transfer.ExamAnalysisPageOptions = {
+    paperType: EnumPaperType.SIMULATED,
+    readonly: false,
+    simulationInfo: {
+      name: data.paperName,
+      // 难受
+      examineeId: data.relateId,
+    }
+  }
+  transferTo('/pagesStudy/pages/exam-start/exam-start', {
+    data: pageOptions,
+  });
 }
 onLoad(() => {
   loadData();

+ 4 - 4
src/pagesStudy/pages/index/index.vue

@@ -15,16 +15,16 @@
     <index-practice-entry />
     <index-menu />
     <index-banner />
-    <henan-exam v-if="isVHS" :directed-school="firstDirectedSchool" />
-    <hunan-exam v-else :directed-school="firstDirectedSchool" />
+    <vhs-exam v-if="isVHS" :directed-school="firstDirectedSchool" />
+    <ie-exam v-else :directed-school="firstDirectedSchool" />
   </ie-page>
 </template>
 
 <script lang="ts" setup>
 import IndexMenu from './compoentns/index-menu.vue';
 import IndexBanner from './compoentns/index-banner.vue';
-import HunanExam from './compoentns/hunan-exam.vue';
-import HenanExam from './compoentns/henan-exam.vue';
+import IeExam from './compoentns/ie-exam.vue';
+import VhsExam from './compoentns/vhs-exam.vue';
 import IndexPracticeEntry from './compoentns/index-practice-entry.vue';
 import { EnumDictName, EnumExamType, EnumUserRole } from '@/common/enum';
 import { useUserStore } from '@/store/userStore';

+ 1 - 1
src/pagesStudy/pages/knowledge-practice-history/knowledge-practice-history.vue

@@ -46,7 +46,7 @@ const handleViewHistory = (item: Study.PracticeHistory) => {
       examineeId: item.examineeId,
       name: item.paperName,
       directed: item.directed === 1,
-      questionType: item.questionType
+      questionType: Number(item.questionType)
     }
   });
 }

+ 28 - 1
src/types/study.ts

@@ -462,4 +462,31 @@ export interface PaperWork {
 
 export interface VHSPaperListRequestDTO {
   subjectId: number;
-}
+}
+
+export interface VHSPaper {
+  collect: boolean;
+  createBy: string | null;
+  createTime: string;
+  directKey: string;
+  examineeId: string | null;
+  examineeTypes: string;
+  fenshu: number;
+  filename: string;
+  id: number;
+  locations: string;
+  number: string | null;
+  ospath: string | null;
+  paperInfo: string | null;
+  paperName: string;
+  paperSource: number;
+  paperType: string;
+  relateId: number;
+  remark: string | null;
+  status: string | null;
+  subjectId: number;
+  tiid: string;
+  updateBy: string | null;
+  updateTime: string | null;
+  year: string | null;
+}

+ 3 - 2
src/types/transfer.ts

@@ -20,12 +20,13 @@ export interface PracticeResultPageOptions {
  */
 export interface ExamAnalysisPageOptions {
   paperType: EnumPaperType;
-  name: string;
+  // name: string;
   questionId?: number;
-  readonly?: boolean;
+  readonly: boolean;
   // 模拟考试
   simulationInfo?: {
     examineeId: number;
+    name: string;
   };
   // 知识点练习、教材同步练、组卷作业
   practiceInfo?: {