menuInfo.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <div id="menuInfo">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-col :span="24" class="top">
  6. <el-image :src="topUrl"></el-image>
  7. <span>个人中心</span>
  8. </el-col>
  9. <el-col :span="24">
  10. <el-menu :default-active="num" @select="selectMenu" text-color="#999" active-text-color="#044b79">
  11. <!-- <el-menu-item :index="index + ''" v-for="(item, index) in menu" :key="index">
  12. <template slot="title">
  13. <i class="el-icon-tickets"></i>
  14. <span>{{ item.title }}</span>
  15. </template>
  16. </el-menu-item> -->
  17. <el-menu-item index="1">
  18. <template slot="title">
  19. <i class="el-icon-pie-chart"></i>
  20. <span>绑定微信</span>
  21. </template>
  22. </el-menu-item>
  23. <el-menu-item index="2">
  24. <template slot="title">
  25. <i class="el-icon-pie-chart"></i>
  26. <span>展会管理</span>
  27. </template>
  28. </el-menu-item>
  29. <el-menu-item index="3">
  30. <template slot="title">
  31. <i class="el-icon-pie-chart"></i>
  32. <span>申请管理</span>
  33. </template>
  34. </el-menu-item>
  35. <el-menu-item index="4">
  36. <template slot="title">
  37. <i class="el-icon-pie-chart"></i>
  38. <span>VIP用户</span>
  39. </template>
  40. </el-menu-item>
  41. <el-menu-item index="5">
  42. <template slot="title">
  43. <i class="el-icon-notebook-1"></i>
  44. <span>交易备案</span>
  45. </template>
  46. </el-menu-item>
  47. <el-menu-item index="6">
  48. <template slot="title">
  49. <i class="el-icon-notebook-1"></i>
  50. <span>嘉宾访谈</span>
  51. </template>
  52. </el-menu-item>
  53. <el-menu-item index="7">
  54. <template slot="title">
  55. <i class="el-icon-notebook-1"></i>
  56. <span>项目路演</span>
  57. </template>
  58. </el-menu-item>
  59. <el-menu-item index="8">
  60. <template slot="title">
  61. <i class="el-icon-notebook-1"></i>
  62. <span>统计报表</span>
  63. </template>
  64. </el-menu-item>
  65. <el-menu-item index="9">
  66. <template slot="title">
  67. <i class="el-icon-notebook-1"></i>
  68. <span>动态监测</span>
  69. </template>
  70. </el-menu-item>
  71. <el-menu-item index="10">
  72. <template slot="title">
  73. <i class="el-icon-refresh-right"></i>
  74. <span>返回</span>
  75. </template>
  76. </el-menu-item>
  77. <el-menu-item index="11">
  78. <template slot="title">
  79. <i class="el-icon-circle-close"></i>
  80. <span>退出登录</span>
  81. </template>
  82. </el-menu-item>
  83. </el-menu>
  84. </el-col>
  85. </el-col>
  86. </el-row>
  87. </div>
  88. </template>
  89. <script>
  90. import { mapState, createNamespacedHelpers } from 'vuex';
  91. const { mapActions: login } = createNamespacedHelpers('login');
  92. const { mapActions: personalChat } = createNamespacedHelpers('personalchat');
  93. const { mapActions: dock } = createNamespacedHelpers('dock');
  94. export default {
  95. name: 'menuInfo',
  96. props: {},
  97. components: {},
  98. data: function() {
  99. return {
  100. topUrl: require('@/assets/live/square_big.png'),
  101. num: '1',
  102. haveMsg: false,
  103. };
  104. },
  105. created() {
  106. this.$set(this, `num`, this.$route.query.num);
  107. },
  108. mounted() {},
  109. methods: {
  110. ...login({ logout: 'logout', transactiondtetle: 'delete' }),
  111. ...dock(['fetch', 'query', 'delete', 'update', 'fetch']),
  112. // 菜单跳转
  113. async selectMenu(key) {
  114. if (key == '11') {
  115. this.logout();
  116. this.$message({
  117. message: '退出登录成功',
  118. type: 'success',
  119. });
  120. this.$router.push({ path: '/webLogin' });
  121. } else if (key == '10') {
  122. let res = await this.fetch(this.user.uid);
  123. this.$router.push({ path: '/hall/direct', query: { id: res.data.id, title: res.data.title } });
  124. } else {
  125. this.$router.push({ path: '/adminCenter/index', query: { num: key } });
  126. }
  127. },
  128. },
  129. computed: {
  130. ...mapState(['user']),
  131. pageTitle() {
  132. return `${this.$route.meta.title}`;
  133. },
  134. },
  135. metaInfo() {
  136. return { title: this.$route.meta.title };
  137. },
  138. };
  139. </script>
  140. <style lang="less" scoped>
  141. .top {
  142. height: 50px;
  143. line-height: 50px;
  144. text-align: center;
  145. border-bottom: 1px solid #2d64b3;
  146. .el-image {
  147. float: left;
  148. padding: 10px 40px;
  149. width: 30px;
  150. height: 30px;
  151. }
  152. span {
  153. font-size: 24px;
  154. color: #92959a;
  155. font-weight: 600;
  156. float: left;
  157. text-align: left;
  158. }
  159. }
  160. /deep/.el-menu-item {
  161. font-weight: bold;
  162. font-size: 20px;
  163. text-align: center;
  164. border-bottom: 1px solid #2d64b3;
  165. margin: 0 20px;
  166. }
  167. </style>