index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div style="overflow-y: auto">
  3. <!-- <img :src="images" style="width: 100%; height: 100%" /> -->
  4. <div style="width: 71%; margin-left: 10%">
  5. <a-tabs v-model:activeKey="activeKey" type="card">
  6. <a-tab-pane key="1" tab="教室信息">
  7. <courseInfo :courseInfoId="courseInfoId" @nextStep="nextStep" />
  8. </a-tab-pane>
  9. <a-tab-pane key="2" tab="课程制作" :disabled="courseInfoId==null">
  10. <courseProduction :courseInfoId="courseInfoId" />
  11. </a-tab-pane>
  12. <!-- <a-tab-pane key="3" tab="学员管理" :disabled="courseInfoId==null">-->
  13. <!-- <StudentDetails :courseInfoId="courseInfoId"></StudentDetails>-->
  14. <!-- </a-tab-pane>-->
  15. <!-- <a-tab-pane key="4" tab="作业布置" :disabled="courseInfoId==null">-->
  16. <!-- <div>这里是作业布置的内容</div>-->
  17. <!-- </a-tab-pane>-->
  18. <!-- <a-tab-pane key="5" tab="测试布置" :disabled="courseInfoId==null">-->
  19. <!-- <div>这里是测试布置的内容</div>-->
  20. <!-- </a-tab-pane>-->
  21. </a-tabs>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup>
  26. import { ref, onMounted } from 'vue'
  27. import Header from '@/views/portal/components/Header.vue'
  28. import Footer from '@/views/portal/components/Footer.vue'
  29. import courseInfo from './components/courseInfo.vue'
  30. import courseProduction from './components/courseProduction/index.vue'
  31. import StudentDetails from './components/StudentDetails.vue'
  32. import { useRoute, useRouter } from 'vue-router'
  33. const router = useRouter()
  34. const route = useRoute()
  35. const activeKey = ref('1') // 默认选中的标签页
  36. const courseInfoId = ref(route.query.id || null) // 编辑课程信息id
  37. const nextStep = (id) => {
  38. courseInfoId.value = id
  39. activeKey.value = '2'
  40. }
  41. const onChangeCurrent = (current) => {
  42. router.push({
  43. path: '/' + current
  44. })
  45. }
  46. // onMounted(() => {
  47. // })
  48. </script>
  49. <style scoped>
  50. /* 自定义样式 */
  51. </style>