|
@@ -1,7 +1,7 @@
|
|
import OHeader from '@/components/o-header'
|
|
import OHeader from '@/components/o-header'
|
|
import OSticky from '@/components/o-sticky'
|
|
import OSticky from '@/components/o-sticky'
|
|
import { Button, Cell, CellGroup, Dialog, Icon, Image, showToast, Tab, Tabs, Tag } from 'vant'
|
|
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 styles from './index.module.less'
|
|
import iconTimer from '../../images/icon-timer.png'
|
|
import iconTimer from '../../images/icon-timer.png'
|
|
import iconTeacher from '@common/images/icon_teacher.png'
|
|
import iconTeacher from '@common/images/icon_teacher.png'
|
|
@@ -50,18 +50,24 @@ export default defineComponent({
|
|
? { orchestraId: forms.selectOrchestraId }
|
|
? { orchestraId: forms.selectOrchestraId }
|
|
: forms.planList.orchestra[0]
|
|
: forms.planList.orchestra[0]
|
|
state.tabValue = selectOrchestra.orchestraId
|
|
state.tabValue = selectOrchestra.orchestraId
|
|
|
|
+ console.log(forms.selectClassGroupId, forms.planList.classes[selectOrchestra.orchestraId])
|
|
const selectClasses = forms.selectClassGroupId
|
|
const selectClasses = forms.selectClassGroupId
|
|
? { classGroupId: forms.selectClassGroupId }
|
|
? { classGroupId: forms.selectClassGroupId }
|
|
: forms.planList.classes[selectOrchestra.orchestraId]
|
|
: forms.planList.classes[selectOrchestra.orchestraId]
|
|
? forms.planList.classes[selectOrchestra.orchestraId][0]
|
|
? forms.planList.classes[selectOrchestra.orchestraId][0]
|
|
: {}
|
|
: {}
|
|
- state.courseValue = selectClasses.classGroupId
|
|
|
|
state.selectClasses = forms.planList.classes[selectOrchestra.orchestraId] || []
|
|
state.selectClasses = forms.planList.classes[selectOrchestra.orchestraId] || []
|
|
state.selectCourse = forms.planList.course[selectClasses.classGroupId]
|
|
state.selectCourse = forms.planList.course[selectClasses.classGroupId]
|
|
|
|
|
|
|
|
+ state.courseValue = selectClasses.classGroupId
|
|
|
|
+
|
|
|
|
+ console.log(selectClasses.classGroupId, 'selectClasses.classGroupId')
|
|
|
|
+
|
|
// 判断是否有数据
|
|
// 判断是否有数据
|
|
forms.selectOrchestraId = null
|
|
forms.selectOrchestraId = null
|
|
forms.selectClassGroupId = null
|
|
forms.selectClassGroupId = null
|
|
|
|
+
|
|
|
|
+ console.log(selectClasses.classGroupId, 'selectClasses.classGroupId 333333')
|
|
}
|
|
}
|
|
} catch {
|
|
} catch {
|
|
//
|
|
//
|
|
@@ -165,6 +171,9 @@ export default defineComponent({
|
|
} catch {
|
|
} catch {
|
|
//
|
|
//
|
|
state.isClick = false
|
|
state.isClick = false
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ getClasses()
|
|
|
|
+ }, 1100)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -201,23 +210,25 @@ export default defineComponent({
|
|
))}
|
|
))}
|
|
</Tabs>
|
|
</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>
|
|
</OSticky>
|
|
|
|
|
|
{state.selectCourse.map((item: any) => (
|
|
{state.selectCourse.map((item: any) => (
|