Health5.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="health-5">
  3. <!-- 当内容超出页面时 添加 el-scrollbar 即可自动添加滚动条 -->
  4. <el-scrollbar>
  5. <div class="health-matrix">
  6. <div class="health-matrix-panel" v-for="index of 6" :key="index">
  7. <div class="header">
  8. <i class="svg-icon svg-icon-sm svg-icon-white">
  9. <svg-icon :svgid="'svg-wind-site'" />
  10. </i>
  11. <span class="title">某某某风机厂</span>
  12. <div class="tools">
  13. <div class="tool-block">
  14. <div class="legend bg-green"></div>
  15. <div class="legend-text green">良好数量</div>
  16. <div class="legend-value">123</div>
  17. </div>
  18. <div class="tool-block">
  19. <div class="legend bg-purple"></div>
  20. <div class="legend-text purple">正常数量</div>
  21. <div class="legend-value">123</div>
  22. </div>
  23. <div class="tool-block">
  24. <div class="legend bg-yellow"></div>
  25. <div class="legend-text yellow">注意数量</div>
  26. <div class="legend-value">123</div>
  27. </div>
  28. <div class="tool-block">
  29. <div class="legend bg-orange"></div>
  30. <div class="legend-text orange">严重数量</div>
  31. <div class="legend-value">123</div>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="body">
  36. <div class="matrix">
  37. <div class="item green">1号</div>
  38. <div class="item purple">2号</div>
  39. <div class="item orange">3号</div>
  40. <div class="item" v-for="index of 100" :key="index">{{ index + 3 }}号</div>
  41. <div class="blank" v-for="index of 25" :key="index"></div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </el-scrollbar>
  47. </div>
  48. </template>
  49. <script>
  50. import SvgIcon from "../../components/coms/icon/svg-icon.vue";
  51. export default {
  52. setup() {},
  53. components: { SvgIcon },
  54. data() {
  55. return {};
  56. },
  57. };
  58. </script>
  59. <style lang="less">
  60. .health-5 {
  61. .health-matrix {
  62. height: calc(100vh - 7vh);
  63. .health-matrix-panel {
  64. margin-bottom: 8px;
  65. .header {
  66. background: fade(@gray, 20);
  67. line-height: 37px;
  68. margin-bottom: 8px;
  69. padding: 0 16px;
  70. display: flex;
  71. align-items: center;
  72. i {
  73. margin-right: 8px;
  74. }
  75. .title {
  76. font-size: @fontsize-s;
  77. }
  78. .tools {
  79. display: flex;
  80. .tool-block {
  81. display: flex;
  82. align-items: center;
  83. margin-left: 36px;
  84. .legend {
  85. flex: auto;
  86. width: 0.741vh;
  87. height: 0.741vh;
  88. margin-right: 0.741vh;
  89. &.long {
  90. width: 2.963vh;
  91. height: 0.37vh;
  92. }
  93. }
  94. .legend-value {
  95. color: @white;
  96. margin-left: 16px;
  97. }
  98. }
  99. }
  100. }
  101. }
  102. .matrix {
  103. display: flex;
  104. flex-wrap: wrap;
  105. .item {
  106. flex: 1 0 calc(100% / 25 - 4px);
  107. line-height: 26px;
  108. background: fade(@gray, 20);
  109. color: @gray-l;
  110. font-size: 12px;
  111. margin-bottom: 4px;
  112. text-align: center;
  113. border: 1px solid transparent;
  114. & + .item {
  115. margin-left: 4px;
  116. }
  117. &:nth-child(25n + 1) {
  118. margin-left: 0px;
  119. }
  120. &.green {
  121. color: @green;
  122. background: fade(@green, 20);
  123. border-color: @green;
  124. }
  125. &.purple {
  126. color: @purple;
  127. background: fade(@purple, 20);
  128. border-color: @purple;
  129. }
  130. &.orange {
  131. color: @orange;
  132. background: fade(@orange, 20);
  133. border-color: @orange;
  134. }
  135. &.red {
  136. color: @red;
  137. background: fade(@red, 20);
  138. border-color: @red;
  139. }
  140. }
  141. .blank {
  142. flex: 1 0 calc(100% / 25 - 4px);
  143. margin-left: 4px;
  144. }
  145. }
  146. }
  147. }
  148. </style>