|
@@ -72,6 +72,7 @@ export default defineComponent({
|
|
|
tagsNames: [] as Array<{ [id in string]: string }>,
|
|
|
formated: {} as FormatXMLInfo,
|
|
|
tagVisibility: false,
|
|
|
+ subjectListres: [] as any[],
|
|
|
subjectListNames: {} as any,
|
|
|
selectedSubjectList: null as any,
|
|
|
vlewSubjectList: null as any,
|
|
@@ -107,7 +108,7 @@ export default defineComponent({
|
|
|
},
|
|
|
subjectList() {
|
|
|
// 学科列表
|
|
|
- return teacherState.subjectList || []
|
|
|
+ return this.subjectListres || []
|
|
|
},
|
|
|
choiceSubject() {
|
|
|
// 选择的科目
|
|
@@ -133,8 +134,13 @@ export default defineComponent({
|
|
|
.then(res => (this.music_sheet_service_fee = res.data.paramValue))
|
|
|
// if (teacherState.subjectList.length <= 0) {
|
|
|
await request.get('/api-teacher/subject/subjectSelect').then(res => {
|
|
|
- teacherState.subjectList = res.data || []
|
|
|
- this.subjectListNames = this.getSubjectListNames(teacherState.subjectList)
|
|
|
+ const list: any[] = []
|
|
|
+ for (const item of res.data || []) {
|
|
|
+ const slist: any[] = (item as any).subjects || []
|
|
|
+ list.push(...slist)
|
|
|
+ }
|
|
|
+ this.subjectListres = list
|
|
|
+ this.subjectListNames = this.getSubjectListNames(list)
|
|
|
})
|
|
|
|
|
|
if (this.$route.params.id) {
|