gasBoard.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <div class="gas-board">
  3. <div :class="`board-box-${type}`" v-for="(item, index) in option" :key="index">
  4. <div :class="`board-item-${type}`">
  5. <div :class="`board-item-icon-${type}`">
  6. <SvgIcon :class="`icon-style-${type}`" size="24" :name="item.iconName" />
  7. </div>
  8. <div :class="`board-item-content-${type}`">
  9. <div :class="`item-content-label-${type}`">{{ item.label }}</div>
  10. <div :class="`item-content-value-${type}`">
  11. <span>{{ item.value }}</span>
  12. <span style="margin-left: 10px;">{{ item.unit }}</span>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script setup lang="ts">
  20. import { ref } from 'vue'
  21. import { SvgIcon } from '/@/components/Icon';
  22. let props = defineProps({
  23. option: {
  24. type: Array as any
  25. },
  26. type: {
  27. type: String
  28. }
  29. })
  30. // let listData = ref<any[]>(
  31. // [
  32. // { label: '氧气浓度', value: '60', iconName: 'o2-gas', unit: 'Nm³' },
  33. // { label: '甲烷浓度', value: '60', iconName: 'ch4-gas', unit: 'm³/min' },
  34. // { label: '温度', value: '60', iconName: 'temp-gas', unit: '' },
  35. // { label: '风速', value: '60', iconName: 'wind-gas', unit: '' },
  36. // ]
  37. // )
  38. </script>
  39. <style lang="less" scoped>
  40. @import '/@/design/theme.less';
  41. @{theme-deepblue} {
  42. .gas-board {
  43. --image-gas_board_bg: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/7-4.png');
  44. --image-gas_board_bg1: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/7-5.png');
  45. --image-gas_board_bg2: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-12.png');
  46. --image-gas_board_bg3: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/3-3.png');
  47. --image-gas_board_bg4: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/3-4.png');
  48. }
  49. }
  50. .gas-board {
  51. --image-gas_board_bg: url('@/assets/images/gasInjection/7-4.png');
  52. --image-gas_board_bg1: url('@/assets/images/gasInjection/7-5.png');
  53. --image-gas_board_bg2: url('@/assets/images/gasInjection/2-12.png');
  54. --image-gas_board_bg3: url('@/assets/images/gasInjection/3-3.png');
  55. --image-gas_board_bg4: url('@/assets/images/gasInjection/3-4.png');
  56. display: flex;
  57. flex-wrap: wrap;
  58. width: 100%;
  59. height: 100%;
  60. padding: 15px 20px;
  61. box-sizing: border-box;
  62. .board-box-A {
  63. width: 50%;
  64. height: 50%;
  65. display: flex;
  66. justify-content: center;
  67. align-items: center;
  68. &:nth-child(1) {
  69. .board-item-A {
  70. background: var(--image-gas_board_bg1) no-repeat;
  71. background-size: 100% 100%;
  72. .item-content-value-A {
  73. color: #91e0ff;
  74. }
  75. }
  76. }
  77. &:nth-child(2) {
  78. .board-item-A {
  79. background: var(--image-gas_board_bg) no-repeat;
  80. background-size: 100% 100%;
  81. .item-content-value-A {
  82. color: #2cffdd;
  83. }
  84. }
  85. }
  86. &:nth-child(3) {
  87. .board-item-A {
  88. background: var(--image-gas_board_bg) no-repeat;
  89. background-size: 100% 100%;
  90. .item-content-value-A {
  91. color: #2cffdd;
  92. }
  93. }
  94. }
  95. &:nth-child(4) {
  96. .board-item-A {
  97. background: var(--image-gas_board_bg1) no-repeat;
  98. background-size: 100% 100%;
  99. .item-content-value-A {
  100. color: #91e0ff;
  101. }
  102. }
  103. }
  104. }
  105. .board-box-B {
  106. width: 33.3%;
  107. height: 33.3%;
  108. display: flex;
  109. justify-content: center;
  110. align-items: center;
  111. }
  112. .board-box-C {
  113. width: 50%;
  114. height: 50%;
  115. display: flex;
  116. justify-content: center;
  117. align-items: center;
  118. &:nth-child(1) {
  119. .board-item-C {
  120. background: var(--image-gas_board_bg3) no-repeat;
  121. background-size: 100% 100%;
  122. .item-content-value-C {
  123. color: #91e0ff;
  124. }
  125. }
  126. }
  127. &:nth-child(2) {
  128. .board-item-C {
  129. background: var(--image-gas_board_bg4) no-repeat;
  130. background-size: 100% 100%;
  131. .item-content-value-C {
  132. color: #2cffdd;
  133. }
  134. }
  135. }
  136. &:nth-child(3) {
  137. .board-item-C {
  138. background: var(--image-gas_board_bg4) no-repeat;
  139. background-size: 100% 100%;
  140. .item-content-value-C {
  141. color: #2cffdd;
  142. }
  143. }
  144. }
  145. &:nth-child(4) {
  146. .board-item-C {
  147. background: var(--image-gas_board_bg3) no-repeat;
  148. background-size: 100% 100%;
  149. .item-content-value-C {
  150. color: #91e0ff;
  151. }
  152. }
  153. }
  154. }
  155. .board-item-A {
  156. position: relative;
  157. width: 180px;
  158. height: 60px;
  159. }
  160. .board-item-B {
  161. position: relative;
  162. width: 213px;
  163. height: 57px;
  164. background: var(--image-gas_board_bg2) no-repeat;
  165. background-size: 100% 100%;
  166. }
  167. .board-item-C {
  168. position: relative;
  169. width: 194px;
  170. height: 76px;
  171. }
  172. .board-item-icon-A {
  173. position: absolute;
  174. left: 24px;
  175. top: 50%;
  176. transform: translate(0, -35%);
  177. }
  178. .board-item-icon-B {
  179. position: absolute;
  180. left: 14px;
  181. top: 50%;
  182. transform: translate(0, -45%);
  183. }
  184. .board-item-icon-C {
  185. position: absolute;
  186. left: 24px;
  187. top: 50%;
  188. transform: translate(0, -45%);
  189. }
  190. .board-item-content-A {
  191. position: absolute;
  192. height: 100%;
  193. left: 70px;
  194. display: flex;
  195. flex-direction: column;
  196. justify-content: center;
  197. }
  198. .board-item-content-B {
  199. position: absolute;
  200. height: 100%;
  201. left: 70px;
  202. display: flex;
  203. flex-direction: column;
  204. justify-content: center;
  205. }
  206. .board-item-content-C {
  207. position: absolute;
  208. height: 100%;
  209. left: 82px;
  210. display: flex;
  211. flex-direction: column;
  212. justify-content: center;
  213. }
  214. .item-content-label-A {
  215. margin-bottom: 10px;
  216. }
  217. .item-content-label-B {
  218. margin-bottom: 10px;
  219. }
  220. .item-content-label-C {
  221. font-size: 13px;
  222. margin-bottom: 10px;
  223. }
  224. .item-content-value-A {
  225. font-size: 12px;
  226. font-family: 'douyuFont';
  227. }
  228. .item-content-value-B {
  229. font-size: 12px;
  230. color: #91e0ff;
  231. font-family: 'douyuFont';
  232. }
  233. .item-content-value-C {
  234. font-size: 12px;
  235. font-family: 'douyuFont';
  236. }
  237. }
  238. </style>