lex-xin 6 kuukautta sitten
vanhempi
commit
55c9e1d95c

+ 1 - 1
dev-dist/sw.js

@@ -82,7 +82,7 @@ define(['./workbox-88bf3160'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
-    "revision": "0.edsfn33bd8"
+    "revision": "0.l07eibm7mu"
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1725954844986}
+{"version":1725966216504}

+ 10 - 2
src/components/TheSearch/index.tsx

@@ -1,4 +1,4 @@
-import { PropType, defineComponent, reactive } from 'vue';
+import { PropType, defineComponent, reactive, watch } from 'vue';
 import styles from './index.module.less';
 import { InputProps, NButton, NInput } from 'naive-ui';
 import icon_search from '/src/common/images/icon_search.png';
@@ -19,13 +19,21 @@ export default defineComponent({
     placeholder: {
       type: String,
       default: '请输入搜索关键词'
+    },
+    value: {
+      type: String,
+      default: ''
     }
   },
   emits: ['search'],
   setup(props, { emit }) {
     const searchData = reactive({
-      value: ''
+      value: props.value || ''
     });
+
+    watch(() => props.value, () => {
+      searchData.value = props.value
+    })
     return () => (
       <NInput
         class={[

+ 34 - 15
src/views/attend-class/component/audio-pay.tsx

@@ -273,17 +273,17 @@ export default defineComponent({
         //     );
         //   }
         // }
-        console.log(
-          uncachedTime,
-          duration,
-          cachedDuration,
-          'duration',
-          buffterCatchArray,
-          element.currentTime,
-          currentLength + '%',
-          isWaiting,
-          currentBytesLoaded <= previousBytesLoaded
-        );
+        // console.log(
+        //   uncachedTime,
+        //   duration,
+        //   cachedDuration,
+        //   'duration',
+        //   buffterCatchArray,
+        //   element.currentTime,
+        //   currentLength + '%',
+        //   isWaiting,
+        //   currentBytesLoaded <= previousBytesLoaded
+        // );
 
         const isNoBuffer = currentBytesLoaded <= previousBytesLoaded;
         // console.log(
@@ -420,6 +420,8 @@ export default defineComponent({
       });
       window.addEventListener('online', onChangeOnlineStatus);
       window.addEventListener('offline', onChangeOnlineStatus);
+
+      console.log(props.item, 'item');
     });
 
     onUnmounted(() => {
@@ -435,6 +437,7 @@ export default defineComponent({
     return () => (
       <div class={styles.audioWrap}>
         <div class={styles.audioContainer}>
+          <div class={styles.audioTitle}>{props.item.title}</div>
           <audio
             ref={audio}
             crossorigin="anonymous"
@@ -510,6 +513,20 @@ export default defineComponent({
             emit('reset');
           }}>
           <div class={styles.slider}>
+            <div class={styles.time}>
+              <div
+                class="plyr__time plyr__time--current"
+                aria-label="Current time">
+                {audioForms.currentTime}
+              </div>
+              <span class={styles.line}>/</span>
+              <div
+                class="plyr__time plyr__time--duration"
+                aria-label="Duration">
+                {audioForms.duration}
+              </div>
+            </div>
+
             <NSlider
               value={audioForms.currentTimeNum}
               step={0.01}
@@ -526,7 +543,8 @@ export default defineComponent({
             {props.imagePos === 'right' ? (
               <>
                 <div class={styles.actions}>
-                  <div class={styles.time}>
+                  <div class={styles.title}>{props.item.title}</div>
+                  {/* <div class={styles.time}>
                     <div
                       class="plyr__time plyr__time--current"
                       aria-label="Current time">
@@ -538,7 +556,7 @@ export default defineComponent({
                       aria-label="Duration">
                       {audioForms.duration}
                     </div>
-                  </div>
+                  </div> */}
                 </div>
                 <div class={styles.actions}>
                   <div class={styles.actionWrap}>
@@ -578,7 +596,8 @@ export default defineComponent({
                   </div>
                 </div>
                 <div class={styles.actions}>
-                  <div class={styles.time}>
+                  <div class={styles.title}>{props.item.title}</div>
+                  {/* <div class={styles.time}>
                     <div
                       class="plyr__time plyr__time--current"
                       aria-label="Current time">
@@ -590,7 +609,7 @@ export default defineComponent({
                       aria-label="Duration">
                       {audioForms.duration}
                     </div>
-                  </div>
+                  </div> */}
                 </div>
               </>
             )}

+ 30 - 17
src/views/attend-class/component/audio.module.less

@@ -12,7 +12,15 @@
   height: 100%;
   padding: 0 240px;
 
-  &>div {
+  .audioTitle {
+    position: absolute;
+    top: 180px;
+    font-weight: 600;
+    font-size: 40px;
+    color: #131415;
+  }
+
+  & > div {
     flex: 1;
   }
 
@@ -41,7 +49,7 @@
   opacity: 0;
   pointer-events: none;
   transform: translateY(126px);
-  transition: all .2s;
+  transition: all 0.2s;
 }
 
 .controls {
@@ -65,14 +73,14 @@
     justify-content: space-between;
     color: #fff;
     // font-size: 10px;
-    padding: 4px 20px 4px;
-    font-size: 24px;
+    padding: 4px 20px 4px 0;
+    font-size: 20px;
     font-weight: 600;
     line-height: 33px;
 
-    &>div {
+    & > div {
       font-size: 20px !important;
-      color: rgba(255, 255, 255, 0.8);
+      color: rgba(255, 255, 255);
     }
 
     .line {
@@ -80,7 +88,7 @@
     }
 
     :global {
-      .plyr__time+.plyr__time:before {
+      .plyr__time + .plyr__time:before {
         content: '';
         margin-right: 0;
       }
@@ -91,7 +99,7 @@
 .tools {
   display: flex;
   justify-content: space-between;
-  padding: 0 10px;
+  padding: 0;
   margin-top: 10px;
 }
 
@@ -111,8 +119,8 @@
 
   .downloadSpeed {
     font-weight: 600;
-    font-size: max(18px, 14Px);
-    color: #FFFFFF;
+    font-size: max(18px, 14px);
+    color: #ffffff;
     line-height: 25px;
   }
 
@@ -122,13 +130,12 @@
     background: transparent;
     cursor: pointer;
 
-    &>img {
+    & > img {
       width: 100%;
       height: 100%;
     }
   }
 
-
   .iconReplay {
     width: 40px;
     height: 40px;
@@ -136,22 +143,28 @@
     cursor: pointer;
     margin: 0 22px;
 
-    &>img {
+    & > img {
       width: 100%;
       height: 100%;
     }
   }
+
+  .title {
+    font-size: max(20px, 16px);
+    color: #ffffff;
+  }
 }
 
 .slider {
   width: 100%;
   padding-top: 6px;
+  display: flex;
+  align-items: center;
 
   :global {
-
     .n-slider .n-slider-rail .n-slider-rail__fill,
     .n-slider .n-slider-handles .n-slider-handle-wrapper {
-      transition: all .2s;
+      transition: all 0.2s;
     }
 
     .n-slider .n-slider-rail .n-slider-rail__fill {
@@ -169,9 +182,9 @@
       border-radius: calc(var(--n-rail-height) / 2);
       top: 0;
       bottom: 0;
-      left: -8Px;
+      left: -8px;
       // right: -8Px;
       background-color: #909090;
     }
   }
-}
+}

+ 19 - 4
src/views/attend-class/component/video-play.tsx

@@ -582,6 +582,19 @@ export default defineComponent({
             emit('reset');
           }}>
           <div class={styles.slider}>
+            <div class={styles.time}>
+                      <div
+                        class="plyr__time plyr__time--current"
+                        aria-label="Current time">
+                        {videoFroms.currentTime}
+                      </div>
+                      <span class={styles.line}>/</span>
+                      <div
+                        class="plyr__time plyr__time--duration"
+                        aria-label="Duration">
+                        {videoFroms.duration}
+                      </div>
+                    </div>
             <NSlider
               value={videoFroms.currentTimeNum}
               step={0.01}
@@ -600,7 +613,8 @@ export default defineComponent({
               <>
                 <div class={styles.actions}>
                   <div class={styles.actionWrap}>
-                    <div class={styles.time}>
+                    <div class={styles.title}>{props.item.title}</div>
+                    {/* <div class={styles.time}>
                       <div
                         class="plyr__time plyr__time--current"
                         aria-label="Current time">
@@ -612,7 +626,7 @@ export default defineComponent({
                         aria-label="Duration">
                         {videoFroms.duration}
                       </div>
-                    </div>
+                    </div> */}
                   </div>
                 </div>
                 <div class={styles.actions}>
@@ -841,7 +855,8 @@ export default defineComponent({
                 </div>
                 <div class={styles.actions}>
                   <div class={styles.actionWrap}>
-                    <div class={styles.time}>
+                   <div class={styles.title}>{props.item.title}</div>
+                    {/* <div class={styles.time}>
                       <div
                         class="plyr__time plyr__time--current"
                         aria-label="Current time">
@@ -853,7 +868,7 @@ export default defineComponent({
                         aria-label="Duration">
                         {videoFroms.duration}
                       </div>
-                    </div>
+                    </div> */}
                   </div>
                 </div>
               </>

+ 10 - 3
src/views/attend-class/component/video.module.less

@@ -44,14 +44,14 @@
       justify-content: space-between;
       color: #fff;
       // font-size: 10px;
-      padding: 4px 20px 4px;
+      padding: 4px 20px 4px 0;
       font-size: 24px;
       font-weight: 600;
       line-height: 33px;
 
       &>div {
         font-size: 20px !important;
-        color: rgba(255, 255, 255, 0.8);
+        color: rgba(255, 255, 255);
       }
 
       .line {
@@ -70,7 +70,7 @@
   .tools {
     display: flex;
     justify-content: space-between;
-    padding: 0 10px;
+    padding: 0;
     margin-top: 10px;
   }
 
@@ -88,6 +88,11 @@
       align-items: center;
     }
 
+    .title {
+      font-size: max(20px, 16px);
+      color: #ffffff;
+    }
+
     .downloadSpeed {
       font-weight: 600;
       font-size: max(18px, 14Px);
@@ -139,6 +144,8 @@
   .slider {
     width: 100%;
     padding-top: 6px;
+    display: flex;
+    align-items: center;
 
     :global {
 

+ 24 - 3
src/views/content-information/content-instrument/components/list/index.tsx

@@ -20,16 +20,28 @@ export default defineComponent({
     }
   },
   setup(props) {
+    // 保存数据
+    const operationCatch = (type: 'get'| 'set' = 'get', value: string = '') : any => {
+      const sessionName = 'content-instrument-catch'
+      if(type === "get") {
+        const result = sessionStorage.getItem(sessionName)
+        return result ? JSON.parse(result) : null
+      } else if(type === 'set') {
+        sessionStorage.setItem(sessionName, value)
+      }
+    }
+
     const router = useRouter();
+    const catchData = operationCatch('get')
     const state = reactive({
       searchWord: '',
       loading: false,
       pageTotal: 0,
-      pagination: {
+      pagination: catchData && catchData.pagination ? catchData.pagination : {
         page: 1,
         rows: 18
       },
-      searchGroup: {
+      searchGroup:  catchData && catchData.searchGroup ? catchData.searchGroup : {
         type: 'INSTRUMENT', //
         keyword: '',
         wikiCategoryId: props.categoryId
@@ -40,8 +52,15 @@ export default defineComponent({
       item: {} as any
     });
 
+    
+
     const getList = async () => {
       state.loading = true;
+      // 缓存
+      operationCatch('set', JSON.stringify({
+        pagination: state.pagination,
+        searchGroup: state.searchGroup
+      }))
       try {
         const { data } = await api_knowledgeWiki_page({
           ...state.pagination,
@@ -81,7 +100,9 @@ export default defineComponent({
         <SearchGroupResources
           categoryChildList={props.categoryChildList || []}
           onSearch={(item: any) => onSearch(item)}
-          wikiCategoryId={props.categoryId}
+          wikiCategoryId={state.searchGroup.wikiCategoryId}
+          defaultWikiCategoryId={props.categoryId}
+          searchValue={state.searchGroup.keyword}
         />
 
         <NSpin v-model:show={state.loading} style={{ 'min-height': '50vh' }}>

+ 14 - 5
src/views/content-information/content-instrument/components/list/search-group-resources.tsx

@@ -9,9 +9,17 @@ export default defineComponent({
       type: Array as PropType<any>,
       default: () => []
     },
+    defaultWikiCategoryId: {
+      type: String,
+      default: ''
+    },
     wikiCategoryId: {
       type: String,
       default: ''
+    },
+    searchValue: {
+      type: String,
+      default: ''
     }
   },
   emits: ['search', 'add'],
@@ -19,8 +27,8 @@ export default defineComponent({
   setup(props, { emit }) {
     // const catchStore = useCatchStore();
     const forms = reactive({
-      keyword: '',
-      wikiCategoryId: props.wikiCategoryId || ''
+      keyword: props.searchValue || '',
+      wikiCategoryId: props.wikiCategoryId || props.defaultWikiCategoryId || ''
     });
 
     const onSearch = () => {
@@ -37,18 +45,18 @@ export default defineComponent({
             {props.categoryChildList.length > 0 ? (
               <NButton
                 type={
-                  forms.wikiCategoryId === props.wikiCategoryId
+                  forms.wikiCategoryId === props.defaultWikiCategoryId
                     ? 'primary'
                     : 'default'
                 }
                 secondary={
-                  forms.wikiCategoryId === props.wikiCategoryId ? false : true
+                  forms.wikiCategoryId === props.defaultWikiCategoryId ? false : true
                 }
                 round
                 size="small"
                 focusable={false}
                 onClick={() => {
-                  forms.wikiCategoryId = props.wikiCategoryId;
+                  forms.wikiCategoryId = props.defaultWikiCategoryId;
                   onSearch();
                 }}>
                 全部
@@ -73,6 +81,7 @@ export default defineComponent({
           </NSpace>
           <TheSearch
             class={styles.inputSearch}
+            value={props.searchValue}
             placeholder="请输入乐器名称"
             round
             onSearch={(val: string) => {

+ 1 - 0
src/views/content-information/content-instrument/index.tsx

@@ -80,6 +80,7 @@ export default defineComponent({
               paneWrapperClass={styles.paneWrapperContainer}
               onUpdate:value={(val: any) => {
                 sessionStorage.setItem('content-instrument-tab', val);
+                sessionStorage.removeItem('content-instrument-catch')
               }}
               v-model:value={state.tabValue}>
               {state.categoryList.map((category: any) => (

+ 37 - 10
src/views/content-information/content-music/components/list/index.tsx

@@ -21,20 +21,40 @@ export default defineComponent({
     }
   },
   setup(props) {
+    // 保存数据
+    const operationCatch = (
+      type: 'get' | 'set' = 'get',
+      value: string = ''
+    ): any => {
+      const sessionName = 'content-music-catch';
+      if (type === 'get') {
+        const result = sessionStorage.getItem(sessionName);
+        return result ? JSON.parse(result) : null;
+      } else if (type === 'set') {
+        sessionStorage.setItem(sessionName, value);
+      }
+    };
     const router = useRouter();
+    const catchData = operationCatch('get');
     const state = reactive({
       searchWord: '',
       loading: false,
       pageTotal: 0,
-      pagination: {
-        page: 1,
-        rows: 18
-      },
-      searchGroup: {
-        type: 'MUSIC', //
-        keyword: '',
-        wikiCategoryId: props.categoryId
-      },
+      pagination:
+        catchData && catchData.pagination
+          ? catchData.pagination
+          : {
+              page: 1,
+              rows: 18
+            },
+      searchGroup:
+        catchData && catchData.searchGroup
+          ? catchData.searchGroup
+          : {
+              type: 'MUSIC', //
+              keyword: '',
+              wikiCategoryId: props.categoryId
+            },
       tableList: [] as any,
       teachingStatus: false,
       show: false,
@@ -43,6 +63,11 @@ export default defineComponent({
 
     const getList = async () => {
       state.loading = true;
+      // 缓存
+      operationCatch('set', JSON.stringify({
+        pagination: state.pagination,
+        searchGroup: state.searchGroup
+      }))
       try {
         const { data } = await api_knowledgeWiki_page({
           ...state.pagination,
@@ -74,7 +99,9 @@ export default defineComponent({
       <div class={styles.instrumentList}>
         <SearchGroupResources
           categoryChildList={props.categoryChildList || []}
-          wikiCategoryId={props.categoryId}
+          wikiCategoryId={state.searchGroup.wikiCategoryId}
+          defaultWikiCategoryId={props.categoryId}
+          searchValue={state.searchGroup.keyword}
           onSearch={(item: any) => onSearch(item)}
         />
 

+ 14 - 5
src/views/content-information/content-music/components/list/search-group-resources.tsx

@@ -10,9 +10,17 @@ export default defineComponent({
       type: Array as PropType<any>,
       default: () => []
     },
+    defaultWikiCategoryId: {
+      type: String,
+      default: ''
+    },
     wikiCategoryId: {
       type: String,
       default: ''
+    },
+    searchValue: {
+      type: String,
+      default: ''
     }
   },
   emits: ['search', 'add'],
@@ -20,8 +28,8 @@ export default defineComponent({
   setup(props, { emit }) {
     // const catchStore = useCatchStore();
     const forms = reactive({
-      keyword: '',
-      wikiCategoryId: props.wikiCategoryId || '',
+      keyword: props.searchValue || '',
+      wikiCategoryId: props.wikiCategoryId || props.defaultWikiCategoryId || '',
       wikiCategoryIdChild: '',
       childIds: [] as any
     });
@@ -104,18 +112,18 @@ export default defineComponent({
             {props.categoryChildList.length > 0 ? (
               <NButton
                 type={
-                  forms.wikiCategoryId === props.wikiCategoryId
+                  forms.wikiCategoryId === props.defaultWikiCategoryId
                     ? 'primary'
                     : 'default'
                 }
                 secondary={
-                  forms.wikiCategoryId === props.wikiCategoryId ? false : true
+                  forms.wikiCategoryId === props.defaultWikiCategoryId ? false : true
                 }
                 round
                 size="small"
                 focusable={false}
                 onClick={() => {
-                  forms.wikiCategoryId = props.wikiCategoryId;
+                  forms.wikiCategoryId = props.defaultWikiCategoryId;
                   forms.wikiCategoryIdChild = '';
                   onSearch();
                 }}>
@@ -142,6 +150,7 @@ export default defineComponent({
           </NSpace>
           <TheSearch
             class={styles.inputSearch}
+            value={props.searchValue}
             placeholder="请输入曲目名称"
             round
             onSearch={(val: string) => {

+ 1 - 1
src/views/content-information/content-music/index.tsx

@@ -79,8 +79,8 @@ export default defineComponent({
               paneWrapperClass={styles.paneWrapperContainer}
               v-model:value={state.tabValue}
               onUpdate:value={(val: any) => {
-                console.log(val, 'val');
                 sessionStorage.setItem('content-music-tab', val);
+                sessionStorage.removeItem('content-music-catch')
               }}>
               {state.categoryList.map((category: any) => (
                 <NTabPane

+ 28 - 3
src/views/content-information/content-musician/components/list/index.tsx

@@ -20,16 +20,34 @@ export default defineComponent({
     }
   },
   setup(props) {
+    // 保存数据
+    const operationCatch = (
+      type: 'get' | 'set' = 'get',
+      value: string = ''
+    ): any => {
+      const sessionName = 'content-musician-catch';
+      if (type === 'get') {
+        const result = sessionStorage.getItem(sessionName);
+        return result ? JSON.parse(result) : null;
+      } else if (type === 'set') {
+        sessionStorage.setItem(sessionName, value);
+      }
+    };
     const router = useRouter();
+    const catchData = operationCatch('get');
     const state = reactive({
       searchWord: '',
       loading: false,
       pageTotal: 0,
-      pagination: {
+      pagination:catchData && catchData.pagination
+      ? catchData.pagination
+      : {
         page: 1,
         rows: 18
       },
-      searchGroup: {
+      searchGroup: catchData && catchData.searchGroup
+      ? catchData.searchGroup
+      :{
         type: 'MUSICIAN', //
         keyword: '',
         wikiCategoryId: props.categoryId
@@ -42,6 +60,11 @@ export default defineComponent({
 
     const getList = async () => {
       state.loading = true;
+      // 缓存
+      operationCatch('set', JSON.stringify({
+        pagination: state.pagination,
+        searchGroup: state.searchGroup
+      }))
       try {
         const { data } = await api_knowledgeWiki_page({
           ...state.pagination,
@@ -79,7 +102,9 @@ export default defineComponent({
       <div class={styles.instrumentList}>
         <SearchGroupResources
           categoryChildList={props.categoryChildList || []}
-          wikiCategoryId={props.categoryId}
+          wikiCategoryId={state.searchGroup.wikiCategoryId}
+          defaultWikiCategoryId={props.categoryId}
+          searchValue={state.searchGroup.keyword}
           onSearch={(item: any) => onSearch(item)}
         />
 

+ 17 - 5
src/views/content-information/content-musician/components/list/search-group-resources.tsx

@@ -9,9 +9,17 @@ export default defineComponent({
       type: Array as PropType<any>,
       default: () => []
     },
+    defaultWikiCategoryId: {
+      type: String,
+      default: ''
+    },
     wikiCategoryId: {
       type: String,
       default: ''
+    },
+    searchValue: {
+      type: String,
+      default: ''
     }
   },
   emits: ['search', 'add'],
@@ -19,9 +27,10 @@ export default defineComponent({
   setup(props, { emit }) {
     // const catchStore = useCatchStore();
     const forms = reactive({
-      keyword: '',
-      wikiCategoryId: props.wikiCategoryId || ''
+      keyword: props.searchValue || '',
+      wikiCategoryId: props.wikiCategoryId || props.defaultWikiCategoryId || ''
     });
+    
 
     const onSearch = () => {
       emit('search', forms);
@@ -29,6 +38,8 @@ export default defineComponent({
     onMounted(async () => {
       // 获取教材分类列表
       // await catchStore.getMusicSheetCategory()
+
+      console.log(forms, 'formsformsformsforms')
     });
     return () => (
       <div class={styles.searchGroup}>
@@ -37,18 +48,18 @@ export default defineComponent({
             {props.categoryChildList.length > 0 ? (
               <NButton
                 type={
-                  forms.wikiCategoryId === props.wikiCategoryId
+                  forms.wikiCategoryId === props.defaultWikiCategoryId
                     ? 'primary'
                     : 'default'
                 }
                 secondary={
-                  forms.wikiCategoryId === props.wikiCategoryId ? false : true
+                  forms.wikiCategoryId === props.defaultWikiCategoryId ? false : true
                 }
                 round
                 size="small"
                 focusable={false}
                 onClick={() => {
-                  forms.wikiCategoryId = props.wikiCategoryId;
+                  forms.wikiCategoryId = props.defaultWikiCategoryId;
                   onSearch();
                 }}>
                 全部
@@ -73,6 +84,7 @@ export default defineComponent({
           </NSpace>
           <TheSearch
             class={styles.inputSearch}
+            value={props.searchValue}
             placeholder="请输入音乐家名称"
             round
             onSearch={(val: string) => {

+ 1 - 0
src/views/content-information/content-musician/index.tsx

@@ -80,6 +80,7 @@ export default defineComponent({
               paneWrapperClass={styles.paneWrapperContainer}
               onUpdate:value={(val: any) => {
                 sessionStorage.setItem('content-musician-tab', val);
+                sessionStorage.removeItem('content-musician-catch')
               }}
               v-model:value={state.tabValue}>
               {state.categoryList.map((category: any) => (

+ 17 - 2
src/views/prepare-lessons/components/directory-main/select-lessonware/index.module.less

@@ -4,7 +4,7 @@
   // align-items: center;
   // gap: 0 24px;
   margin-bottom: 6px;
-  padding: 32px 40px 0;
+  padding: 30px 40px 0;
 
   :global {
     .n-base-selection,
@@ -56,7 +56,7 @@
   }
 
   .spaceSection {
-    width: 75%;
+    width: 98%;
     transition: 1s all ease-in;
   
     &>div {
@@ -66,6 +66,21 @@
       line-height: var(--n-blank-height);
     }
   }
+  
+}
+
+.popSelect {
+  font-size: 16px;
+  width: 200px;
+  box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.08);
+  border-radius: 11px;
+  --n-option-height: 34px;
+
+  :global {
+    .n-base-select-option__content {
+      width: 80% !important;
+    }
+  }
 }
 
 .classList {

+ 26 - 8
src/views/prepare-lessons/components/directory-main/select-lessonware/index.tsx

@@ -65,16 +65,18 @@ export default defineComponent({
     const getLessonCourseware = async () => {
       forms.loading = true;
       try {
+        console.log(forms.bookVersionId, 'bookVersionId')
         const { data } = await lessonCoursewarePage({
           page: 1,
           rows: 99,
           type: 'COURSEWARE',
           enableFlag: 1,
-          bookVersionId: forms.bookVersionId,
+          bookVersionId: forms.bookVersionId === '0' ? null : forms.bookVersionId,
+          customFlag: forms.bookVersionId === '0' ? true : null,
           keyword: forms.keyword,
           currentGradeNum: forms.currentGradeNum,
-          instrumentId: forms.instrumentId
-          // bookType: forms.bookType
+          instrumentId: forms.instrumentId,
+          bookType: forms.bookType
         });
 
         forms.list = data.rows;
@@ -171,10 +173,17 @@ export default defineComponent({
                         forms.currentGradeNum = ''
                         forms.bookType = ''
                         if(subject.children && subject.children.length > 0) {
-                          treeList.gradeList = subject.children || []
+                          const result = subject.children || []
+                          treeList.gradeList =  [{
+                            name: '全部',
+                            id: ''
+                          }, ...result]
                         } else {
                           treeList.gradeList = []
                         }
+                        forms.bookVersionId = subject.id
+
+                        throttledFn()
                       }}>
                       {subject.name}
                     </span>
@@ -195,9 +204,17 @@ export default defineComponent({
                         forms.bookType = ''
                         if(subject.children && subject.children.length > 0) {
                           treeList.bookTypeList = subject.children || []
+                          const result = subject.children || []
+                          treeList.bookTypeList =  [{
+                            name: '全部',
+                            id: ''
+                          }, ...result]
                         } else {
                           treeList.bookTypeList = []
                         }
+                        forms.currentGradeNum = subject.id
+
+                        throttledFn()
                       }}>
                       {subject.name}
                     </span>
@@ -216,6 +233,8 @@ export default defineComponent({
                       ]}
                       onClick={() => {
                         forms.bookType = subject.id
+
+                        throttledFn()
                       }}>
                       {subject.name}
                     </span>
@@ -227,7 +246,7 @@ export default defineComponent({
               <NFormItem label="声部:">
                 <NSpace class={styles.spaceSection}>
                   {[
-                    { name: '全部乐器', id: '' },
+                    { name: '全部乐器', value: '' },
                     ...catchStore.getSubjectList
                   ].map((subject: any) =>
                     subject.instruments && subject.instruments.length > 1 ? (
@@ -238,7 +257,7 @@ export default defineComponent({
                         v-model:value={treeList.tempSubjectId}
                         onUpdate:value={() => {
                           forms.instrumentId = treeList.tempSubjectId;
-                          // onSearch();
+                          throttledFn()
                         }}
                         key={subject.value}
                         class={[styles.popSelect]}>
@@ -262,9 +281,8 @@ export default defineComponent({
                         ]}
                         onClick={() => {
                           forms.instrumentId = subject.value;
-
                           treeList.tempSubjectId = null;
-                          // onSearch();
+                          throttledFn()
                         }}>
                         {subject.name}
                       </span>