ComplexList-green.vue 12 KB

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