index.vue 2.0 KB

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