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 }}