Browse Source

Merge branch 'iteration-0905' into iteration-0906

lex 1 year ago
parent
commit
16d3aee387

+ 2 - 2
src/components/layout/layoutTop.tsx

@@ -92,13 +92,13 @@ export default defineComponent({
                   <div
                     class={styles.optons}
                     onClick={() => (showSuggestionViseble.value = true)}>
-                    <img src={opinionIcon}></img>
+                    <NImage src={opinionIcon} previewDisabled></NImage>
                   </div>
                 ),
                 default: '意见反馈'
               }}
             </NTooltip>
-
+            {/* </div> */}
             <div onClick={() => (showImGroup.value = true)}>
               <NBadge
                 value={noReadCount.value}

+ 1 - 0
src/components/layout/modals/suggestion-option.module.less

@@ -11,6 +11,7 @@
 }
 
 .updatePassword {
+  background-color: transparent;
   padding: 40px;
 }
 

+ 38 - 42
src/components/timerMeter/components/countdown.tsx

@@ -146,7 +146,7 @@ export default defineComponent({
     };
 
     const suspendNum = () => {
-      setTimeout(()=>{
+      setTimeout(() => {
         isPlaying.value = false;
         soundVIdeo.currentTime = 0;
         soundVIdeo.pause();
@@ -154,24 +154,22 @@ export default defineComponent({
           clearInterval(timer.value);
           timer.value = null;
         }
-      },600)
-
+      }, 600);
     };
     const onReset = () => {
-      if( isPlaying.value ){
+      if (isPlaying.value) {
         suspendNum();
         count.value = 0;
         soundVIdeo.currentTime = 0;
         soundVIdeo.pause();
-        setTimeout(()=>{
+        setTimeout(() => {
           init();
-        },600)
-      }else {
+        }, 600);
+      } else {
         // isPlaying.value = false
         count.value = 0;
         init();
       }
-
     };
     onMounted(() => {
       nextTick(() => {
@@ -211,47 +209,46 @@ export default defineComponent({
       second.value = Math.floor(count.value % 60);
     };
 
-    const updateMin = (e:any) => {
-      let targetCount =parseInt(e.target.value);
-      if(Number.isNaN(targetCount) ){
-        targetCount = 0
+    const updateMin = (e: any) => {
+      let targetCount = parseInt(e.target.value);
+      if (Number.isNaN(targetCount)) {
+        targetCount = 0;
       }
-      if(targetCount > 59){
-        targetCount = 59
+      if (targetCount > 59) {
+        targetCount = 59;
       }
-      mine.value = targetCount
-        const lastStr = getSecond(count.value);
-        console.log( mine.value);
-        count.value = mine.value * 60 + second.value;
+      mine.value = targetCount;
+      const lastStr = getSecond(count.value);
+      console.log(mine.value);
+      count.value = mine.value * 60 + second.value;
 
-        const str = getSecond(count.value);
-        console.log(str, lastStr);
-        for (let i = 0; i < flipObjs.value.length; i++) {
-          if (lastStr[i] === str[i]) {
-            continue;
-          }
-          flipObjs.value[i].value.flipUp(lastStr[i], str[i]);
+      const str = getSecond(count.value);
+      console.log(str, lastStr);
+      for (let i = 0; i < flipObjs.value.length; i++) {
+        if (lastStr[i] === str[i]) {
+          continue;
         }
+        flipObjs.value[i].value.flipUp(lastStr[i], str[i]);
+      }
     };
-    const updateSecond = (e:any) => {
-      let targetCount =parseInt(e.target.value);
-      if(Number.isNaN(targetCount) ){
-        targetCount = 0
+    const updateSecond = (e: any) => {
+      let targetCount = parseInt(e.target.value);
+      if (Number.isNaN(targetCount)) {
+        targetCount = 0;
       }
-      if(targetCount > 59){
-        targetCount = 59
+      if (targetCount > 59) {
+        targetCount = 59;
       }
-      second.value = targetCount
-        const lastStr = getSecond(count.value);
-        count.value = mine.value * 60 + second.value;
-        const str = getSecond(count.value);
-        for (let i = 0; i < flipObjs.value.length; i++) {
-          if (lastStr[i] === str[i]) {
-            continue;
-          }
-          flipObjs.value[i].value.flipUp(lastStr[i], str[i]);
+      second.value = targetCount;
+      const lastStr = getSecond(count.value);
+      count.value = mine.value * 60 + second.value;
+      const str = getSecond(count.value);
+      for (let i = 0; i < flipObjs.value.length; i++) {
+        if (lastStr[i] === str[i]) {
+          continue;
         }
-
+        flipObjs.value[i].value.flipUp(lastStr[i], str[i]);
+      }
     };
 
     watch(
@@ -276,7 +273,6 @@ export default defineComponent({
                   </div>
 
                   <div
-
                     class={[
                       styles.chioseWrap,
                       isPlaying.value ? styles.chioseHidden : ''

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

@@ -109,6 +109,10 @@ export default defineComponent({
     classId: {
       type: String,
       defaault: ''
+    },
+    preStudentNum: {
+      type: [String, Number],
+      default: ''
     }
   },
   emits: ['close'],
@@ -150,6 +154,7 @@ export default defineComponent({
       detailId: '' as any, // 编号 - 课程编号
       classGroupId: '' as any, // 上课时需要 班级编号
       classId: '' as any, // 上课编号
+      preStudentNum: '' as any, // 班上学生
       // detail: null,
       knowledgePointList: [] as any,
       itemList: [] as any,
@@ -269,6 +274,7 @@ export default defineComponent({
     onMounted(() => {
       // initMoveable();
       const query = route.query;
+      console.log(query, props.preStudentNum, '学生人数');
       // 先取参数,
       data.type = props.type || (query.type as any);
       data.subjectId = props.subjectId || query.subjectId;
@@ -276,6 +282,7 @@ export default defineComponent({
       data.lessonCourseId = props.lessonCourseId || query.lessonCourseId;
       data.classGroupId = props.classGroupId || query.classGroupId;
       data.classId = props.classId || query.classId;
+      data.preStudentNum = props.preStudentNum || query.preStudentNum;
 
       window.addEventListener('message', iframeHandle);
       getDetail();
@@ -1202,8 +1209,13 @@ export default defineComponent({
             </div>
             {data.type !== 'preview' && (
               <div
-                class={styles.btnItem}
+                class={[
+                  styles.btnItem,
+                  data.preStudentNum <= 0 ? styles.btnsDisabled : ''
+                ]}
                 onClick={async () => {
+                  // 学生人数必须大于0,才可以布置作业
+                  if (data.preStudentNum <= 0) return;
                   const res = await lessonPreTrainingPage({
                     coursewareKnowledgeDetailId: data.detailId,
                     subjectId: data.subjectId,

+ 3 - 0
src/views/attend-class/model/train-update/index.tsx

@@ -39,6 +39,7 @@ export default defineComponent({
       baseMaxScore: 99,
       type: 'PRACTICE',
       musicId: '',
+      musicName: '',
       coursewareKnowledgeDetailId: '', // 章节编号
       minScore: null as any,
       maxScore: null as any,
@@ -62,6 +63,7 @@ export default defineComponent({
           const params = {
             trainingType: forms.type,
             musicId: forms.musicId,
+            musicName: forms.musicName,
             coursewareKnowledgeDetailId: forms.coursewareKnowledgeDetailId,
             subjectId: forms.subjectId,
             id: forms.id,
@@ -121,6 +123,7 @@ export default defineComponent({
       }
       forms.baseMaxScore = item.practiceChapterMax || 99;
       forms.musicId = item.id;
+      forms.musicName = item.musicName;
       forms.coursewareKnowledgeDetailId = item.coursewareKnowledgeDetailId;
       forms.subjectId = item.subjectId;
       forms.coverImg = item.coverImg;

+ 10 - 0
src/views/classList/components/classRecord.module.less

@@ -64,6 +64,16 @@
       color: #777777;
       line-height: 26px;
     }
+
+    .subjectName {
+      font-size: 14px;
+      font-weight: 400;
+      color: #FFFFFF;
+      background: #198CFE;
+      border-radius: 5px;
+      padding: 1px 8px;
+      margin-right: 4px;
+    }
   }
 
 }

+ 5 - 0
src/views/classList/components/classRecord.tsx

@@ -131,6 +131,11 @@ export default defineComponent({
                   <div class={styles.userInfo}>
                     <h2>{item.teacherName}</h2>
                     <p>
+                      {item.subjectName && (
+                        <span class={styles.subjectName}>
+                          {item.subjectName}
+                        </span>
+                      )}
                       {item.lessonCourseware.lessonCoursewareName} |{' '}
                       {item.lessonCourseware.lessonCoursewareDetailName}|{' '}
                       {

+ 2 - 1
src/views/classList/modals/Gotoclass.tsx

@@ -58,7 +58,8 @@ export default defineComponent({
         if (data.rows && data.rows.length > 0) {
           const res = await courseScheduleStart({
             lessonCoursewareKnowledgeDetailId: forms.chapter,
-            classGroupId: props.activeRow.id
+            classGroupId: props.activeRow.id,
+            subjectId: forms.subjectId
           });
 
           emit('close');

+ 11 - 1
src/views/home/index.module.less

@@ -785,9 +785,19 @@
 
       .teachGroupItemInfo {
         font-size: 13px;
-        line-height: 18px;
+        line-height: 26px;
         color: rgba(0, 0, 0, 0.5);
       }
+
+      .subjectName {
+        font-size: 14px;
+        font-weight: 400;
+        color: #FFFFFF;
+        background: #198CFE;
+        border-radius: 5px;
+        padding: 1px 8px;
+        margin-right: 4px;
+      }
     }
   }
 }

+ 2 - 1
src/views/home/modals/chioseModal.tsx

@@ -55,7 +55,8 @@ export default defineComponent({
         if (data.rows && data.rows.length > 0) {
           const res = await courseScheduleStart({
             lessonCoursewareKnowledgeDetailId: forms.chapter,
-            classGroupId: forms.currentClass
+            classGroupId: forms.currentClass,
+            subjectId: forms.subjectId
           });
           emit('close');
           emit('preview', {

+ 6 - 1
src/views/home/modals/teachItem.tsx

@@ -21,7 +21,12 @@ export default defineComponent({
               {props.item.teacherName} <span>{props.item.classGroup}</span>
             </p>
 
-            <p class={styles.teachGroupItemInfo}>{props.item.conent}</p>
+            <p class={styles.teachGroupItemInfo}>
+              {props.item.subjectName && (
+                <span class={styles.subjectName}>{props.item.subjectName}</span>
+              )}
+              {props.item.conent}
+            </p>
           </div>
         </div>
       </>

+ 30 - 11
src/views/prepare-lessons/components/lesson-main/courseware/index.tsx

@@ -49,6 +49,8 @@ export default defineComponent({
     const forms = reactive({
       className: route.query.name as any,
       classGroupId: route.query.classGroupId,
+      preStudentNum: route.query.preStudentNum,
+      courseScheduleSubjectId: route.query.courseScheduleSubjectId,
       // 选取参数带的,后取缓存
       subjectId: route.query.subjectId
         ? Number(route.query.subjectId)
@@ -247,11 +249,12 @@ export default defineComponent({
       }
     };
     const fscreen = () => {
-      const el = document.documentElement;
+      const el: any = document.documentElement;
+      const documentDom: any = document;
       const isFullscreen =
-        document.fullScreen ||
-        document.mozFullScreen ||
-        document.webkitIsFullScreen;
+        documentDom.fullScreen ||
+        documentDom.mozFullScreen ||
+        documentDom.webkitIsFullScreen;
       if (!isFullscreen) {
         //进入全屏
         (el.requestFullscreen && el.requestFullscreen()) ||
@@ -296,9 +299,16 @@ export default defineComponent({
         const localStorageSubjectId = localStorage.getItem(
           'prepareLessonSubjectId'
         );
+        // 先取 上次上课声部,在取班级声部 最后取缓存
         const subjectId =
-          forms.subjectId || localStorageSubjectId
-            ? Number(forms.subjectId || localStorageSubjectId)
+          forms.courseScheduleSubjectId ||
+          forms.subjectId ||
+          localStorageSubjectId
+            ? Number(
+                forms.courseScheduleSubjectId ||
+                  forms.subjectId ||
+                  localStorageSubjectId
+              )
             : null;
         // 判断浏览器上面是否有
         const index = subjectList.findIndex(
@@ -325,6 +335,7 @@ export default defineComponent({
       async () => {
         forms.className = route.query.name as any;
         forms.classGroupId = route.query.classGroupId as any;
+        forms.preStudentNum = route.query.preStudentNum as any;
         forms.subjectId = route.query.subjectId
           ? Number(route.query.subjectId)
           : null;
@@ -642,7 +653,8 @@ export default defineComponent({
                     // 开始上课
                     const res = await courseScheduleStart({
                       lessonCoursewareKnowledgeDetailId: prepareStore.selectKey,
-                      classGroupId: forms.classGroupId
+                      classGroupId: forms.classGroupId,
+                      subjectId: prepareStore.getSubjectId
                     });
                     if (
                       window.matchMedia('(display-mode: standalone)').matches
@@ -658,7 +670,8 @@ export default defineComponent({
                         subjectId: prepareStore.getSubjectId,
                         detailId: prepareStore.getSelectKey,
                         classId: res.data,
-                        lessonCourseId: prepareStore.getBaseCourseware.id
+                        lessonCourseId: prepareStore.getBaseCourseware.id,
+                        preStudentNum: forms.preStudentNum
                       };
                     } else {
                       const { href } = router.resolve({
@@ -669,7 +682,8 @@ export default defineComponent({
                           subjectId: prepareStore.getSubjectId,
                           detailId: prepareStore.getSelectKey,
                           classId: res.data,
-                          lessonCourseId: prepareStore.getBaseCourseware.id
+                          lessonCourseId: prepareStore.getBaseCourseware.id,
+                          preStudentNum: forms.preStudentNum
                         }
                       });
                       window.open(href, +new Date() + '');
@@ -720,11 +734,13 @@ export default defineComponent({
               if (forms.classGroupId) {
                 forms.className = item.name;
                 forms.classGroupId = item.classGroupId;
+                forms.preStudentNum = item.preStudentNum;
                 forms.subjectId = item.subjectId;
+                forms.courseScheduleSubjectId = item.courseScheduleSubjectId;
                 forms.showAttendClass = false;
 
                 prepareStore.setClassGroupId(item.classGroupId);
-
+                console.log(forms, 'forms', item);
                 checkSubjectIds();
                 // 声部切换时
                 eventGlobal.emit('onChangeClass', {
@@ -734,7 +750,8 @@ export default defineComponent({
               } else {
                 const res = await courseScheduleStart({
                   lessonCoursewareKnowledgeDetailId: prepareStore.selectKey,
-                  classGroupId: item.classGroupId
+                  classGroupId: item.classGroupId,
+                  subjectId: prepareStore.getSubjectId
                 });
                 forms.showAttendClass = false;
                 if (window.matchMedia('(display-mode: standalone)').matches) {
@@ -746,6 +763,7 @@ export default defineComponent({
                     type: 'class',
                     classId: res.data, // 上课编号
                     classGroupId: item.classGroupId,
+                    preStudentNum: item.preStudentNum,
                     subjectId: prepareStore.getSubjectId,
                     detailId: prepareStore.getSelectKey,
                     lessonCourseId: prepareStore.getBaseCourseware.id
@@ -760,6 +778,7 @@ export default defineComponent({
                       type: 'class',
                       classId: res.data, // 上课编号
                       classGroupId: item.classGroupId,
+                      preStudentNum: item.preStudentNum,
                       subjectId: prepareStore.getSubjectId,
                       detailId: prepareStore.getSelectKey,
                       lessonCourseId: prepareStore.getBaseCourseware.id

+ 28 - 32
src/views/prepare-lessons/components/lesson-main/train/index.tsx

@@ -24,6 +24,7 @@ import { evaluateDifficult } from '/src/utils/contants';
 import TrainUpdate from '/src/views/attend-class/model/train-update';
 import AssignHomework from './assign-homework';
 import Trainguide from '@/custom-plugins/guide-page/train-guide';
+import { eventGlobal } from '/src/utils';
 export default defineComponent({
   name: 'courseware-modal',
   setup() {
@@ -68,6 +69,7 @@ export default defineComponent({
         prepareStore.setIsEditTrain(false);
         // 重置临时删除编号
         forms.removeIds = [];
+        await getList();
       } catch {
         //
       }
@@ -185,38 +187,15 @@ export default defineComponent({
       }
     };
 
-    // const checkSubjectIds = () => {
-    //   const subjectList = prepareStore.getSubjectList;
-
-    //   // 并且没有声部时才会更新
-    //   if (subjectList.length > 0) {
-    //     // 判断浏览器上面是否有
-    //     const index = subjectList.findIndex(
-    //       (subject: any) => subject.id == forms.subjectId
-    //     );
-
-    //     // 并且声部在列表中
-    //     if (forms.subjectId && index >= 0) {
-    //       prepareStore.setSubjectId(forms.subjectId);
-    //     } else {
-    //       // 判断是否有缓存
-    //       prepareStore.setSubjectId(subjectList[0].id);
-    //     }
-    //   }
-    // };
-
     onMounted(async () => {
-      // 获取教材分类列表
-      // await catchStore.getSubjects();
-
-      // const subjectList = catchStore.getSubjectList;
-      // if (subjectList.length > 0 && !prepareStore.getSubjectId) {
-      //   prepareStore.setSubjectId(subjectList[0].id);
-      // }
-      // 获取教材分类列表
-      // checkSubjectIds();
-
       await getList();
+
+      // 动态添加数据
+      eventGlobal.on('onTrainAddItem', (item: any) => {
+        forms.drag = true;
+        forms.trainList.push(item);
+        prepareStore.setTrainList(forms.trainList);
+      });
     });
     return () => (
       <div class={styles.coursewareModal}>
@@ -320,7 +299,22 @@ export default defineComponent({
                 !forms.loadingStatus && prepareStore.getTrainList.length <= 0
                   ? styles.emptySection
                   : ''
-              ]}>
+              ]}
+              onDragenter={(e: any) => {
+                e.preventDefault();
+              }}
+              onDragover={(e: any) => {
+                e.preventDefault();
+              }}
+              onDrop={(e: any) => {
+                console.log(e, 'e');
+                let dropItem = e.dataTransfer.getData('text');
+                dropItem = dropItem ? JSON.parse(dropItem) : {};
+                // 判断是否有数据
+                if (dropItem.id) {
+                  eventGlobal.emit('onTrainDragItem', dropItem);
+                }
+              }}>
               {forms.trainList.length > 0 && (
                 <>
                   {forms.drag ? (
@@ -340,7 +334,9 @@ export default defineComponent({
                         item: (element: any) => {
                           const item = element.element;
                           return (
-                            <div data-id={item.id} class={styles.itemBlock}>
+                            <div
+                              data-id={item.musicId}
+                              class={styles.itemBlock}>
                               <TrainType
                                 item={item}
                                 isDelete

+ 68 - 5
src/views/prepare-lessons/components/resource-main/components/select-music/index.tsx

@@ -10,6 +10,8 @@ import { musicSheetPage } from '/src/views/prepare-lessons/api';
 import TrainUpdate from '/src/views/attend-class/model/train-update';
 import requestOrigin from 'umi-request';
 import CardPreview from '/src/components/card-preview';
+import { evaluateDifficult } from '/src/utils/contants';
+import { eventGlobal } from '/src/utils';
 export default defineComponent({
   name: 'share-resources',
   setup() {
@@ -48,7 +50,11 @@ export default defineComponent({
         state.loading = false;
         const tempRows = data.rows || [];
         const temp: any = [];
+
         tempRows.forEach((row: any) => {
+          const index = prepareStore.getTrainList.findIndex(
+            (course: any) => course.musicId === row.id
+          );
           temp.push({
             id: row.id,
             coverImg: row.musicSvg,
@@ -57,7 +63,8 @@ export default defineComponent({
             isCollect: false,
             isSelected: true,
             content: row.id,
-            xmlFileUrl: row.xmlFileUrl
+            xmlFileUrl: row.xmlFileUrl,
+            exist: index !== -1 ? true : false // 是否存在
           });
         });
         state.tableList.push(...temp);
@@ -81,6 +88,21 @@ export default defineComponent({
         onSearch(state.searchGroup);
       }
     );
+    watch(
+      () => prepareStore.trainList,
+      () => {
+        state.tableList.forEach((item: any) => {
+          const index = prepareStore.getTrainList.findIndex(
+            (course: any) => course.musicId === item.id
+          );
+          item.exist = index !== -1 ? true : false; // 是否存在
+        });
+      },
+      {
+        deep: true,
+        immediate: true
+      }
+    );
 
     const throttledFn = useThrottleFn(() => {
       state.pagination.page = state.pagination.page + 1;
@@ -118,8 +140,32 @@ export default defineComponent({
       state.editStatus = true;
     };
 
+    const typeFormat = (trainingType: string, configJson: any) => {
+      let tList: string[] = [];
+
+      if (trainingType === 'EVALUATION') {
+        tList = [
+          `${evaluateDifficult[configJson.evaluateDifficult]}`,
+          '全部小节',
+          // `速度${configJson.evaluateSpeed}`,
+          `${configJson.trainingTimes}分合格`
+        ];
+      } else {
+        tList = [
+          `${configJson.practiceChapterBegin}-${configJson.practiceChapterEnd}小节`,
+          `速度${configJson.practiceSpeed}`,
+          `${configJson.trainingTimes}分钟`
+        ];
+      }
+      return tList;
+    };
+
     onMounted(() => {
       getList();
+
+      eventGlobal.on('onTrainDragItem', (item: any) => {
+        onAdd(item);
+      });
     });
     return () => (
       <div>
@@ -154,7 +200,8 @@ export default defineComponent({
                       isShowAdd
                       isShowCollect={false}
                       item={item}
-                      isShowAddDisabled={!prepareStore.getIsEditTrain}
+                      draggable
+                      // isShowAddDisabled={!prepareStore.getIsEditTrain}
                       disabledMouseHover={false}
                       onClick={() => {
                         if (item.type === 'IMG') return;
@@ -181,10 +228,26 @@ export default defineComponent({
           title="作业设置">
           <TrainUpdate
             item={state.editItem}
+            type="homework"
             onClose={() => (state.editStatus = false)}
-            onConfirm={() => {
-              state.editItem = {};
-              prepareStore.setIsAddTrain(true);
+            onConfirm={(item: any) => {
+              // state.editItem = {};
+              // prepareStore.setIsAddTrain(true);
+
+              const tList = typeFormat(
+                item.trainingType,
+                item.trainingConfigJson
+              );
+              //
+              const train = {
+                ...item,
+                id: null,
+                musicName: state.editItem.title,
+                typeList: tList
+              };
+
+              console.log(train, '1212');
+              eventGlobal.emit('onTrainAddItem', train);
             }}
           />
         </NModal>

+ 22 - 16
src/views/prepare-lessons/model/attend-class/index.tsx

@@ -40,6 +40,7 @@ export default defineComponent({
     const loading = ref(false);
     // 开始上课
     const onAttendClass = async (item: any) => {
+      // console.log(item, 'onAttendClass');
       try {
         // 判断是否是切换班级
         if (props.type == 'change') {
@@ -48,8 +49,10 @@ export default defineComponent({
               lastUseCoursewareId: item.lessonCoursewareId,
               unit: item.lessonCoursewareKnowledgeDetailId,
               subjectId: item.subjectId,
+              courseScheduleSubjectId: item.courseScheduleSubjectId,
               name: item.name, // 班级名称
-              classGroupId: item.id // 班级编号
+              classGroupId: item.id, // 班级编号
+              preStudentNum: item.preStudentNum
             });
           } else {
             forms.showSubjectClass = true;
@@ -60,7 +63,8 @@ export default defineComponent({
 
         const res = await courseScheduleStart({
           lessonCoursewareKnowledgeDetailId: prepareStore.selectKey,
-          classGroupId: item.id
+          classGroupId: item.id,
+          subjectId: prepareStore.getSubjectId
         });
 
         emit('close');
@@ -70,7 +74,8 @@ export default defineComponent({
           classGroupId: item.id,
           subjectId: prepareStore.getSubjectId,
           detailId: prepareStore.getSelectKey,
-          lessonCourseId: prepareStore.getBaseCourseware.id
+          lessonCourseId: prepareStore.getBaseCourseware.id,
+          preStudentNum: item.preStudentNum
         });
         if (window.matchMedia('(display-mode: standalone)').matches) {
           state.application = window.matchMedia(
@@ -85,11 +90,12 @@ export default defineComponent({
       }
     };
     const fscreen = () => {
-      const el = document.documentElement;
+      const el: any = document.documentElement;
+      const documentDom: any = document;
       const isFullscreen =
-        document.fullScreen ||
-        document.mozFullScreen ||
-        document.webkitIsFullScreen;
+        documentDom.fullScreen ||
+        documentDom.mozFullScreen ||
+        documentDom.webkitIsFullScreen;
       if (!isFullscreen) {
         //进入全屏
         (el.requestFullscreen && el.requestFullscreen()) ||
@@ -98,12 +104,12 @@ export default defineComponent({
           (el.msRequestFullscreen && el.msRequestFullscreen());
       } else {
         //退出全屏
-        document.exitFullscreen
-          ? document.exitFullscreen()
-          : document.mozCancelFullScreen
-          ? document.mozCancelFullScreen()
-          : document.webkitExitFullscreen
-          ? document.webkitExitFullscreen()
+        documentDom.exitFullscreen
+          ? documentDom.exitFullscreen()
+          : documentDom.mozCancelFullScreen
+          ? documentDom.mozCancelFullScreen()
+          : documentDom.webkitExitFullscreen
+          ? documentDom.webkitExitFullscreen()
           : '';
       }
     };
@@ -120,9 +126,9 @@ export default defineComponent({
         const temp: any = [];
         result.forEach((item: any) => {
           // 判断班级里面有学生的
-          if (item.preStudentNum > 0) {
-            temp.push(item);
-          }
+          // if (item.preStudentNum > 0) {
+          temp.push(item);
+          // }
         });
         list.value = temp;
       } catch {

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

@@ -137,7 +137,7 @@ export default defineComponent({
                           isShowAdd
                           isShowCollect={false}
                           item={item}
-                          isShowAddDisabled={state.isShowAddDisabled}
+                          // isShowAddDisabled={state.isShowAddDisabled}
                           onAdd={() => emit('add', item)}
                           disabledMouseHover={false}
                           onClick={() => {

+ 1 - 0
src/views/preview-window/index.tsx

@@ -63,6 +63,7 @@ export default defineComponent({
                   classGroupId={params.value.classGroupId || ''}
                   lessonCourseId={params.value.lessonCourseId || ''}
                   classId={params.value.classId || ''}
+                  preStudentNum={params.value.preStudentNum}
                   onClose={() => emit('update:show', false)}
                 />
               ) : type.value == 'notation' ? (