|
@@ -46,10 +46,11 @@ export default defineComponent({
|
|
|
//
|
|
|
}
|
|
|
const list = this.subjectList.map((n: any) => n.subjects).flat().sort((a,b) => a.id - b.id)
|
|
|
- const userSubjectId = this.params.lessonSubject
|
|
|
+ const userSubjectId = state.user.data?.subjectId.split(',').map(n => parseInt(n)) || [this.params.lessonSubject]
|
|
|
let isRest = true
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
- if (list[i].id == userSubjectId) {
|
|
|
+ if (userSubjectId.includes(list[i].id)) {
|
|
|
+ this.params.lessonSubject = list[i].id
|
|
|
this.params.subjectName = list[i].name
|
|
|
isRest = false
|
|
|
break;
|