index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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" v-if="cpt && cpt != ''"></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 vip from './vip/index.vue';
  36. import user from './user/index.vue';
  37. import duijiehui from './duijiehui/index.vue';
  38. import enterpriseProduct from './enterpriseProduct/index.vue';
  39. import enterpriseTrans from './enterpriseTrans/index.vue';
  40. import technical from './technical/index.vue';
  41. import roadshow from './roadshow/index.vue';
  42. import guestInter from './guestInter/index.vue';
  43. import dictionary from './dictionary/index.vue';
  44. import business from './business/index.vue';
  45. import manager from './manager/index.vue';
  46. import bindWx from './bindWx/index.vue';
  47. import notice from './notice/index.vue';
  48. import productSolicit from './productSolicit/index.vue';
  49. import heads from '@/layout/userCenter/heads.vue';
  50. import foot from '@/layout/live/foot.vue';
  51. import { mapState, createNamespacedHelpers } from 'vuex';
  52. export default {
  53. name: 'index',
  54. props: {},
  55. components: {
  56. heads,
  57. foot,
  58. role,
  59. permission,
  60. adminUser,
  61. vip,
  62. user,
  63. duijiehui,
  64. enterpriseProduct,
  65. enterpriseTrans,
  66. technical,
  67. roadshow,
  68. guestInter,
  69. dictionary,
  70. business,
  71. manager,
  72. bindWx,
  73. notice,
  74. productSolicit,
  75. menus,
  76. top,
  77. },
  78. data: function() {
  79. return {
  80. cpt: 'role',
  81. topTitle: '',
  82. };
  83. },
  84. created() {},
  85. methods: {
  86. setRight(menu) {
  87. let { name, cpt } = menu;
  88. this.$set(this, `topTitle`, name);
  89. this.$set(this, `cpt`, cpt);
  90. },
  91. },
  92. computed: {
  93. ...mapState(['user']),
  94. pageTitle() {
  95. return `${this.$route.meta.title}`;
  96. },
  97. },
  98. metaInfo() {
  99. return { title: this.$route.meta.title };
  100. },
  101. };
  102. </script>
  103. <style lang="less" scoped>
  104. .w_1200 {
  105. // width: 80%;
  106. width: 1200px;
  107. margin: 0 auto;
  108. }
  109. .info {
  110. background-color: #e9edf6;
  111. }
  112. .main {
  113. min-height: 834px;
  114. margin: 15px 0;
  115. }
  116. .mainMenu {
  117. width: 20%;
  118. min-height: 834px;
  119. background-color: #fff;
  120. }
  121. .mainMess {
  122. float: right;
  123. min-height: 834px;
  124. background-color: #fff;
  125. }
  126. </style>