From 4b935b9110dbd41029ae2660ba4d4f8ba9b1965f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Wed, 25 Dec 2024 17:30:42 +0800 Subject: [PATCH] 1 --- src/renderer/src/hooks/useClassTask.js | 1 + .../experimentQuestion/components/selectClass.vue | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index 3668ef6..50d8cf4 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -121,6 +121,7 @@ export const editListItem = (row, courseObj) => { const eduInfo = row.worktag.split('-'); useClassTaskStores.experimentObj.edustage = eduInfo[0]; useClassTaskStores.experimentObj.edusubject = eduInfo[1]; + useClassTaskStores.experimentObj.updateEduInfo = row.worktag; } // 更新科学实验内容 classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); 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 635643d..a504518 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/experimentQuestion/components/selectClass.vue @@ -125,8 +125,8 @@ const handleUserEduStage = (item) => { const newSubjectList = subjectList.value.filter(item => item.edustage === '小学'); for(let i in newSubjectList){ const name = newSubjectList[i].itemtitle - if(isExpList(name)){ - useClassTaskStore().experimentObj.edusubject = name; + if(isExpList(name) && useClassTaskStore().experimentObj.edusubject===name){ + //useClassTaskStore().experimentObj.edusubject = name; // 更改学科默认与学科下的实验科目 handleUserEduSubject(name) break; @@ -138,8 +138,8 @@ const handleUserEduStage = (item) => { const newSubjectList = subjectList.value.filter(item => item.edustage === '初中'); for(let i in newSubjectList){ const name = newSubjectList[i].itemtitle - if(isExpList(name)){ - useClassTaskStore().experimentObj.edusubject = name; + if(isExpList(name) && useClassTaskStore().experimentObj.edusubject===name){ + //useClassTaskStore().experimentObj.edusubject = name; // 更改学科默认与学科下的实验科目 handleUserEduSubject(name) break; @@ -151,8 +151,8 @@ const handleUserEduStage = (item) => { const newSubjectList = subjectList.value.filter(item => item.edustage === '高中'); for(let i in newSubjectList){ const name = newSubjectList[i].itemtitle - if(isExpList(name)){ - useClassTaskStore().experimentObj.edusubject = name; + if(isExpList(name) && useClassTaskStore().experimentObj.edusubject===name){ + //useClassTaskStore().experimentObj.edusubject = name; // 更改学科默认与学科下的实验科目 handleUserEduSubject(name) break;