Health5.vue 3.9 KB

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