index.vue 5.2 KB

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