ComplexList.vue 14 KB

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