CustomList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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" :class="`list__wrapper_${type}`">
  9. <div v-for="(item, i) in listConfig" :key="`customlist${i}`" class="flex items-center" :class="`list-item_${type}`">
  10. <!-- 列表项前面的图标 -->
  11. <div :class="`list-item__icon_${type}`"></div>
  12. <!-- 列表项的具体内容填充剩余宽度 -->
  13. <div class="flex-grow" :class="`list-item__content_${type}`">
  14. <div class="list-item__label">{{ item.label }}</div>
  15. <div class="list-item__info" :class="`list-item__info_${item.color}`">{{ item.info }}</div>
  16. <div class="list-item__value" :class="`list-item__value_${item.color} list-item__value_${type}`">{{ item.value }}</div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script lang="ts" setup>
  23. withDefaults(
  24. defineProps<{
  25. listConfig: {
  26. value: string;
  27. color: string;
  28. label: string;
  29. info: string;
  30. }[];
  31. /** A B C D E F G */
  32. type: string;
  33. }>(),
  34. {
  35. listConfig: () => [],
  36. type: 'A',
  37. }
  38. );
  39. // defineEmits(['click']);
  40. </script>
  41. <style lang="less" scoped>
  42. @import '/@/design/theme.less';
  43. @import '/@/design/theme.less';
  44. /* Timeline 相关的样式 */
  45. @{theme-deepblue} {
  46. .list {
  47. --image-list_bg_default: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_default.png);
  48. --image-triangle_icon: url(/@/assets/images/themify/deepblue/home-container/configurable/triangle_icon.png);
  49. --image-list_bg_b: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_b.png);
  50. --image-deco_1: url(/@/assets/images/themify/deepblue/home-container/configurable/deco_1.png);
  51. --image-list_bg_c: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_c.png);
  52. --image-list_bg_defflip: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_defflip.png);
  53. --image-list_bg_d: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_d.png);
  54. --image-list_bg_e: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_e.png);
  55. --image-list: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/list.png);
  56. --image-list_bg_h: url(/@/assets/images/themify/deepblue/home-container/configurable/list_bg_h.png);
  57. --image-list_bg_i: url('/@/assets/images/themify/deepblue/home-container/configurable/list_bg_i.png');
  58. }
  59. }
  60. .list {
  61. --image-list_bg_default: url(/@/assets/images/home-container/configurable/list_bg_default.png);
  62. --image-triangle_icon: url(/@/assets/images/home-container/configurable/triangle_icon.png);
  63. --image-list_bg_b: url(/@/assets/images/home-container/configurable/list_bg_b.png);
  64. --image-deco_1: url(/@/assets/images/home-container/configurable/deco_1.png);
  65. --image-list_bg_c: url(/@/assets/images/home-container/configurable/list_bg_c.png);
  66. --image-list_bg_defflip: url(/@/assets/images/home-container/configurable/list_bg_defflip.png);
  67. --image-list_bg_d: url(/@/assets/images/home-container/configurable/list_bg_d.png);
  68. --image-list_bg_e: url(/@/assets/images/home-container/configurable/list_bg_e.png);
  69. --image-list: url(/@/assets/images/home-container/configurable/firehome/list.png);
  70. --image-list_bg_h: url(/@/assets/images/home-container/configurable/list_bg_h.png);
  71. --image-list_bg_i: url('/@/assets/images/home-container/configurable/list_bg_i.png');
  72. --image-list_bg_j: url('/@/assets/images/home-container/configurable/list_bg_j.png');
  73. --image-linear-gradient-3: linear-gradient(to right, #39deff15, #3977e500);
  74. padding: 5px 20px;
  75. position: relative;
  76. background-repeat: no-repeat;
  77. width: 100%;
  78. height: 100%;
  79. background-size: 100% 100%;
  80. background-image: var(--image-list_bg_default);
  81. }
  82. .list_A {
  83. padding-left: 5px;
  84. }
  85. .list-item__content_A {
  86. background-repeat: no-repeat;
  87. background-image: @vent-gas-list-item-bg-img;
  88. // padding: 5px 10px;
  89. display: flex;
  90. }
  91. .list-item__icon_A {
  92. background-repeat: no-repeat;
  93. width: 25px;
  94. height: 29px;
  95. background-image: var(--image-triangle_icon);
  96. }
  97. .list-item__content_B {
  98. background-repeat: no-repeat;
  99. padding: 5px 10px 10px 10px;
  100. display: flex;
  101. background-position: left bottom;
  102. background-size: 100% auto;
  103. background-image: var(--image-list_bg_b);
  104. }
  105. .list__image_B {
  106. width: 77px;
  107. height: 77px;
  108. background-repeat: no-repeat;
  109. background-image: var(--image-deco_1);
  110. background-size: auto;
  111. margin-right: 20px;
  112. }
  113. .list_C {
  114. background: none;
  115. }
  116. .list-item__content_C {
  117. height: 60px;
  118. background-repeat: no-repeat;
  119. padding: 25px 50px 0 50px;
  120. display: flex;
  121. background-position: center;
  122. background-size: 100% 100%;
  123. background-image: var(--image-list_bg_c);
  124. margin-bottom: 10px;
  125. text-align: center;
  126. }
  127. .list-item__content_C > div {
  128. flex-basis: 33.3%;
  129. }
  130. .list_D {
  131. background-image: var(--image-list_bg_defflip);
  132. }
  133. .list__wrapper_D {
  134. display: flex;
  135. flex-wrap: wrap;
  136. }
  137. .list-item__icon_D {
  138. display: none;
  139. }
  140. .list-item_D {
  141. flex-basis: 25%;
  142. height: 60px;
  143. background-repeat: no-repeat;
  144. background-position: center;
  145. background-size: auto 100%;
  146. background-image: var(--image-list_bg_d);
  147. text-align: center;
  148. margin-bottom: 10px;
  149. }
  150. .list-item__content_D {
  151. line-height: 30px;
  152. }
  153. .list-item__value_D {
  154. font-weight: bold;
  155. }
  156. .list_E {
  157. background-image: var(--image-list_bg_defflip);
  158. }
  159. .list__wrapper_E {
  160. display: flex;
  161. flex-wrap: wrap;
  162. }
  163. .list-item__icon_E {
  164. display: none;
  165. }
  166. .list-item_E {
  167. flex-basis: 25%;
  168. height: 70px;
  169. background-repeat: no-repeat;
  170. background-position: center;
  171. background-size: auto 100%;
  172. background-image: var(--image-list_bg_e);
  173. text-align: center;
  174. margin: 5px 0px;
  175. padding-top: 32px;
  176. font-size: 12px;
  177. }
  178. .list_F {
  179. background: none;
  180. }
  181. .list-item__content_F {
  182. height: 40px;
  183. background-repeat: no-repeat;
  184. padding: 0 50px 0 50px;
  185. display: flex;
  186. background-position: center;
  187. background-size: 100% auto;
  188. background-image: var(--image-list);
  189. margin-top: 10px;
  190. text-align: center;
  191. }
  192. .list-item__content_F > div {
  193. flex-basis: 33.3%;
  194. }
  195. .list_G {
  196. background: none;
  197. }
  198. .list__wrapper_G {
  199. display: flex;
  200. flex-wrap: wrap;
  201. justify-content: space-between;
  202. }
  203. .list-item_G {
  204. width: 130px;
  205. height: 80px;
  206. align-items: center;
  207. text-align: center;
  208. border: 1px solid rgba(25, 237, 255, 0.4);
  209. box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
  210. background: rgba(0, 0, 0, 0.1);
  211. margin: 5px 10px;
  212. }
  213. .list-item__content_G {
  214. position: relative;
  215. width: 100%;
  216. height: 100%;
  217. }
  218. .list-item__content_G > .list-item__label {
  219. width: 60px;
  220. height: 100%;
  221. left: 0;
  222. position: absolute;
  223. font-size: 20px;
  224. line-height: 80px;
  225. }
  226. .list-item__content_G > .list-item__info {
  227. width: 70px;
  228. height: 30px;
  229. line-height: 30px;
  230. right: 0;
  231. position: absolute;
  232. }
  233. .list-item__content_G > .list-item__value {
  234. width: 70px;
  235. height: 50px;
  236. line-height: 50px;
  237. top: 30px;
  238. right: 0;
  239. position: absolute;
  240. text-shadow: 0 0 25px #00fbfe;
  241. background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
  242. font-style: normal;
  243. background-size: cover;
  244. font-family: electronicFont;
  245. font-size: 30px;
  246. -webkit-background-clip: text;
  247. background-clip: text;
  248. -webkit-text-fill-color: transparent;
  249. font-family: Arial, Helvetica, sans-serif;
  250. font-size: 18px;
  251. color: aliceblue;
  252. }
  253. .list_H {
  254. background: none;
  255. }
  256. .list-item__content_H {
  257. height: 50px;
  258. background-repeat: no-repeat;
  259. padding: 20px 50px 0 50px;
  260. display: flex;
  261. background-position: bottom;
  262. background-size: 100% auto;
  263. background-image: var(--image-list_bg_h);
  264. margin-bottom: 10px;
  265. text-align: center;
  266. }
  267. .list-item__content_H > div {
  268. flex-basis: 33.3%;
  269. }
  270. .list_fireList {
  271. background: none;
  272. }
  273. .list__wrapper_fireList {
  274. display: flex;
  275. flex-wrap: wrap;
  276. justify-content: flex-start;
  277. margin-left: 86px;
  278. }
  279. .list-item_fireList {
  280. width: 167px;
  281. height: 58px;
  282. align-items: center;
  283. text-align: center;
  284. background-image: var(--image-list_bg_i);
  285. background-repeat: no-repeat;
  286. background-size: auto 100%;
  287. margin: 5px 10px;
  288. }
  289. .list-item__content_fireList {
  290. position: relative;
  291. width: 100%;
  292. height: 100%;
  293. }
  294. .list-item__content_fireList > .list-item__label {
  295. width: 60px;
  296. height: 100%;
  297. left: 0;
  298. position: absolute;
  299. font-size: 20px;
  300. line-height: 63px;
  301. color: #009bff;
  302. }
  303. .list-item__content_fireList > .list-item__info {
  304. height: 50%;
  305. left: 70px;
  306. position: absolute;
  307. }
  308. .list-item__content_fireList > .list-item__value {
  309. top: 50%;
  310. height: 50%;
  311. left: 70px;
  312. position: absolute;
  313. font-size: 18px;
  314. }
  315. .list_I {
  316. background: none;
  317. }
  318. .list__wrapper_I {
  319. display: flex;
  320. flex-wrap: wrap;
  321. justify-content: flex-start;
  322. }
  323. .list-item_I {
  324. width: 160px;
  325. height: 63px;
  326. align-items: center;
  327. text-align: center;
  328. background-image: var(--image-list_bg_i);
  329. background-repeat: no-repeat;
  330. background-size: auto 100%;
  331. margin: 5px 10px;
  332. }
  333. .list-item__content_I {
  334. position: relative;
  335. width: 100%;
  336. height: 100%;
  337. }
  338. .list-item__content_I > .list-item__label {
  339. width: 60px;
  340. height: 100%;
  341. left: 0;
  342. position: absolute;
  343. font-size: 20px;
  344. line-height: 63px;
  345. color: #009bff;
  346. }
  347. .list-item__content_I > .list-item__info {
  348. height: 50%;
  349. left: 70px;
  350. position: absolute;
  351. }
  352. .list-item__content_I > .list-item__value {
  353. top: 50%;
  354. height: 50%;
  355. left: 70px;
  356. position: absolute;
  357. font-size: 18px;
  358. }
  359. .list_J {
  360. background: unset;
  361. padding: 0 5px 0 10px;
  362. }
  363. .list-item_J {
  364. width: 312px;
  365. height: 57px;
  366. align-items: center;
  367. text-align: center;
  368. background-image: var(--image-list_bg_j);
  369. background-repeat: no-repeat;
  370. background-size: auto 100%;
  371. margin: 5px 10px;
  372. }
  373. .list-item__content_J {
  374. display: flex;
  375. justify-content: space-between;
  376. align-items: center;
  377. padding: 0 20px 0 15px;
  378. }
  379. .list_K {
  380. background: unset;
  381. padding: 0 5px 0 10px;
  382. }
  383. .list__wrapper_K {
  384. height: 100%;
  385. }
  386. .list-item__content_K {
  387. display: flex;
  388. justify-content: space-between;
  389. align-items: center;
  390. padding: 5px;
  391. margin: 4px 0;
  392. background-image: var(--image-linear-gradient-3);
  393. .list-item__value {
  394. flex-basis: unset;
  395. }
  396. .list-item__label {
  397. flex-basis: unset;
  398. }
  399. .list-item__info {
  400. display: none;
  401. }
  402. }
  403. .list-item__label {
  404. flex-basis: 55%;
  405. }
  406. .list-item__info {
  407. flex-grow: 1;
  408. }
  409. .list-item__value {
  410. flex-basis: 30%;
  411. }
  412. .list-item__value_red {
  413. color: red;
  414. }
  415. .list-item__value_orange {
  416. color: orange;
  417. }
  418. .list-item__value_yellow {
  419. color: yellow;
  420. }
  421. .list-item__value_green {
  422. color: yellowgreen;
  423. }
  424. .list-item__value_blue {
  425. color: @vent-table-action-link;
  426. }
  427. .list-item__value_white {
  428. color: white;
  429. }
  430. .gallery-item__value_lightblue {
  431. color: @vent-configurable-home-light-border;
  432. }
  433. </style>