科学实验:学科写死

This commit is contained in:
白了个白 2024-12-20 16:37:08 +08:00
parent 1488d7cc03
commit f7a3aa6e53
1 changed files with 20 additions and 7 deletions

View File

@ -61,12 +61,25 @@ const checkList = ref([])// 当前年级对应学科的课程,
// //
const getSubject = () => { const getSubject = () => {
// //
if(!userStore.subject) return // if(!userStore.subject) return
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => { // listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
const arr = userStore.subject.split(',') // const arr = userStore.subject.split(',')
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items) // subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
console.log(subjectList,'subjectList'); // console.log(subjectList,'subjectList');
// })
// list
const edustageList = ['小学','初中','高中'];
const subList = ['数学','物理','化学','生物','科学'];
edustageList.forEach((item) => {
subList.forEach((subItems) => {
subjectList.value.push({
edustage: item,
edusubject: subItems,
itemtitle: subItems
}) })
})
})
console.log(subjectList,'subjectList');
// //
handleUserEduStage(useClassTaskStore().experimentObj.edustage) handleUserEduStage(useClassTaskStore().experimentObj.edustage)
} }