lex 9 meses atrás
pai
commit
02e7c48620
1 arquivos alterados com 12 adições e 0 exclusões
  1. 12 0
      src/views/choose-homework/music-list/index.tsx

+ 12 - 0
src/views/choose-homework/music-list/index.tsx

@@ -168,6 +168,18 @@ export default defineComponent({
               text: item.name
             }))
         ];
+
+        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);
+          }
+        });
       } catch (error) {
         //
       }