index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header @back="onCancel" :content="studentName"></el-page-header>
  5. </h2>
  6. <div class="m-core">
  7. <!-- navMenu -->
  8. <el-tabs v-model.trim="activeIndex" type="card" @tab-click="handleClick">
  9. <el-tab-pane label="基本信息" v-if="permissionList.studentInfo" name="1">
  10. <studentInfo v-if="activeIndex == 1" />
  11. </el-tab-pane>
  12. <el-tab-pane label="乐团&课程" v-if="permissionList.teamAndcourse" name="2">
  13. <teamAndcourse v-if="activeIndex == 2" />
  14. </el-tab-pane>
  15. <el-tab-pane label="VIP课" v-if="permissionList.studentVip" name="3">
  16. <studentVip v-if="activeIndex == 3" />
  17. </el-tab-pane>
  18. <el-tab-pane label="对外课程" v-if="permissionList.studentOutList" name="4">
  19. <studentOutList v-if="activeIndex == 4" />
  20. </el-tab-pane>
  21. <el-tab-pane label="课表详情" v-if="permissionList.studentRecord" name="5">
  22. <studentRecord v-if="activeIndex == 5" />
  23. </el-tab-pane>
  24. <el-tab-pane label="扣费记录" v-if="permissionList.studentPayList" name="6">
  25. <studentPayList v-if="activeIndex == 6" />
  26. </el-tab-pane>
  27. <el-tab-pane label="学员订单" v-if="permissionList.studentOrder" name="7">
  28. <studentOrder v-if="activeIndex == 7" />
  29. </el-tab-pane>
  30. <el-tab-pane label="学员提现" v-if="permissionList.studentCashout" name="8">
  31. <studentCashout v-if="activeIndex == 8" />
  32. </el-tab-pane>
  33. </el-tabs>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. import studentInfo from "./components/studentInfo.vue";
  39. import teamAndcourse from "./components/teamAndcourse.vue";
  40. import studentRecord from "./components/studentRecord.vue";
  41. import studentPayList from "./components/studentPayList.vue";
  42. import studentVip from "./components/studentVip.vue";
  43. import studentOutList from "./components/studentOutList.vue";
  44. import studentOrder from "./components/studentOrder.vue";
  45. import studentCashout from "./components/studentCashout.vue";
  46. import { permission } from "@/utils/directivePage";
  47. export default {
  48. components: {
  49. teamAndcourse,
  50. studentRecord,
  51. studentPayList,
  52. studentInfo,
  53. studentVip,
  54. studentOrder,
  55. studentCashout,
  56. studentOutList
  57. },
  58. name: "studentDetail",
  59. data() {
  60. return {
  61. activeIndex: "1",
  62. // acitveStatus: [true, false, false, false, false, false, false]
  63. permissionList: {
  64. studentInfo: permission("/studentDetail/studentInfo"),
  65. teamAndcourse: permission("/studentDetail/teamAndcourse"),
  66. studentVip: permission("/studentDetail/studentVip"),
  67. studentRecord: permission("/studentDetail/studentRecord"),
  68. studentPayList: permission("/studentDetail/studentPayList"),
  69. studentOrder: permission("/studentDetail/studentOrder"),
  70. studentCashout: permission("/studentDetail/studentCashout"),
  71. studentOutList: permission("/studentDetail/studentOutList"),
  72. },
  73. studentName: ""
  74. };
  75. },
  76. mounted() {
  77. if (this.$route.query.search) {
  78. this.Fsearch = this.$route.query.search;
  79. }
  80. if (this.$route.query.rules) {
  81. this.Frules = this.$route.query.rules;
  82. }
  83. this.studentName = this.$route.query.studentName;
  84. },
  85. activated() {
  86. if (this.$route.query.search) {
  87. this.Fsearch = this.$route.query.search;
  88. }
  89. if (this.$route.query.rules) {
  90. this.Frules = this.$route.query.rules;
  91. }
  92. this.studentName = this.$route.query.studentName;
  93. },
  94. methods: {
  95. onCancel() {
  96. this.$router.push({
  97. path: "/business/studentList",
  98. query: { rules: this.Frules, search: this.Fsearch }
  99. });
  100. },
  101. handleClick(val) {
  102. this.activeIndex = val.name;
  103. // this.acitveStatus[val.name - 1] = true
  104. }
  105. }
  106. };
  107. </script>
  108. <style lang="scss">
  109. </style>