index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-col :span="24" class="top">
  6. <heads></heads>
  7. </el-col>
  8. <el-col :span="24" class="main">
  9. <div class="w_1200">
  10. <el-col :span="4" class="mainMenu">
  11. <menus @setRight="setRight"></menus>
  12. </el-col>
  13. <el-col :span="19" class="mainMess">
  14. <top :title="topTitle"></top>
  15. <div style="padding:10px">
  16. <component :is="cpt"></component>
  17. </div>
  18. </el-col>
  19. </div>
  20. </el-col>
  21. <el-col :span="24" class="foot">
  22. <foot></foot>
  23. </el-col>
  24. </el-col>
  25. </el-row>
  26. </div>
  27. </template>
  28. <script>
  29. /* eslint-disable vue/no-unused-components */
  30. import menus from './menuInfo.vue';
  31. import top from './lefttop.vue';
  32. import role from './role/index.vue';
  33. import permission from './permission/index.vue';
  34. import adminUser from './adminUser/index.vue';
  35. import business from './business/index.vue';
  36. import manager from './manager/index.vue';
  37. import heads from '@/layout/userCenter/heads.vue';
  38. import foot from '@/layout/live/foot.vue';
  39. import { mapState, createNamespacedHelpers } from 'vuex';
  40. export default {
  41. name: 'index',
  42. props: {},
  43. components: {
  44. heads,
  45. foot,
  46. role,
  47. permission,
  48. adminUser,
  49. business,
  50. manager,
  51. menus,
  52. top,
  53. },
  54. data: function() {
  55. return {
  56. cpt: 'role',
  57. topTitle: '',
  58. };
  59. },
  60. created() {},
  61. methods: {
  62. setRight(menu) {
  63. let { name, cpt } = menu;
  64. this.$set(this, `topTitle`, name);
  65. this.$set(this, `cpt`, cpt);
  66. },
  67. },
  68. computed: {
  69. ...mapState(['user']),
  70. pageTitle() {
  71. return `${this.$route.meta.title}`;
  72. },
  73. },
  74. metaInfo() {
  75. return { title: this.$route.meta.title };
  76. },
  77. };
  78. </script>
  79. <style lang="less" scoped>
  80. .w_1200 {
  81. width: 80%;
  82. margin: 0 auto;
  83. }
  84. .info {
  85. background-color: #e9edf6;
  86. }
  87. .main {
  88. min-height: 666px;
  89. margin: 15px 0;
  90. }
  91. .mainMenu {
  92. width: 20%;
  93. min-height: 666px;
  94. background-color: #fff;
  95. }
  96. .mainMess {
  97. float: right;
  98. min-height: 666px;
  99. background-color: #fff;
  100. }
  101. </style>