teacher.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. // 教师路由信息
  2. import Layout from '@/layout/teacher.vue'
  3. const teacher = [
  4. {
  5. path: '/recruit/teacher',
  6. show: true,
  7. redirect: '/recruit/teacher/studentList/index',
  8. },
  9. {
  10. path: '/recruit/teacher/studentList',
  11. component: Layout,
  12. name: '学生列表',
  13. icon: 'mdi-account-school-outline',
  14. meta: {
  15. enName: 'Student List'
  16. },
  17. children: [
  18. {
  19. path: 'index',
  20. name: '学生列表',
  21. meta: {
  22. enName: 'Student List',
  23. },
  24. show: true,
  25. component: () => import('@/views/recruit/teacher/studentList/index.vue')
  26. },
  27. {
  28. path: 'detail/:id',
  29. show: true,
  30. name: '学生详情',
  31. meta: {
  32. enName: 'Student Details'
  33. },
  34. component: () => import('@/views/recruit/teacher/studentList/studentDetails.vue')
  35. },
  36. ]
  37. },
  38. {
  39. path: '/recruit/teacher/internshipSituation',
  40. component: Layout,
  41. name: '实习情况',
  42. icon: 'mdi-town-hall',
  43. meta: {
  44. enName: 'Internship Situation'
  45. },
  46. children: [
  47. {
  48. path: 'index',
  49. name: '实习情况',
  50. meta: {
  51. enName: 'Internship Situation',
  52. },
  53. show: true,
  54. component: () => import('@/views/recruit/teacher/internshipSituation/index.vue')
  55. },
  56. ]
  57. },
  58. {
  59. path: '/recruit/teacher/internshipReport',
  60. component: Layout,
  61. name: '实习报告',
  62. icon: 'mdi-file-document-multiple-outline',
  63. meta: {
  64. enName: 'Internship Report'
  65. },
  66. children: [
  67. {
  68. path: 'index',
  69. name: '实习报告',
  70. meta: {
  71. enName: 'Internship Report',
  72. },
  73. show: true,
  74. component: () => import('@/views/recruit/teacher/internshipReport/index.vue')
  75. },
  76. ]
  77. },
  78. // {
  79. // path: '/recruit/teacher/internshipCompany',
  80. // component: Layout,
  81. // name: 'internshipCompany',
  82. // meta: {
  83. // title: '实习企业',
  84. // enName: 'Internship Company',
  85. // icon: 'mdi-home-city-outline'
  86. // },
  87. // children: [
  88. // {
  89. // path: 'index',
  90. // meta: {
  91. // title: '实习企业',
  92. // enName: 'Internship Company',
  93. // },
  94. // show: true,
  95. // component: () => import('@/views/recruit/teacher/internshipCompany/index.vue')
  96. // },
  97. // ]
  98. // },
  99. {
  100. path: '/recruit/teacher/teacherCertification',
  101. component: Layout,
  102. name: '账号信息',
  103. icon: 'mdi-human-male-board',
  104. meta: {
  105. enName: 'Teacher Certification'
  106. },
  107. children: [
  108. {
  109. path: 'index',
  110. name: '账号信息',
  111. meta: {
  112. enName: 'Teacher Certification',
  113. },
  114. show: true,
  115. component: () => import('@/views/recruit/teacher/teacherCertification/index.vue')
  116. },
  117. ]
  118. },
  119. {
  120. path: '/recruit/teacher/organization',
  121. component: Layout,
  122. name: '学校机构',
  123. icon: 'mdi-file-tree-outline',
  124. meta: {
  125. enName: 'Teacher Organization'
  126. },
  127. children: [
  128. {
  129. path: 'index',
  130. name: '学校机构',
  131. meta: {
  132. enName: 'Teacher Organization',
  133. },
  134. show: true,
  135. component: () => import('@/views/recruit/teacher/organization/index.vue')
  136. },
  137. ]
  138. },
  139. ]
  140. function traverse(list, type) {
  141. list.forEach(e => {
  142. if (!e.type) e.type = type
  143. if (!e.meta) e.meta = {}
  144. if (!e.meta.title) e.meta.title = e.name
  145. if (e.children?.length) traverse(e.children, 2)
  146. })
  147. }
  148. traverse(teacher, 1)
  149. export default teacher