Bladeren bron

更新显示与bug

lex 1 jaar geleden
bovenliggende
commit
bb07137817

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

@@ -736,6 +736,7 @@ export default defineComponent({
                 item={item}
                 isActive={popupData.activeIndex === index}
                 isCollect={false}
+                isShowCollect={false}
                 onClick={(item: any) => {
                   popupData.open = false;
                   toggleMaterial(item.id);

+ 4 - 4
src/views/prepare-lessons/api.ts

@@ -125,10 +125,10 @@ export const courseScheduleStart = (params: any) => {
 };
 
 /**
- * 备课 - 查询标签树列表
+ * 备课 - 音乐教材版本
  */
-export const musicTagTree = (params?: any) => {
-  return request.get('/edu-app/musicTag/tree', {
-    params: params
+export const bookVersionPage = (params?: any) => {
+  return request.post('/edu-app/bookVersion/page', {
+    data: params
   });
 };

+ 7 - 4
src/views/prepare-lessons/components/directory-main/select-lessonware/index.tsx

@@ -18,7 +18,7 @@ import AddTeaching, {
 import {
   lessonCoursewarePage,
   lessonCoursewareRemove,
-  musicTagTree
+  bookVersionPage
 } from '../../../api';
 import iconUploadBg from '../images/icon-upload-bg.svg';
 import { useCatchStore } from '/src/store/modules/catchData';
@@ -92,9 +92,12 @@ export default defineComponent({
     onMounted(async () => {
       // 获取教材分类列表
       try {
-        const { data } = await musicTagTree({});
-        console.log(data);
-        const temp = data || [];
+        const { data } = await bookVersionPage({
+          page: 1,
+          rows: 99,
+          type: 'COURSEWARE'
+        });
+        const temp = data.rows || [];
         temp.forEach((item: any) => {
           forms.musicTagList.push({
             id: item.id,

+ 2 - 1
src/views/prepare-lessons/components/lesson-main/courseware/index.tsx

@@ -153,7 +153,8 @@ export default defineComponent({
       await catchStore.getSubjects();
 
       const subjectList = catchStore.getSubjectList;
-      if (subjectList.length > 0) {
+      // 并且没有声部时才会更新
+      if (subjectList.length > 0 && !prepareStore.getSubjectId) {
         prepareStore.setSubjectId(subjectList[0].id);
       }
 

+ 1 - 1
src/views/prepare-lessons/components/lesson-main/train/index.tsx

@@ -146,7 +146,7 @@ export default defineComponent({
       await catchStore.getSubjects();
 
       const subjectList = catchStore.getSubjectList;
-      if (subjectList.length > 0) {
+      if (subjectList.length > 0 && !prepareStore.getSubjectId) {
         prepareStore.setSubjectId(subjectList[0].id);
       }
 

+ 3 - 2
src/views/prepare-lessons/components/resource-main/components/select-music/index.tsx

@@ -25,7 +25,7 @@ export default defineComponent({
         musicSheetCategoriesId: '',
         status: 1,
         versionFlag: false,
-        subjectId: null
+        musicSubject: null
       },
       tableList: [] as any,
       editStatus: false,
@@ -40,7 +40,7 @@ export default defineComponent({
         const { data } = await musicSheetPage({
           ...state.searchGroup,
           ...state.pagination,
-          subjectId: prepareStore.getSubjectId
+          musicSubject: prepareStore.getSubjectId
         });
         state.loading = false;
         const tempRows = data.rows || [];
@@ -149,6 +149,7 @@ export default defineComponent({
                   {state.tableList.map((item: any) => (
                     <CardType
                       isShowAdd
+                      isShowCollect={false}
                       item={item}
                       onAdd={(child: any) => onAdd(child)}
                     />

+ 1 - 0
src/views/prepare-lessons/model/select-music/index.tsx

@@ -114,6 +114,7 @@ export default defineComponent({
                       {state.tableList.map((item: any) => (
                         <CardType
                           isShowAdd
+                          isShowCollect={false}
                           item={item}
                           onAdd={() => emit('add', item)}
                         />