shmily1213 il y a 1 mois
Parent
commit
78c1b16a98

+ 8 - 1
src/api/modules/study.ts

@@ -113,5 +113,12 @@ export function getSimulationInfo() {
  * 收藏题目
  */
 export function collectQuestion(questionId: number) {
-  return flyio.post('/front/questions/collect/', null, { params: { questionId } }) as Promise<ApiResponse<any>>;
+  return flyio.post('/front/questions/collect', null, { params: { questionId } }) as Promise<ApiResponse<any>>;
+}
+
+/**
+ * 取消收藏题目
+ */
+export function cancelCollectQuestion(questionId: number) {
+  return flyio.post('/front/questions/cancelCollect', null, { params: { questionId } }) as Promise<ApiResponse<any>>;
 }

+ 6 - 1
src/common/enum.ts

@@ -120,5 +120,10 @@ export enum EnumQuestionType {
   /**
    * 分析题
    */
-  ANALYSIS = 8
+  ANALYSIS = 8,
+
+  /**
+   * 阅读题
+   */
+  OTHER = 99
 }

+ 24 - 20
src/composables/useExam.ts

@@ -13,6 +13,7 @@ export const useExam = () => {
     [EnumQuestionType.SHORT_ANSWER]: '简答题',
     [EnumQuestionType.ESSAY]: '问答题',
     [EnumQuestionType.ANALYSIS]: '分析题',
+    [EnumQuestionType.OTHER]: '阅读题'
   }
   // 题型顺序
   const questionTypeOrder = [
@@ -23,7 +24,8 @@ export const useExam = () => {
     EnumQuestionType.SUBJECTIVE,
     EnumQuestionType.SHORT_ANSWER,
     EnumQuestionType.ESSAY,
-    EnumQuestionType.ANALYSIS
+    EnumQuestionType.ANALYSIS,
+    EnumQuestionType.OTHER
   ];
   let interval: NodeJS.Timeout | null = null;
   const countDownCallback = ref<() => void>(() => { });
@@ -53,6 +55,14 @@ export const useExam = () => {
   const markList = ref<Study.Question[]>([]);
   // 包含状态的问题列表
   const stateQuestionList = computed(() => {
+    return questionList.value.map(item => {
+      return {
+        ...item,
+        isDone: isDone(item)
+      }
+    });
+  });
+  const groupedQuestionList = computed(() => {
     // 状态:已做、未做、是否不会、是否标记,整体按照题型分组
     const state = questionTypeOrder.map(type => {
       return {
@@ -87,16 +97,20 @@ export const useExam = () => {
   });
   const doneCount = computed(() => {
     // 有答案的或者不会做的,都认为是做了
-    return stateQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isDone || q.question.isNotKnow).length, 0);
+    // return groupedQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isDone || q.question.isNotKnow).length, 0);
+    return stateQuestionList.value.filter(q => q.isDone || q.isNotKnow).length;
   });
   const notDoneCount = computed(() => {
-    return questionList.value.length - doneCount.value;
+    // return questionList.value.length - doneCount.value;
+    return stateQuestionList.value.length - doneCount.value;
   });
   const notKnowCount = computed(() => {
-    return stateQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isNotKnow).length, 0);
+    // return groupedQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isNotKnow).length, 0);
+    return stateQuestionList.value.filter(q => q.isNotKnow).length;
   });
   const markCount = computed(() => {
-    return stateQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isMark).length, 0);
+    // return groupedQuestionList.value.reduce((acc, item) => acc + item.list.filter(q => q.question.isMark).length, 0);
+    return stateQuestionList.value.filter(q => q.isMark).length;
   });
   const isDone = (qs: Study.Question): boolean => {
     if (qs.subQuestions && qs.subQuestions.length > 0) {
@@ -117,7 +131,6 @@ export const useExam = () => {
     currentIndex.value--;
   }
   const nextQuestionQuickly = () => {
-    // currentIndex.value += 10;
     if (currentIndex.value >= questionList.value.length - 1) {
       return;
     }
@@ -187,15 +200,6 @@ export const useExam = () => {
   const setCountDownCallback = (callback: () => void) => {
     countDownCallback.value = callback;
   }
-  const loadExamData = async (paperType: string, paperId: number) => {
-    // const res = await getPaper({
-    //   type: paperType,
-    //   id: paperId
-    // });
-    // // questionList.value = res.data.questions;
-    // console.log(questionList.value)
-    // startPracticeDuration();
-  }
   const setQuestionList = (list: Study.ApiQuestion[]) => {
     const orders = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
     // 数据预处理
@@ -203,18 +207,19 @@ export const useExam = () => {
     const parseQuestion = (item: Study.ApiQuestion): Study.Question => {
       return {
         title: item.title,
-        typeId: item.typeId,
+        // 处理没有题型的大题,统一作为阅读题
+        typeId: (item.typeId === null || item.typeId === undefined) ? EnumQuestionType.OTHER : item.typeId,
         id: item.id,
         answers: item.answers || [],
         subQuestions: item.subQuestions?.map(parseQuestion) || [],
-        options: item.options.map((option, index) => {
+        options: item.options?.map((option, index) => {
           return {
             name: option,
             no: orders[index],
             id: index,
             isAnswer: false
           } as Study.QuestionOption
-        }),
+        }) || [],
         isDone: false,
         isMark: item.isMark,
         isNotKnow: item.isNotKnow,
@@ -224,7 +229,6 @@ export const useExam = () => {
     const arr: Study.Question[] = list.map(item => {
       return parseQuestion(item);
     });
-    console.log(222, arr)
     questionList.value = arr;
   }
   const reset = () => {
@@ -244,6 +248,7 @@ export const useExam = () => {
   }
   return {
     questionList,
+    groupedQuestionList,
     stateQuestionList,
     favoriteList,
     notKnowList,
@@ -255,7 +260,6 @@ export const useExam = () => {
     notDoneCount,
     notKnowCount,
     markCount,
-    loadExamData,
     questionTypeDesc,
     nextQuestion,
     prevQuestion,

+ 4 - 2
src/pagesOther/pages/topic-center/topic-collection/components/question-collection-list.vue

@@ -1,6 +1,6 @@
 <template>
     <z-paging ref="paging" v-model="list" @query="handleQuery">
-        <question-preview-list :list="list" hidden-delete/>
+        <question-preview-list :list="list" hidden-delete @change="handleChange"/>
     </z-paging>
 </template>
 
@@ -17,7 +17,9 @@ const props = defineProps({
 
 const list = ref([])
 const paging = ref(null)
-
+const handleChange = (collect) => {
+  paging.value.reload()
+}
 const handleQuery = function (pageNum, pageSize) {
     const params = {pageNum, pageSize, type: 'question', subjectId: props.subjectId}
     favQuestions(params)

+ 6 - 1
src/pagesOther/pages/topic-center/topic-collection/components/question-preview-list-item.vue

@@ -3,7 +3,7 @@
         <mx-question-content :question="item" readonly class="p-40"/>
         <uv-line/>
         <view class="grid grid-cols-3 py-20">
-            <mx-question-collect :question="item" class="!items-start"/>
+            <mx-question-collect :question="item" class="!items-start" @change="handleChange"/>
             <mx-question-correct :question="item" class="!items-center"/>
             <mx-tag-button :text="expand?'隐藏解析':'查看解析'" :icon="expand?'eye-off-outline':'eye'"
                            class="!items-end" @click="expand=!expand"/>
@@ -27,6 +27,11 @@ const props = defineProps({
     item: createPropDefine({}, Object)
 })
 const expand = ref(false)
+
+const emits = defineEmits(['change'])
+const handleChange = (collect) => {
+    emits('change', collect)
+}
 </script>
 
 <style scoped>

+ 5 - 1
src/pagesOther/pages/topic-center/topic-collection/components/question-preview-list.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="p-20 fx-col gap-20">
-        <question-preview-list-item v-for="q in list" :item="q"/>
+        <question-preview-list-item v-for="q in list" :item="q" @change="handleChange"/>
     </view>
 </template>
 
@@ -12,6 +12,10 @@ import {createPropDefine} from "@/utils";
 const props = defineProps({
     list: createPropDefine([], Array)
 })
+const emits = defineEmits(['change'])
+const handleChange = (collect) => {
+    emits('change', collect)
+}
 </script>
 
 <style scoped>

+ 3 - 8
src/pagesStudy/pages/index/compoentns/index-exam-record.vue

@@ -7,15 +7,10 @@
       <ie-image src="/pagesStudy/static/image/icon-ear-right.png" customClass="w-20 h-26 ml-26 mr-30" />
       <view class="h-0 w-160 border-0 border-b border-dashed border-border"></view>
     </view>
-    <view class="rounded-15 mb-20 bg-white px-20 py-38">
+    <view class="py-50 text-center text-24 text-fore-subcontent bg-white rounded-4">暂无数据</view>
+    <!-- <view class="rounded-15 mb-20 bg-white px-20 py-38">
       <exam-record-item />
-    </view>
-    <view class="rounded-15 mb-20 bg-white px-20 py-38">
-      <exam-record-item />
-    </view>
-    <view class="rounded-15 mb-20 bg-white px-20 py-38">
-      <exam-record-item />
-    </view>
+    </view> -->
   </view>
 </template>
 <script lang="ts" setup>

+ 82 - 24
src/pagesStudy/pages/start-exam/components/question-item.vue

@@ -1,12 +1,13 @@
 <template>
-  <scroll-view scroll-y class="question-item">
-    <view class="h-20"></view>
-    <view class="question-type">{{ questionTypeDesc[question.typeId as EnumQuestionType] }}</view>
-    <view class="question-content">
-      <uv-parse :content="question.title"></uv-parse>
-    </view>
-    <view class="question-options">
-      <view v-if="question.subQuestions.length === 0">
+  <view class="question-item">
+    <view class="is-main-question">
+      <view v-if="question.typeId && !isSubQuestion" class="question-type">
+        {{ questionTypeDesc[question.typeId as EnumQuestionType] }}
+      </view>
+      <view class="question-content" :class="{ 'mt-30': isSubQuestion }">
+        <uv-parse :content="getQuestionTitle"></uv-parse>
+      </view>
+      <view class="question-options">
         <view class="question-option" v-for="option in question.options"
           :class="{ 'question-option-selected': isSelected(option) }" :key="option.id" @click="handleSelect(option)">
           <view class="question-option-index">{{ option.no }}</view>
@@ -14,20 +15,21 @@
             <uv-parse :content="option.name"></uv-parse>
           </view>
         </view>
-        <view class="question-option" :class="{ 'question-option-not-know': question.isNotKnow }"
-          @click="handleNotKnow">
+        <view v-if="question.options.length" class="question-option"
+          :class="{ 'question-option-not-know': question.isNotKnow }" @click="handleNotKnow">
           <view class="question-option-index">
             <uv-icon name="info-circle" :color="question.isNotKnow ? '#31A0FC' : '#999'" size="18" />
           </view>
           <view class="question-option-content text-fore-light">不会</view>
         </view>
       </view>
-      <view v-else class="">
-        <question-item :question="subQuestion" v-for="subQuestion in question.subQuestions" :key="subQuestion.id" />
-      </view>
     </view>
-    <view class="h-20"></view>
-  </scroll-view>
+    <view v-if="question.subQuestions.length" class="is-sub-question">
+      <question-item :question="subQuestion" v-for="subQuestion in question.subQuestions" :key="subQuestion.id"
+        :is-sub-question="true" @update:question="emit('update:question', $event)" @select="handleSelectOption"
+        @notKnow="handleSelectNotKnow" />
+    </view>
+  </view>
 </template>
 
 <script lang="ts" setup>
@@ -38,6 +40,7 @@ import { NEXT_QUESTION, PREV_QUESTION, NEXT_QUESTION_QUICKLY, PREV_QUESTION_QUIC
 const { questionTypeDesc } = useExam();
 const props = defineProps<{
   question: Study.Question;
+  isSubQuestion?: boolean;
 }>();
 const nextQuestion = inject(NEXT_QUESTION);
 const prevQuestion = inject(PREV_QUESTION);
@@ -45,15 +48,28 @@ const nextQuestionQuickly = inject(NEXT_QUESTION_QUICKLY);
 const prevQuestionQuickly = inject(PREV_QUESTION_QUICKLY);
 const emit = defineEmits<{
   (e: 'update:question', question: Study.Question): void;
+  (e: 'select', question: Study.Question): void;
+  (e: 'notKnow', question: Study.Question): void;
 }>();
+const getQuestionTitle = computed(() => {
+  if (props.isSubQuestion) {
+    return `[${questionTypeDesc[props.question.typeId as EnumQuestionType]}] ${props.question.title}`;
+  }
+  return props.question.title;
+});
+
 const handleNotKnow = () => {
   // console.log('handleNotKnow')
+  props.question.answers = [];
   props.question.isNotKnow = !props.question.isNotKnow;
+  checkIsDone();
   emit('update:question', props.question);
-  nextQuestion?.();
+  // emit('notKnow', props.question);
+  // nextQuestion?.();
+  handleSelectNotKnow();
 }
 const handleSelect = (option: Study.QuestionOption) => {
-  // console.log('handleSelect', option)
+  // console.log('handleSelect', isDone.value)
   if ([
     EnumQuestionType.JUDGMENT,
     EnumQuestionType.SINGLE_CHOICE,
@@ -63,8 +79,8 @@ const handleSelect = (option: Study.QuestionOption) => {
     EnumQuestionType.ANALYSIS
   ].includes(props.question.typeId)) {
     props.question.answers = [option.no];
-    // props.question.answers.push(option.no);
-    nextQuestion?.();
+    // nextQuestion?.();
+
   } else if (props.question.typeId === EnumQuestionType.MULTIPLE_CHOICE) {
     if (props.question.answers.includes(option.no)) {
       props.question.answers = props.question.answers.filter(item => item !== option.no);
@@ -72,9 +88,34 @@ const handleSelect = (option: Study.QuestionOption) => {
       props.question.answers.push(option.no);
     }
   }
+  props.question.isNotKnow = false;
+  checkIsDone();
   emit('update:question', props.question);
+
   // props.question.answer = option.no;
+  if (props.isSubQuestion) {
+    emit('select', props.question);
+  } else {
+    handleSelectOption();
+  }
+}
+const checkIsDone = () => {
+  if (props.question.subQuestions.length > 0) {
+    props.question.isDone = props.question.subQuestions.every(q => q.answers.length > 0 || q.isNotKnow);
+  }
+  props.question.isDone = props.question.answers.length > 0 || props.question.isNotKnow;
+}
+const handleSelectOption = () => {
+  if (props.question.isDone) {
+    nextQuestion?.();
+  }
 }
+const handleSelectNotKnow = () => {
+  if (props.question.isDone) {
+    nextQuestion?.();
+  }
+}
+
 const isSelected = (option: Study.QuestionOption) => {
   const { typeId, answers } = props.question;
   if ([
@@ -94,19 +135,36 @@ const isSelected = (option: Study.QuestionOption) => {
 </script>
 
 <style lang="scss" scoped>
-.question-item {
-  @apply h-full box-border;
+.is-sub-question {
+  @apply px-0;
+
+  .question-options {
+    @apply mt-0;
+  }
+}
+
+.is-main-question {
+  @apply px-40;
+
+  >.question-options {
+    @apply mt-40;
+  }
+}
 
+.question-item {
   .question-type {
-    @apply px-40 my-20 text-32 text-fore-subtitle font-bold;
+    @apply my-20 text-32 text-fore-subtitle font-bold;
+  }
+
+  .sub-question-type {
+    @apply text-28 text-fore-light font-bold;
   }
 
   .question-content {
-    @apply px-40 mt-20 text-32 text-fore-title;
+    @apply text-32 text-fore-title;
   }
 
   .question-options {
-    @apply mt-40 px-40;
 
     .question-option {
       @apply flex items-center px-30 py-30 bg-back rounded-10;

+ 25 - 0
src/pagesStudy/pages/start-exam/components/question-wrap.vue

@@ -0,0 +1,25 @@
+<template>
+  <scroll-view scroll-y class="question-wrap">
+    <view class="h-20"></view>
+    <question-item :question="question" @update:question="emit('update:question', $event)" />
+    <view class="h-20"></view>
+  </scroll-view>
+</template>
+
+<script lang="ts" setup>
+import { Study } from '@/types';
+import QuestionItem from './question-item.vue';
+const props = defineProps<{
+  question: Study.Question;
+}>();
+const emit = defineEmits<{
+  (e: 'update:question', question: Study.Question): void;
+}>();
+
+</script>
+
+<style lang="scss" scoped>
+.question-wrap {
+  @apply h-full box-border;
+}
+</style>

+ 0 - 9
src/pagesStudy/pages/start-exam/components/sub-question-item.vue

@@ -1,9 +0,0 @@
-<template>
-
-</template>
-
-<script lang="ts" setup>
-
-</script>
-
-<style lang="scss" scoped></style>

+ 14 - 7
src/pagesStudy/pages/start-exam/start-exam.vue

@@ -21,7 +21,7 @@
           @change="handleSwiperChange" @transition="handleSwiperTransition"
           @animationfinish="handleSwiperAnimationFinish">
           <swiper-item class="h-full" v-for="(item, index) in questionList" :key="index">
-            <question-item :question="item" @update:question="handleUpdateQuestion" />
+            <question-wrap :question="item" @update:question="handleUpdateQuestion" />
           </swiper-item>
         </swiper>
       </view>
@@ -54,7 +54,7 @@
     <view class="popup-content">
       <view class="flex-1 min-h-1">
         <scroll-view class="h-full" scroll-y>
-          <view v-for="(item, i) in stateQuestionList" :key="i" class="">
+          <view v-for="(item, i) in groupedQuestionList" :key="i" class="">
             <template v-if="item.list.length > 0">
               <view class="h-70 bg-back px-20 leading-70 text-fore-subcontent">{{ questionTypeDesc[item.type] }}</view>
               <view class="grid grid-cols-5 place-items-center gap-x-20 gap-y-20 p-30">
@@ -92,18 +92,18 @@
 
 <script lang="ts" setup>
 import QuestionItem from './components/question-item.vue';
+import QuestionWrap from './components/question-wrap.vue';
 import QuestionStatsPopup from './components/question-stats-popup.vue';
 import { useTransferPage } from '@/hooks/useTransferPage';
 import { EnumExamMode } from '@/common/enum';
-import { getOpenExaminee, getPaper, commitExamineePaper, collectQuestion } from '@/api/modules/study';
+import { getOpenExaminee, getPaper, commitExamineePaper, collectQuestion, cancelCollectQuestion } from '@/api/modules/study';
 import { useExam } from '@/composables/useExam';
 import { Study } from '@/types';
 import { NEXT_QUESTION, PREV_QUESTION, NEXT_QUESTION_QUICKLY, PREV_QUESTION_QUICKLY } from '@/types/injectionSymbols';
 // import { Examinee, ExamPaper, ExamPaperSubmit } from '@/types/study';
 const { prevData, transferBack } = useTransferPage();
-const { setQuestionList, questionList, stateQuestionList, questionTypeDesc, favoriteList, notKnowList, markList, currentIndex,
-  totalCount, doneCount, notDoneCount, notKnowCount, markCount, isAllDone,
-  loadExamData, nextQuestion, prevQuestion, nextQuestionQuickly, prevQuestionQuickly, swiperDuration,
+const { setQuestionList, questionList, groupedQuestionList, stateQuestionList, questionTypeDesc, favoriteList, notKnowList, markList, currentIndex,
+  totalCount, doneCount, notDoneCount, notKnowCount, markCount, isAllDone, nextQuestion, prevQuestion, nextQuestionQuickly, prevQuestionQuickly, swiperDuration,
   formatPracticeDuration, formatExamDuration, practiceDuration, startPracticeDuration, stopPracticeDuration,
   examDuration, startExamDuration, stopExamDuration, setExamDuration, setCountDownCallback, changeIndex, reset } = useExam();
 
@@ -165,7 +165,14 @@ const hanadleNavigate = (index: number) => {
 const handleFavorite = async () => {
   if (!currentQuestion.value.isFavorite) {
     await collectQuestion(currentQuestion.value.id);
+    currentQuestion.value.isFavorite = true;
+    uni.$ie.showToast('收藏成功');
+  } else {
+    await cancelCollectQuestion(currentQuestion.value.id);
+    currentQuestion.value.isFavorite = false;
+    uni.$ie.showToast('取消收藏成功');
   }
+  
   // currentQuestion.value.isFavorite = !currentQuestion.value.isFavorite;
 };
 const handleMark = () => {
@@ -377,6 +384,6 @@ onLoad(() => {
 }
 
 .is-not-know {
-  @apply border-[#F2F2F2] bg-[#F2F2F2];
+  @apply text-fore-title border-[#F2F2F2] bg-[#F2F2F2];
 }
 </style>

+ 21 - 11
src/pagesStudy/pages/study-plan/components/page-calendar.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="mt-24 bg-white relative z-4">
-    <uni-calendar :insert="true" :lunar="false" :readonly="true" :showMonth="false" :selected="selected"
-      :endDate="endDate" @change-month="changeMonth" />
+    <uni-calendar :insert="true" :lunar="false" :readonly="false" :showMonth="false" :selected="selected"
+      :endDate="endDate" @change-month="changeMonth" @change="handleChangeDate" />
     <view class="wrap mt-20 w-fit mx-auto px-98 py-16 flex items-center justify-center">
       <ie-image src="/pagesStudy/static/image/icon-calendar.png" custom-class="w-22 h-22" />
       <text class="ml-4 text-20 text-primary">{{ tip }}</text>
@@ -20,15 +20,25 @@
 </template>
 <script lang="ts" setup>
 import { STUDY_PLAN_STATS, STUDY_PLAN } from '@/types/injectionSymbols';
+import { Study } from '@/types';
 const studyPlanRef = inject(STUDY_PLAN);
 const studyPlanStatsRef = inject(STUDY_PLAN_STATS);
 
+let selectDate = ref(uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd'));
 const stat = computed(() => {
   const studyPlan = studyPlanRef?.value;
-  const todayData = studyPlanStatsRef?.value?.today;
+  let todayData = {} as Study.StudyStats;
   const questionCnt = studyPlan?.questionCnt;
   const videoTime = studyPlan?.videoTime;
-  
+  if (studyPlanStatsRef?.value?.studyList?.length) {
+    const index = studyPlanStatsRef?.value?.studyList.findIndex(item => item.date === selectDate.value);
+    if (index !== -1) {
+      todayData = studyPlanStatsRef?.value?.studyList[index].data;
+    } else {
+      todayData = {} as Study.StudyStats;
+    }
+  }
+
   return [
     {
       name: '答题数',
@@ -63,7 +73,7 @@ const todayPlanFinish = computed(() => {
   const todayData = studyPlanStatsRef?.value?.today;
   const questionCnt = studyPlan?.questionCnt;
   const videoTime = studyPlan?.videoTime;
-  
+
   if (
     getValue(todayData?.questionCnt) >= getValue(questionCnt) &&
     getValue(todayData?.videoTime) >= getValue(videoTime)) {
@@ -83,13 +93,13 @@ const getValue = (val?: number) => {
 const init = () => {
   endDate.value = uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd')
 }
-
+const emit = defineEmits(['changeMonth', 'changeDate']);
 const changeMonth = (e: any) => {
-  console.log(e);
-  uni.$ie.showLoading();
-  setTimeout(() => {
-    uni.$ie.hideLoading();
-  }, 1000);
+  emit('changeMonth', e);
+}
+
+const handleChangeDate = (e: any) => {
+  selectDate.value = e.fulldate;
 }
 
 init();

+ 21 - 6
src/pagesStudy/pages/study-plan/study-plan.vue

@@ -2,7 +2,7 @@
   <ie-page>
     <ie-navbar title="学习计划" transparent bg-color="#FFFFFF" title-color="black" :keep-title-color="true" />
     <page-header />
-    <page-calendar />
+    <page-calendar :select-date="selectDate" @changeMonth="handleChangeMonth" @changeDate="handleChangeDate" />
     <ie-safe-toolbar :height="84" :shadow="false">
       <view class="px-46 pt-24">
         <ie-button type="primary" @click="handleEditPlan">修改学习计划</ie-button>
@@ -20,7 +20,7 @@ import { StudyPlan, StudyPlanStats } from '@/types/study';
 import { STUDY_PLAN, STUDY_PLAN_STATS } from '@/types/injectionSymbols';
 
 const { prevData, transferTo } = useTransferPage();
-const today = uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd');
+let selectDate = ref(uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd'));
 const studyPlan = ref<StudyPlan>({} as StudyPlan);
 const studyPlanStats = ref<StudyPlanStats>({} as StudyPlanStats);
 provide(STUDY_PLAN, studyPlan);
@@ -33,14 +33,29 @@ const handleEditPlan = () => {
     }
   });
 }
-const loadData = async () => {
-  const res = await getStudyPlan();
-  studyPlan.value = res.data;
+const handleChangeMonth = async (e: any) => {
+  console.log(e);
+  uni.$ie.showLoading();
+  selectDate.value = e.date.slice(0, 7) + '-01';
+  await loadStatsData();
+  uni.$ie.hideLoading();
+}
+const handleChangeDate = (e: any) => {
+  selectDate.value = e.fullDate;
+}
+const loadStatsData = async () => {
   const { data } = await getStudyPlanStats({
-    reportMonth: today
+    reportMonth: selectDate.value
   });
   studyPlanStats.value = data;
 }
+const loadData = async () => {
+  uni.$ie.showLoading();
+  const res = await getStudyPlan();
+  studyPlan.value = res.data;
+  await loadStatsData();
+  uni.$ie.hideLoading();
+}
 onShow(() => {
   loadData();
 });

+ 10 - 0
src/pagesSystem/pages/edit-profile/edit-profile.vue

@@ -78,6 +78,16 @@
           </block>
         </content-card>
 
+        <content-card v-if="form.examType === 'OHS' || form.examType === 'SVS'" title="职业技能成绩">
+          <uv-form-item label="职业技能" prop="name">
+            <uv-input v-model="scores.chinese" border="none" placeholder="请输入" placeholderClass="text-30"
+              font-size="30rpx" :custom-style="customStyle">
+            </uv-input>
+            <ie-image v-if="form.examType === 'OHS'" slot="right" src="/pagesSystem/static/image/icon/icon-lock.png"
+              custom-class="w-24 h-30" mode="aspectFill" />
+          </uv-form-item>
+        </content-card>
+
         <content-card v-if="userStore.isLogin" title="学校信息">
           <uv-form-item label="学校名称" prop="form.name" borderBottom>
             <uv-input v-model="form.schoolName" border="none" placeholder="" placeholderClass="text-30"

+ 1 - 0
src/types/study.ts

@@ -204,6 +204,7 @@ export interface GetExamPaperRequestDTO {
 
 export interface DirectedSchool extends SelectedUniversityMajor {
   code: string;
+  notice: string;
 }
 
 export interface University {

+ 3 - 0
src/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue

@@ -442,6 +442,9 @@ export default {
      * 回到今天
      */
     backToday() {
+      if (this.calendar.fullDate === this.cale.date.fullDate && this.cale.selectDate.fullDate === this.cale.date.fullDate) {
+        return;
+      }
       const nowYearMonth = `${this.nowDate.year}-${this.nowDate.month}`
       const date = this.cale.getDate(new Date())
       const todayYearMonth = `${date.year}-${date.month}`