|
@@ -169,17 +169,19 @@ export default defineComponent({
|
|
|
}))
|
|
|
];
|
|
|
|
|
|
- const studentSubjectIds =
|
|
|
- baseState.platformType === 'TEACHER'
|
|
|
- ? baseState.user.data.subjectId
|
|
|
- : baseState.user.data.student.subjectIdList;
|
|
|
- const id = studentSubjectIds ? studentSubjectIds.split(',')[0] : 0;
|
|
|
+ if (!appState.subjectId) {
|
|
|
+ const studentSubjectIds =
|
|
|
+ baseState.platformType === 'TEACHER'
|
|
|
+ ? baseState.user.data.subjectId
|
|
|
+ : baseState.user.data.student.subjectIdList;
|
|
|
+ const id = studentSubjectIds ? studentSubjectIds.split(',')[0] : 0;
|
|
|
|
|
|
- appState.subjectOptions.forEach((subject: any) => {
|
|
|
- if (Number(id) === subject.value) {
|
|
|
- appState.subjectId = Number(id);
|
|
|
- }
|
|
|
- });
|
|
|
+ appState.subjectOptions.forEach((subject: any) => {
|
|
|
+ if (Number(id) === subject.value) {
|
|
|
+ appState.subjectId = Number(id);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
//
|
|
|
}
|