From 622a71253f97bf3baee788e25d0aceea30279f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Fri, 20 Dec 2024 15:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E8=AE=A1=EF=BC=9A?= =?UTF-8?q?=E7=A7=91=E5=AD=A6=E5=AE=9E=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/hooks/useClassTask.js | 2 + src/renderer/src/store/modules/classTask.js | 5 + .../components/experimentList.vue | 6 +- .../components/selectClass.vue | 114 +++++++++++------- .../experimentQuestion/index.vue | 38 +++--- 5 files changed, 94 insertions(+), 71 deletions(-) diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index 7e58c45..72fe882 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -117,6 +117,8 @@ export const editListItem = (row, courseObj) => { classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); // // console.log('科学实验', classtaskObj); + // 更新默认的科学实验( 学段 学科 以及实验科目) + console.log('科学实验', classtaskObj); return resolve(classtaskObj); } } diff --git a/src/renderer/src/store/modules/classTask.js b/src/renderer/src/store/modules/classTask.js index 05a9491..e93be20 100644 --- a/src/renderer/src/store/modules/classTask.js +++ b/src/renderer/src/store/modules/classTask.js @@ -5,6 +5,11 @@ import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuesti const useClassTaskStore = defineStore('classTask',{ state: () => ({ + experimentObj:{ + edustage: '小学', // 教育阶段 + edusubject: '', // 学科 + experimentList: [], // 实验科目列表 + }, isOpenQuestUploadView: false, // 是否打开习题上传的页面 classListIds: [], entpCourseWorkTypeList: [ diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue index 8c0505f..9755859 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/experimentList.vue @@ -8,7 +8,7 @@ @change="onSelectOption" > { const onSelectOption = (option) => { console.log(option,'选择的实验课-------') - emit('selectItem', props.list.filter(item => item.label === option)[0]) + emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0]) } diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue index 87ce096..e539610 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue @@ -3,7 +3,7 @@
- {{ userStore.edustage }} + {{ useClassTaskStore().experimentObj.edustage }} @@ -20,14 +20,14 @@
- {{ userStore.edusubject }} + {{ useClassTaskStore().experimentObj.edusubject }}