ComplexList-FireNew.vue 11 KB

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