index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>评论管理
  5. </h2>
  6. <div class="m-core">
  7. <location-hash v-model="activeIndex" @change="handleClick">
  8. <el-tabs v-model.trim="activeIndex"
  9. type="card"
  10. @tab-click="handleClick">
  11. <el-tab-pane label="月报"
  12. name="1"
  13. v-if="permissionList.evaluateList">
  14. <evaluateList v-if="activeIndex == 1"></evaluateList>
  15. </el-tab-pane>
  16. <el-tab-pane label="网管课评价"
  17. name="2"
  18. v-if="permissionList.networkList">
  19. <networkList v-if="activeIndex == 2"></networkList>
  20. </el-tab-pane>
  21. <el-tab-pane label="vip课评价"
  22. v-if="permissionList.vipEvaluateList"
  23. name="3">
  24. <vipEvaluateList v-if="activeIndex == 3">
  25. </vipEvaluateList>
  26. </el-tab-pane>
  27. </el-tabs>
  28. </location-hash>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import evaluateList from "@/views/evaluateManager/evaluateList";
  34. import networkList from '@/views/evaluateManager/networkList'
  35. import vipEvaluateList from '@/views/evaluateManager/vipEvaluateList'
  36. import { permission } from "@/utils/directivePage";
  37. export default {
  38. components: {
  39. evaluateList,
  40. networkList,
  41. vipEvaluateList
  42. },
  43. data () {
  44. const query = this.$route.query
  45. return {
  46. activeIndex:query.opt|| "1",
  47. permissionList: {
  48. evaluateList: permission("/commentManager/evaluateList"),
  49. networkList: permission("/commentManager/networkList"),
  50. studentVip: permission("/studentDetail/studentVip"),
  51. vipEvaluateList: permission("/commentManager/vipEvaluateList"),
  52. },
  53. }
  54. },
  55. created () {
  56. this.init();
  57. },
  58. activated () {
  59. this.init();
  60. },
  61. methods: {
  62. init () {
  63. this.$route.query.activeIndex ? this.activeIndex = this.$route.query.activeIndex : this.activeIndex;
  64. },
  65. handleClick (val) {
  66. this.activeIndex = val.name
  67. }
  68. }
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. </style>