ComplexList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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/theme.less';
  46. @import '@/design/theme.less';
  47. /* Timeline 相关的样式 */
  48. @{theme-deepblue} {
  49. .list {
  50. --image-img-3: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-3.png);
  51. --image-img-7: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-7.png);
  52. --image-img-8: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-8.png);
  53. --image-img-9: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-9.png);
  54. --image-list_bg_1: url(/@/assets/images/themify/deepblue/home-container/configurable/dusthome/list_bg_1.png);
  55. }
  56. }
  57. .list {
  58. --image-img-3: url(/@/assets/images/home-container/configurable/firehome/img-3.png);
  59. --image-img-7: url(/@/assets/images/home-container/configurable/firehome/img-7.png);
  60. --image-img-8: url(/@/assets/images/home-container/configurable/firehome/img-8.png);
  61. --image-img-9: url(/@/assets/images/home-container/configurable/firehome/img-9.png);
  62. --image-list_bg_1: url(/@/assets/images/home-container/configurable/dusthome/list_bg_1.png);
  63. padding: 5px 20px;
  64. position: relative;
  65. width: 100%;
  66. height: 100%;
  67. }
  68. .list-item_A {
  69. position: relative;
  70. height: 140px;
  71. background-repeat: no-repeat;
  72. background-image: var(--image-img-3);
  73. background-size: auto 100%;
  74. background-position: center;
  75. }
  76. .list-item__title_A {
  77. position: absolute;
  78. left: 41%;
  79. // font-size: 14px;
  80. top: 15px;
  81. }
  82. // .list-item__content_A {
  83. // position: absolute;
  84. // left: 35%;
  85. // top: 55px;
  86. // display: flex;
  87. // justify-content: space-evenly;
  88. // }
  89. .list-item__content_A:nth-of-type(2) {
  90. position: absolute;
  91. top: 15px;
  92. left: 14%;
  93. width: 22%;
  94. text-align: center;
  95. display: block;
  96. .list-item__label {
  97. font-size: 18px;
  98. margin-bottom: 25px;
  99. }
  100. .list-item__info {
  101. display: none;
  102. }
  103. .list-item__value {
  104. font-size: 24px;
  105. }
  106. }
  107. .list-item__content_A:nth-of-type(3) {
  108. position: absolute;
  109. left: 41%;
  110. top: 55px;
  111. .list-item__info {
  112. display: none;
  113. }
  114. .list-item__value {
  115. font-size: 20px;
  116. }
  117. }
  118. .list-item__content_A:nth-of-type(4) {
  119. position: absolute;
  120. left: 66%;
  121. top: 55px;
  122. .list-item__info {
  123. display: none;
  124. }
  125. .list-item__value {
  126. font-size: 20px;
  127. }
  128. }
  129. .list-item__content_A:nth-of-type(5) {
  130. position: absolute;
  131. left: 35%;
  132. bottom: 10px;
  133. display: flex;
  134. align-items: center;
  135. .list-item__info {
  136. display: none;
  137. }
  138. .list-item__value {
  139. font-size: 20px;
  140. margin-left: 5px;
  141. }
  142. }
  143. .list-item_B {
  144. // height: 155px;
  145. background-repeat: no-repeat;
  146. // background-size: 100% 100%;
  147. // background-size: auto 100%;
  148. background-size: 87% auto;
  149. background-position: center;
  150. background-image: var(--image-img-7);
  151. display: flex;
  152. align-items: center;
  153. justify-content: space-between;
  154. text-align: center;
  155. padding: 0 10%;
  156. margin-top: 5px;
  157. height: 33px;
  158. .list-item__label {
  159. font-size: 11px;
  160. }
  161. .list-item__value {
  162. font-size: 18px;
  163. margin-left: 5px;
  164. }
  165. .list-item__content_B {
  166. height: 100%;
  167. display: flex;
  168. align-items: center;
  169. flex-basis: 100px;
  170. flex-grow: 1;
  171. }
  172. .list-item__title_B {
  173. width: 40px;
  174. text-align: center;
  175. margin-right: 50px
  176. // height: 30px;
  177. // background-size: auto 80%;
  178. // background-position: center;
  179. // background-repeat: no-repeat;
  180. }
  181. .list-item__info {
  182. display: none;
  183. }
  184. }
  185. .list_C {
  186. padding: 5px 10px;
  187. }
  188. .list__wrapper_C {
  189. display: flex;
  190. justify-content: space-between;
  191. flex-wrap: wrap;
  192. }
  193. .list-item_C {
  194. position: relative;
  195. height: 140px;
  196. width: 200px;
  197. background-repeat: no-repeat;
  198. background-image: var(--image-img-8);
  199. background-size: 100% 100%;
  200. background-position: left center;
  201. }
  202. .list-item__title_C {
  203. position: absolute;
  204. left: 99px;
  205. // font-size: 14px;
  206. top: 15px;
  207. }
  208. .list-item__content_C:nth-of-type(2) {
  209. position: absolute;
  210. top: 15px;
  211. left: 19px;
  212. width: 30%;
  213. text-align: center;
  214. display: block;
  215. .list-item__label {
  216. // font-size: 18px;
  217. margin-bottom: 25px;
  218. }
  219. .list-item__info {
  220. display: none;
  221. }
  222. .list-item__value {
  223. font-size: 18px;
  224. }
  225. }
  226. .list-item__content_C:nth-of-type(3) {
  227. position: absolute;
  228. left: 99px;
  229. top: 55px;
  230. .list-item__info {
  231. display: none;
  232. }
  233. .list-item__value {
  234. font-size: 18px;
  235. }
  236. }
  237. .list_D {
  238. padding: 5px 10px;
  239. }
  240. .list__wrapper_D {
  241. display: flex;
  242. justify-content: space-between;
  243. flex-wrap: wrap;
  244. }
  245. .list-item_D {
  246. position: relative;
  247. height: 110px;
  248. width: 200px;
  249. background-repeat: no-repeat;
  250. background-image: var(--image-img-9);
  251. background-size: 100% auto;
  252. background-position: center top;
  253. text-align: center;
  254. margin-bottom: 20px;
  255. }
  256. .list-item__title_D {
  257. position: absolute;
  258. width: 100%;
  259. bottom: 0;
  260. font-size: 16px;
  261. font-weight: bold;
  262. }
  263. .list-item__content_D:nth-of-type(2) {
  264. position: absolute;
  265. top: 10%;
  266. left: 10%;
  267. width: 30%;
  268. text-align: center;
  269. .list-item__info {
  270. display: none;
  271. }
  272. .list-item__value {
  273. font-size: 18px;
  274. }
  275. }
  276. .list-item__content_D:nth-of-type(3) {
  277. position: absolute;
  278. top: 10%;
  279. right: 10%;
  280. width: 30%;
  281. text-align: center;
  282. .list-item__info {
  283. display: none;
  284. }
  285. .list-item__value {
  286. font-size: 18px;
  287. }
  288. }
  289. .list_E {
  290. padding: 5px 10px;
  291. }
  292. .list__wrapper_E {
  293. display: flex;
  294. justify-content: space-between;
  295. flex-wrap: wrap;
  296. padding: 0 10px;
  297. }
  298. .list-item_E {
  299. position: relative;
  300. height: 104px;
  301. width: 188px;
  302. background-repeat: no-repeat;
  303. background-image: var(--image-list_bg_1);
  304. background-size: 100% auto;
  305. background-position: center top;
  306. text-align: center;
  307. margin-bottom: 20px;
  308. }
  309. .list-item__title_E {
  310. // position: absolute;
  311. width: 100%;
  312. // top: 0;
  313. font-size: 16px;
  314. font-weight: bold;
  315. margin-top: 10px;
  316. }
  317. .list-item__content_E:nth-of-type(2) {
  318. position: absolute;
  319. top: 40%;
  320. left: 5%;
  321. text-align: left;
  322. .list-item__info {
  323. display: none;
  324. }
  325. .list-item__value {
  326. font-size: 16px;
  327. }
  328. }
  329. .list-item__content_E:nth-of-type(3) {
  330. position: absolute;
  331. top: 40%;
  332. right: 5%;
  333. text-align: right;
  334. .list-item__info {
  335. display: none;
  336. }
  337. .list-item__value {
  338. font-size: 16px;
  339. }
  340. }
  341. .list-item_F {
  342. // height: 155px;
  343. background-repeat: no-repeat;
  344. background-size: 100% 100%;
  345. // background-size: auto 100%;
  346. background-position: center;
  347. background-image: @vent-gas-list-item-bg-img;
  348. display: flex;
  349. align-items: center;
  350. // justify-content: space-between;
  351. // text-align: center;
  352. padding: 0 5%;
  353. margin-top: 5px;
  354. height: 50px;
  355. .list-item__title_F {
  356. flex-basis: 25%;
  357. }
  358. .list-item__content_F {
  359. flex-basis: 25%;
  360. }
  361. .list-item__label::after {
  362. content: ':';
  363. }
  364. .list-item__value {
  365. font-size: 18px;
  366. margin-left: 5px;
  367. font-weight: bold;
  368. }
  369. .list-item__content_F {
  370. display: flex;
  371. align-items: center;
  372. }
  373. .list-item__info {
  374. display: none;
  375. }
  376. }
  377. // .list-item__title_B_O2 {
  378. // background-image: url(/@/assets/images/home-container/configurable/firehome/O₂.png);
  379. // }
  380. // .list-item__title_B_CH4 {
  381. // background-image: url(/@/assets/images/home-container/configurable/firehome/CH₄.png);
  382. // }
  383. // .list-item__title_B_CO {
  384. // background-image: url(/@/assets/images/home-container/configurable/firehome/CO.png);
  385. // }
  386. // .list-item__title_B_CO2 {
  387. // background-image: url(/@/assets/images/home-container/configurable/firehome/CO₂.png);
  388. // }
  389. // .list-item__label {
  390. // flex-basis: 55%;
  391. // }
  392. // .list-item__info {
  393. // flex-grow: 1;
  394. // }
  395. // .list-item__value {
  396. // flex-basis: 30%;
  397. // }
  398. .list-item__value_red {
  399. color: red;
  400. }
  401. .list-item__value_orange {
  402. color: orange;
  403. }
  404. .list-item__value_yellow {
  405. color: yellow;
  406. }
  407. .list-item__value_green {
  408. color: yellowgreen;
  409. }
  410. .list-item__value_blue {
  411. color: @vent-table-action-link;
  412. }
  413. .list-item__value_white {
  414. color: white;
  415. }
  416. .gallery-item__value_lightblue {
  417. color: @vent-configurable-home-light-border;
  418. }
  419. </style>