Browse Source

更新 字段

黄琪勇 5 months ago
parent
commit
d52ca86864

+ 1 - 1
src/page-instrument/component/the-music-list/filterList.tsx

@@ -42,7 +42,7 @@ export default defineComponent({
         function handleConfirm() {
             emit("handleConfirm",{
                 audioPlayTypes:  queryObj.audioPlayTypes,
-                musicTutorialIds: queryObj.grade ? queryObj.grade : queryObj.course,
+                bookVersionId: queryObj.grade ? queryObj.grade : queryObj.course,
                 musicTagIds: queryObj.sheetTag,
                 musicalInstrumentId: queryObj.subject.id
             })

+ 2 - 0
src/page-instrument/component/the-music-list/index.module.less

@@ -309,6 +309,7 @@
             white-space: nowrap;
             overflow: hidden;
             text-overflow: ellipsis;
+            line-height: 1;
         }
         .detail{
             display: flex;
@@ -343,6 +344,7 @@
                 white-space: nowrap;
                 overflow: hidden;
                 text-overflow: ellipsis;
+                line-height: 1;
             }
             .playType,.singType{
                 flex-shrink: 0;

+ 13 - 7
src/page-instrument/component/the-music-list/list.tsx

@@ -35,11 +35,11 @@ export default defineComponent({
       name: "",
       page: 1,
       rows: 20,
-      musicSheetCategoriesId: state.bizMusicCategoryId,
+      //musicSheetCategoriesId: state.bizMusicCategoryId,
       recentFlag: props.recentFlag ? true : null,
       excludeMusicId: props.recentFlag ? null : state.examSongId,
       audioPlayTypes: "",
-      musicTutorialIds: "",
+      bookVersionId: "",
       musicTagIds: "",
       musicalInstrumentId: props.recentFlag ? "" : query.instrumentId
     });
@@ -102,10 +102,16 @@ export default defineComponent({
           type: "fullscreen",
         },
       });
-      let href = location.href.replace(/id=\d+/, `id=${item.id}`); // 替换id
-      href = href.replace(/instrumentId=\d+/, `instrumentId=${forms.musicalInstrumentId}`); // 替换乐器
-      location.href = href
-      location.reload()
+      const queryObj = {
+        ...query
+      }
+      queryObj.id = item.id
+      forms.musicalInstrumentId && (queryObj.instrumentId = forms.musicalInstrumentId)
+      location.href =
+        location.origin +
+        location.pathname +
+          "?" +
+          qs.stringify(queryObj);
     };
     function formatNumber(num:number) {
       return num >= 10000 
@@ -179,7 +185,7 @@ export default defineComponent({
           <FilterList onClose={() => { filterShow.value = false }} onHandleConfirm={(queryObj) => {
             filterShow.value = false
             forms.audioPlayTypes = queryObj.audioPlayTypes
-            forms.musicTutorialIds = queryObj.musicTutorialIds
+            forms.bookVersionId = queryObj.bookVersionId
             forms.musicTagIds = queryObj.musicTagIds
             forms.musicalInstrumentId = queryObj.musicalInstrumentId
             handleQuery()