【前端】智能库房综合管理系统前端项目
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.

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