unitDetail.tsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import OEmpty from '@/components/o-empty'
  2. import OHeader from '@/components/o-header'
  3. import OSearch from '@/components/o-search'
  4. import OSticky from '@/components/o-sticky'
  5. import {
  6. ActionSheet,
  7. Button,
  8. Cell,
  9. CellGroup,
  10. Dialog,
  11. Icon,
  12. Image,
  13. List,
  14. showToast,
  15. Tab,
  16. Tabs
  17. } from 'vant'
  18. import { defineComponent, onMounted, reactive, ref } from 'vue'
  19. import questIcon from '@/school/images/quest-icon.png'
  20. import styles from './index.module.less'
  21. import { useRoute, useRouter } from 'vue-router'
  22. import UnitListItem from './models/unit-list-item'
  23. import UnitStudentList from './models/unit-student-list'
  24. import OFullRefresh from '@/components/o-full-refresh'
  25. //
  26. import request from '@/helpers/request'
  27. export default defineComponent({
  28. name: 'unitDetail',
  29. setup() {
  30. const router = useRouter()
  31. const route = useRoute()
  32. const form = reactive({})
  33. const refreshing = ref(false)
  34. const loading = ref(false)
  35. const activeName = ref('one')
  36. const showTip = ref(false)
  37. const getDetail = async () => {
  38. try {
  39. const res = await request.get('/api-teacher/unitExamination/detail', {
  40. params: { unitExaminationId: route.query.id }
  41. })
  42. } catch (e) {}
  43. }
  44. onMounted(() => {
  45. getDetail()
  46. })
  47. return () => (
  48. <div class={styles.unitDetail}>
  49. <UnitListItem></UnitListItem>
  50. <div class={styles.tabsWrap}>
  51. <Icon
  52. class={styles.tabsWrapIcon}
  53. name={questIcon}
  54. size={18}
  55. color="#333"
  56. onClick={() => {
  57. showTip.value = true
  58. }}
  59. />
  60. <Tabs
  61. v-model:active={activeName.value}
  62. class={styles.rankTabs}
  63. background={'#F8F8F8'}
  64. title-active-color={'#333333'}
  65. title-inactive-color={'#777'}
  66. color={'#FF8057'}
  67. shrink
  68. >
  69. <Tab name="one" title="I类学生">
  70. <UnitStudentList></UnitStudentList>
  71. </Tab>
  72. <Tab name="two" title="II类学生">
  73. <UnitStudentList></UnitStudentList>
  74. </Tab>
  75. <Tab name="three" title="III类学生">
  76. <UnitStudentList></UnitStudentList>
  77. </Tab>
  78. </Tabs>
  79. </div>
  80. <Dialog
  81. class="exercisDetailDialog"
  82. v-model:show={showTip.value}
  83. title="提示框"
  84. confirmButtonText="我知道了"
  85. v-slots={{
  86. title: () => (
  87. <div class={styles.DialogTitle}>
  88. <span></span>
  89. <p>学生分类</p>
  90. </div>
  91. ),
  92. default: () => (
  93. <div class={styles.DialogConent}>
  94. <p>
  95. 根据学生入团的批次对不同训练阶段的学生进行分类,不同训练阶段的学生可布置不同标准的课后训练和单元测验内容。
  96. </p>
  97. <br />
  98. <p>&nbsp;&nbsp;&nbsp;I类学生:最新进入本乐团的学员</p>
  99. <p>&nbsp;II 类学生:较早进入本乐团的学员</p>
  100. <p>III 类学生:最早进入本乐团的学员</p>
  101. </div>
  102. )
  103. }}
  104. ></Dialog>
  105. </div>
  106. )
  107. }
  108. })