MiniBoard.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="mini-board" :class="`mini-board_${type}`">
  4. <template v-if="layout === 'val-top'">
  5. <slot name="value">
  6. <div class="mini-board__value" :class="`mini-board__value_${type}`">
  7. {{ value }}
  8. </div>
  9. </slot>
  10. <slot name="label">
  11. <div class="mini-board__label" :class="`mini-board__label_${type}`">
  12. {{ label }}
  13. </div>
  14. </slot>
  15. </template>
  16. <template v-if="layout === 'label-top'">
  17. <slot name="label">
  18. <div class="mini-board__label" :class="`mini-board__label_${type}`">
  19. {{ label }}
  20. </div>
  21. </slot>
  22. <slot name="value">
  23. <div class="mini-board__value" :class="`mini-board__value_${type}`">
  24. {{ value }}
  25. </div>
  26. </slot>
  27. </template>
  28. </div>
  29. </template>
  30. <script lang="ts" setup>
  31. withDefaults(
  32. defineProps<{
  33. label: string;
  34. value?: string;
  35. // 告示牌布局,类型为:'val-top' | 'label-top'
  36. layout: string;
  37. // 告示牌类型,类型为:'A' | 'B' | 'C' | 'D' | 'E' | 'F'
  38. type?: string;
  39. }>(),
  40. {
  41. value: '/',
  42. type: 'A',
  43. layout: 'val-top',
  44. }
  45. );
  46. defineEmits(['click']);
  47. </script>
  48. <style lang="less" scoped>
  49. @import '@/design/vent/color.less';
  50. .mini-board {
  51. height: 50px;
  52. line-height: 25px;
  53. width: 130px;
  54. padding: 0 5px 0 5px;
  55. // box-sizing: border-box;
  56. text-align: center;
  57. background-size: 100% 100%;
  58. position: relative;
  59. }
  60. .mini-board_A {
  61. width: 120px;
  62. height: 60px;
  63. background-image: url('@/assets/images/company/area3.png');
  64. background-size: 100% 100%;
  65. }
  66. .mini-board_B {
  67. width: 131px;
  68. height: 64px;
  69. background-image: url('@/assets/images/vent/value-bg.png');
  70. background-size: 100% auto;
  71. background-position: center bottom;
  72. background-repeat: no-repeat;
  73. }
  74. .mini-board_C {
  75. width: 121px;
  76. height: 69px;
  77. background-image: url('@/assets/images/vent/vent-param-bg.png');
  78. }
  79. .mini-board_D {
  80. width: 105px;
  81. height: 58px;
  82. background-image: url('@/assets/images/vent/home/mini-board-1.png');
  83. background-position: center bottom;
  84. background-repeat: no-repeat;
  85. }
  86. .mini-board_E {
  87. width: 30%;
  88. height: 200px;
  89. padding: 20px 5px;
  90. background-image: url('/@/assets/images/home-container/configurable/board_bg_1.png');
  91. background-position: center bottom;
  92. background-repeat: no-repeat;
  93. background-size: 100% 100%;
  94. }
  95. .mini-board_F {
  96. width: 140px;
  97. height: 70px;
  98. background-image: url('/@/assets/images/home-container/configurable/firehome/miehuo.png');
  99. background-size: 100% 80%;
  100. background-position: center bottom;
  101. background-repeat: no-repeat;
  102. }
  103. .mini-board_G {
  104. width: 98px;
  105. height: 70px;
  106. background-image: url('@/assets/images/vent/value-bg-2.png');
  107. background-size: 100% auto;
  108. background-position: center bottom;
  109. background-repeat: no-repeat;
  110. }
  111. .mini-board__value_A {
  112. color: @vent-gas-primary-text;
  113. font-size: 20px;
  114. font-weight: bold;
  115. height: 30px;
  116. line-height: 30px;
  117. }
  118. // .mini-board__label_A {
  119. // }
  120. .mini-board__value_B {
  121. color: @vent-gas-primary-text;
  122. font-size: 20px;
  123. font-weight: bold;
  124. height: 40px;
  125. line-height: 40px;
  126. }
  127. .mini-board__label_B {
  128. line-height: 24px;
  129. height: 24px;
  130. }
  131. .mini-board__value_C {
  132. color: @vent-gas-primary-text;
  133. height: 40px;
  134. line-height: 40px;
  135. font-size: 20px;
  136. font-weight: bold;
  137. }
  138. // .mini-board__label_C {
  139. // }
  140. .mini-board__value_D {
  141. font-size: 20px;
  142. font-weight: bold;
  143. height: 40px;
  144. line-height: 40px;
  145. }
  146. .mini-board__label_D {
  147. line-height: 17px;
  148. height: 17px;
  149. }
  150. .mini-board__value_E {
  151. font-size: 20px;
  152. font-weight: bold;
  153. line-height: 76px;
  154. }
  155. .mini-board__label_E {
  156. line-height: 17px;
  157. height: 80px;
  158. padding-top: 60px;
  159. background-repeat: no-repeat;
  160. background-position: center top;
  161. }
  162. .mini-board__value_F {
  163. font-size: 20px;
  164. font-weight: bold;
  165. color: @vent-gas-primary-text;
  166. }
  167. .mini-board__label_F {
  168. line-height: 50px;
  169. }
  170. .mini-board__value_G {
  171. color: @vent-gas-primary-text;
  172. font-size: 20px;
  173. font-weight: bold;
  174. height: 42px;
  175. line-height: 42px;
  176. }
  177. .mini-board__label_G {
  178. line-height: 20px;
  179. height: 20px;
  180. }
  181. .mini-board_E:nth-child(1) {
  182. .mini-board__label_E {
  183. background-image: url(/@/assets/images/home-container/configurable/dusthome/hycd.png);
  184. }
  185. }
  186. .mini-board_E:nth-child(2) {
  187. .mini-board__label_E {
  188. background-image: url(/@/assets/images/home-container/configurable/dusthome/dyfl.png);
  189. }
  190. }
  191. .mini-board_E:nth-child(3) {
  192. .mini-board__label_E {
  193. background-image: url(/@/assets/images/home-container/configurable/dusthome/jdjl.png);
  194. }
  195. }
  196. </style>