Quellcode durchsuchen

对口升学模拟考试对接

shmily1213 vor 1 Woche
Ursprung
Commit
be9c21827c

+ 0 - 0
src/pagesStudy/components/hunan-exam-item.vue → src/pagesStudy/components/ie-exam-item.vue


+ 5 - 3
src/pagesStudy/components/vhs-exam-item.vue

@@ -3,8 +3,8 @@
     <view class="px-30 pt-32 pb-20">
       <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">{{ data.subjectId === 0 ? '公共课' : '专业课' }}</view>
+        <view class="tag-item bg-[#FFFBEB] text-[#F97316]">{{ data.subjectName }}</view>
+        <view class="tag-item bg-back text-fore-light">{{ type === 0 ? '公共课' : '专业课' }}</view>
       </view>
     </view>
     <uv-line color="#F6F8FA" />
@@ -16,7 +16,8 @@
         <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>
+      <view class="px-20 py-8 bg-primary border border-solid border-primary rounded-full text-24 text-white"
+        @click="handleStartExam">开始考试</view>
     </view>
   </view>
 </template>
@@ -25,6 +26,7 @@ import { Study } from '@/types';
 
 const props = defineProps<{
   data: Study.VHSPaper;
+  type?: number
 }>();
 const emit = defineEmits<{
   (e: 'startExam', data: Study.VHSPaper): void;

+ 2 - 2
src/pagesStudy/pages/index/compoentns/ie-exam.vue

@@ -11,14 +11,14 @@
         <view class="h-0 w-160 border-0 border-b border-dashed border-border"></view>
       </view>
       <view v-for="value in list" :key="value.id" class="rounded-10 mb-20 bg-white px-20 py-38">
-        <hunan-exam-item :data="value" />
+        <ie-exam-item :data="value" />
       </view>
     </view>
   </view>
 </template>
 <script lang="ts" setup>
 import IndexTest from './index-test.vue';
-import HunanExamItem from '@/pagesStudy/components/hunan-exam-item.vue';
+import IeExamItem from '@/pagesStudy/components/ie-exam-item.vue';
 import { getSimulatedRecord } from '@/api/modules/study';
 import { Study } from '@/types';
 

+ 3 - 2
src/pagesStudy/pages/index/compoentns/vhs-exam.vue

@@ -13,7 +13,7 @@
       </view>
 
       <view class="px-30 pb-24 bg-back flex flex-col gap-20 sticky z-1 " :style="{ top: baseStickyTop + 20 + 'px' }">
-        <vhs-exam-item v-for="(item, index) in list" :key="index" :data="item" @start-exam="handleStartExam" />
+        <vhs-exam-item v-for="(item, index) in list" :key="index" :data="item" :type="current" @start-exam="handleStartExam" />
       </view>
     </view>
   </view>
@@ -35,6 +35,7 @@ const handleChange = (index: number) => {
   loadData();
 }
 const loadData = async () => {
+  list.value = [];
   const { data } = await getVHSPaperList({
     subjectId: current.value
   });
@@ -47,7 +48,7 @@ const handleStartExam = (data: Study.VHSPaper) => {
     simulationInfo: {
       name: data.paperName,
       // 难受
-      examineeId: data.relateId,
+      examineeId: data.id,
     }
   }
   transferTo('/pagesStudy/pages/exam-start/exam-start', {

+ 4 - 4
src/pagesStudy/pages/study-history/components/exam-history.vue

@@ -1,14 +1,14 @@
 <template>
   <view class="flex-1 min-h-1 relative bg-back">
     <view class="absolute inset-0">
-      <hunan-exam-history v-if="getLocation === '湖南'" />
-      <henan-exam-history v-if="getLocation === '河南'" />
+      <ie-exam-history v-if="getLocation === '湖南'" />
+      <vhs-exam-history v-if="getLocation === '河南'" />
     </view>
   </view>
 </template>
 <script lang="ts" setup>
-import HunanExamHistory from './hunan-exam-history.vue'
-import HenanExamHistory from './henan-exam-history.vue'
+import IeExamHistory from './ie-exam-history.vue'
+import VhsExamHistory from './vhs-exam-history.vue'
 import { useUserStore } from '@/store/userStore';
 const userStore = useUserStore();
 const { getLocation } = storeToRefs(userStore);

+ 2 - 2
src/pagesStudy/pages/study-history/components/hunan-exam-history-student.vue → src/pagesStudy/pages/study-history/components/ie-exam-history-student.vue

@@ -2,7 +2,7 @@
   <view class="pb-30">
     <view v-if="examType === EnumExamRecordType.SIMULATED" class="px-30">
       <view class="sibling-border-top px-20 py-30" v-for="(item, index) in simulatedRecordList" :key="index">
-        <hunan-exam-item :data="item" />
+        <ie-exam-item :data="item" />
       </view>
     </view>
     <template v-else>
@@ -18,7 +18,7 @@
 <script lang="ts" setup>
 import { getSimulatedRecord, getPaperWorkList } from '@/api/modules/study';
 import { EnumExamRecordType, EnumPaperWorkState } from '@/common/enum';
-import HunanExamItem from '@/pagesStudy/components/hunan-exam-item.vue';
+import IeExamItem from '@/pagesStudy/components/ie-exam-item.vue';
 import { Study } from '@/types';
 import PaperWorkItem from '@/pagesStudy/components/paper-work-item.vue';
 const props = defineProps({

+ 0 - 0
src/pagesStudy/pages/study-history/components/hunan-exam-history-teacher.vue → src/pagesStudy/pages/study-history/components/ie-exam-history-teacher.vue


+ 4 - 4
src/pagesStudy/pages/study-history/components/hunan-exam-history.vue → src/pagesStudy/pages/study-history/components/ie-exam-history.vue

@@ -13,15 +13,15 @@
       </view>
     </view>
     <scroll-view class="flex-1 min-h-1" scroll-y>
-      <hunan-exam-history-student v-if="isStudent" :exam-type="examType" />
-      <hunan-exam-history-teacher v-else :exam-type="examType" />
+      <ie-exam-history-student v-if="isStudent" :exam-type="examType" />
+      <ie-exam-history-teacher v-else :exam-type="examType" />
     </scroll-view>
   </view>
 </template>
 <script lang="ts" setup>
 import { EnumExamRecordType } from '@/common/enum';
-import HunanExamHistoryStudent from './hunan-exam-history-student.vue';
-import HunanExamHistoryTeacher from './hunan-exam-history-teacher.vue';
+import IeExamHistoryStudent from './ie-exam-history-student.vue';
+import IeExamHistoryTeacher from './ie-exam-history-teacher.vue';
 import { useUserStore } from '@/store/userStore';
 const { isStudent } = storeToRefs(useUserStore());
 const examType = ref(EnumExamRecordType.SIMULATED);

+ 3 - 3
src/pagesStudy/pages/study-history/components/henan-exam-history-student.vue → src/pagesStudy/pages/study-history/components/vhs-exam-history-student.vue

@@ -1,14 +1,14 @@
 <template>
   <view class="flex flex-col gap-20 px-30 pb-20 bg-back h-fit">
-    <view class="" v-for="(item, index) in [1, 1, 1, 1, 1, 1, 1]" :key="index">
-      <henan-exam-item :data="item" />
+    <view class="" v-for="(item, index) in []" :key="index">
+      <vhs-exam-item :data="item" />
     </view>
   </view>
 </template>
 <script lang="ts" setup>
 import { getSimulatedRecord, getPaperWorkList } from '@/api/modules/study';
 import { EnumExamRecordType, EnumPaperWorkState } from '@/common/enum';
-import HenanExamItem from '@/pagesStudy/components/henan-exam-item.vue';
+import VhsExamItem from '@/pagesStudy/components/vhs-exam-item.vue';
 import { Study } from '@/types';
 import PaperWorkItem from '@/pagesStudy/components/paper-work-item.vue';
 const props = defineProps({

+ 0 - 0
src/pagesStudy/pages/study-history/components/henan-exam-history-teacher.vue → src/pagesStudy/pages/study-history/components/vhs-exam-history-teacher.vue


+ 4 - 4
src/pagesStudy/pages/study-history/components/henan-exam-history.vue → src/pagesStudy/pages/study-history/components/vhs-exam-history.vue

@@ -1,13 +1,13 @@
 <template>
   <view class="h-full">
-    <henan-exam-history-student v-if="isStudent" :exam-type="examType" />
-    <henan-exam-history-teacher v-else :exam-type="examType" />
+    <vhs-exam-history-student v-if="isStudent" :exam-type="examType" />
+    <vhs-exam-history-teacher v-else :exam-type="examType" />
   </view>
 </template>
 <script lang="ts" setup>
 import { EnumExamRecordType } from '@/common/enum';
-import HenanExamHistoryStudent from './henan-exam-history-student.vue';
-import HenanExamHistoryTeacher from './henan-exam-history-teacher.vue';
+import VhsExamHistoryStudent from './vhs-exam-history-student.vue';
+import VhsExamHistoryTeacher from './vhs-exam-history-teacher.vue';
 import { useUserStore } from '@/store/userStore';
 const { isStudent } = storeToRefs(useUserStore());
 const examType = ref(EnumExamRecordType.SIMULATED);

+ 1 - 0
src/types/study.ts

@@ -485,6 +485,7 @@ export interface VHSPaper {
   remark: string | null;
   status: string | null;
   subjectId: number;
+  subjectName: string;
   tiid: string;
   updateBy: string | null;
   updateTime: string | null;