mo 1 gadu atpakaļ
vecāks
revīzija
a9a3b39ed6

+ 6 - 0
src/views/attend-class/index.tsx

@@ -95,6 +95,10 @@ export default defineComponent({
     classId: {
       type: String,
       defaault: ''
+    },
+    preStudentNum:{
+      type: [String, Number],
+      default: ''
     }
   },
   emits: ['close'],
@@ -376,8 +380,10 @@ 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;

+ 2 - 2
src/views/classList/index.tsx

@@ -217,7 +217,7 @@ export default defineComponent({
                   {index == 0 ? (
                     <NButton
                       {...{ id: 'class-2' }}
-                      disabled={!(row.preStudentNum > 0)}
+                      // disabled={!(row.preStudentNum > 0)}
                       type="primary"
                       text
                       onClick={() => classesBegin(row)}>
@@ -225,7 +225,7 @@ export default defineComponent({
                     </NButton>
                   ) : (
                     <NButton
-                      disabled={!(row.preStudentNum > 0)}
+                      // disabled={!(row.preStudentNum > 0)}
                       type="primary"
                       text
                       onClick={() => classesBegin(row)}>

+ 7 - 4
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') {
@@ -49,7 +50,8 @@ export default defineComponent({
               unit: item.lessonCoursewareKnowledgeDetailId,
               subjectId: item.subjectId,
               name: item.name, // 班级名称
-              classGroupId: item.id // 班级编号
+              classGroupId: item.id, // 班级编号
+              preStudentNum:item.preStudentNum
             });
           } else {
             forms.showSubjectClass = true;
@@ -70,7 +72,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(
@@ -119,9 +122,9 @@ export default defineComponent({
         const temp: any = [];
         result.forEach((item: any) => {
           // 判断班级里面有学生的
-          if (item.preStudentNum > 0) {
+          // if (item.preStudentNum > 0) {
             temp.push(item);
-          }
+          // }
         });
         list.value = temp;
       } catch {

+ 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' ? (