lex 1 год назад
Родитель
Сommit
174a81e206

+ 23 - 3
src/views/attend-class/model/source-list/index.module.less

@@ -6,6 +6,8 @@
   display: flex;
   align-items: center;
   padding-bottom: 12px;
+  border-bottom: 1px solid #F0F0F0;
+  margin-bottom: 10px;
 
   .classNameIcon {
     display: inline-block;
@@ -30,10 +32,27 @@
 
 .treeParent {
   transition: height 1s ease-in-out;
+  padding: 8px 13px 0;
 
   .cardContainer {
     margin-bottom: 12px;
     padding-top: 12px;
+    margin-right: 30px;
+    margin-left: 18px;
+  }
+
+  &.parentSelect {
+    background: #F5F6FA;
+    border-radius: 8px;
+    padding-bottom: 12px;
+  }
+
+
+  :global {
+    .card-section-container {
+      width: 100%;
+      height: 180px;
+    }
   }
 }
 
@@ -51,9 +70,10 @@
   border-radius: 10px;
   font-size: max(17px, 12Px);
 
-  &:hover {
-    background: #F5F6FA;
-  }
+  // &:hover {
+  //   background: #F5F6FA;
+  // }
+
 
   .title {
     padding-left: 8px;

+ 6 - 1
src/views/attend-class/model/source-list/index.tsx

@@ -56,7 +56,12 @@ export default defineComponent({
         )}
 
         {props.knowledgePointList.map((item: any, index: number) => (
-          <div class={styles.treeParent} key={'parent' + index}>
+          <div
+            class={[
+              styles.treeParent,
+              parentIndex.value === index && styles.parentSelect
+            ]}
+            key={'parent' + index}>
             <div
               class={[styles.treeItem, styles.parentItem]}
               onClick={() => {

+ 10 - 0
src/views/prepare-lessons/components/resource-main/components/select-music/index.module.less

@@ -3,10 +3,20 @@
   max-height: calc(var(--window-page-lesson-height) - 204px);
   // overflow-x: auto;
 
+  &.listNoMusic {
+    max-height: calc(var(--window-page-lesson-height) - 150px);
+
+    .listSection {
+      min-height: calc(var(--window-page-lesson-height) - 150px);
+    }
+  }
+
   .listSection {
     min-height: calc(var(--window-page-lesson-height) - 204px);
   }
 
+
+
   .emptySection {
     display: flex;
     align-items: center;

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

@@ -216,9 +216,15 @@ export default defineComponent({
     });
     return () => (
       <div>
-        <ResourceSearchGroup onSearch={(item: any) => onSearch(item)} />
+        <ResourceSearchGroup
+          type={props.type}
+          onSearch={(item: any) => onSearch(item)}
+        />
         <NScrollbar
-          class={styles.listContainer}
+          class={[
+            styles.listContainer,
+            props.type === 'myMusic' ? styles.listNoMusic : ''
+          ]}
           onScroll={(e: any) => {
             const clientHeight = e.target?.clientHeight;
             const scrollTop = e.target?.scrollTop;

+ 25 - 17
src/views/prepare-lessons/components/resource-main/components/select-music/resource-search-group/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, onMounted, reactive } from 'vue';
+import { PropType, defineComponent, onMounted, reactive } from 'vue';
 import styles from './index.module.less';
 import { NButton, NInput, NSelect, NSpace } from 'naive-ui';
 import { useCatchStore } from '/src/store/modules/catchData';
@@ -6,6 +6,12 @@ import { useThrottleFn } from '@vueuse/core';
 
 export default defineComponent({
   name: 'resource-search-group',
+  props: {
+    type: {
+      type: String as PropType<'myMusic' | 'sahreMusic' | 'collectMusic'>,
+      default: 'myMusic'
+    }
+  },
   emits: ['search'],
   setup(props, { emit }) {
     const catchStore = useCatchStore();
@@ -29,22 +35,24 @@ export default defineComponent({
     return () => (
       <>
         <div class={styles.searchGroup}>
-          <div class={styles.searchSelect}>
-            <NSelect
-              placeholder="全部教材"
-              options={[
-                { name: '全部教材', id: null },
-                ...catchStore.getMusicCategories
-              ]}
-              clearable
-              labelField="name"
-              valueField="id"
-              v-model:value={forms.musicSheetCategoriesId}
-              onUpdate:value={() => {
-                onSearch();
-              }}
-            />
-          </div>
+          {props.type !== 'myMusic' && (
+            <div class={styles.searchSelect}>
+              <NSelect
+                placeholder="全部教材"
+                options={[
+                  { name: '全部教材', id: null },
+                  ...catchStore.getMusicCategories
+                ]}
+                clearable
+                labelField="name"
+                valueField="id"
+                v-model:value={forms.musicSheetCategoriesId}
+                onUpdate:value={() => {
+                  onSearch();
+                }}
+              />
+            </div>
+          )}
 
           <NInput
             type="text"

+ 1 - 1
src/views/prepare-lessons/model/source-instrument/index.tsx

@@ -48,7 +48,7 @@ export default defineComponent({
       state.selectItems.forEach((item: any) => {
         tempList.push({
           coverImg: PageEnum.INSTRUMENT_DEFAULT_COVER,
-          title: item.name,
+          title: '乐器百科-' + item.name,
           materialId: item.id,
           content: item.id
         });

+ 1 - 1
src/views/prepare-lessons/model/source-knowledge/index.tsx

@@ -100,7 +100,7 @@ export default defineComponent({
       items.forEach(item => {
         result.push({
           coverImg: PageEnum.THEORY_DEFAULT_COVER,
-          title: item.name,
+          title: '乐理知识-' + item.name,
           materialId: item.id,
           content: item.id
         });

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

@@ -55,7 +55,7 @@ export default defineComponent({
       state.selectItems.forEach((item: any) => {
         tempList.push({
           coverImg: PageEnum.MUSIC_DEFAULT_COVER,
-          title: item.name,
+          title: '名曲鉴赏-' + item.name,
           materialId: item.id,
           content: item.id
         });

+ 1 - 1
src/views/prepare-lessons/model/source-musician/index.tsx

@@ -47,7 +47,7 @@ export default defineComponent({
       state.selectItems.forEach((item: any) => {
         tempList.push({
           coverImg: PageEnum.MUSICIAN_DEFAULT_COVER,
-          title: item.name,
+          title: '音乐家-' + item.name,
           materialId: item.id,
           content: item.id
         });