index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div class="lakala-container">
  3. <el-container>
  4. <el-header height="60px">
  5. <el-menu
  6. :default-active="activeMenu"
  7. mode="horizontal"
  8. @select="handleMenuSelect"
  9. class="el-menu-horizontal"
  10. >
  11. <el-menu-item index="profitShareReceiver">
  12. <span>分账接收方申请</span>
  13. </el-menu-item>
  14. <el-menu-item index="profitShareOrder">
  15. <span>分帐申请</span>
  16. </el-menu-item>
  17. <el-menu-item index="tradeOrder">
  18. <span>拉卡拉交易记录</span>
  19. </el-menu-item>
  20. </el-menu>
  21. </el-header>
  22. <el-main>
  23. <component
  24. :is="currentComponent"
  25. :axios-instance="axiosInstance"
  26. />
  27. </el-main>
  28. </el-container>
  29. </div>
  30. </template>
  31. <script>
  32. import ProfitShareReceiver from './ProfitShareReceiver.vue'
  33. import ProfitShareOrder from './ProfitShareOrder.vue'
  34. import TradeOrder from './TradeOrder.vue'
  35. export default {
  36. name: 'LakalaAdmin',
  37. components: {
  38. ProfitShareReceiver,
  39. ProfitShareOrder,
  40. TradeOrder
  41. },
  42. props: {
  43. axiosInstance: {
  44. type: Object,
  45. default: null
  46. }
  47. },
  48. data() {
  49. return {
  50. activeMenu: 'profitShareReceiver'
  51. }
  52. },
  53. computed: {
  54. currentComponent() {
  55. if (this.activeMenu === 'profitShareReceiver') {
  56. return 'ProfitShareReceiver'
  57. } else if (this.activeMenu === 'profitShareOrder') {
  58. return 'ProfitShareOrder'
  59. } else if (this.activeMenu === 'tradeOrder') {
  60. return 'TradeOrder'
  61. }
  62. return 'ProfitShareReceiver'
  63. }
  64. },
  65. methods: {
  66. handleMenuSelect(key) {
  67. this.activeMenu = key
  68. }
  69. }
  70. }
  71. </script>
  72. <style scoped>
  73. .lakala-container {
  74. padding: 0;
  75. height: calc(100vh - 120px);
  76. }
  77. .el-menu-horizontal {
  78. height: 60px;
  79. font-size: 16px;
  80. }
  81. .el-header {
  82. padding: 0;
  83. background-color: #fff;
  84. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  85. }
  86. .el-main {
  87. padding: 30px;
  88. background: #fff;
  89. margin: 20px;
  90. border-radius: 8px;
  91. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  92. flex: 1;
  93. }
  94. </style>