lex пре 11 месеци
родитељ
комит
67773f5b88

+ 7 - 2
src/components/card-preview/index.tsx

@@ -50,7 +50,6 @@ export default defineComponent({
     const show = toRef(props.show);
     const item = toRef(props.item);
     const pptLoading = ref(true);
-
     watch(
       () => props.show,
       () => {
@@ -62,6 +61,8 @@ export default defineComponent({
       () => props.item,
       () => {
         item.value = props.item;
+
+        console.log(item.value, 'item.value  value');
       }
     );
     // 拖动
@@ -80,6 +81,7 @@ export default defineComponent({
         users.info.id
       );
     }
+
     return () => (
       <>
         <NModal
@@ -107,7 +109,10 @@ export default defineComponent({
           blockScroll={false}>
           {item.value.type === 'VIDEO' && (
             <VideoModal
-              title={item.value.title}
+              title={
+                item.value.title +
+                (props.item.studentName ? '-' + props.item.studentName : '')
+              }
               poster={item.value.url}
               src={item.value.content}
               isDownload={props.isDownload}

+ 36 - 4
src/components/card-preview/song-modal/index.module.less

@@ -121,16 +121,48 @@
     }
   }
 
+  .actionBtn,
+  .actionBtnSpeed,
+  .iconReplay {
+    width: 48px;
+    height: 48px;
+    flex-shrink: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 6px;
+
+    &>img {
+      width: 36px;
+      height: 36px;
+    }
+
+    &:hover {
+      transition: background .1s ease;
+      background-color: rgba(255, 255, 255, 0.15);
+    }
+  }
+
   .iconDownload {
-    width: 36px;
-    height: 36px;
+    width: 48px;
+    height: 48px;
     margin-left: 22px;
+    border-radius: 6px;
     background-color: transparent;
     cursor: pointer;
+    transition: background .1s ease;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 
     &>img {
-      width: 100%;
-      height: 100%;
+      width: 36px;
+      height: 36px;
+    }
+
+    &:hover {
+      transition: background .1s ease;
+      background-color: rgba(255, 255, 255, 0.15);
     }
   }
 }

+ 4 - 2
src/components/card-preview/song-modal/index.tsx

@@ -3,7 +3,7 @@ import styles from './index.module.less';
 import iconplay from '@views/attend-class/image/icon-pause.png';
 import iconpause from '@views/attend-class/image/icon-play.png';
 import iconReplay from '@views/attend-class/image/icon-replay.png';
-import iconPreviewDownload from '@views/attend-class/image/icon-preivew-download.png';
+import iconPreviewDownload from '@views/attend-class/image/icon-preivew-download2.png';
 import iconFullscreen from '@views/attend-class/image/icon-fullscreen.png';
 import iconFullscreenExit from '@views/attend-class/image/icon-fullscreen-exit.png';
 import { NSlider, useMessage } from 'naive-ui';
@@ -118,7 +118,9 @@ export default defineComponent({
         return;
       }
       const fileUrl = props.item.content;
-      const filename = props.item.title;
+      const filename =
+        props.item.title +
+        (props.item.studentName ? '-' + props.item.studentName : '');
       // 发起Fetch请求
       fetch(fileUrl)
         .then(response => response.blob())

+ 38 - 6
src/components/card-preview/video-modal/index.module.less

@@ -33,7 +33,7 @@
 
     :global {
       .video-js .vjs-tech {
-        object-fit: cover;
+        // object-fit: cover;
       }
     }
   }
@@ -130,7 +130,7 @@
       height: 36px;
       background-color: transparent;
       cursor: pointer;
-      margin: 0 22px;
+      margin: 0 18px;
 
       &>img {
         width: 100%;
@@ -138,16 +138,48 @@
       }
     }
 
+    .actionBtn,
+    .actionBtnSpeed,
+    .iconReplay {
+      width: 48px;
+      height: 48px;
+      flex-shrink: 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      border-radius: 6px;
+
+      &>img {
+        width: 36px;
+        height: 36px;
+      }
+
+      &:hover {
+        transition: background .1s ease;
+        background-color: rgba(255, 255, 255, 0.15);
+      }
+    }
+
     .iconDownload {
-      width: 36px;
-      height: 36px;
+      width: 48px;
+      height: 48px;
       margin-left: 22px;
+      border-radius: 6px;
       background-color: transparent;
       cursor: pointer;
+      transition: background .1s ease;
+      display: flex;
+      align-items: center;
+      justify-content: center;
 
       &>img {
-        width: 100%;
-        height: 100%;
+        width: 36px;
+        height: 36px;
+      }
+
+      &:hover {
+        transition: background .1s ease;
+        background-color: rgba(255, 255, 255, 0.15);
       }
     }
   }

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

@@ -8,7 +8,7 @@ import styles from './index.module.less';
 import iconplay from '@views/attend-class/image/icon-pause.png';
 import iconpause from '@views/attend-class/image/icon-play.png';
 import iconReplay from '@views/attend-class/image/icon-replay.png';
-import iconPreviewDownload from '@views/attend-class/image/icon-preivew-download.png';
+import iconPreviewDownload from '@views/attend-class/image/icon-preivew-download2.png';
 import iconFullscreen from '@views/attend-class/image/icon-fullscreen.png';
 import iconFullscreenExit from '@views/attend-class/image/icon-fullscreen-exit.png';
 import iconSpeed from '@views/attend-class/image/icon-speed.png';

BIN
src/views/attend-class/image/icon-preivew-download2.png


+ 265 - 250
src/views/classList/components/afterWorkDetail.module.less

@@ -1,251 +1,266 @@
-.listWrap {
-  // min-height: 100%;
-  padding: 32px;
-  background-color: #fff;
-  border-radius: 20px;
-  min-height: calc(100vh - 7.8125vw) !important
-}
-
-.teacherSection {
-  display: flex;
-  align-items: center;
-  border-bottom: 1px solid #E9E9E9;
-  margin-bottom: 30px;
-  padding-bottom: 24px;
-
-  .tTemp {
-    display: flex;
-    align-content: center;
-  }
-
-  .infos {
-    margin-top: 8px;
-    padding: 13px;
-    background: #FFFFFF;
-    border-radius: 10px;
-
-    .homeTitle {
-      font-size: max(17px, 14Px);
-      font-family: PingFangSC, PingFang SC;
-      font-weight: 600;
-      color: #000000;
-      padding-bottom: 8px;
-    }
-
-    .homeContent {
-      padding-bottom: 5px;
-    }
-
-    .homeworkText {
-      display: flex;
-      align-items: flex-start;
-
-      .pSection {
-        max-width: 790px;
-      }
-
-      .p1,
-      .p2 {
-        // white-space: nowrap;
-        // overflow: hidden;
-        // text-overflow: ellipsis;
-
-        &>div {
-          display: flex;
-          align-items: flex-start;
-          color: #838383;
-
-          span {
-            color: #313131;
-            flex-shrink: 0;
-          }
-        }
-      }
-
-      .p1::before,
-      .p2::before {
-        content: '';
-        display: inline-block;
-        width: 5px;
-        height: 5px;
-        background: #198CFE;
-        margin-right: 7px;
-        border-radius: 50%;
-        flex-shrink: 0;
-        transform: translateY(-3px);
-      }
-
-      .p2 {
-        padding-top: 6px;
-      }
-
-      .p2::before {
-        background: #F44040;
-      }
-    }
-
-    .title {
-      font-size: max(13px, 12Px);
-      color: #777777;
-      flex-shrink: 0;
-    }
-
-    .text {
-      font-size: max(13px, 12Px);
-      font-weight: 500;
-      color: #333333;
-      line-height: 22px;
-      display: flex;
-      align-items: baseline;
-    }
-
-  }
-
-  .stitcTitle {
-    display: flex;
-    align-items: center;
-    font-size: max(20px, 16Px);
-    font-family: PingFangSC, PingFang SC;
-    font-weight: 600;
-    color: #000000;
-    line-height: 28px;
-    padding-bottom: 30px;
-
-    &::before {
-      content: '';
-      display: inline-block;
-      width: 4px;
-      height: 14px;
-      background: #198CFE;
-      border-radius: 2px;
-      margin-right: 8px;
-    }
-  }
-
-  .stitcConent {
-    :global {
-      .n-progress {
-        width: 116Px;
-      }
-    }
-
-    .contentRect {
-      text-align: center;
-
-      .text {
-        padding-top: 5px;
-        font-size: 12Px;
-        font-family: PingFangSC, PingFang SC;
-        font-weight: 400;
-        color: #777777;
-        line-height: 17px;
-      }
-    }
-
-    .nums {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      font-size: max(26px, 18Px);
-      font-family: DINAlternate, DINAlternate;
-      font-weight: bold;
-      color: #000000;
-      line-height: 30px;
-
-      i {
-        font-style: normal;
-        font-size: max(20px, 14Px);
-      }
-
-      span {
-        font-size: 12Px;
-        font-family: PingFangSC, PingFang SC;
-        font-weight: 500;
-        color: #333333;
-        line-height: 17px;
-      }
-    }
-  }
-}
-
-.teacherList {
-  display: flex;
-  // align-items: center;
-  flex-direction: column;
-  // margin-bottom: 32px;
-  flex: 1;
-  margin-right: 60px;
-  position: relative;
-
-  &::after {
-    content: '';
-    position: absolute;
-    right: 0;
-    width: 1px;
-    height: 55%;
-    background: #E9E9E9;
-    top: 50%;
-    margin-top: -60px;
-  }
-
-
-
-  .teacherHeader {
-    width: 100px;
-    height: 100px;
-    padding: 4px;
-    border-radius: 99px;
-    background: linear-gradient(228deg,
-        rgba(2, 186, 255, 1),
-        rgba(0, 122, 254, 1));
-    margin-right: 20px;
-
-    .teacherHeaderBorder {
-      width: 100%;
-      height: 100%;
-      background: #fff;
-      border-radius: 99px;
-      overflow: hidden;
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-      justify-content: center;
-      padding: 4px;
-    }
-  }
-
-  .teacherHeaderImg {
-    width: 84px;
-    height: 84px;
-    border-radius: 50%;
-    overflow: hidden;
-  }
-
-  .workafterInfo {
-    display: flex;
-    justify-content: center;
-    flex-direction: column;
-
-    h4 {
-      font-size: 22px;
-      line-height: 30px;
-      font-weight: 600;
-      color: #131415;
-      margin-bottom: 12px;
-    }
-
-    p {
-      font-size: max(16px, 12Px);
-      line-height: 22px;
-      color: #777;
-
-      span {
-        color: #ea4132;
-      }
-    }
-  }
-}
-
-.wordDetailModel {
-  width: 1012px;
+.listWrap {
+  // min-height: 100%;
+  padding: 32px;
+  background-color: #fff;
+  border-radius: 20px;
+  min-height: calc(100vh - 7.8125vw) !important
+}
+
+.teacherSection {
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #E9E9E9;
+  margin-bottom: 30px;
+  padding-bottom: 24px;
+
+  .tTemp {
+    display: flex;
+    align-content: center;
+  }
+
+  .infos {
+    margin-top: 8px;
+    padding: 13px;
+    background: #FFFFFF;
+    border-radius: 10px;
+
+    .homeTitle {
+      font-size: max(17px, 14Px);
+      font-family: PingFangSC, PingFang SC;
+      font-weight: 600;
+      color: #000000;
+      padding-bottom: 8px;
+    }
+
+    .homeContent {
+      padding-bottom: 5px;
+    }
+
+    .homeworkText {
+      display: flex;
+      align-items: flex-start;
+
+      .pSection {
+        max-width: 790px;
+      }
+
+      .p1,
+      .p2 {
+        // white-space: nowrap;
+        // overflow: hidden;
+        // text-overflow: ellipsis;
+
+        &>div {
+          display: flex;
+          align-items: flex-start;
+          color: #838383;
+
+          span {
+            color: #313131;
+            flex-shrink: 0;
+          }
+        }
+      }
+
+      .p1::before,
+      .p2::before {
+        content: '';
+        display: inline-block;
+        width: 5px;
+        height: 5px;
+        background: #198CFE;
+        margin-right: 7px;
+        border-radius: 50%;
+        flex-shrink: 0;
+        transform: translateY(-3px);
+      }
+
+      .p2 {
+        padding-top: 6px;
+      }
+
+      .p2::before {
+        background: #F44040;
+      }
+    }
+
+    .title {
+      font-size: max(13px, 12Px);
+      color: #777777;
+      flex-shrink: 0;
+    }
+
+    .text {
+      font-size: max(13px, 12Px);
+      font-weight: 500;
+      color: #333333;
+      line-height: 22px;
+      display: flex;
+      align-items: baseline;
+    }
+
+  }
+
+  .stitcTitle {
+    display: flex;
+    align-items: center;
+    font-size: max(20px, 16Px);
+    font-family: PingFangSC, PingFang SC;
+    font-weight: 600;
+    color: #000000;
+    line-height: 28px;
+    padding-bottom: 30px;
+
+    &::before {
+      content: '';
+      display: inline-block;
+      width: 4px;
+      height: 14px;
+      background: #198CFE;
+      border-radius: 2px;
+      margin-right: 8px;
+    }
+  }
+
+  .stitcConent {
+    :global {
+      .n-progress {
+        width: 116Px;
+      }
+    }
+
+    .contentRect {
+      text-align: center;
+
+      .text {
+        padding-top: 5px;
+        font-size: 12Px;
+        font-family: PingFangSC, PingFang SC;
+        font-weight: 400;
+        color: #777777;
+        line-height: 17px;
+      }
+    }
+
+    .nums {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-size: max(26px, 18Px);
+      font-family: DINAlternate, DINAlternate;
+      font-weight: bold;
+      color: #000000;
+      line-height: 30px;
+
+      i {
+        font-style: normal;
+        font-size: max(20px, 14Px);
+      }
+
+      span {
+        font-size: 12Px;
+        font-family: PingFangSC, PingFang SC;
+        font-weight: 500;
+        color: #333333;
+        line-height: 17px;
+      }
+    }
+  }
+}
+
+.teacherList {
+  display: flex;
+  // align-items: center;
+  flex-direction: column;
+  // margin-bottom: 32px;
+  flex: 1;
+  margin-right: 60px;
+  position: relative;
+
+  &::after {
+    content: '';
+    position: absolute;
+    right: 0;
+    width: 1px;
+    height: 55%;
+    background: #E9E9E9;
+    top: 50%;
+    margin-top: -60px;
+  }
+
+
+
+  .teacherHeader {
+    width: 100px;
+    height: 100px;
+    padding: 4px;
+    border-radius: 99px;
+    background: linear-gradient(228deg,
+        rgba(2, 186, 255, 1),
+        rgba(0, 122, 254, 1));
+    margin-right: 20px;
+
+    .teacherHeaderBorder {
+      width: 100%;
+      height: 100%;
+      background: #fff;
+      border-radius: 99px;
+      overflow: hidden;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      justify-content: center;
+      padding: 4px;
+    }
+  }
+
+  .teacherHeaderImg {
+    width: 84px;
+    height: 84px;
+    border-radius: 50%;
+    overflow: hidden;
+  }
+
+  .workafterInfo {
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+
+    h4 {
+      font-size: 22px;
+      line-height: 30px;
+      font-weight: 600;
+      color: #131415;
+      margin-bottom: 12px;
+    }
+
+    p {
+      font-size: max(16px, 12Px);
+      line-height: 22px;
+      color: #777;
+
+      span {
+        color: #ea4132;
+      }
+    }
+  }
+}
+
+.wordDetailModel {
+  width: 1012px;
+}
+
+.isok {
+  font-weight: 600;
+  color: #333333;
+}
+
+.ison {
+  font-weight: 600;
+  color: #ea4132;
+}
+
+.nosub {
+  font-weight: 600;
+  color: #aaa;
 }

+ 6 - 1
src/views/classList/modals/TrainingDetails.tsx

@@ -206,7 +206,12 @@ export default defineComponent({
             <div class={styles.workList}>
               {studnetInfo.value.studentLessonTrainingDetails.map(
                 (item: any) => (
-                  <WorkItem item={item} />
+                  <WorkItem
+                    item={{
+                      ...item,
+                      studentName: studnetInfo.value.studentName
+                    }}
+                  />
                 )
               )}
             </div>

+ 8 - 0
src/views/classList/work-item/index.module.less

@@ -36,6 +36,14 @@
   align-items: center;
   justify-content: center;
 
+  .videoSection {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+
   .expireBg {
     position: absolute;
     inset: 0;

+ 70 - 32
src/views/classList/work-item/index.tsx

@@ -15,6 +15,7 @@ import CardPreview from '/src/components/card-preview';
 import { checkUrlType, iframeDislableKeyboard } from '/src/utils';
 import { useUserStore } from '/src/store/modules/users';
 import { vaildMusicScoreUrl } from '/src/utils/urlUtils';
+import { saveAs } from 'file-saver';
 
 export default defineComponent({
   name: 'work-item',
@@ -31,21 +32,34 @@ export default defineComponent({
     const preivewItem = ref({
       type: 'MUSIC',
       content: props.item.musicId,
-      title: props.item.musicName
+      title: props.item.musicName,
+      studentName: props.item.studentName
     });
     const reportSrc = ref('');
     const detailVisiable = ref(false);
 
-    // const isDownload = computed(() => {
-    //   if (
-    //     props.item.fileList?.expireFlag &&
-    //     props.item.fileList?.fileType === 'EVALUATION'
-    //   ) {
-    //     return true;
-    //   } else {
-    //     return false;
-    //   }
-    // });
+    // 下载资源
+    const onDownload = (src: any) => {
+      if (!src) {
+        message.error('下载失败');
+        return;
+      }
+      const fileUrl = src;
+      // props.item.studentName
+      const title =
+        props.item.musicName +
+        (props.item.studentName ? '-' + props.item.studentName : '');
+      const suffix = src.substring(src.lastIndexOf('.'));
+      // 发起Fetch请求
+      fetch(fileUrl)
+        .then(response => response.blob())
+        .then(blob => {
+          saveAs(blob, (title || new Date().getTime() + '') + suffix);
+        })
+        .catch(() => {
+          message.error('下载失败');
+        });
+    };
     return () => (
       <div
         class={[
@@ -73,17 +87,35 @@ export default defineComponent({
             <NImage
               src={props.item.fileList?.filePath}
               objectFit="contain"
-              // renderToolbar={({ nodes }: ImageRenderToolbarProps) => {
-              //   return [
-              //     nodes.prev,
-              //     nodes.next,
-              //     nodes.rotateCounterclockwise,
-              //     nodes.rotateClockwise,
-              //     nodes.resizeToOriginalSize,
-              //     nodes.zoomOut,
-              //     nodes.close
-              //   ];
-              // }}
+              renderToolbar={({ nodes }: ImageRenderToolbarProps) => {
+                return [
+                  nodes.prev,
+                  nodes.next,
+                  nodes.rotateCounterclockwise,
+                  nodes.rotateClockwise,
+                  nodes.resizeToOriginalSize,
+                  nodes.zoomOut,
+                  <div
+                    class={'n-base-icon'}
+                    onClick={() => onDownload(props.item.fileList?.filePath)}>
+                    <svg
+                      viewBox="0 0 16 16"
+                      version="1.1"
+                      xmlns="http://www.w3.org/2000/svg">
+                      <g
+                        stroke="none"
+                        stroke-width="1"
+                        fill="none"
+                        fill-rule="evenodd">
+                        <g fill="currentColor" fill-rule="nonzero">
+                          <path d="M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"></path>
+                        </g>
+                      </g>
+                    </svg>
+                  </div>,
+                  nodes.close
+                ];
+              }}
             />
           )}
           {props.item.fileList?.fileType === 'SOUND' && (
@@ -103,16 +135,19 @@ export default defineComponent({
           )}
           {props.item.fileList?.fileType === 'EVALUATION' &&
             (checkUrlType(props.item.fileList?.content) === 'video' ? (
-              <video
-                style={{ height: '100%' }}
-                src={props.item.fileList?.content}
+              <div
+                class={styles.videoSection}
                 onClick={() => {
                   preivewItem.value.content = props.item.fileList?.content;
                   preivewItem.value.title = props.item.musicName;
                   preivewItem.value.type = 'VIDEO';
                   previewShow.value = true;
-                }}
-              />
+                }}>
+                <video
+                  style={{ height: '100%' }}
+                  src={props.item.fileList?.content}
+                />
+              </div>
             ) : (
               <div
                 onClick={() => {
@@ -130,16 +165,19 @@ export default defineComponent({
             ))}
           {/* 'https://oss.dayaedu.com/ktqy/1715586967518b42c4fe5.mp4' */}
           {props.item.fileList?.fileType === 'VIDEO' && (
-            <video
-              style={{ height: '100%' }}
-              src={props.item.fileList?.filePath}
+            <div
+              class={styles.videoSection}
               onClick={() => {
                 preivewItem.value.content = props.item.fileList?.filePath;
                 preivewItem.value.title = props.item.musicName;
                 preivewItem.value.type = 'VIDEO';
                 previewShow.value = true;
-              }}
-            />
+              }}>
+              <video
+                style={{ height: '100%' }}
+                src={props.item.fileList?.filePath}
+              />
+            </div>
           )}
 
           {/* 判断是否过期 */}

+ 271 - 261
src/views/login/index.tsx

@@ -1,261 +1,271 @@
-import {
-  defineComponent,
-  onBeforeUnmount,
-  reactive,
-  ref,
-  onMounted
-} from 'vue';
-import loginStyles from './images/login_styles.png';
-import loginLeft from './images/login-left.png';
-import loginRight from './images/loginright.png';
-import colLogo from './images/colLogo.png';
-import CodeLogin from './components/codeLogin';
-import PwdLogin from './components/pwdLogin';
-import {
-  NTabs,
-  NTabPane,
-  useDialog,
-  NModal,
-  NButton,
-  NSpace,
-  NAlert,
-  NImage
-} from 'naive-ui';
-import styles from './index.module.less';
-import ForgotPassword from './components/forgotPassword';
-import moveTop from './images/moveTopBg.png';
-import dingPng from './images/ding.png';
-import closeAble from './images/closeAble.png';
-import infoIcon from './images/infoIcon.png';
-import { state } from '/src/state';
-import TheAuth from '/src/components/TheAuth';
-import { mutualTLSQuery } from './api';
-export default defineComponent({
-  name: 'login-page',
-  setup() {
-    const isForgot = ref(false);
-    const NavsValue = ref('pwdLogin');
-    const pwdLoginRef = ref();
-    const forgotPasswordRef = ref();
-    const popEvent = ref();
-    const dialog = useDialog();
-    const userPhone = ref(); // 用户手机号
-    const showModalMask = ref(false);
-    const showAuthStatus = ref(false);
-    const showAuthMask = ref(false);
-    const checkInstall = async (event: any) => {
-      event.preventDefault();
-      console.log('checkInstall', event);
-      popEvent.value = event;
-      console.log('beforeoutcome');
-      // const { outcome } = await event.userChoice;
-      // console.log(outcome, 'outcome')
-      // setTimeout(async function () {
-      //   try {
-      //     const { outcome } = await event.userChoice;
-      //     console.log(outcome, 'outcome')
-      //   } catch (e) {
-      //     console.log(e)
-      //   }
-
-      // }, 2000)
-
-      if (window.matchMedia('(display-mode: standalone)').matches) {
-        state.application = window.matchMedia(
-          '(display-mode: standalone)'
-        ).matches;
-      } else {
-        console.log(popEvent.value, 'popEvent.value');
-        if (popEvent.value) {
-          showModalMask.value = true;
-          setTimeout(() => {
-            const btn = document.querySelector('#submitBtn');
-            // console.log(btn);
-            if (btn) {
-              btn.addEventListener('click', () => {
-                showModalMask.value = false;
-                if (!popEvent.value) {
-                  return;
-                }
-                popEvent.value.prompt();
-                popEvent.value.userChoice.then((choiceResult: any) => {
-                  if (choiceResult.outcome === 'accepted') {
-                    console.log('用户已同意添加到桌面');
-                    showModalMask.value = false;
-                    checkAuthShow();
-                  } else {
-                    console.log('用户已取消添加到桌面');
-                    showModalMask.value = false;
-                    checkAuthShow();
-                  }
-                });
-              });
-            }
-          }, 500);
-        }
-      }
-
-      // 是否显示桌面安装,是否安装了证书
-      await checkAuthError();
-      if (!showModalMask.value && showAuthStatus.value) {
-        showAuthMask.value = true;
-      }
-    };
-
-    const checkAuthShow = () => {
-      if (showAuthStatus.value) showAuthMask.value = true;
-    };
-
-    window.addEventListener('beforeinstallprompt', checkInstall, {
-      once: true
-    });
-
-    onBeforeUnmount(() => {
-      window.removeEventListener('beforeinstallprompt', checkInstall);
-    });
-
-    const checkAuthError = async () => {
-      try {
-        await mutualTLSQuery({});
-      } catch (err: any) {
-        if (err.message.indexOf('511')) {
-          // showAuthMask.value = true;
-          showAuthStatus.value = true;
-        }
-      }
-    };
-
-    onMounted(async () => {
-      // 删除打谱里面上传记录
-      sessionStorage.removeItem('task-upload-music');
-      // const relatedApps = await navigator?.getInstalledRelatedApps();
-    });
-    const downChrome = () => {
-      const agent = navigator.userAgent.toLowerCase();
-      const isMac = (function () {
-        return /macintosh|mac os x/i.test(navigator.userAgent);
-      })();
-      if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
-        window.open(
-          'https://oss.dayaedu.com/appstore/ChromeStandaloneSetup32.exe'
-        );
-      }
-      if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
-        window.open(
-          'https://oss.dayaedu.com/appstore/ChromeStandaloneSetup64.exe'
-        );
-      }
-      if (isMac) {
-        window.open('https://oss.dayaedu.com/appstore/googlechrome-mac.dmg');
-      }
-    };
-
-    return () => (
-      <div class={styles['view-account']}>
-        <div class={styles['view-account-container']}>
-          <img src={loginLeft} class={styles.loginLeft} alt="" />
-          <img src={loginRight} class={styles.loginRight} alt="" />
-          <div class={styles['stylesWrap']}>
-            <img src={loginStyles} alt="" />
-          </div>
-        </div>
-        <div class={styles['view-account-form']}>
-          <img class={styles.colLogo} src={colLogo}></img>
-          {isForgot.value ? (
-            <NTabs
-              key="forgotPassword"
-              default-value={NavsValue.value}
-              class={[styles.loginTabs, styles.loginForgot]}
-              ref={forgotPasswordRef}
-              justify-content="center">
-              <NTabPane name="forgotPassword" tab="重置密码">
-                <ForgotPassword
-                  v-model:phone={userPhone.value}
-                  onChangType={() => {
-                    isForgot.value = false;
-                    NavsValue.value = 'pwdLogin';
-                    // pwdLoginRef.value.syncBarPosition();
-                  }}></ForgotPassword>
-              </NTabPane>
-            </NTabs>
-          ) : (
-            <NTabs
-              key="pwdLogin"
-              ref={pwdLoginRef}
-              default-value={NavsValue.value}
-              class={[styles.loginTabs]}
-              justify-content="center">
-              <NTabPane name="pwdLogin" tab="密码登录">
-                <PwdLogin
-                  v-model:phone={userPhone.value}
-                  onChangType={() => {
-                    isForgot.value = true;
-                    NavsValue.value = 'forgotPassword';
-                    // forgotPasswordRef.value.syncBarPosition();
-                  }}></PwdLogin>
-              </NTabPane>
-              <NTabPane name="codeLogin" tab="短信验证">
-                <CodeLogin v-model:phone={userPhone.value}></CodeLogin>
-              </NTabPane>
-            </NTabs>
-          )}
-          <div class={styles.alertWrap}>
-            <div class={styles.alertInfo}>
-              <NImage
-                src={infoIcon}
-                class={styles.infoIcon}
-                previewDisabled></NImage>
-              为了您更好的上课体验,推荐使用Chrome浏览器
-            </div>
-            <div class={styles.down} onClick={downChrome}>
-              立即下载
-            </div>
-          </div>
-        </div>
-        <NModal
-          v-model:show={showModalMask.value}
-          onMaskClick={() => {
-            checkAuthShow();
-          }}
-          onClose={() => {
-            checkAuthShow();
-          }}>
-          <div class={styles.downMove}>
-            <img src={dingPng} class={styles.dingPng} alt="" />
-            <img src={moveTop} class={styles.downMoveBg} alt="" />
-            <img
-              src={closeAble}
-              class={styles.closeAble}
-              onClick={() => {
-                showModalMask.value = false;
-                checkAuthShow();
-              }}
-              alt=""
-            />
-            <h2>温馨提示</h2>
-            <p>
-              检测到您尚未安装“音乐数字课堂”应用程序,为了更好的使用体验,是否立即下载?
-            </p>
-            {/* <NButton>确定</NButton> */}
-            <NSpace style={{ padding: '25px 0 0 0' }} justify="center">
-              <NButton
-                {...{ id: 'submitBtn' }}
-                class={styles.submitAppBtn}
-                round
-                type="primary">
-                立即下载
-              </NButton>
-            </NSpace>
-          </div>
-        </NModal>
-
-        <NModal
-          v-model:show={showAuthMask.value}
-          closeOnEsc={false}
-          maskClosable={false}>
-          <TheAuth onClose={() => (showAuthMask.value = false)} />
-        </NModal>
-      </div>
-    );
-  }
-});
+import {
+  defineComponent,
+  onBeforeUnmount,
+  reactive,
+  ref,
+  onMounted
+} from 'vue';
+import loginStyles from './images/login_styles.png';
+import loginLeft from './images/login-left.png';
+import loginRight from './images/loginright.png';
+import colLogo from './images/colLogo.png';
+import CodeLogin from './components/codeLogin';
+import PwdLogin from './components/pwdLogin';
+import {
+  NTabs,
+  NTabPane,
+  useDialog,
+  NModal,
+  NButton,
+  NSpace,
+  NAlert,
+  NImage
+} from 'naive-ui';
+import styles from './index.module.less';
+import ForgotPassword from './components/forgotPassword';
+import moveTop from './images/moveTopBg.png';
+import dingPng from './images/ding.png';
+import closeAble from './images/closeAble.png';
+import infoIcon from './images/infoIcon.png';
+import { state } from '/src/state';
+import TheAuth from '/src/components/TheAuth';
+import { mutualTLSQuery } from './api';
+export default defineComponent({
+  name: 'login-page',
+  setup() {
+    const isForgot = ref(false);
+    const NavsValue = ref('pwdLogin');
+    const pwdLoginRef = ref();
+    const forgotPasswordRef = ref();
+    const popEvent = ref();
+    const dialog = useDialog();
+    const userPhone = ref(); // 用户手机号
+    const showModalMask = ref(false);
+    const showAuthStatus = ref(false);
+    const showAuthMask = ref(false);
+    const checkInstall = async (event: any) => {
+      event.preventDefault();
+      console.log('checkInstall', event);
+      popEvent.value = event;
+      console.log('beforeoutcome');
+      // const { outcome } = await event.userChoice;
+      // console.log(outcome, 'outcome')
+      // setTimeout(async function () {
+      //   try {
+      //     const { outcome } = await event.userChoice;
+      //     console.log(outcome, 'outcome')
+      //   } catch (e) {
+      //     console.log(e)
+      //   }
+
+      // }, 2000)
+
+      if (window.matchMedia('(display-mode: standalone)').matches) {
+        state.application = window.matchMedia(
+          '(display-mode: standalone)'
+        ).matches;
+      } else {
+        console.log(popEvent.value, 'popEvent.value');
+        if (popEvent.value) {
+          showModalMask.value = true;
+          setTimeout(() => {
+            const btn = document.querySelector('#submitBtn');
+            // console.log(btn);
+            if (btn) {
+              btn.addEventListener('click', () => {
+                showModalMask.value = false;
+                if (!popEvent.value) {
+                  return;
+                }
+                popEvent.value.prompt();
+                popEvent.value.userChoice.then((choiceResult: any) => {
+                  if (choiceResult.outcome === 'accepted') {
+                    console.log('用户已同意添加到桌面');
+                    showModalMask.value = false;
+                    checkAuthShow();
+                  } else {
+                    console.log('用户已取消添加到桌面');
+                    showModalMask.value = false;
+                    checkAuthShow();
+                  }
+                });
+              });
+            }
+          }, 500);
+        }
+      }
+
+      // 是否显示桌面安装,是否安装了证书
+      await checkAuthError();
+      if (!showModalMask.value && showAuthStatus.value) {
+        showAuthMask.value = true;
+      }
+    };
+
+    const checkAuthShow = () => {
+      if (showAuthStatus.value) showAuthMask.value = true;
+    };
+
+    window.addEventListener('beforeinstallprompt', checkInstall, {
+      once: true
+    });
+    onBeforeUnmount(() => {
+      window.removeEventListener('beforeinstallprompt', checkInstall);
+    });
+
+    const checkAuthError = async () => {
+      try {
+        await mutualTLSQuery({});
+      } catch (err: any) {
+        if (err.message.indexOf('511')) {
+          // showAuthMask.value = true;
+          showAuthStatus.value = true;
+        }
+      }
+    };
+
+    onMounted(async () => {
+      // 已经安装 pwa 不会触发 beforeinstallprompt, 所以加上以下判断
+      if (
+        window.matchMedia('(display-mode: standalone)').matches ||
+        (window.navigator as any).standalone === true
+      ) {
+        // 是否显示桌面安装,是否安装了证书
+        await checkAuthError();
+        if (!showModalMask.value && showAuthStatus.value) {
+          showAuthMask.value = true;
+        }
+      }
+      // 删除打谱里面上传记录
+      sessionStorage.removeItem('task-upload-music');
+      // const relatedApps = await navigator?.getInstalledRelatedApps();
+    });
+    const downChrome = () => {
+      const agent = navigator.userAgent.toLowerCase();
+      const isMac = (function () {
+        return /macintosh|mac os x/i.test(navigator.userAgent);
+      })();
+      if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
+        window.open(
+          'https://oss.dayaedu.com/appstore/ChromeStandaloneSetup32.exe'
+        );
+      }
+      if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
+        window.open(
+          'https://oss.dayaedu.com/appstore/ChromeStandaloneSetup64.exe'
+        );
+      }
+      if (isMac) {
+        window.open('https://oss.dayaedu.com/appstore/googlechrome-mac.dmg');
+      }
+    };
+
+    return () => (
+      <div class={styles['view-account']}>
+        <div class={styles['view-account-container']}>
+          <img src={loginLeft} class={styles.loginLeft} alt="" />
+          <img src={loginRight} class={styles.loginRight} alt="" />
+          <div class={styles['stylesWrap']}>
+            <img src={loginStyles} alt="" />
+          </div>
+        </div>
+        <div class={styles['view-account-form']}>
+          <img class={styles.colLogo} src={colLogo}></img>
+          {isForgot.value ? (
+            <NTabs
+              key="forgotPassword"
+              default-value={NavsValue.value}
+              class={[styles.loginTabs, styles.loginForgot]}
+              ref={forgotPasswordRef}
+              justify-content="center">
+              <NTabPane name="forgotPassword" tab="重置密码">
+                <ForgotPassword
+                  v-model:phone={userPhone.value}
+                  onChangType={() => {
+                    isForgot.value = false;
+                    NavsValue.value = 'pwdLogin';
+                    // pwdLoginRef.value.syncBarPosition();
+                  }}></ForgotPassword>
+              </NTabPane>
+            </NTabs>
+          ) : (
+            <NTabs
+              key="pwdLogin"
+              ref={pwdLoginRef}
+              default-value={NavsValue.value}
+              class={[styles.loginTabs]}
+              justify-content="center">
+              <NTabPane name="pwdLogin" tab="密码登录">
+                <PwdLogin
+                  v-model:phone={userPhone.value}
+                  onChangType={() => {
+                    isForgot.value = true;
+                    NavsValue.value = 'forgotPassword';
+                    // forgotPasswordRef.value.syncBarPosition();
+                  }}></PwdLogin>
+              </NTabPane>
+              <NTabPane name="codeLogin" tab="短信验证">
+                <CodeLogin v-model:phone={userPhone.value}></CodeLogin>
+              </NTabPane>
+            </NTabs>
+          )}
+          <div class={styles.alertWrap}>
+            <div class={styles.alertInfo}>
+              <NImage
+                src={infoIcon}
+                class={styles.infoIcon}
+                previewDisabled></NImage>
+              为了您更好的上课体验,推荐使用Chrome浏览器
+            </div>
+            <div class={styles.down} onClick={downChrome}>
+              立即下载
+            </div>
+          </div>
+        </div>
+        <NModal
+          v-model:show={showModalMask.value}
+          onMaskClick={() => {
+            checkAuthShow();
+          }}
+          onClose={() => {
+            checkAuthShow();
+          }}>
+          <div class={styles.downMove}>
+            <img src={dingPng} class={styles.dingPng} alt="" />
+            <img src={moveTop} class={styles.downMoveBg} alt="" />
+            <img
+              src={closeAble}
+              class={styles.closeAble}
+              onClick={() => {
+                showModalMask.value = false;
+                checkAuthShow();
+              }}
+              alt=""
+            />
+            <h2>温馨提示</h2>
+            <p>
+              检测到您尚未安装“音乐数字课堂”应用程序,为了更好的使用体验,是否立即下载?
+            </p>
+            {/* <NButton>确定</NButton> */}
+            <NSpace style={{ padding: '25px 0 0 0' }} justify="center">
+              <NButton
+                {...{ id: 'submitBtn' }}
+                class={styles.submitAppBtn}
+                round
+                type="primary">
+                立即下载
+              </NButton>
+            </NSpace>
+          </div>
+        </NModal>
+
+        <NModal
+          v-model:show={showAuthMask.value}
+          closeOnEsc={false}
+          maskClosable={false}>
+          <TheAuth onClose={() => (showAuthMask.value = false)} />
+        </NModal>
+      </div>
+    );
+  }
+});

+ 4 - 0
src/views/prepare-lessons/components/lesson-main/courseware-presets/index.module.less

@@ -33,6 +33,10 @@
       font-size: max(15px, 13Px);
     }
 
+    .n-tabs-tab {
+      font-weight: 500 !important;
+    }
+
     .n-tabs-tab-pad {
       width: 33px !important;
     }

+ 8 - 1
src/views/studentList/modals/studentTraomomhDetails.tsx

@@ -199,9 +199,16 @@ export default defineComponent({
             style="max-height:400px;min-height: 260px;"
             trigger="none">
             <div class={styles.workList}>
+              {/* studentName: studnetInfo.value.studentName */}
               {teacherInfo.value.studentLessonTrainingDetails.map(
                 (item: any) => (
-                  <WorkItem style={{ marginBottom: '20px' }} item={item} />
+                  <WorkItem
+                    style={{ marginBottom: '20px' }}
+                    item={{
+                      ...item,
+                      studentName: teacherInfo.value.studentName
+                    }}
+                  />
                 )
               )}
             </div>