operations.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div id="operations" >
  3. <el-container class="container-box">
  4. <el-aside width="200px" style="text-align: left" >
  5. <el-menu :default-active="activeIndex" :height="winHeight" @select="handleSelect">
  6. <el-menu-item index="systemInfo">
  7. <template slot="title"><i class="el-icon-s-home"></i>平台信息</template>
  8. </el-menu-item>
  9. <el-submenu index="log">
  10. <template slot="title"><i class="el-icon-document"></i>日志信息</template>
  11. <el-menu-item index="historyLog">历史日志</el-menu-item>
  12. <el-menu-item index="realTimeLog">运行日志</el-menu-item>
  13. </el-submenu>
  14. <el-submenu index="senior">
  15. <template slot="title"><i class="el-icon-setting"></i>高级维护</template>
  16. <el-menu-item disabled="disabled" index="tcpdump">网络抓包</el-menu-item>
  17. </el-submenu>
  18. </el-menu>
  19. </el-aside>
  20. <el-main style="background-color: #FFFFFF; margin: 0 20px 20px 20px">
  21. <operationsForRealLog v-if="activeIndex==='realTimeLog'"></operationsForRealLog>
  22. <operationsForHistoryLog v-if="activeIndex==='historyLog'"></operationsForHistoryLog>
  23. <operationsForSystemInfo v-if="activeIndex==='systemInfo'"></operationsForSystemInfo>
  24. </el-main>
  25. </el-container>
  26. </div>
  27. </template>
  28. <script>
  29. import operationsForRealLog from './operationsForRealLog'
  30. import operationsForHistoryLog from './operationsForHistoryLog.vue'
  31. import operationsForSystemInfo from './operationsForSystemInfo.vue'
  32. export default {
  33. name: 'log',
  34. components: {
  35. operationsForRealLog, operationsForHistoryLog, operationsForSystemInfo
  36. },
  37. data() {
  38. return {
  39. loading: false,
  40. winHeight: (window.innerHeight - 170) + "px",
  41. data: [],
  42. filter: "",
  43. activeIndex: "systemInfo"
  44. };
  45. },
  46. created() {
  47. console.log('created');
  48. },
  49. destroyed() {
  50. },
  51. methods: {
  52. handleSelect: function (index) {
  53. this.activeIndex = index;
  54. },
  55. }
  56. };
  57. </script>
  58. <style>
  59. .container-box {
  60. position: absolute;
  61. top: 80px;
  62. width: calc(100% - 20px);
  63. height: calc(100% - 80px);
  64. }
  65. </style>