【前端】智能库房综合管理系统前端项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB

  1. <template>
  2. <div class="app-container lend-container">
  3. <div class="tab-content">
  4. <span class="right-top-line" />
  5. <span class="left-bottom-line" />
  6. <span class="right-bottom-line" />
  7. <ul class="tab-nav">
  8. <li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">登录日志<i /></li>
  9. <li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">操作日志<i /></li>
  10. <li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">报警日志<i /></li>
  11. <li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">通道门日志<i /></li>
  12. <li :class="{ 'active-tab-nav': activeIndex == 4 }" @click="changeActiveTab(4)">门禁日志<i /></li>
  13. <li :class="{ 'active-tab-nav': activeIndex == 5 }" @click="changeActiveTab(5)">密集架日志<i /></li>
  14. <!-- <li :class="{ 'active-tab-nav': activeIndex == 4 }" @click="changeActiveTab(4)">接口访问日志<i /></li> -->
  15. <!-- 最右侧装饰img -->
  16. <span class="tab-right-img" />
  17. </ul>
  18. <component :is="comName" />
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. import loginLog from './loginLog/index.vue'
  24. import operateLog from './operateLog/index.vue'
  25. import warnLog from './warnLog/index.vue'
  26. import doorLog from './doorLog/index.vue'
  27. import accessDoorLog from './accessDoorLog/index.vue'
  28. import portLog from './portLog/index.vue'
  29. import deviceLog from './deviceLog/index.vue'
  30. export default {
  31. name: 'LogManage',
  32. components: {
  33. loginLog,
  34. operateLog,
  35. warnLog,
  36. doorLog,
  37. portLog,
  38. accessDoorLog,
  39. deviceLog
  40. },
  41. data() {
  42. return {
  43. activeIndex: 0
  44. }
  45. },
  46. computed: {
  47. comName: function() {
  48. if (this.activeIndex === 0) {
  49. return 'loginLog'
  50. } else if (this.activeIndex === 1) {
  51. return 'operateLog'
  52. } else if (this.activeIndex === 2) {
  53. return 'warnLog'
  54. } else if (this.activeIndex === 3) {
  55. return 'accessDoorLog'
  56. } else if (this.activeIndex === 4) {
  57. return 'doorLog'
  58. } else if (this.activeIndex === 5) {
  59. return 'deviceLog'
  60. }
  61. // else if (this.activeIndex === 4) {
  62. // return 'portLog'
  63. // }
  64. return 'loginLog'
  65. }
  66. },
  67. created() {
  68. if (this.$route.params.locationIndex) {
  69. this.activeIndex = this.$route.params.locationIndex
  70. }
  71. },
  72. methods: {
  73. changeActiveTab(data) {
  74. this.activeIndex = data
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .lend-container{
  81. .tab-content{
  82. position: relative;
  83. margin-top: 61px;
  84. border: 1px solid #113d72;
  85. }
  86. }
  87. .tab-content .tab-nav{
  88. margin-bottom: 0;
  89. }
  90. </style>