LongList.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <div class="long-list">
  3. <div class="list-title">
  4. <span>设备列表</span>
  5. <span style="margin-left: 5px">{{ count }}</span>
  6. </div>
  7. <div class="list-content">
  8. <div class="list-search">
  9. <a-input v-model:value="searchData" placeholder="搜索设备编号,名称" size="small" />
  10. </div>
  11. <div class="content-container">
  12. <div class="content-nav">
  13. <div
  14. :class="activeIndex == index ? 'nav-item-active' : 'nav-item'"
  15. v-for="(item, index) in navList"
  16. :key="index"
  17. @click="changeNav(item, index)"
  18. >{{ item.label }}</div
  19. >
  20. </div>
  21. <div class="content-box">
  22. <basicDevice v-for="(item, index) in 10" :key="index"></basicDevice>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <script setup lang="ts">
  29. import { ref } from 'vue';
  30. import basicDevice from './src/views/vent/home/configurable/components/basicDevice.vue';
  31. //设备列表数量
  32. let count = ref(0);
  33. //搜索条件
  34. let searchData = ref('');
  35. //当前激活nav选项
  36. let activeIndex = ref(0);
  37. let navList = ref<any[]>([
  38. { label: '全部', value: '0' },
  39. { label: 'xxx', value: '1' },
  40. { label: 'xxx', value: '2' },
  41. { label: 'xxx', value: '3' },
  42. { label: 'xxx', value: '4' },
  43. { label: 'xxx', value: '5' },
  44. ]);
  45. //nav选项切换
  46. function changeNav(item, index) {
  47. activeIndex.value = index;
  48. }
  49. </script>
  50. <style lang="less" scoped>
  51. @import '/@/design/theme.less';
  52. @{theme-deepblue} {
  53. .long-list {
  54. }
  55. }
  56. .long-list {
  57. --image-box-bg: url('@/assets/images/home-container/configurable/hsq/2-5.png');
  58. --image-box-bg1: url('@/assets/images/home-container/configurable/hsq/2-6.png');
  59. --image-box-bg2: url('@/assets/images/home-container/configurable/hsq/2-2.png');
  60. position: relative;
  61. width: 100%;
  62. height: 100%;
  63. padding: 15px;
  64. box-sizing: border-box;
  65. .list-title {
  66. width: 177px;
  67. height: 30px;
  68. line-height: 22px;
  69. padding-left: 16px;
  70. color: #01fefc;
  71. font-weight: bolder;
  72. background: var(--image-box-bg) no-repeat;
  73. background-size: 100% 100%;
  74. margin-bottom: 5px;
  75. }
  76. .list-content {
  77. width: 100%;
  78. height: calc(100% - 35px);
  79. }
  80. .list-search {
  81. margin-bottom: 5px;
  82. }
  83. .content-container {
  84. width: 100%;
  85. height: calc(100% - 47px);
  86. }
  87. .content-nav {
  88. display: flex;
  89. align-items: center;
  90. height: 32px;
  91. margin: 0px 5px 10px 5px;
  92. background-color: #15517b;
  93. }
  94. .nav-item {
  95. display: flex;
  96. justify-content: center;
  97. align-items: center;
  98. width: 120px;
  99. height: 100%;
  100. cursor: pointer;
  101. }
  102. .nav-item-active {
  103. display: flex;
  104. justify-content: center;
  105. align-items: center;
  106. width: 120px;
  107. height: 100%;
  108. cursor: pointer;
  109. background-color: #1d73a8;
  110. border-bottom: 2px solid #36c7ff;
  111. }
  112. .content-box {
  113. height: calc(100% - 42px);
  114. overflow-y: auto;
  115. }
  116. .zxm-input {
  117. height: 42px;
  118. color: #fff;
  119. background-color: transparent;
  120. border: none;
  121. background: var(--image-box-bg1) no-repeat;
  122. background-size: 100% 100%;
  123. }
  124. .zxm-input-sm {
  125. padding: 0px 20px;
  126. }
  127. ::-webkit-scrollbar {
  128. display: none;
  129. }
  130. }
  131. </style>