lex 1 rok pred
rodič
commit
3112ba599e

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

@@ -1797,6 +1797,7 @@ export default defineComponent({
             onConfirm={async (val: any) => {
               popupData.chapterLoading = true;
               try {
+                data.selectClassStatus = false;
                 data.detailId = val.itemActive;
                 data.courseId = val.chapterId;
                 const ids = formatParentId(
@@ -1811,7 +1812,6 @@ export default defineComponent({
                 await getDetail();
                 popupData.activeIndex = 0;
                 popupData.chapterOpen = false;
-                data.selectClassStatus = false;
               } catch {
                 //
               }

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

@@ -32,7 +32,8 @@
   transition: height 1s ease-in-out;
 
   .cardContainer {
-    margin-bottom: 17px;
+    margin-bottom: 12px;
+    padding-top: 12px;
   }
 }
 
@@ -43,7 +44,7 @@
 .treeItem {
   display: flex;
   align-items: center;
-  line-height: 54px;
+  line-height: 36px;
   border-radius: 10px;
   padding: 0 5px;
   cursor: pointer;

+ 22 - 15
src/views/prepare-lessons/components/lesson-main/courseware/addCourseware.tsx

@@ -488,10 +488,15 @@ export default defineComponent({
       }
     };
     onMounted(async () => {
+      // 修改时重置默认数据
+      if (props.groupItem?.id) {
+        forms.coursewareList = [];
+        forms.baseCoursewareList = [];
+      }
+
       await getList();
       // 动态添加数据
       eventGlobal.on('onPrepareAddItem', addItem);
-
       eventGlobal.on('pageBeforeLeave', onPageBeforeLeave);
     });
 
@@ -822,20 +827,22 @@ export default defineComponent({
                 </div>
               ))}
 
-              <NButton
-                block
-                type="primary"
-                secondary
-                class={styles.addKnowledgePoint}
-                onClick={() => {
-                  forms.coursewareList.push({
-                    name: '',
-                    list: []
-                  });
-                }}>
-                <i class={styles.iconCAdd}></i>
-                添加知识点
-              </NButton>
+              {!forms.loadingStatus && (
+                <NButton
+                  block
+                  type="primary"
+                  secondary
+                  class={styles.addKnowledgePoint}
+                  onClick={() => {
+                    forms.coursewareList.push({
+                      name: '',
+                      list: []
+                    });
+                  }}>
+                  <i class={styles.iconCAdd}></i>
+                  添加知识点
+                </NButton>
+              )}
             </div>
           </NSpin>
         </NScrollbar>

+ 8 - 1
src/views/prepare-lessons/model/source-instrument/components/list/index.module.less

@@ -14,12 +14,19 @@
 
 
     .swipeControll {
-      height: 25Px;
+      height: 37px;
 
       .leftIcon {
         transform: rotate(180deg);
       }
 
+      :global {
+        .n-image {
+          height: 37px;
+          align-items: center;
+        }
+      }
+
       img {
         cursor: pointer;
         width: 25Px;

+ 2 - 3
src/views/prepare-lessons/model/source-instrument/detail.module.less

@@ -76,7 +76,7 @@
   position: relative;
   flex: 1;
   display: flex;
-  padding: 20px 55px 20px 20px;
+  padding: 20px 50px 20px 26px;
   overflow: hidden;
   gap: 0 32px;
 }
@@ -177,8 +177,7 @@
     display: flex;
     align-items: center;
     justify-content: center;
-    height: 50vh;
-    // height: 100%;
+    height: 40vh;
   }
 }
 

+ 1 - 2
src/views/prepare-lessons/model/source-knowledge/index.module.less

@@ -1,7 +1,7 @@
 .container {
   display: flex;
   flex-direction: column;
-  height: 650px;
+  height: 750px;
   background: #F1F5FF;
   border-radius: 0 0 12Px 12Px;
   padding-left: 27px;
@@ -11,7 +11,6 @@
     height: 36px;
   }
 
-
   .separator {
     width: 9px;
     height: 15px;

+ 8 - 1
src/views/prepare-lessons/model/source-music/components/list/index.module.less

@@ -14,12 +14,19 @@
 
 
     .swipeControll {
-      height: 25Px;
+      height: 37px;
 
       .leftIcon {
         transform: rotate(180deg);
       }
 
+      :global {
+        .n-image {
+          height: 37px;
+          align-items: center;
+        }
+      }
+
       img {
         cursor: pointer;
         width: 25Px;

+ 9 - 2
src/views/prepare-lessons/model/source-musician/components/list/index.module.less

@@ -4,7 +4,7 @@
 
 
   .btnType {
-    gap: 0px 24px !important;
+    gap: 0px 10px !important;
     flex-wrap: nowrap !important;
 
     &>div {
@@ -14,12 +14,19 @@
 
 
     .swipeControll {
-      height: 25Px;
+      height: 37px;
 
       .leftIcon {
         transform: rotate(180deg);
       }
 
+      :global {
+        .n-image {
+          height: 37px;
+          align-items: center;
+        }
+      }
+
       img {
         cursor: pointer;
         width: 25Px;

+ 3 - 3
src/views/prepare-lessons/model/source-musician/components/list/index.tsx

@@ -47,8 +47,8 @@ export default defineComponent({
       item: {} as any
     });
 
-    const getList = async () => {
-      state.loading = true;
+    const getList = async (status = true) => {
+      if (status) state.loading = true;
       try {
         const { data } = await api_knowledgeWiki_page({
           ...state.pagination,
@@ -122,7 +122,7 @@ export default defineComponent({
               !state.loading
             ) {
               state.pagination.page = state.pagination.page + 1;
-              getList();
+              getList(false);
             }
           }}>
           <NSpin v-model:show={state.loading} style={{ 'min-height': '50vh' }}>

+ 1 - 1
src/views/prepare-lessons/model/source-musician/components/list/search-group-resources.tsx

@@ -163,7 +163,7 @@ export default defineComponent({
           </NSpace>
           <TheSearch
             class={styles.inputSearch}
-            placeholder="请输入乐器关键词"
+            placeholder="请输入音乐家关键词"
             round
             onSearch={(val: string) => {
               forms.keyword = val;