entry-ai-list.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="page-content">
  3. <mx-nav-bar title="志愿表"/>
  4. <mx-tabs-swiper v-model="current" :tabs="tabs" border>
  5. <template #AI志愿>
  6. <ai-list/>
  7. </template>
  8. <template #模拟志愿>
  9. <multiple-list/>
  10. </template>
  11. </mx-tabs-swiper>
  12. </view>
  13. </template>
  14. <script>
  15. import MxConst from "@/common/MxConst";
  16. import AiListItem from "@/pages/ie/entry-ai-list/components/ai-list-item.vue";
  17. import AiList from "@/pages/ie/entry-ai-list/components/ai-list.vue";
  18. import MultipleList from "@/pages/ie/entry-ai-list/components/multiple-list.vue";
  19. import {useTransfer} from "@/hooks/useTransfer";
  20. import {useProvideMajorTreeService} from "@/pages/ie/hooks/useMajorTreeInjection";
  21. export default {
  22. components: {MultipleList, AiList, AiListItem},
  23. data() {
  24. return {
  25. current: 0,
  26. tabs: [
  27. {name: 'AI志愿', type: MxConst.enum.ai.voluntaryType.ai},
  28. {name: '模拟志愿', type: MxConst.enum.ai.voluntaryType.multiple}
  29. ]
  30. };
  31. },
  32. setup() {
  33. const {prevData} = useTransfer()
  34. useProvideMajorTreeService()
  35. return {
  36. prevData
  37. }
  38. },
  39. mounted() {
  40. if (!isNaN(this.prevData.tab)) {
  41. // switch default tab.
  42. this.current = this.prevData.tab * 1
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. </style>