Browse Source

更新打包

lex 2 years ago
parent
commit
8d438713b2

+ 8 - 0
src/school/train-planning/component/course-preview/index.module.less

@@ -31,6 +31,9 @@
   }
 }
 
+.courseTabsContainer {
+  height: 50px;
+}
 .courseTabs {
   :global {
     .van-tabs__line {
@@ -67,6 +70,11 @@
   }
   .cellTeacher {
     padding: 10px 12px 15px;
+    :global {
+      .van-button {
+        margin: 4px 0;
+      }
+    }
   }
   .conflictGrouop {
     padding: 0 12px;

+ 30 - 19
src/school/train-planning/component/course-preview/index.tsx

@@ -1,7 +1,7 @@
 import OHeader from '@/components/o-header'
 import OSticky from '@/components/o-sticky'
 import { Button, Cell, CellGroup, Dialog, Icon, Image, showToast, Tab, Tabs, Tag } from 'vant'
-import { defineComponent, onMounted, reactive, ref } from 'vue'
+import { defineComponent, onMounted, reactive, ref, nextTick } from 'vue'
 import styles from './index.module.less'
 import iconTimer from '../../images/icon-timer.png'
 import iconTeacher from '@common/images/icon_teacher.png'
@@ -50,18 +50,24 @@ export default defineComponent({
             ? { orchestraId: forms.selectOrchestraId }
             : forms.planList.orchestra[0]
           state.tabValue = selectOrchestra.orchestraId
+          console.log(forms.selectClassGroupId, forms.planList.classes[selectOrchestra.orchestraId])
           const selectClasses = forms.selectClassGroupId
             ? { classGroupId: forms.selectClassGroupId }
             : forms.planList.classes[selectOrchestra.orchestraId]
             ? forms.planList.classes[selectOrchestra.orchestraId][0]
             : {}
-          state.courseValue = selectClasses.classGroupId
           state.selectClasses = forms.planList.classes[selectOrchestra.orchestraId] || []
           state.selectCourse = forms.planList.course[selectClasses.classGroupId]
 
+          state.courseValue = selectClasses.classGroupId
+
+          console.log(selectClasses.classGroupId, 'selectClasses.classGroupId')
+
           // 判断是否有数据
           forms.selectOrchestraId = null
           forms.selectClassGroupId = null
+
+          console.log(selectClasses.classGroupId, 'selectClasses.classGroupId 333333')
         }
       } catch {
         //
@@ -165,6 +171,9 @@ export default defineComponent({
       } catch {
         //
         state.isClick = false
+        setTimeout(() => {
+          getClasses()
+        }, 1100)
       }
     }
 
@@ -201,23 +210,25 @@ export default defineComponent({
             ))}
           </Tabs>
 
-          {/* {state.courseValue && ( */}
-          <Tabs
-            swipeThreshold={3}
-            class={styles.courseTabs}
-            v-model:active={state.courseValue}
-            lineHeight={0}
-            shrink
-            ref={courseTabsRef}
-            onChange={(val: any) => {
-              state.selectCourse = forms.planList.course[val]
-            }}
-          >
-            {state.selectClasses.map((item: any) => (
-              <Tab title={item.className} name={item.classGroupId}></Tab>
-            ))}
-          </Tabs>
-          {/* )} */}
+          <div class={styles.courseTabsContainer}>
+            {state.courseValue && (
+              <Tabs
+                swipeThreshold={3}
+                class={styles.courseTabs}
+                v-model:active={state.courseValue}
+                lineHeight={0}
+                shrink
+                ref={courseTabsRef}
+                onChange={(val: any) => {
+                  state.selectCourse = forms.planList.course[val]
+                }}
+              >
+                {state.selectClasses.map((item: any) => (
+                  <Tab title={item.className} name={item.classGroupId}></Tab>
+                ))}
+              </Tabs>
+            )}
+          </div>
         </OSticky>
 
         {state.selectCourse.map((item: any) => (

+ 5 - 1
src/school/train-planning/modal/practice-class/index.tsx

@@ -180,7 +180,11 @@ export default defineComponent({
           >
             <CheckboxGroup class={[styles.gridContainer, styles.gridClass]} v-model={forms.check}>
               {forms.list.map((item: any) => (
-                <CellGroup class={styles.classCellGroup} onClick={() => onSelect(item.id)}>
+                <CellGroup
+                  class={styles.classCellGroup}
+                  onClick={() => onSelect(item.id)}
+                  border={false}
+                >
                   <Cell center titleStyle={{ flex: '0 auto' }} valueClass={styles.classCheckbox}>
                     {{
                       icon: () => <Image src={iconTeacher} class={styles.img} />,

+ 1 - 1
src/styles/index.less

@@ -124,7 +124,7 @@ body {
 
 .btnGroup {
   padding: 0 25px;
-  padding-bottom: 24px;
+  padding-bottom: calc(20px + env(safe-area-inset-bottom));
   .van-button {
     font-size: 16px !important;
     font-weight: 500;