index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <div class='m-container'>
  3. <h2>
  4. <!-- <div class='squrt'></div> -->
  5. <el-page-header @back="onCancel"
  6. :content="name"></el-page-header>
  7. <!-- <div class="term">第一学期</div>
  8. <div class="term active">第二学期</div> -->
  9. </h2>
  10. <div class="m-core">
  11. <p class='msg'
  12. :class="status=='PROGRESS'? 'ing' : '' "> <img :src="status=='PROGRESS'?stepImgs.PROGRESS:stepImgs.PAUSE"
  13. alt="">
  14. {{ status=='PROGRESS'?'进行中':'已结束' }}</p>
  15. <!-- navMenu -->
  16. <tab-router v-model.trim="activeIndex"
  17. type="card"
  18. @tab-click="handleClick">
  19. <el-tab-pane label="基本信息"
  20. lazy
  21. v-if="permission('/teamDetails/baseInfo')"
  22. name="1">
  23. <baseinfo v-if="activeIndex == '1'"
  24. :teamid='teamid' />
  25. </el-tab-pane>
  26. <el-tab-pane label="老师列表"
  27. lazy
  28. v-if="permission('/teamDetails/teacherList')"
  29. name="2">
  30. <teacherList v-if="activeIndex == '2'"
  31. :teamid='teamid' />
  32. </el-tab-pane>
  33. <el-tab-pane label="学员列表"
  34. lazy
  35. v-if="permission('/teamDetails/studentList')"
  36. name="3">
  37. <studentList v-if="activeIndex == '3'"
  38. :teamid='teamid' />
  39. </el-tab-pane>
  40. <el-tab-pane label="班级详情"
  41. lazy
  42. v-if="permission('/teamDetails/classList')"
  43. name="4">
  44. <classList v-if="activeIndex == '4'"
  45. :teamid='teamid' />
  46. </el-tab-pane>
  47. <el-tab-pane label="课表详情"
  48. lazy
  49. v-if="permission('/teamDetails/courseList')"
  50. name="5">
  51. <courseList v-if="activeIndex == '5'"
  52. :teamid='teamid' />
  53. </el-tab-pane>
  54. <!-- <el-tab-pane label="课程课酬"
  55. name="6">
  56. <salaryList v-if="activeIndex == 6" />
  57. </el-tab-pane> -->
  58. <!-- <el-tab-pane label="课酬调整"
  59. v-if="permission('/teamDetails/salaryList')"
  60. name="7">
  61. <salaryList v-if="activeIndex == '7'"
  62. :teamid='teamid' />
  63. </el-tab-pane> -->
  64. </tab-router>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import studentList from '@/views/teamDetail/components/studentList'
  70. import teacherList from '@/views/teamDetail/components/teacherList'
  71. import courseList from '@/views/teamDetail/components/courseList'
  72. import classList from '@/views/teamDetail/components/classList'
  73. import salaryList from '@/views/teamDetail/components/salaryList'
  74. import baseinfo from '@/views/teamDetail/components/baseInfo'
  75. import { permission } from '@/utils/directivePage'
  76. export default {
  77. name: 'teamDetail',
  78. data () {
  79. return {
  80. activeIndex: this.$route.query.checkIndex ? this.$route.query.checkIndex : '1',
  81. teamid: '',
  82. name: '',
  83. stepImgs: {
  84. PROGRESS: require('@/assets/images/base/ing.png'),
  85. PAUSE: require('@/assets/images/base/end.png')
  86. },
  87. status: '',
  88. }
  89. },
  90. mounted () {
  91. this.activeIndex = '1';
  92. this.init()
  93. },
  94. activated () {
  95. this.activeIndex = '1';
  96. this.init()
  97. },
  98. methods: {
  99. permission (str) {
  100. return permission(str)
  101. },
  102. init () {
  103. // let teamInfo = this.$route.query;
  104. this.$nextTick(res=>{
  105. this.status = this.$route.query.status;
  106. this.teamid = this.$route.query.id;
  107. this.name = this.$route.query.name;
  108. // console.log(this.teamid)
  109. })
  110. // 判断是否带缓存参数
  111. },
  112. handleClick (val) {
  113. this.activeIndex = val.name;
  114. },
  115. onCancel () {
  116. this.$store.dispatch('delVisitedViews', this.$route)
  117. this.$router.push({ path: '/teamList'})
  118. },
  119. // getname (name) {
  120. // this.name = name;
  121. // localStorage.setItem('teamName', name);
  122. // },
  123. },
  124. components: {
  125. studentList,
  126. teacherList,
  127. courseList,
  128. classList,
  129. salaryList,
  130. baseinfo
  131. }
  132. }
  133. </script>
  134. <style lang="scss" scoped>
  135. .m-container {
  136. .m-core {
  137. .msg.ing {
  138. color: var(--color-primary);
  139. }
  140. .msg {
  141. text-align: right;
  142. color: #777;
  143. font-size: 32px;
  144. font-weight: bold;
  145. position: absolute;
  146. right: 40px;
  147. top: -33px;
  148. img {
  149. width: 36px;
  150. height: 36px;
  151. position: relative;
  152. top: 5px;
  153. margin-right: 8px;
  154. }
  155. }
  156. .abs {
  157. position: absolute;
  158. right: 240px;
  159. top: -28px;
  160. }
  161. }
  162. .term {
  163. height: 32px;
  164. line-height: 32px;
  165. border-radius: 24px;
  166. width: 100px;
  167. color: var(--color-primary);
  168. border: 1px solid var(--color-primary);
  169. font-size: 14px;
  170. text-align: center;
  171. margin-right: 12px;
  172. &:nth-child(1) {
  173. margin-left: 47px;
  174. }
  175. }
  176. .term.active {
  177. color: #fff;
  178. background-color: var(--color-primary);
  179. }
  180. }
  181. </style>
  182. <style lang='scss'>
  183. </style>