Ver Fonte

Merge remote-tracking branch 'origin/iteration-login' into startLogin

mo há 1 ano atrás
pai
commit
632ceb8295
50 ficheiros alterados com 1185 adições e 697 exclusões
  1. 3 1
      src/components/card-preview/index.module.less
  2. 1 1
      src/components/card-preview/music-modal/index.tsx
  3. 11 0
      src/utils/contants.ts
  4. 12 10
      src/views/attend-class/index.tsx
  5. 1 1
      src/views/classList/classDetail.tsx
  6. BIN
      src/views/home/images/bannerPerson.png
  7. BIN
      src/views/home/images/blackboard_bg.png
  8. BIN
      src/views/home/images/cloundIcon.png
  9. BIN
      src/views/home/images/goClass.png
  10. BIN
      src/views/home/images/headerD.png
  11. BIN
      src/views/home/images/icon-book.png
  12. BIN
      src/views/home/images/icon-date.png
  13. BIN
      src/views/home/images/icon-detail.png
  14. 17 0
      src/views/home/images/icon-from.svg
  15. BIN
      src/views/home/images/icon-lession.png
  16. BIN
      src/views/home/images/icon-right-arrow.png
  17. BIN
      src/views/home/images/icon-subject.png
  18. BIN
      src/views/home/images/icon-to.png
  19. 16 0
      src/views/home/images/icon-white-arrow.svg
  20. BIN
      src/views/home/images/leftDot.png
  21. BIN
      src/views/home/images/lineICon.png
  22. BIN
      src/views/home/images/musicIcon.png
  23. BIN
      src/views/home/images/rightDot.png
  24. BIN
      src/views/home/images/soureIcon.png
  25. BIN
      src/views/home/images/t1.png
  26. BIN
      src/views/home/images/t1_bg.png
  27. BIN
      src/views/home/images/t2.png
  28. BIN
      src/views/home/images/t2_bg.png
  29. BIN
      src/views/home/images/t3.png
  30. BIN
      src/views/home/images/t3_bg.png
  31. BIN
      src/views/home/images/teacher_man.png
  32. BIN
      src/views/home/images/teacher_woman.png
  33. BIN
      src/views/home/images/tool_bg.png
  34. 393 286
      src/views/home/index.module.less
  35. 207 232
      src/views/home/index.tsx
  36. 138 0
      src/views/home/modals/selectClass.tsx
  37. 1 1
      src/views/natural-resources/components/my-collect/index.tsx
  38. 1 0
      src/views/prepare-lessons/api.ts
  39. 17 3
      src/views/prepare-lessons/components/lesson-main/courseware/index.tsx
  40. 1 0
      src/views/prepare-lessons/components/lesson-main/train/assign-homework.tsx
  41. 7 1
      src/views/prepare-lessons/components/lesson-main/train/index.tsx
  42. 5 1
      src/views/prepare-lessons/model/select-music/index.module.less
  43. 37 11
      src/views/setting/components/personInfo.tsx
  44. 62 12
      src/views/setting/components/schoolInfo/index.module.less
  45. 139 101
      src/views/setting/components/schoolInfo/index.tsx
  46. 42 18
      src/views/setting/index.module.less
  47. 49 6
      src/views/setting/modal/add-teacher/index.tsx
  48. 15 4
      src/views/setting/modal/forgotPassword.tsx
  49. 2 2
      src/views/xiaoku-music/index.module.less
  50. 8 6
      src/views/xiaoku-music/index.tsx

+ 3 - 1
src/components/card-preview/index.module.less

@@ -4,6 +4,8 @@
   :global {
     .n-card__content {
       height: 517px;
+      border-radius: 16px;
+      overflow: hidden;
     }
 
     .n-card-header__main {
@@ -14,4 +16,4 @@
       text-overflow: ellipsis;
     }
   }
-}
+}

+ 1 - 1
src/components/card-preview/music-modal/index.tsx

