lex 1 year ago
parent
commit
591ea4e775

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1709714910065}
+{"version":1709716750033}

+ 1 - 0
src/views/attend-class/index.tsx

@@ -1123,6 +1123,7 @@ export default defineComponent({
       },
       {
         name: '曲目资源',
+        name2: '曲目资源',
         icon: rightIconMusic,
         id: 9
       },

+ 8 - 8
src/views/prepare-lessons/model/select-resources/select-item/index.tsx

@@ -59,7 +59,7 @@ export default defineComponent({
         type: 'MUSIC', //
         name: '',
         bookVersionId: null,
-        subjectId: prepareStore.getSubjectId,
+        subjectId: null,
         sourceType: formatType(type.value),
         musicalInstrumentId: null as any,
         enableFlag: true
@@ -175,13 +175,13 @@ export default defineComponent({
     onMounted(async () => {
       // 获取声部
       await catchStore.getSubjects();
-      catchStore.getSubjectInstruments.forEach((item: any) => {
-        if (item.id == prepareStore.getSubjectId) {
-          if (item.instruments && item.instruments.length > 0) {
-            state.searchGroup.musicalInstrumentId = item.instruments[0].value;
-          }
-        }
-      });
+      // catchStore.getSubjectInstruments.forEach((item: any) => {
+      //   if (item.id == prepareStore.getSubjectId) {
+      //     if (item.instruments && item.instruments.length > 0) {
+      //       state.searchGroup.musicalInstrumentId = item.instruments[0].value;
+      //     }
+      //   }
+      // });
 
       getList();
 

+ 14 - 9
src/views/prepare-lessons/model/select-resources/select-item/resource-search-group/index.tsx

@@ -133,15 +133,20 @@ export default defineComponent({
       // 获取声部
       await catchStore.getSubjects();
 
-      catchStore.getSubjectInstruments.forEach((item: any) => {
-        if (item.id == props.subjectId) {
-          if (item.instruments.length > 0) {
-            forms.subjectId = item.instruments[0].value;
-          } else {
-            forms.subjectId = item.value;
-          }
-        }
-      });
+      console.log(
+        catchStore.getSubjectInstruments,
+        'catchStore.getSubjectInstruments'
+      );
+      // catchStore.getSubjectInstruments.forEach((item: any) => {
+      //   if (item.id == props.subjectId && Array.isArray(item.instruments)) {
+      //     if (item.instruments.length > 0) {
+      //       forms.subjectId = item.instruments[0].value;
+      //     } else {
+      //       forms.subjectId = item.value;
+      //     }
+      //   }
+      // });
+      forms.subjectId = null;
 
       // 这里开始
       // musicCateRef