|
@@ -40,9 +40,28 @@ export default defineComponent({
|
|
sessionStorage.setItem('unit-create', JSON.stringify(forms.value))
|
|
sessionStorage.setItem('unit-create', JSON.stringify(forms.value))
|
|
router.push({ path: '/unit-Lesson', query: { classGroupId: forms.value.classGroupId } })
|
|
router.push({ path: '/unit-Lesson', query: { classGroupId: forms.value.classGroupId } })
|
|
}
|
|
}
|
|
- onMounted(() => {
|
|
|
|
|
|
+ onMounted(async () => {
|
|
forms.value = { ...JSON.parse(sessionStorage.getItem('unit-create') || '{}') } as any
|
|
forms.value = { ...JSON.parse(sessionStorage.getItem('unit-create') || '{}') } as any
|
|
getOrchestraList()
|
|
getOrchestraList()
|
|
|
|
+ if (forms.value?.orchestraId) {
|
|
|
|
+ try {
|
|
|
|
+ const res = await request.post('/api-teacher/classGroup/page', {
|
|
|
|
+ data: { page: 1, rows: 9999, orchestraId: forms.value?.orchestraId }
|
|
|
|
+ })
|
|
|
|
+ state.classList = res.data.rows.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ name: item.name,
|
|
|
|
+ value: item.id as string
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (state.classList.length < 1) {
|
|
|
|
+ showToast('当前乐团暂无班级')
|
|
|
|
+ }
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log(e, 'cuowu')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
})
|
|
})
|
|
const getOrchestraList = async () => {
|
|
const getOrchestraList = async () => {
|
|
try {
|
|
try {
|
|
@@ -168,11 +187,11 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<OSticky position="bottom">
|
|
<OSticky position="bottom">
|
|
- <div class={'btnGroup'}>
|
|
|
|
|
|
+ {/* <div class={'btnGroup'}>
|
|
<Button block round type="primary">
|
|
<Button block round type="primary">
|
|
下一步
|
|
下一步
|
|
</Button>
|
|
</Button>
|
|
- </div>
|
|
|
|
|
|
+ </div> */}
|
|
</OSticky>
|
|
</OSticky>
|
|
</div>
|
|
</div>
|
|
<ActionSheet
|
|
<ActionSheet
|