lex 1 year ago
parent
commit
8a5ecde958

+ 1 - 1
dev-dist/sw.js

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

+ 14 - 0
src/components/card-preview/index.module.less

@@ -17,9 +17,23 @@
     }
   }
 }
+
 .maxCard {
   width: 1200px;
+
   .pptBox {
     height: 700px;
   }
+}
+
+.cardLarge {
+  position: relative;
+  width: 1360px;
+
+  .musicPreview {
+    height: 82vh;
+
+  }
+
+  // height: calc(85vh - var(--modal-lesson-tab-height) - 151.171875px - 12px);
 }

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

@@ -16,6 +16,10 @@ export default defineComponent({
     item: {
       type: Object,
       default: () => ({})
+    },
+    size: {
+      type: String,
+      default: 'default'
     }
   },
   emit: ['update:show'],
@@ -52,14 +56,17 @@ export default defineComponent({
           class={[
             'modalTitle background',
             styles.cardPreview,
-            item.value.type === 'PPT' && styles.maxCard
+            item.value.type === 'PPT' && styles.maxCard,
+            props.size === 'large' && styles.cardLarge
           ]}
           title={item.value.title}
           blockScroll={false}>
           {item.value.type === 'VIDEO' && (
             <VideoModal poster={item.value.url} src={item.value.content} />
           )}
-          {item.value.type === 'MUSIC' && <MusicModal item={item.value} />}
+          {item.value.type === 'MUSIC' && (
+            <MusicModal class={styles.musicPreview} item={item.value} />
+          )}
           {item.value.type === 'SONG' && <SongModal item={item.value} />}
           {item.value.type === 'PPT' && (
             <NSpin show={pptLoading.value}>

+ 13 - 8
src/views/attend-class/model/train-type/index.tsx

@@ -69,6 +69,11 @@ export default defineComponent({
 
     const removeVisiable = ref(false);
     const previewShow = ref(false);
+    const preivewItem = ref({
+      type: 'MUSIC',
+      content: props.item.musicId,
+      title: props.item.musicName
+    });
     const onDetail = () => {
       // const origin = /(localhost|192)/.test(location.host)
       //   ? 'https://dev.kt.colexiu.com'
@@ -76,6 +81,7 @@ export default defineComponent({
       // const src = `${origin}/instrument?platform=pc&modelType=practise&id=${props.item.musicId}&Authorization=${userStore.getToken}`;
       // window.open(src, '_blank');
       // console.log(props.item, 'item');
+      // console.log(props.item, '1212');
       previewShow.value = true;
     };
 
@@ -147,7 +153,7 @@ export default defineComponent({
                 if (props.isDisabled) {
                   return;
                 }
-                onDetail;
+                onDetail();
               }}>
               {props.item.trainingType === 'EVALUATION'
                 ? '评测模式'
@@ -284,7 +290,10 @@ export default defineComponent({
             </NSpace>
           )}
 
-          {props.isDisabled && !props.isCLassWork ? (
+          {/* 只有评测的时候才有 */}
+          {props.isDisabled &&
+          !props.isCLassWork &&
+          props.item.trainingType === 'EVALUATION' ? (
             <>
               <NSpace size={6}>
                 <n-button
@@ -308,7 +317,7 @@ export default defineComponent({
                   class={styles.operation}
                   onClick={(e: MouseEvent) => {
                     e.stopPropagation();
-                    removeVisiable.value = true;
+                    onDetail();
                   }}>
                   <NTooltip showArrow={false}>
                     {{
@@ -379,11 +388,7 @@ export default defineComponent({
 
         <CardPreview
           v-model:show={previewShow.value}
-          item={{
-            type: 'MUSIC',
-            content: props.item.musicId,
-            title: props.item.musicName
-          }}
+          item={preivewItem.value}
         />
 
         <NModal

+ 5 - 1
src/views/prepare-lessons/model/select-resources/select-item/index.tsx

@@ -248,7 +248,11 @@ export default defineComponent({
         </NScrollbar>
 
         {/* 弹窗查看 */}
-        <CardPreview v-model:show={state.show} item={state.item} />
+        <CardPreview
+          size={props.from === 'class' ? 'large' : 'default'}
+          v-model:show={state.show}
+          item={state.item}
+        />
       </div>
     );
   }

+ 2 - 2
src/views/studentList/components/studentAfterWork.tsx

@@ -45,8 +45,8 @@ export default defineComponent({
       index: 0
     });
     const timer = ref<[number, number]>([
-      new Date('2023-01-01').getTime(),
-      // getNowDateAndMonday(new Date().getTime()),
+      // new Date('2023-01-01').getTime(),
+      getNowDateAndMonday(new Date().getTime()),
       getNowDateAndSunday(new Date().getTime())
     ]);
     const TrainingDetailsRef = ref();