@@ -17,7 +17,7 @@ export default defineComponent({
     const origin = /(localhost|192)/.test(location.host)
       ? 'https://dev.kt.colexiu.com'
       : location.origin;
-    const src = `${origin}/instrument?platform=pc&modelType=practise&id=${props.item.content}&Authorization=${userStore.getToken}`;
+    const src = `${origin}/instrument?modelType=practise&id=${props.item.content}&Authorization=${userStore.getToken}`;
     return () => (
       <div class={styles.musicScore}>
         <iframe

+ 11 - 0
src/utils/contants.ts

@@ -47,3 +47,14 @@ export const trainingStatus = {
   SUBMITTED: '不合格',
   TARGET: '合格'
 } as any;
+
+/** 周 */
+export const weekToCN = {
+  0: '星期天',
+  1: '星期一',
+  2: '星期二',
+  3: '星期三',
+  4: '星期四',
+  5: '星期五',
+  6: '星期六'
+} as any;

+ 12 - 10
src/views/attend-class/index.tsx

@@ -110,16 +110,18 @@ export default defineComponent({
         const tempRows = res.data.rows || [];
         const temp: any = [];
         tempRows.forEach((row: any) => {
-          temp.push({
-            id: row.id,
-            materialId: row.materialId,
-            coverImg: row.coverImg,
-            type: row.materialType,
-            title: row.materialName,
-            isCollect: !!row.favoriteFlag,
-            isSelected: row.source === 'PLATFORM' ? true : false,
-            content: row.content
-          });
+          if (!row.removeFlag) {
+            temp.push({
+              id: row.id,
+              materialId: row.materialId,
+              coverImg: row.coverImg,
+              type: row.materialType,
+              title: row.materialName,
+              isCollect: !!row.favoriteFlag,
+              isSelected: row.source === 'PLATFORM' ? true : false,
+              content: row.content
+            });
+          }
         });
         data.knowledgePointList = temp;
         data.itemList = data.knowledgePointList.map((m: any) => {

+ 1 - 1
src/views/classList/classDetail.tsx

@@ -11,7 +11,7 @@ import { getTabsCache, setTabsCaches } from '@/hooks/use-async';
 export default defineComponent({
   name: 'base-setting',
   setup() {
-    const activeTab = ref('attendclass');
+    const activeTab = ref('student');
     const route = useRoute();
     const routerList = ref([
       { name: '班级管理', path: '/classList' },

BIN
src/views/home/images/bannerPerson.png


BIN
src/views/home/images/blackboard_bg.png


BIN
src/views/home/images/cloundIcon.png


BIN
src/views/home/images/goClass.png


BIN
src/views/home/images/headerD.png


BIN
src/views/home/images/icon-book.png


BIN
src/views/home/images/icon-date.png


BIN
src/views/home/images/icon-detail.png


+ 17 - 0
src/views/home/images/icon-from.svg

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="18px" viewBox="0 0 38 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>形状</title>
+    <defs>
+        <linearGradient x1="3.82187655%" y1="48.6777144%" x2="100%" y2="50%" id="linearGradient-1">
+            <stop stop-color="#198CFE" offset="0%"></stop>
+            <stop stop-color="#007AFE" stop-opacity="0.125464379" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="老师端首页改版+数据页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.400000006">
+        <g id="1、主页-女老师" transform="translate(-599.000000, -983.000000)" fill="url(#linearGradient-1)" fill-rule="nonzero">
+            <g id="位图" transform="translate(132.000000, 828.000000)">
+                <path d="M487.117135,164 L480.070594,170.709091 L482.476729,173 L491.929406,164 L482.476729,155 L480.070594,157.290909 L487.117135,164 Z M474.046541,164 L467,170.709091 L469.406136,173 L478.858813,164 L469.578003,155 L467,157.290909 L474.046541,164 Z M500.187728,164 L493.141187,170.709091 L495.547323,173 L505,164 L495.71919,155 L493.141187,157.290909 L500.187728,164 Z" id="形状"></path>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
src/views/home/images/icon-lession.png


BIN
src/views/home/images/icon-right-arrow.png


BIN
src/views/home/images/icon-subject.png


BIN
src/views/home/images/icon-to.png


+ 16 - 0
src/views/home/images/icon-white-arrow.svg

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>编组 37</title>
+    <g id="老师端首页改版+数据页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="1、主页-女老师" transform="translate(-660.000000, -192.000000)" fill="#FFFFFF">
+            <g id="编组-38" transform="translate(560.000000, 177.000000)">
+                <g id="编组-37" transform="translate(100.000000, 15.000000)">
+                    <g id="编组-36" transform="translate(5.656854, 5.656854) rotate(-45.000000) translate(-5.656854, -5.656854) translate(1.656854, 1.656854)">
+                        <rect id="矩形" x="3.01442635e-13" y="6" width="8" height="2"></rect>
+                        <polygon id="矩形" transform="translate(7.000000, 4.000000) rotate(-270.000000) translate(-7.000000, -4.000000) " points="3 3 11 3 11 5 3 5"></polygon>
+                    </g>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
src/views/home/images/leftDot.png


BIN
src/views/home/images/lineICon.png


BIN
src/views/home/images/musicIcon.png


BIN
src/views/home/images/rightDot.png


BIN
src/views/home/images/soureIcon.png


BIN
src/views/home/images/t1.png


BIN
src/views/home/images/t1_bg.png


BIN
src/views/home/images/t2.png


BIN
src/views/home/images/t2_bg.png


BIN
src/views/home/images/t3.png


BIN
src/views/home/images/t3_bg.png


BIN
src/views/home/images/teacher_man.png


BIN
src/views/home/images/teacher_woman.png


BIN
src/views/home/images/tool_bg.png


+ 393 - 286
src/views/home/index.module.less

@@ -4,125 +4,348 @@
   // align-items: center;
   // justify-content: space-between;
   align-content: stretch;
+}
+
+.homeInfoLeft {
+  display: flex;
+  flex-direction: column;
+  width: 1286px;
+}
+
+.homeBanner {
+  border-radius: 20px;
+  background-color: #fff;
+  position: relative;
+  margin-bottom: 20px;
+  padding: 32px;
+}
 
-  .homeInfoLeft {
+.welcomeInfo {
+  margin-bottom: 30px;
+  padding-bottom: 30px;
+  border-bottom: 1px solid #F2F2F2;
+
+  .userInfo {
     display: flex;
-    flex-direction: column;
-    width: 1286px;
-
-    .homeBanner {
-      height: 246px;
-      border-radius: 20px;
-      background-color: #d5e9ff;
-      position: relative;
-      margin-bottom: 20px;
-
-      .bannerPerson {
-        width: 327px;
-        height: 278px;
-        position: absolute;
-        left: 138px;
-        bottom: 0;
-        z-index: 100;
+    align-items: center;
+    justify-content: space-between;
+    color: #131415;
+    padding-bottom: 14px;
+
+    .userName {
+      font-size: 26px;
+      font-family: Alibaba-PuHuiTi-B, Alibaba-PuHuiTi;
+      font-weight: bold;
+      line-height: 35px;
+    }
+
+    .userTime {
+      display: flex;
+      align-items: center;
+      font-size: 20px;
+      font-weight: 600;
+      line-height: 28px;
+
+      &::before {
+        content: ' ';
+        display: inline-block;
+        width: 18px;
+        height: 18px;
+        background: url('./images/icon-date.png') no-repeat center;
+        background-size: contain;
+        margin-right: 10px;
       }
+    }
+  }
 
-      .bannerInfo {
-        width: 520px;
-        height: 156px;
-        position: absolute;
-        bottom: 45px;
-        right: 195px;
-        font-size: 18px;
+  .userTips {
+    font-size: 18px;
+    color: #787D7F;
+    line-height: 25px;
+  }
 
-        color: rgba(0, 0, 0, 0.65);
-        line-height: 25px;
-        letter-spacing: 1px;
+  .guide_btn {
+    margin-left: 16px;
+    --n-height: 40px !important;
+
+    i {
+      display: inline-block;
+      width: 12px;
+      height: 12px;
+      background: url('./images/icon-white-arrow.svg') no-repeat center;
+      background-size: contain;
+      margin-left: 4px;
+    }
+  }
+}
 
-        h3 {
-          margin-bottom: 23px;
-          height: 35px;
-          font-size: 30px;
-          font-weight: 600;
-          color: #131415;
-        }
+.applyInfo {
+  background: #E6F2FF;
+  border-radius: 20px;
+  position: relative;
+  display: flex;
+  align-items: center;
 
-        .bannerRrey {
-          color: rgba(0, 0, 0, 0.5);
-        }
+  .teacherWoman {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    z-index: 9;
+    width: 238px;
+    height: 518px;
 
-        .bannerRed {
-          color: #f24a6c;
-        }
+    img {
+      width: inherit;
+      height: inherit;
+    }
+  }
 
-        .bannerBtn {
-          width: 154px;
-          height: 43px;
-          background: #3583fa;
-          border-radius: 22px;
-          font-size: 18px;
-          line-height: 43px;
-          font-weight: 600;
-          color: #ffffff;
-          letter-spacing: 1px;
-          display: flex;
-          flex-direction: row;
-          align-items: center;
-          justify-content: center;
-          margin-top: 25px;
-          cursor: pointer;
-
-          &:hover {
-            opacity: 0.8;
-          }
+  .teacherMan {
+    position: absolute;
+    left: -45px;
+    bottom: -26px;
+    z-index: 9;
+    width: 376px;
+    height: 538px;
+
+    img {
+      width: inherit;
+      height: inherit;
+    }
+  }
 
-          .rotueRight {
-            font-size: 14px;
-            margin-left: 4px;
-          }
-        }
+  .blackborad {
+    padding-left: 182px;
+    padding-right: 85px;
+
+    .blackBoardBg {
+      width: 466px;
+      height: 298px;
+    }
+  }
+}
+
+.applyContainer {
+  width: 390px;
+  padding: 24px 0;
+
+  .applyTitle {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 42px;
+
+    .className {
+      font-size: 26px;
+      font-family: Alibaba-PuHuiTi-B, Alibaba-PuHuiTi;
+      font-weight: bold;
+      color: #323DC5;
+      line-height: 35px;
+
+
+      &::after {
+        content: ' ';
+        margin-left: 8px;
+        display: inline-block;
+        width: 16px;
+        height: 16px;
+        background: url('./images/icon-right-arrow.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+  }
+
+  .informations {
+    line-height: 40px;
+    height: 40px;
+    font-size: 14px;
+    color: #6AA1E0;
+  }
+
+  .selectContainer {
+    display: flex;
+    align-items: center;
+    width: 100%;
+    background-color: #fff;
+    border-radius: 10px;
+
+    img {
+      position: absolute;
+      left: 20px;
+      top: 10px;
+      width: 32px;
+      height: 32px;
+      z-index: 9;
+    }
+  }
+
+  .startClass,
+  .beforClass {
+    --n-height: 60px !important;
+    min-width: 182px !important;
+    --n-font-size: 20px !important;
+    font-weight: bold !important;
+  }
+
+  .btnGroup {
+    margin-top: 10px;
+    width: 100%;
+  }
+
+  :global {
+    .n-avatar {
+      --n-merged-size: 42px !important;
+    }
+
+    .n-base-selection {
+      --n-height: 52px !important;
+      --n-border: none !important;
+      --n-border-radius: 10px !important;
+      --n-padding-single: 0 26px 0 0px !important;
+      // --n-placeholder-color: #626264 !important;
+      padding-left: 70px;
+    }
+
+    .n-form-item {
+      --n-feedback-height: 20px !important;
+    }
+
+    .n-base-selection.n-base-selection--disabled {
+      background-color: var(--n-color-disabled);
+      cursor: not-allowed;
+    }
+  }
+}
+
+.toolContainer {
+  display: flex;
+  align-items: center;
+  background: url('./images/tool_bg.png') no-repeat left bottom #fff;
+  background-size: 108px 84px;
+  border-radius: 16px;
+  padding: 32px 48px 32px 54px;
+
+  .toolTips {
+    width: 370px;
+
+    .toolTitle {
+      display: flex;
+      align-items: center;
+      font-size: 24px;
+      font-weight: 600;
+      color: #131415;
+      padding-bottom: 24px;
+
+      &::before {
+        margin-right: 8px;
+        content: ' ';
+        display: inline-block;
+        width: 5px;
+        height: 16px;
+        background: #198CFE;
       }
+    }
+
+    .toolContent {
+      font-size: 16px;
+      color: #787D7F;
+      line-height: 25px;
+      letter-spacing: 1px;
+      padding-bottom: 18px;
+    }
+  }
+
+  .iconTo {
+    margin: 0 44px;
+    width: 38px;
+    height: 18px
+  }
+
+  .toolFunction {
+    display: flex;
+    align-items: center;
+
+    img {
+      width: 174px;
+      height: 146px;
+      margin: 6px 14px 10px;
+    }
+
+    .toolItem {
+      width: 203px;
+      background: #EBF5FF;
+      border-radius: 16px;
+      margin-right: 40px;
+      text-align: center;
 
-      .leftDot {
-        position: absolute;
-        left: 0;
-        top: 0;
-        width: 141px;
-        height: 141px;
+      &:last-child {
+        margin-right: 0;
       }
 
-      .rightDot {
-        position: absolute;
-        right: 0;
-        bottom: 0;
-        width: 158px;
-        height: 137px;
+      .toolMemo {
+        font-size: 16px;
+        color: #4A8FE0;
+        line-height: 22px;
+        text-align: center;
+      }
+
+      .btn1,
+      .btn2,
+      .btn3 {
+        --n-border-radius: 9px !important;
+        --n-height: 38px !important;
+        --n-padding: 7px 28px !important;
+        --n-border: none !important;
+        --n-border-hover: none !important;
+        --n-border-pressed: none !important;
+        --n-border-focus: none !important;
+        --n-border-disabled: none !important;
+        --n-font-size: 18px !important;
+        font-weight: 600 !important;
+        color: #fff;
+        margin: 16px 0 20px;
       }
 
-      .lineIcon {
-        position: absolute;
-        z-index: 500;
-        width: 48px;
-        height: 48px;
-        left: 96px;
-        top: 89px;
+
+      .btn1 {
+        background: linear-gradient(135deg, #51E7FF 0%, #2A7CFF 100%) !important;
+        --n-ripple-color: #51E7FF !important;
+      }
+
+      .btn2 {
+        background: linear-gradient(135deg, #FFA289 0%, #FF5177 100%);
+        --n-ripple-color: #FFA289 !important;
       }
 
-      .musicIcon {
-        position: absolute;
-        width: 51px;
-        height: 46px;
-        left: 400px;
-        top: 36px;
+      .btn3 {
+        background: linear-gradient(135deg, #FFC37B 0%, #FF6635 100%);
+        --n-ripple-color: #FFC37B !important;
       }
     }
-  }
 
-  .homeInfoRight {
-    margin-left: 20px;
-    width: 450px;
+    .item1 {
+      background: url('./images/t1_bg.png')no-repeat right bottom #EBF5FF;
+      background-size: 28px;
+    }
+
+    .item2 {
+      background: url('./images/t2_bg.png')no-repeat right bottom #FFF1EF;
+      background-size: 28px;
+    }
+
+    .item3 {
+      background: url('./images/t3_bg.png')no-repeat right bottom #FFF7E2;
+      background-size: 28px;
+    }
   }
 }
 
+
+.homeInfoRight {
+  margin-left: 20px;
+  width: 450px;
+}
+
 // 学情
 .homeStudy {
   background-color: #fff;
@@ -280,9 +503,11 @@
           border-radius: 4px;
           margin-right: 6px;
         }
+
         .DataTopRightDot.DataTopRightDotBlue {
           background: #d5e9ff;
         }
+
         .DataTopRightDot.red {
           background: #ff7aa7;
         }
@@ -297,148 +522,11 @@
   }
 }
 
-.leftBottomWrap {
-  padding: 20px 32px;
-  border-radius: 20px;
-  background-color: #fff;
-  flex: 1;
-
-  .tableWrap {
-    margin-top: 40px;
-
-    :global {
-      .n-data-table {
-        border-radius: 10px 10px 0 0;
-        overflow: hidden;
-      }
-
-      .n-data-table-thead {
-        height: 54px;
-        line-height: 54px;
-      }
-
-      .n-data-table-th {
-        padding: 0 20px;
-        background-color: #f7f7f8;
-        color: rgba(0, 0, 0, 0.88);
-      }
-
-      .n-data-table-th__title-wrapper {
-        &::after {
-          content: '';
-          width: 1px;
-          height: 22px;
-          background: #ebebeb;
-
-          &:nth-last-child(1) {
-            display: none;
-          }
-        }
-      }
-
-      .n-data-table-th--last {
-        .n-data-table-th__title-wrapper {
-          &::after {
-            content: '';
-            width: 0px;
-            height: 22px;
-            background: #ebebeb;
-          }
-        }
-      }
-    }
-  }
-}
 
 .homeInfoRight {
   display: flex;
   flex-direction: column;
 
-  .homeInfoRightTop {
-    border-radius: 20px;
-    background-color: #fff;
-    padding: 30px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-
-    .HeaderWrap {
-      position: relative;
-
-      .headerD {
-        width: 237px;
-        height: 142px;
-      }
-
-      .defultHeade {
-        width: 116px;
-        height: 116px;
-        overflow: hidden;
-        border-radius: 50%;
-        position: absolute;
-        top: 13px;
-        left: 61px;
-      }
-    }
-
-    .headerInfo {
-      .headerTitle {
-        font-size: 20px;
-        font-weight: 600;
-        color: #131415;
-        line-height: 28px;
-        letter-spacing: 1px;
-        margin: 18px 0 8px;
-        text-align: center;
-      }
-
-      .headerSubTitle {
-        font-size: 14px;
-        font-weight: 400;
-        color: #707a92;
-        line-height: 20px;
-      }
-    }
-
-    .quickEnter {
-      width: 100%;
-      margin-top: 30px;
-
-      .quickList {
-        margin-top: 20px;
-        display: flex;
-        flex-direction: row;
-        align-items: center;
-        justify-content: space-around;
-
-        .quickItem {
-          cursor: pointer;
-
-          &:hover {
-            opacity: 0.8;
-          }
-
-          display: flex;
-          flex-direction: column;
-          align-items: center;
-
-          .quickItemImg {
-            img {
-              width: 48px;
-              height: 48px;
-            }
-          }
-
-          p {
-            font-size: 14px;
-            font-weight: 600;
-            color: #333333;
-          }
-        }
-      }
-    }
-  }
-
   .rightTitle {
     display: flex;
     flex-direction: row;
@@ -455,47 +543,103 @@
     }
   }
 
+  .headerContainer {
+    padding-top: 12px;
+    text-align: center;
+  }
+
+  .HeaderWrap {
+    position: relative;
+    display: inline-block;
+
+    .headerD {
+      width: 237px;
+      height: 138px;
+    }
+
+    .defultHeade {
+      width: 116px;
+      height: 116px;
+      overflow: hidden;
+      border-radius: 50%;
+      position: absolute;
+      top: 11px;
+      left: 61px;
+    }
+  }
+
+  .headerInfo {
+    text-align: center;
+    padding-bottom: 32px;
+    border-bottom: 1px solid #F2F2F2;
+    margin-bottom: 32px;
+
+    .headerTitle {
+      font-size: 20px;
+      font-weight: 600;
+      color: #131415;
+      line-height: 28px;
+      letter-spacing: 1px;
+      padding: 20px 0 8px;
+    }
+
+    .headerSubTitle {
+      font-size: 14px;
+      font-weight: 400;
+      color: #707a92;
+      line-height: 20px;
+    }
+  }
+
   .rightTeachingWrap {
     overflow: hidden;
     flex: 1;
     background-color: #fff;
     padding: 20px;
     border-radius: 20px;
-    margin-top: 20px;
+
     .rightTeachingWrapTitle {
       display: flex;
       flex-direction: row;
       align-items: center;
       justify-content: space-between;
+
       .lookMore {
         cursor: pointer;
         display: flex;
-        flex-direction: row;
         align-items: center;
-        color: #1677ff;
-        .lookMoreArrow {
-          width: 12px;
-          height: 12px;
+        min-width: 114px;
+        border-radius: 8px;
+        border: 1px solid #DEDEDE;
+        font-size: 15px;
+        color: #131415;
+        padding: 7px 12px;
+
+        svg {
+          margin-left: 8px;
+          width: 16px;
+          height: 16px;
         }
       }
     }
   }
 }
+
 .teachListWrap {
   position: relative;
+
   .teachListWrapWall {
     position: absolute;
     bottom: 0;
     height: 159px;
     width: 100%;
-    background: linear-gradient(
-      180deg,
-      rgba(255, 255, 255, 0) 0%,
-      #ffffff 100%
-    );
+    background: linear-gradient(180deg,
+        rgba(255, 255, 255, 0) 0%,
+        #ffffff 100%);
     border-radius: 0px 0px 20px 20px;
   }
 }
+
 .teachGroup {
   margin-top: 12px;
 
@@ -624,50 +768,13 @@
   }
 }
 
-.chioseModel {
-  width: 413px;
-
-  :global {
-    .n-select {
-      width: 100%;
-      min-width: 180px;
-
-      .n-base-selection-label {
-        height: 43px;
-        line-height: 43px;
-      }
-
-      .n-base-selection__border {
-        border-radius: 8px;
-        overflow: hidden;
-      }
-
-      .n-base-selection__state-border {
-        border-radius: 8px;
-        overflow: hidden;
-      }
-    }
-
-    .n-card-header {
-      position: relative;
-      padding: 20px 18px;
-      text-align: center;
-      // background: #F5F6FA;
-      font-size: 22px;
-      font-weight: 600;
-      color: #131415;
-      line-height: 30px;
-    }
+.assignHomework {
+  width: 520px;
+}
 
-    .n-card-header__close {
-      position: absolute;
-      right: 18px;
-    }
+.assignHomeworkContainer {
+  padding: 24px 30px;
 
-    .n-card__content {
-      padding-bottom: 30px;
-    }
-  }
 
   .updateBtnGroup {
     padding: 0;
@@ -680,4 +787,4 @@
       }
     }
   }
-}
+}

+ 207 - 232
src/views/home/index.tsx

@@ -1,273 +1,248 @@
-import { defineComponent, reactive } from 'vue';
+import { computed, defineComponent, reactive } from 'vue';
 import styles from './index.module.less';
-import bannerPerson from './images/bannerPerson.png';
-import { NIcon, NImage, NDataTable, NButton, NModal } from 'naive-ui';
-import leftDot from './images/leftDot.png';
-import rightDot from './images/rightDot.png';
-import lineIcon from './images/lineIcon.png';
-import musicIcon from './images/musicIcon.png';
-import Study from './components/study';
-import Pagination from '@/components/pagination';
+import {
+  NImage,
+  NButton,
+  NAvatarGroup,
+  NForm,
+  NFormItem,
+  NSelect,
+  NSpace,
+  NModal
+} from 'naive-ui';
 import headerD from './images/headerD.png';
 import defultHeade from '@/components/layout/images/teacherIcon.png';
-import cloundIcon from './images/cloundIcon.png';
-import goClass from './images/goClass.png';
-import boxIcon from './images/boxIcon.png';
 import TeachList from './components/teachList';
-import ChioseModal from './modals/chioseModal';
-import blueArrow from './images/blueArrow.png';
-import soureIcon from './images/soureIcon.png';
+import blackBoardBg from './images/blackboard_bg.png';
+import teacherMan from './images/teacher_man.png';
+import teacherWoman from './images/teacher_woman.png';
+import iconLession from './images/icon-lession.png';
+import iconBook from './images/icon-book.png';
+import iconDetail from './images/icon-detail.png';
+import iconSubject from './images/icon-subject.png';
+import iconTo from './images/icon-to.png';
+import t1 from './images/t1.png';
+import t2 from './images/t2.png';
+import t3 from './images/t3.png';
 import { useRouter } from 'vue-router';
+import { useUserStore } from '/src/store/modules/users';
+import SelectClass from './modals/selectClass';
+import dayjs from 'dayjs';
+import { weekToCN } from '/src/utils/contants';
+import { getCLassStudent } from '../classList/api';
+
 export default defineComponent({
   name: 'home-page',
   setup() {
     const router = useRouter();
-    const state = reactive({
-      loading: false,
-      pagination: {
-        page: 1,
-        rows: 10,
-        pageTotal: 4
-      },
-      tableList: [
-        {
-          teacherName: '孙忆枫',
-          createTime: '2023-06-27',
-          endTime: '2023-06-30',
-          status: 'ing',
-          studentNum: 100,
-          submitNum: 100,
-          quantityNum: 60,
-          submitRate: 100,
-          quantityRate: 60
-        },
-        {
-          teacherName: '孙忆枫',
-          createTime: '2023-06-27',
-          endTime: '2023-06-30',
-          status: 'ing',
-          studentNum: 100,
-          submitNum: 100,
-          quantityNum: 60,
-          submitRate: 100,
-          quantityRate: 60
-        },
-        {
-          teacherName: '孙忆枫',
-          createTime: '2023-06-27',
-          endTime: '2023-06-30',
-          status: 'ing',
-          studentNum: 100,
-          submitNum: 100,
-          quantityNum: 60,
-          submitRate: 100,
-          quantityRate: 60
-        },
-        {
-          teacherName: '孙忆枫',
-          createTime: '2023-06-25',
-          endTime: '2023-06-26',
-          status: 'end',
-          studentNum: 100,
-          submitNum: 100,
-          quantityNum: 60,
-          submitRate: 100,
-          quantityRate: 60
-        }
-      ] as any,
-      goCourseVisiable: false
+    const userStore = useUserStore();
+    const forms = reactive({
+      applyClass: null as any,
+      applyClassItem: {} as any, // 选择的内容
+      applyStatus: false,
+      studentList: [] as any
     });
-    const columns = () => {
-      return [
-        {
-          title: '布置老师',
-          key: 'teacherName'
-        },
-        {
-          title: '布置时间',
-          key: 'createTime'
-        },
-        {
-          title: '截止时间',
-          key: 'endTime'
-        },
-        {
-          title: '训练状态',
-          key: 'status',
-          render(row: any) {
-            return row.status == 'ing' ? (
-              <div class={styles.indDot}>
-                {' '}
-                <span></span> 进行中
-              </div>
-            ) : (
-              <div class={styles.endDot}>
-                <span></span>已结束
-              </div>
-            );
-          }
-        },
-        {
-          title: '布置人数',
-          key: 'studentNum'
-        },
-        {
-          title: '提交人数',
-          key: 'submitNum'
-        },
-        {
-          title: '合格人数',
-          key: 'quantityNum'
-        },
-        {
-          title: '提交率',
-          key: 'submitRate',
-          render(row: any) {
-            return <span>{row.submitRate}%</span>;
-          }
-        },
-        {
-          title: '合格率',
-          key: 'quantityRate',
-          render(row: any) {
-            return <span>{row.quantityRate}%</span>;
-          }
-        },
-        {
-          title: '操作',
-          key: 'id',
-          render(row: any) {
-            return (
-              <NButton text type="primary">
-                详情
-              </NButton>
-            );
-          }
-        }
-      ];
-    };
-    const getList = () => {
-      console.log('1');
+
+    // 显示选择的内容
+    const bookInfo = computed(() => {
+      return '';
+    });
+
+    // 学生列表
+    // getStdentList
+    // 应用选择年级班级
+    const onApplyConfirm = async (item: any) => {
+      try {
+        //
+        const { data } = await getCLassStudent({
+          page: 1,
+          rows: 999,
+          classGroupId: item.classGroupId
+        });
+
+        const temps = data.rows || [];
+        temps.forEach((row: any) => {
+          forms.studentList.push({
+            name: row.nickname,
+            src: row.avatar
+          });
+        });
+
+        console.log(item, data);
+        forms.applyClass = item.currentGradeLabel + item.className;
+        forms.applyClassItem = item;
+      } catch {
+        //
+      }
     };
     return () => (
       <div class={styles.homeWrap}>
         <div class={styles.homeInfoLeft}>
           <div class={styles.homeBanner}>
-            <img class={styles.bannerPerson} src={bannerPerson}></img>
-            <div class={styles.bannerInfo}>
-              <h3>Hi,张老师 下午好!</h3>
-              <p class={styles.bannerMsg}>
-                您有 <span class={styles.bannerRed}> 4 </span>
-                <span class={styles.bannerRrey}> 条消息未读,</span>
-                <span class={styles.bannerRed}> 3 </span>
-                门课程未布置作业,请及时处理哦!
-              </p>
-              <div class={styles.bannerBtn}>
-                立即处理{' '}
-                <NIcon class={styles.rotueRight}>
-                  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
-                    <path
-                      d="M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31a.996.996 0 0 0 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z"
-                      fill="currentColor"></path>
-                  </svg>
-                </NIcon>
+            <div class={styles.welcomeInfo}>
+              <div class={styles.userInfo}>
+                <div class={styles.userName}>
+                  Hi,{userStore.getUserInfo?.nickname} 下午好~
+                </div>
+                <div class={styles.userTime}>
+                  {dayjs().format('MM月DD日')},{weekToCN[dayjs().day()]}
+                </div>
+              </div>
+              <div class={styles.userTips}>
+                <span>欢迎您使用酷乐秀课堂乐器数字化教学平台!</span>
+                <NButton color="#40A1FF" round class={styles.guide_btn}>
+                  功能引导
+                  <i></i>
+                </NButton>
+              </div>
+            </div>
+
+            <div class={styles.applyInfo}>
+              {userStore.getUserInfo.gender === 1 ? (
+                <img src={teacherMan} class={styles.teacherMan} />
+              ) : (
+                <img src={teacherWoman} class={styles.teacherWoman} />
+              )}
+
+              <div class={styles.blackborad}>
+                <img src={blackBoardBg} class={styles.blackBoardBg} />
+              </div>
+              <div class={styles.applyContainer}>
+                <div class={styles.applyTitle}>
+                  <span
+                    class={styles.className}
+                    onClick={() => (forms.applyStatus = true)}>
+                    {forms.applyClass || '请选择班级'}
+                  </span>
+                  <NAvatarGroup options={forms.studentList} max={5} />
+                </div>
+                <div class={styles.informations}>{bookInfo.value}</div>
+
+                <NForm showLabel={false}>
+                  <NFormItem>
+                    <div class={styles.selectContainer}>
+                      <img src={iconLession} />
+                      <NSelect placeholder="请选择教材版本" />
+                    </div>
+                  </NFormItem>
+                  <NFormItem>
+                    <div class={styles.selectContainer}>
+                      <img src={iconBook} />
+                      <NSelect placeholder="请选择册别" />
+                    </div>
+                  </NFormItem>
+                  <NFormItem>
+                    <div class={styles.selectContainer}>
+                      <img src={iconDetail} />
+                      <NSelect placeholder="请选择章节" />
+                    </div>
+                  </NFormItem>
+                  <NFormItem>
+                    <div class={styles.selectContainer}>
+                      <img src={iconSubject} />
+                      <NSelect placeholder="请选择声部" />
+                    </div>
+                  </NFormItem>
+                  <NSpace class={styles.btnGroup} justify="center">
+                    <NButton
+                      round
+                      block
+                      class={styles.startClass}
+                      color="#FF6E4C">
+                      开始上课
+                    </NButton>
+                    <NButton
+                      round
+                      block
+                      class={styles.beforClass}
+                      color="#5B64D1"
+                      onClick={() => router.push('/prepare-lessons')}>
+                      去备课
+                    </NButton>
+                  </NSpace>
+                </NForm>
               </div>
             </div>
-            <NImage
-              class={styles.leftDot}
-              src={leftDot}
-              previewDisabled></NImage>
-            <NImage
-              class={styles.rightDot}
-              src={rightDot}
-              previewDisabled></NImage>
-            <NImage
-              class={styles.lineIcon}
-              src={lineIcon}
-              previewDisabled></NImage>
-            <NImage
-              class={styles.musicIcon}
-              src={musicIcon}
-              previewDisabled></NImage>
           </div>
-          <div class={styles.leftBottomWrap}>
-            <Study></Study>
+
+          <div class={styles.toolContainer}>
+            <div class={styles.toolTips}>
+              <div class={styles.toolTitle}>工具箱</div>
+              <div class={styles.toolContent}>
+                这里是常用的教学辅助工具,可帮助学生集中注意力、提高演奏效率,使演奏更完整平稳。让您在课堂上完成更好的教学。
+              </div>
+            </div>
+            <img src={iconTo} class={styles.iconTo} />
+            <div class={styles.toolFunction}>
+              <div class={[styles.toolItem, styles.item1]}>
+                <img src={t1} />
+                <p class={styles.toolMemo}>提升效率,练习好节奏</p>
+                <NButton class={styles.btn1}>节拍器</NButton>
+              </div>
+              <div class={[styles.toolItem, styles.item2]}>
+                <img src={t2} />
+                <p class={styles.toolMemo}>精准调音,一劳永逸</p>
+                <NButton class={styles.btn2}>调音器</NButton>
+              </div>
+              <div class={[styles.toolItem, styles.item3]}>
+                <img src={t3} />
+                <p class={styles.toolMemo}>创造时间,集中注意力</p>
+                <NButton class={styles.btn3}>计时器</NButton>
+              </div>
+            </div>
           </div>
         </div>
         <div class={styles.homeInfoRight}>
-          <div class={styles.homeInfoRightTop}>
-            <div class={styles.HeaderWrap}>
-              <NImage
-                previewDisabled
-                class={styles.headerD}
-                src={headerD}></NImage>
-              <NImage
-                previewDisabled
-                class={styles.defultHeade}
-                src={defultHeade}></NImage>
+          <div class={styles.rightTeachingWrap}>
+            <div class={styles.headerContainer}>
+              <div class={styles.HeaderWrap}>
+                <NImage
+                  previewDisabled
+                  class={styles.headerD}
+                  src={headerD}></NImage>
+                <NImage
+                  previewDisabled
+                  class={styles.defultHeade}
+                  src={defultHeade}></NImage>
+              </div>
             </div>
             <div class={styles.headerInfo}>
               <p class={styles.headerTitle}>张晚意</p>
               <p class={styles.headerSubTitle}>武汉小学 | 音乐老师</p>
             </div>
-            <div class={styles.quickEnter}>
-              <h3 class={styles.rightTitle}>
-                <div class={styles.titleDot}></div>快捷入口
-              </h3>
-              <div class={styles.quickList}>
-                <div
-                  class={styles.quickItem}
-                  onClick={() => (state.goCourseVisiable = true)}>
-                  <NImage
-                    previewDisabled
-                    class={styles.quickItemImg}
-                    src={goClass}></NImage>
-                  <p>开始上课</p>
-                </div>
-
-                <div class={styles.quickItem}>
-                  <NImage
-                    previewDisabled
-                    class={styles.quickItemImg}
-                    src={soureIcon}></NImage>
-                  <p>布置作业</p>
-                </div>
-                <div
-                  class={styles.quickItem}
-                  onClick={() => router.push('/natural-resources')}>
-                  <NImage
-                    previewDisabled
-                    class={styles.quickItemImg}
-                    src={cloundIcon}></NImage>
-                  <p>我的资源</p>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class={styles.rightTeachingWrap}>
             <div class={styles.rightTeachingWrapTitle}>
               <h3 class={styles.rightTitle}>
-                <div class={styles.titleDot}></div>教学进度
+                <div class={styles.titleDot}></div>使用记录
               </h3>
               <div class={styles.lookMore}>
-                查看全部{' '}
-                <NImage
-                  src={blueArrow}
-                  class={styles.lookMoreArrow}
-                  previewDisabled></NImage>
+                三年级2班
+                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
+                  <path
+                    d="M6 9l6 6l6-6"
+                    fill="none"
+                    stroke="currentColor"
+                    stroke-width="2"
+                    stroke-linecap="round"
+                    stroke-linejoin="round"></path>
+                </svg>
               </div>
             </div>
             <TeachList></TeachList>
           </div>
         </div>
 
+        {/* 添加自定义教材 */}
         <NModal
-          v-model:show={state.goCourseVisiable}
+          v-model:show={forms.applyStatus}
           preset="card"
-          class={styles.chioseModel}
-          title={'选择课件'}>
-          <ChioseModal
-            onClose={() => (state.goCourseVisiable = false)}></ChioseModal>
+          showIcon={false}
+          class={['modalTitle background', styles.assignHomework]}
+          title={'选择年级'}
+          blockScroll={false}>
+          <SelectClass
+            onConfirm={(item: any) => onApplyConfirm(item)}
+            onClose={() => (forms.applyStatus = false)}
+          />
         </NModal>
       </div>
     );

+ 138 - 0
src/views/home/modals/selectClass.tsx

@@ -0,0 +1,138 @@
+import { defineComponent, reactive, ref } from 'vue';
+import styles from '../index.module.less';
+import { NButton, NForm, NFormItem, NSelect, NSpace } from 'naive-ui';
+import { BOOK_DATA } from '/src/views/natural-resources/model/add-teaching';
+import { classGroupPage } from '../../prepare-lessons/api';
+
+export default defineComponent({
+  name: 'select-class',
+  emits: ['close', 'confirm'],
+  setup(props, { emit }) {
+    const forms = reactive({
+      id: null as any,
+      uploading: false,
+      classList: [] as any,
+      currentGradeNum: null,
+      classGroupId: null as any
+    });
+    const formsRef = ref();
+
+    const getClassList = async () => {
+      try {
+        const { data } = await classGroupPage({
+          currentGradeNum: forms.currentGradeNum,
+          page: 1,
+          rows: 99
+        });
+        const temp = data.rows || [];
+        const classList = [] as any;
+        temp.forEach((row: any) => {
+          classList.push({
+            label: row.currentClass + '班',
+            value: row.id
+          });
+        });
+
+        forms.classList = classList;
+      } catch {
+        //
+      }
+    };
+    const onSubmit = async () => {
+      formsRef.value?.validate(async (err: any) => {
+        if (err) {
+          return;
+        }
+        forms.uploading = true;
+        try {
+          let gradeName = '';
+          BOOK_DATA.grades.forEach((item: any) => {
+            if (forms.currentGradeNum === item.value) {
+              gradeName = item.label;
+            }
+          });
+
+          let className = '';
+          forms.classList.forEach((item: any) => {
+            if (item.value === forms.classGroupId) {
+              className = item.label;
+            }
+          });
+          emit('confirm', {
+            currentGradeNum: forms.currentGradeNum, // 年级
+            currentGradeLabel: gradeName,
+            classGroupId: forms.classGroupId, // 班级
+            className
+          });
+          emit('close');
+        } catch {
+          //
+        }
+        forms.uploading = false;
+      });
+    };
+
+    return () => (
+      <div class={styles.assignHomeworkContainer}>
+        <NForm
+          ref={formsRef}
+          model={forms}
+          labelAlign="right"
+          labelWidth={'auto'}
+          labelPlacement="left">
+          <NFormItem
+            label="年级"
+            path="currentGradeNum"
+            rule={[
+              {
+                required: true,
+                message: '请选择年级',
+                trigger: 'change',
+                type: 'number'
+              }
+            ]}>
+            <NSelect
+              v-model:value={forms.currentGradeNum}
+              placeholder="请选择年级"
+              options={BOOK_DATA.grades}
+              clearable
+              onUpdate:value={() => {
+                forms.classGroupId = null;
+                getClassList();
+              }}
+            />
+          </NFormItem>
+          <NFormItem
+            label="班级"
+            path="classGroupId"
+            rule={[
+              { required: true, message: '请选择班级', trigger: 'change' }
+            ]}>
+            <NSelect
+              v-model:value={forms.classGroupId}
+              placeholder="请选择班级"
+              clearable
+              options={forms.classList}
+              disabled={!forms.currentGradeNum}
+            />
+          </NFormItem>
+
+          <NSpace class={styles.updateBtnGroup}>
+            <NButton strong type="default" round onClick={() => emit('close')}>
+              取消
+            </NButton>
+            <NButton
+              strong
+              type="primary"
+              round
+              disabled={forms.uploading}
+              loading={forms.uploading}
+              onClick={onSubmit}>
+              确认
+            </NButton>
+          </NSpace>
+        </NForm>
+      </div>
+    );
+  }
+});

+ 1 - 1
src/views/natural-resources/components/my-collect/index.tsx

@@ -114,7 +114,7 @@ export default defineComponent({
                   onOffShelf={() => onRemove(item)}
                   disabledMouseHover={false}
                   onClick={(val: any) => {
-                    if (val.type === 'IMG') return;
+                    if (val.type === 'IMG' || !item.enableFlag) return;
                     state.show = true;
                     state.item = val;
                   }}

+ 1 - 0
src/views/prepare-lessons/api.ts

@@ -47,6 +47,7 @@ export const saveCourseware = (params: any) => {
  */
 export const teacherKnowledgeMaterialDelete = (params: any) => {
   return request.post('/edu-app/teacherKnowledgeMaterial/delete', {
+    requestType: 'form',
     data: params
   });
 };

+ 17 - 3
src/views/prepare-lessons/components/lesson-main/courseware/index.tsx

@@ -62,7 +62,8 @@ export default defineComponent({
             title: row.materialName,
             isCollect: !!row.favoriteFlag,
             isSelected: row.source === 'PLATFORM' ? true : false,
-            content: row.content
+            content: row.content,
+            removeFlag: row.removeFlag
           });
         });
 
@@ -141,7 +142,14 @@ export default defineComponent({
 
     // 预览上课
     const onPreviewAttend = () => {
-      if (forms.coursewareList.length <= 0) {
+      // 获取上架的数据
+      let count = 0;
+      forms.coursewareList.forEach((item: any) => {
+        if (!item.removeFlag) {
+          count++;
+        }
+      });
+      if (count <= 0) {
         message.error('课件不能为空');
         return;
       }
@@ -240,7 +248,13 @@ export default defineComponent({
             <NButton
               type="primary"
               onClick={() => {
-                if (forms.coursewareList.length <= 0) {
+                let count = 0;
+                forms.coursewareList.forEach((item: any) => {
+                  if (!item.removeFlag) {
+                    count++;
+                  }
+                });
+                if (count <= 0) {
                   message.error('课件不能为空');
                   return;
                 }

+ 1 - 0
src/views/prepare-lessons/components/lesson-main/train/assign-homework.tsx

@@ -114,6 +114,7 @@ export default defineComponent({
               options={BOOK_DATA.grades}
               clearable
               onUpdate:value={() => {
+                forms.classGroupId = null;
                 getClassList();
               }}
             />

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

@@ -221,7 +221,13 @@ export default defineComponent({
               type="primary"
               disabled={forms.drag}
               onClick={() => {
-                if (forms.trainList.length <= 0) {
+                let count = 0;
+                forms.trainList.forEach((item: any) => {
+                  if (!item.removeFlag) {
+                    count++;
+                  }
+                });
+                if (count <= 0) {
                   message.error('训练内容不能为空');
                   return;
                 }

+ 5 - 1
src/views/prepare-lessons/model/select-music/index.module.less

@@ -119,6 +119,10 @@
       padding-left: 12px;
       padding-right: 4px;
     }
+
+    .n-input__input-el {
+      height: 42px !important;
+    }
   }
 
   .searchBtn {
@@ -130,7 +134,7 @@
 }
 
 .spaceSection {
-  width: 76%;
+  width: 69%;
 
   &>div {
     line-height: var(--n-blank-height);

+ 37 - 11
src/views/setting/components/personInfo.tsx

@@ -39,9 +39,9 @@ export default defineComponent({
     });
     const formRef = ref();
     const teacherForm = reactive({
-      provinceCode: '', // 省份编码
-      cityCode: '', // 城市编码
-      regionCode: '', // 区域编码
+      provinceCode: userStore.info.provinceCode, // 省份编码
+      cityCode: userStore.info.cityCode, // 城市编码
+      regionCode: userStore.info.regionCode, // 区域编码
       nickname: userStore.info.nickname,
       phone: userStore.info.phone,
       gender: userStore.info.gender,
@@ -71,6 +71,10 @@ export default defineComponent({
         if (err) {
           return;
         }
+        if (!teacherForm.provinceCode || !teacherForm.cityCode) {
+          message.error('请选择城区');
+          return;
+        }
         await api_teacherUpdate(teacherForm);
         console.log(teacherForm);
         userStore.getInfo();
@@ -129,12 +133,21 @@ export default defineComponent({
                 <NFormItem
                   label="姓名"
                   path="nickname"
-                  rule={{
-                    required: true,
-                    message: '请填写老师姓名',
-                    trigger: 'blur'
-                  }}>
+                  rule={[
+                    {
+                      required: true,
+                      message: '请输入老师姓名',
+                      trigger: 'blur'
+                    },
+                    {
+                      pattern: /^(?:[\u4e00-\u9fa5·]{2,16})$/,
+                      message: '请输入中文姓名,不要包含空格,及特殊符号',
+                      trigger: 'blur'
+                    }
+                  ]}>
                   <NInput
+                    maxlength={14}
+                    bordered={!data.disabled}
                     placeholder="请填写老师姓名"
                     v-model:value={teacherForm.nickname}></NInput>
                 </NFormItem>
@@ -156,6 +169,7 @@ export default defineComponent({
                     }
                   ]}>
                   <NInput
+                    bordered={!data.disabled}
                     placeholder="请填写老师手机号"
                     v-model:value={teacherForm.phone}></NInput>
                 </NFormItem>
@@ -163,6 +177,7 @@ export default defineComponent({
               <NGi>
                 <NFormItem label="性别" path="sex">
                   <NSelect
+                    bordered={!data.disabled}
                     class={styles.select}
                     showArrow={!data.disabled}
                     placeholder="请选择性别"
@@ -172,8 +187,11 @@ export default defineComponent({
                 </NFormItem>
               </NGi>
             </NGrid>
-            <NFormItem label="城区" style={{ maxWidth: '30%' }}>
+            <NFormItem
+              label="城区"
+              style={{ maxWidth: '30%' }}>
               <NCascader
+                bordered={!data.disabled}
                 options={formOptions.areaList}
                 labelField="name"
                 valueField="code"
@@ -181,7 +199,9 @@ export default defineComponent({
                 checkStrategy="child"
                 expandTrigger="hover"
                 defaultValue={
-                  userStore.info.regionCode || userStore.info.cityCode
+                  userStore.info.regionCode ||
+                  userStore.info.cityCode ||
+                  userStore.info.provinceCode
                 }
                 onUpdate:value={(val: any, option: any, pathValues: any) => {
                   teacherForm.provinceCode = pathValues[0]?.code;
@@ -209,7 +229,12 @@ export default defineComponent({
           </NSpace>
         ) : (
           <NSpace class={styles.btnList} align="center" justify="end">
-            <NButton class={styles.btn} onClick={() => (data.disabled = true)}>
+            <NButton
+              class={styles.btn}
+              onClick={() => {
+                data.disabled = true;
+                formRef.value?.restoreValidation();
+              }}>
               取消
             </NButton>
             <NButton
@@ -227,6 +252,7 @@ export default defineComponent({
           showIcon={false}
           title="修改密码">
           <ForgotPassword
+            phone={userStore.info.phone}
             onClose={() => {
               data.openChangePwd = false;
             }}

+ 62 - 12
src/views/setting/components/schoolInfo/index.module.less

@@ -38,10 +38,39 @@
     }
 }
 
-.input {
-    border-radius: 8px;
-    min-height: 43px;
-    min-width: 240px;
+.formWrap {
+    :global {
+        .n-input {
+            width: 284Px;
+            border-radius: 8Px;
+
+            .n-input__input-el {
+                height: 50Px;
+                font-size: 16Px;
+            }
+
+            &.n-input--disabled {
+                background-color: #F5F6FA;
+                color: rgba(149, 149, 152, 1);
+            }
+        }
+
+        .n-base-selection {
+            height: 50Px;
+            width: 284Px;
+            border-radius: 8Px;
+
+            .n-base-selection-label {
+                height: 50Px;
+                font-size: 16Px;
+            }
+        }
+
+        .n-base-selection.n-base-selection--disabled .n-base-selection-label {
+            background-color: #F5F6FA;
+            color: rgba(149, 149, 152, 1);
+        }
+    }
 }
 
 .schoolInfo {
@@ -105,17 +134,35 @@
         }
 
         .n-input {
-            min-height: 53Px;
             border-radius: 8Px;
 
             .n-input__input-el {
-                height: 100%;
+                height: 50Px;
+                font-size: 16Px;
             }
+
+            &.n-input--disabled {
+                background-color: #F5F6FA;
+                color: rgba(149, 149, 152, 1);
+            }
+        }
+
+        .n-base-selection {
+            border-radius: 8Px;
+
+            .n-base-selection-label {
+                height: 50Px;
+                font-size: 16Px;
+            }
+        }
+
+        .n-base-selection.n-base-selection--disabled .n-base-selection-label {
+            background-color: #F5F6FA;
+            color: rgba(149, 149, 152, 1);
         }
 
         .n-form-item-blank {
             padding-right: 30Px;
-            min-height: 53Px;
         }
 
         .genderBtn {
@@ -131,7 +178,7 @@
         }
 
         .n-form-item-label__text {
-            min-height: 53Px;
+            height: 50Px;
             display: flex;
             align-items: center;
             justify-content: center;
@@ -147,7 +194,9 @@
 
             .n-alert-body .n-alert-body__content {
                 color: #EA4132;
+                font-size: 14Px;
             }
+            
         }
 
         .actionBtn {
@@ -162,10 +211,11 @@
     width: 100%;
 
     .btn {
-        width: 144px;
-        border-radius: 8px;
-        font-size: 18px;
+        width: 144Px;
+        height: 45Px;
+        border-radius: 8Px;
+        font-size: 18Px;
         font-weight: 600 !important;
-        margin-right: 24px;
+        margin-right: 24Px;
     }
 }

+ 139 - 101
src/views/setting/components/schoolInfo/index.tsx

@@ -13,7 +13,7 @@ import {
   useDialog,
   useMessage
 } from 'naive-ui';
-import { defineComponent, onMounted, reactive } from 'vue';
+import { defineComponent, onMounted, reactive, ref } from 'vue';
 import styles from './index.module.less';
 import { useUserStore } from '/src/store/modules/users';
 import UploadFile from '/src/components/upload-file';
@@ -57,11 +57,29 @@ export default defineComponent({
       return [
         {
           title: '老师姓名',
-          key: 'nickname'
+          key: 'nickname',
+          render: (row: any) => {
+            return (
+              <div
+                style={{ userSelect: 'all', cursor: 'pointer' }}
+                onClick={() => copyTo(row.nickname)}>
+                {row.nickname}
+              </div>
+            );
+          }
         },
         {
           title: '手机号码',
-          key: 'phone'
+          key: 'phone',
+          render: (row: any) => {
+            return (
+              <div
+                style={{ userSelect: 'all', cursor: 'pointer' }}
+                onClick={() => copyTo(row.phone)}>
+                {row.phone}
+              </div>
+            );
+          }
         },
         {
           title: '性别',
@@ -77,10 +95,10 @@ export default defineComponent({
             return (
               <div>
                 {row.status === 'ACTIVATION' ? (
-                  <NButton text>{row.statusName}</NButton>
+                  <NButton text>启用</NButton>
                 ) : (
                   <NButton class={styles.errorBtn} text>
-                    {row.statusName}
+                    冻结
                   </NButton>
                 )}
               </div>
@@ -184,13 +202,18 @@ export default defineComponent({
         }
       });
     };
-
-    const changeSchoolInfo = async () => {
-      data.schoolLoading = false;
-      await api_schoolUpdate({ ...user.info.schoolInfos?.[0], ...forms });
-      data.schoolLoading = true;
-      message.success('修改成功');
-      data.disabled = true;
+    const formRef = ref();
+    const changeSchoolInfo = () => {
+      formRef.value?.validate(async (err: any) => {
+        if (err) {
+          return;
+        }
+        data.schoolLoading = false;
+        await api_schoolUpdate({ ...user.info.schoolInfos?.[0], ...forms });
+        data.schoolLoading = true;
+        message.success('修改成功');
+        data.disabled = true;
+      });
     };
 
     const registerUrl = () => {
@@ -200,98 +223,112 @@ export default defineComponent({
       console.log(url);
       return url;
     };
+
+    const copyTo = (text: string) => {
+      const input = document.createElement('input');
+      input.value = text;
+      document.body.appendChild(input);
+      input.select();
+      input.setSelectionRange(0, input.value.length);
+      document.execCommand('Copy');
+      document.body.removeChild(input);
+      message.success('复制成功');
+    };
     return () => (
       <div class={styles.schoolInfo}>
-        <NSpace wrapItem={false} align="center">
-          <div class={styles.logo}>
-            <NImage
-              previewDisabled={false}
-              width={100}
-              height={100}
-              src={forms.logo}
-            />
-            <div
-              style={{ display: data.disabled ? 'none' : '' }}
-              class={styles.changeHead}>
-              修改头像
-              {data.schoolLoading && (
-                <UploadFile
-                  class={[styles.uploadFile]}
-                  cropper
-                  onUpdate:fileList={val => {
-                    forms.logo = val;
-                  }}
-                />
-              )}
-            </div>
-          </div>
-          <NForm
-            model={forms}
-            style={{ paddingTop: '30px' }}
-            disabled={data.disabled}>
-            <NSpace>
-              <NFormItem
-                label="学校名称"
-                path="name"
-                showRequireMark={false}
-                rule={[
-                  { required: true, message: '请填写学习名称', trigger: 'blur' }
-                ]}>
-                <NInput
-                  class={styles.input}
-                  maxlength={20}
-                  v-model:value={forms.name}
-                />
-              </NFormItem>
-              <NFormItem label="城区" style={{ width: '300px' }}>
-                <NCascader
-                  options={formOptions.areaList}
-                  labelField="name"
-                  valueField="code"
-                  childrenField="areas"
-                  checkStrategy="child"
-                  expandTrigger="hover"
-                  defaultValue={
-                    user.info.schoolInfos?.[0]?.regionCode ||
-                    user.info.schoolInfos?.[0]?.cityCode
-                  }
-                  onUpdate:value={(val: any, option: any, pathValues: any) => {
-                    forms.provinceCode = pathValues[0]?.code;
-                    forms.cityCode = pathValues[1]?.code;
-                    forms.regionCode = pathValues[2]?.code;
-                  }}
-                />
-              </NFormItem>
-              <NFormItem>
-                {data.disabled ? (
-                  <NSpace class={styles.btnList} align="center" justify="end">
-                    <NButton
-                      class={styles.btn}
-                      color="#f24433"
-                      onClick={() => (data.disabled = false)}>
-                      修改信息
-                    </NButton>
-                  </NSpace>
-                ) : (
-                  <NSpace class={styles.btnList} align="center" justify="end">
-                    <NButton
-                      class={styles.btn}
-                      onClick={() => (data.disabled = true)}>
-                      取消
-                    </NButton>
-                    <NButton
-                      class={styles.btn}
-                      loading={!data.schoolLoading}
-                      type="primary"
-                      onClick={() => changeSchoolInfo()}>
-                      完成
-                    </NButton>
-                  </NSpace>
+        <NForm
+          ref={formRef}
+          class={styles.formWrap}
+          model={forms}
+          style={{ padding: '30px 0' }}
+          disabled={data.disabled}>
+          <NSpace size={[30, 20]}>
+            <div class={styles.logo}>
+              <NImage
+                previewDisabled={false}
+                width={100}
+                height={100}
+                src={forms.logo}
+              />
+              <div
+                style={{ display: data.disabled ? 'none' : '' }}
+                class={styles.changeHead}>
+                修改头像
+                {data.schoolLoading && (
+                  <UploadFile
+                    class={[styles.uploadFile]}
+                    cropper
+                    onUpdate:fileList={val => {
+                      forms.logo = val;
+                    }}
+                  />
                 )}
-              </NFormItem>
-            </NSpace>
-          </NForm>
-        </NSpace>
+              </div>
+            </div>
+            <NFormItem
+              label="学校名称"
+              path="name"
+              showRequireMark={false}
+              rule={[
+                { required: true, message: '请填写学校名称', trigger: 'blur' }
+              ]}>
+              <NInput
+                bordered={!data.disabled}
+                maxlength={20}
+                v-model:value={forms.name}
+              />
+            </NFormItem>
+            <NFormItem label="城区">
+              <NCascader
+                placeholder="请选择城区"
+                bordered={!data.disabled}
+                options={formOptions.areaList}
+                labelField="name"
+                valueField="code"
+                childrenField="areas"
+                checkStrategy="child"
+                expandTrigger="hover"
+                defaultValue={
+                  user.info.schoolInfos?.[0]?.regionCode ||
+                  user.info.schoolInfos?.[0]?.cityCode ||
+                  user.info.schoolInfos?.[0]?.provinceCode
+                }
+                onUpdate:value={(val: any, option: any, pathValues: any) => {
+                  forms.provinceCode = pathValues[0]?.code;
+                  forms.cityCode = pathValues[1]?.code;
+                  forms.regionCode = pathValues[2]?.code;
+                }}
+              />
+            </NFormItem>
+            <NFormItem>
+              {data.disabled ? (
+                <NSpace class={styles.btnList} align="center" justify="end">
+                  <NButton
+                    class={styles.btn}
+                    color="#f24433"
+                    onClick={() => (data.disabled = false)}>
+                    修改信息
+                  </NButton>
+                </NSpace>
+              ) : (
+                <NSpace class={styles.btnList} align="center" justify="end">
+                  <NButton
+                    class={styles.btn}
+                    onClick={() => (data.disabled = true)}>
+                    取消
+                  </NButton>
+                  <NButton
+                    class={styles.btn}
+                    loading={!data.schoolLoading}
+                    type="primary"
+                    onClick={() => changeSchoolInfo()}>
+                    完成
+                  </NButton>
+                </NSpace>
+              )}
+            </NFormItem>
+          </NSpace>
+        </NForm>
 
         <NSpace style={{ padding: '32px 0' }}>
           <NButton
@@ -317,6 +354,7 @@ export default defineComponent({
           preset="dialog"
           showIcon={false}>
           <AddTeacher
+            areaList={formOptions.areaList}
             onClose={() => {
               data.modal = false;
               getList();

+ 42 - 18
src/views/setting/index.module.less

@@ -54,6 +54,7 @@
       position: relative;
       width: 236px;
       height: 132px;
+
       .headerD {
         width: 100%;
         height: 100%;
@@ -126,19 +127,27 @@
     width: 1172px;
 
     :global {
+      .n-form-item {
+        min-width: 200Px;
+      }
+
       .n-form-item-label {
         font-size: 15px;
         color: rgba(0, 0, 0, 0.8);
       }
 
-      .n-input.n-input--disabled {
-        background-color: #f5f6fa;
-        color: rgba(0, 0, 0, 0.4);
-        border: none;
-      }
-
       .n-input {
-        border-radius: 8px;
+        border-radius: 8Px;
+
+        .n-input__input-el {
+          height: 50Px;
+          font-size: 16Px;
+        }
+
+        &.n-input--disabled {
+          background-color: #F5F6FA;
+          color: rgba(149, 149, 152, 1);
+        }
       }
 
       .n-input__input-el {
@@ -146,6 +155,7 @@
         line-height: 55px;
         border-radius: 8px;
       }
+
       .n-base-selection .n-base-selection-label {
         height: 55px;
       }
@@ -159,12 +169,12 @@
   margin-top: 30px;
 
   .btn {
-    width: 144px;
-    height: 45px;
-    border-radius: 8px;
-    font-size: 18px;
+    width: 144Px;
+    height: 45Px;
+    border-radius: 8Px;
+    font-size: 18Px;
     font-weight: 600 !important;
-    margin-right: 24px;
+    margin-right: 24Px;
   }
 }
 
@@ -177,12 +187,12 @@
     background-color: #198cfe !important;
   }
 
-  .option.n-base-select-option.n-base-select-option--pending
-    .n-base-select-option__content {
+  .option.n-base-select-option.n-base-select-option--pending .n-base-select-option__content {
     color: #fff !important;
     text-align: center;
   }
 }
+
 .select {
   :globla {
     .n-base-selection {
@@ -190,61 +200,75 @@
     }
   }
 }
+
 .changePwdModal {
   border-radius: 16px;
+
   .wrap {
     padding: 12px 0;
+
     :global {
       .n-input {
         border-radius: 8px;
       }
+
       .n-input .n-input__input-el {
         height: 53px;
       }
+
       .n-button.n-button--disabled {
         background: #aaa;
       }
     }
   }
+
   .sendMsg {
     height: 53px;
     min-width: 108px;
   }
+
   .pwdIcon {
-    width: 24px;
-    height: 24px;
+    width: 24Px;
+    height: 24Px;
     cursor: pointer;
   }
+
   .submitBtm {
     width: 45%;
-    height: 47px;
+    height: 46Px;
   }
 }
 
 .wrap {
   padding: 12px 0;
+
   :global {
     .n-input {
       border-radius: 8px;
     }
+
     .n-input .n-input__input-el {
       height: 53px;
     }
+
     .n-button.n-button--disabled {
       background: #aaa;
     }
   }
 }
+
 .sendMsg {
   height: 53px;
   min-width: 108px;
 }
+
 .pwdIcon {
   width: 24px;
   height: 24px;
   cursor: pointer;
 }
+
 .submitBtm {
   width: 45%;
   height: 47px;
-}
+}

+ 49 - 6
src/views/setting/modal/add-teacher/index.tsx

@@ -5,22 +5,33 @@ import {
   NSpace,
   NButton,
   useMessage,
-  NAlert
+  NAlert,
+  NCascader
 } from 'naive-ui';
-import { defineComponent, reactive, ref } from 'vue';
+import { PropType, defineComponent, reactive, ref } from 'vue';
 import { api_teacherAdd } from '../../api';
 import { useUserStore } from '/src/store/modules/users';
+import styles from './index.module.less';
 export default defineComponent({
   name: 'teacher-operation',
   emits: ['close'],
+  props: {
+    areaList: {
+      type: Array as PropType<any[]>,
+      default: () => []
+    }
+  },
   setup(props, { emit }) {
     const user = useUserStore();
     const forms = reactive({
+      provinceCode: '',
+      cityCode: '',
+      regionCode: '',
       tenantId: user.info.schoolInfos?.[0]?.tenantId,
       phone: null,
       schoolId: user.info.schoolInfos?.[0]?.id,
       nickname: null,
-      gender: 0
+      gender: 1
     });
     const btnLoading = ref(false);
     const formsRef = ref();
@@ -75,7 +86,13 @@ export default defineComponent({
             rule={[
               {
                 required: true,
-                message: '请输入老师姓名'
+                message: '请输入老师姓名',
+                trigger: 'blur'
+              },
+              {
+                pattern: /^(?:[\u4e00-\u9fa5·]{2,16})$/,
+                message: '请输入中文姓名,不要包含空格,及特殊符号',
+                trigger: 'blur'
               }
             ]}>
             <NInput
@@ -116,12 +133,38 @@ export default defineComponent({
             </NSpace>
           </NFormItem>
           <NFormItem
+            label="城区"
+            path="provinceCode"
+            rule={[
+              {
+                required: true,
+                message: '请选择城区',
+                trigger: 'change'
+              }
+            ]}>
+            <NCascader
+              to="body"
+              placeholder="请选择城区"
+              options={props.areaList}
+              labelField="name"
+              valueField="code"
+              childrenField="areas"
+              checkStrategy="child"
+              expandTrigger="hover"
+              onUpdate:value={(val: any, option: any, pathValues: any) => {
+                forms.provinceCode = pathValues[0]?.code + '';
+                forms.cityCode = pathValues[1]?.code;
+                forms.regionCode = pathValues[2]?.code;
+              }}
+            />
+          </NFormItem>
+          <NFormItem
             label="手机号"
             path="phone"
             rule={[
               {
                 required: true,
-                message: '手机号码',
+                message: '请输入正确的手机号码',
                 trigger: 'blur'
               },
               {
@@ -132,7 +175,7 @@ export default defineComponent({
               }
             ]}>
             <NInput
-              maxlength={11} 
+              maxlength={11}
               v-model:value={forms.phone}
               placeholder="请输入手机号"
               clearable

+ 15 - 4
src/views/setting/modal/forgotPassword.tsx

@@ -28,16 +28,20 @@ interface FormState {
 export default defineComponent({
   name: 'forgotPassword',
   emits: ['close'],
+  props: {
+    phone: {
+      type: String,
+      default: ''
+    }
+  },
   setup(props, { emit }) {
-    const router = useRouter();
     const formRef = ref();
     const message = useMessage();
     const loading = ref(false);
-    const LOGIN_NAME = PageEnum.BASE_LOGIN_NAME;
     const showPwd = ref(false);
     const userStore = useUserStore();
     const formInline = reactive({
-      mobile: '',
+      mobile: props.phone,
       password: '',
       code: '',
       isCaptcha: true
@@ -131,6 +135,8 @@ export default defineComponent({
                 }
               ]}>
               <NInput
+                readonly
+                disabled={true}
                 maxlength={11}
                 v-model:value={formInline.mobile}
                 placeholder="请输入手机号"></NInput>
@@ -138,7 +144,12 @@ export default defineComponent({
             <NFormItem
               path="code"
               rule={[
-                { required: true, message: '请输入验证码', trigger: 'blur' }
+                { required: true, message: '请输入验证码', trigger: 'blur' },
+                {
+                  pattern: /^\d+$/,
+                  message: '请输入数字验证码',
+                  trigger: 'blur'
+                }
               ]}>
               <NInputGroup>
                 <NInput

+ 2 - 2
src/views/xiaoku-music/index.module.less

@@ -95,7 +95,7 @@
     .wrapList {
         width: 512px;
         min-width: 294Px;
-        min-height: 300Px;
+        min-height: 100%;
         background: #fff;
         border-radius: 16Px;
     }
@@ -104,7 +104,7 @@
         display: flex;
         align-items: center;
         justify-content: center;
-        min-height: 300Px;
+        height: 50vh;
     }
 }
 

+ 8 - 6
src/views/xiaoku-music/index.tsx

@@ -357,12 +357,14 @@ export default defineComponent({
             </div>
           </div>
         </div>
-        <PlayItem
-          show={data.showPlayer}
-          playState={data.playState}
-          item={activeItem.value}
-          onChange={value => handleChangeAudio(value)}
-        />
+        {data.list.length !== 0 && (
+          <PlayItem
+            show={data.showPlayer}
+            playState={data.playState}
+            item={activeItem.value}
+            onChange={value => handleChangeAudio(value)}
+          />
+        )}
       </div>
     );
   }