ComplexList.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <!-- 基准的列表模块,通过不同的 type 展示不同的样式 -->
  4. <div class="list flex items-center" :class="`list_${type}`">
  5. <!-- 部分类型的列表需要加一张图片 -->
  6. <div :class="`list__image_${type}`"></div>
  7. <!-- 剩下的部分填充剩余宽度 -->
  8. <div class="flex-grow h-full" :class="`list__wrapper_${type}`">
  9. <div v-for="(item, i) in listConfig" :key="`vvhccdcl${i}`" :class="`list-item_${type}`">
  10. <!-- 列表项前面的图标 -->
  11. <div :class="`list-item__title_${type}`">{{ item.title }}</div>
  12. <!-- 列表项的具体内容填充剩余宽度 -->
  13. <div v-for="(ctx, j) in item.contents" :key="`vvhccdclc${j}`" :class="`list-item__content_${type}`">
  14. <div class="list-item__label">{{ ctx.label }}</div>
  15. <div class="list-item__info" :class="`list-item__info_${ctx.color}`">{{ ctx.info }}</div>
  16. <div class="list-item__value" :class="`list-item__value_${ctx.color} list-item__value_${type}`">{{ ctx.value }}</div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script lang="ts" setup>
  23. withDefaults(
  24. defineProps<{
  25. listConfig: {
  26. title: string;
  27. contents: {
  28. value: string;
  29. color: string;
  30. label: string;
  31. info: string;
  32. }[];
  33. }[];
  34. /** A B */
  35. type: string;
  36. }>(),
  37. {
  38. listConfig: () => [],
  39. type: 'A',
  40. }
  41. );
  42. // defineEmits(['click']);
  43. </script>
  44. <style lang="less" scoped>
  45. @import '@/design/vent/color.less';
  46. /* Timeline 相关的样式 */
  47. .list {
  48. padding: 5px 20px;
  49. position: relative;
  50. width: 100%;
  51. height: 100%;
  52. }
  53. .list-item_A {
  54. position: relative;
  55. height: 140px;
  56. background-repeat: no-repeat;
  57. background-image: url(/@/assets/images/home-container/configurable/firehome/img-3.png);
  58. background-size: auto 100%;
  59. background-position: center;
  60. }
  61. .list-item__title_A {
  62. position: absolute;
  63. left: 41%;
  64. // font-size: 14px;
  65. top: 15px;
  66. }
  67. // .list-item__content_A {
  68. // position: absolute;
  69. // left: 35%;
  70. // top: 55px;
  71. // display: flex;
  72. // justify-content: space-evenly;
  73. // }
  74. .list-item__content_A:nth-of-type(2) {
  75. position: absolute;
  76. top: 15px;
  77. left: 14%;
  78. width: 22%;
  79. text-align: center;
  80. display: block;
  81. .list-item__label {
  82. font-size: 18px;
  83. margin-bottom: 25px;
  84. }
  85. .list-item__info {
  86. display: none;
  87. }
  88. .list-item__value {
  89. font-size: 24px;
  90. }
  91. }
  92. .list-item__content_A:nth-of-type(3) {
  93. position: absolute;
  94. left: 41%;
  95. top: 55px;
  96. .list-item__info {
  97. display: none;
  98. }
  99. .list-item__value {
  100. font-size: 20px;
  101. }
  102. }
  103. .list-item__content_A:nth-of-type(4) {
  104. position: absolute;
  105. left: 66%;
  106. top: 55px;
  107. .list-item__info {
  108. display: none;
  109. }
  110. .list-item__value {
  111. font-size: 20px;
  112. }
  113. }
  114. .list-item__content_A:nth-of-type(5) {
  115. position: absolute;
  116. left: 35%;
  117. bottom: 10px;
  118. display: flex;
  119. align-items: center;
  120. .list-item__info {
  121. display: none;
  122. }
  123. .list-item__value {
  124. font-size: 20px;
  125. margin-left: 5px;
  126. }
  127. }
  128. .list-item_B {
  129. // height: 155px;
  130. background-repeat: no-repeat;
  131. // background-size: 100% 100%;
  132. // background-size: auto 100%;
  133. background-size: 87% auto;
  134. background-position: center;
  135. background-image: url(/@/assets/images/home-container/configurable/firehome/img-7.png);
  136. display: flex;
  137. align-items: center;
  138. justify-content: space-between;
  139. text-align: center;
  140. padding: 0 10%;
  141. margin-top: 5px;
  142. height: 33px;
  143. .list-item__label {
  144. font-size: 11px;
  145. }
  146. .list-item__value {
  147. font-size: 18px;
  148. margin-left: 5px;
  149. }
  150. .list-item__content_B {
  151. height: 100%;
  152. display: flex;
  153. align-items: center;
  154. flex-basis: 100px;
  155. flex-grow: 1;
  156. }
  157. .list-item__title_B {
  158. width: 40px;
  159. text-align: center;
  160. margin-right: 50px
  161. // height: 30px;
  162. // background-size: auto 80%;
  163. // background-position: center;
  164. // background-repeat: no-repeat;
  165. }
  166. .list-item__info {
  167. display: none;
  168. }
  169. }
  170. .list_C {
  171. padding: 5px 10px;
  172. }
  173. .list__wrapper_C {
  174. display: flex;
  175. justify-content: space-between;
  176. flex-wrap: wrap;
  177. }
  178. .list-item_C {
  179. position: relative;
  180. height: 140px;
  181. width: 200px;
  182. background-repeat: no-repeat;
  183. background-image: url(/@/assets/images/home-container/configurable/firehome/img-8.png);
  184. background-size: 100% 100%;
  185. background-position: left center;
  186. }
  187. .list-item__title_C {
  188. position: absolute;
  189. left: 99px;
  190. // font-size: 14px;
  191. top: 15px;
  192. }
  193. .list-item__content_C:nth-of-type(2) {
  194. position: absolute;
  195. top: 15px;
  196. left: 19px;
  197. width: 30%;
  198. text-align: center;
  199. display: block;
  200. .list-item__label {
  201. // font-size: 18px;
  202. margin-bottom: 25px;
  203. }
  204. .list-item__info {
  205. display: none;
  206. }
  207. .list-item__value {
  208. font-size: 18px;
  209. }
  210. }
  211. .list-item__content_C:nth-of-type(3) {
  212. position: absolute;
  213. left: 99px;
  214. top: 55px;
  215. .list-item__info {
  216. display: none;
  217. }
  218. .list-item__value {
  219. font-size: 18px;
  220. }
  221. }
  222. .list_D {
  223. padding: 5px 10px;
  224. }
  225. .list__wrapper_D {
  226. display: flex;
  227. justify-content: space-between;
  228. flex-wrap: wrap;
  229. }
  230. .list-item_D {
  231. position: relative;
  232. height: 110px;
  233. width: 200px;
  234. background-repeat: no-repeat;
  235. background-image: url(/@/assets/images/home-container/configurable/firehome/img-9.png);
  236. background-size: 100% auto;
  237. background-position: center top;
  238. text-align: center;
  239. margin-bottom: 20px;
  240. }
  241. .list-item__title_D {
  242. position: absolute;
  243. width: 100%;
  244. bottom: 0;
  245. font-size: 20px;
  246. }
  247. .list-item__content_D:nth-of-type(2) {
  248. position: absolute;
  249. top: 10%;
  250. left: 10%;
  251. width: 30%;
  252. text-align: center;
  253. .list-item__info {
  254. display: none;
  255. }
  256. .list-item__value {
  257. font-size: 19px;
  258. }
  259. }
  260. .list-item__content_D:nth-of-type(3) {
  261. position: absolute;
  262. top: 10%;
  263. right: 10%;
  264. width: 30%;
  265. text-align: center;
  266. .list-item__info {
  267. display: none;
  268. }
  269. .list-item__value {
  270. font-size: 19px;
  271. }
  272. }
  273. .list_E {
  274. padding: 5px 10px;
  275. }
  276. .list__wrapper_E {
  277. display: flex;
  278. justify-content: space-between;
  279. flex-wrap: wrap;
  280. padding: 0 10px;
  281. }
  282. .list-item_E {
  283. position: relative;
  284. height: 104px;
  285. width: 188px;
  286. background-repeat: no-repeat;
  287. background-image: url(/@/assets/images/home-container/configurable/dusthome/list_bg_1.png);
  288. background-size: 100% auto;
  289. background-position: center top;
  290. text-align: center;
  291. margin-bottom: 20px;
  292. }
  293. .list-item__title_E {
  294. // position: absolute;
  295. width: 100%;
  296. // top: 0;
  297. font-size: 18px;
  298. margin-top: 10px;
  299. }
  300. .list-item__content_E:nth-of-type(2) {
  301. position: absolute;
  302. top: 40%;
  303. left: 5%;
  304. text-align: left;
  305. .list-item__info {
  306. display: none;
  307. }
  308. .list-item__value {
  309. font-size: 18px;
  310. }
  311. }
  312. .list-item__content_E:nth-of-type(3) {
  313. position: absolute;
  314. top: 40%;
  315. right: 5%;
  316. text-align: right;
  317. .list-item__info {
  318. display: none;
  319. }
  320. .list-item__value {
  321. font-size: 18px;
  322. }
  323. }
  324. // .list-item__title_B_O2 {
  325. // background-image: url(/@/assets/images/home-container/configurable/firehome/O₂.png);
  326. // }
  327. // .list-item__title_B_CH4 {
  328. // background-image: url(/@/assets/images/home-container/configurable/firehome/CH₄.png);
  329. // }
  330. // .list-item__title_B_CO {
  331. // background-image: url(/@/assets/images/home-container/configurable/firehome/CO.png);
  332. // }
  333. // .list-item__title_B_CO2 {
  334. // background-image: url(/@/assets/images/home-container/configurable/firehome/CO₂.png);
  335. // }
  336. // .list-item__label {
  337. // flex-basis: 55%;
  338. // }
  339. // .list-item__info {
  340. // flex-grow: 1;
  341. // }
  342. // .list-item__value {
  343. // flex-basis: 30%;
  344. // }
  345. .list-item__value_red {
  346. color: red;
  347. }
  348. .list-item__value_orange {
  349. color: orange;
  350. }
  351. .list-item__value_yellow {
  352. color: yellow;
  353. }
  354. .list-item__value_green {
  355. color: yellowgreen;
  356. }
  357. .list-item__value_blue {
  358. color: #009bff;
  359. }
  360. .list-item__value_white {
  361. color: white;
  362. }
  363. .gallery-item__value_lightblue {
  364. color: @vent-configurable-home-light-border;
  365. }
  366. </style>