ComplexList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  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_I', { 'bg-1': type == 'I' && i == 0 }]" v-if="type == 'I' && i == 0">
  12. <img src="/src/assets/images/home-container/configurable/device-group-paramer.svg" alt="" style="width: 45px; height: 45px" />
  13. <div>{{ item.title }}</div>
  14. </div>
  15. <div :class="['list-item__title_I', { 'bg-2': type == 'I' && i == 1 }]" v-else-if="type == 'I' && i == 1">
  16. <SvgIcon class="icon" size="40" name="device-paramer" /><div>{{ item.title }}</div>
  17. </div>
  18. <div :class="`list-item__title_${type}`" v-else>{{ item.title }}</div>
  19. <!-- 列表项的具体内容填充剩余宽度 -->
  20. <div v-for="(ctx, j) in item.contents" :key="`vvhccdclc${j}`" :class="`list-item__content_${type}`">
  21. <div class="list-item__label">{{ ctx.label }}</div>
  22. <div class="list-item__info" :class="`list-item__info_${ctx.color}`">{{ ctx.info }}</div>
  23. <div class="list-item__value" :class="`list-item__value_${ctx.color} list-item__value_${type}`">{{ ctx.value }}</div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script lang="ts" setup>
  30. import { SvgIcon } from '/@/components/Icon';
  31. withDefaults(
  32. defineProps<{
  33. listConfig: {
  34. title: string;
  35. contents: {
  36. value: string;
  37. color: string;
  38. label: string;
  39. info: string;
  40. }[];
  41. }[];
  42. /** A B */
  43. type: string;
  44. }>(),
  45. {
  46. listConfig: () => [],
  47. type: 'A',
  48. }
  49. );
  50. // defineEmits(['click']);
  51. </script>
  52. <style lang="less" scoped>
  53. @import '@/design/theme.less';
  54. @import '@/design/theme.less';
  55. /* Timeline 相关的样式 */
  56. @{theme-green} {
  57. .list {
  58. --image-img-9: url(/@/assets/images/themify/green/home-container/configurable/firehome/img-9.png);
  59. --image-list_bg_1: url(/@/assets/images/themify/green/home-container/configurable/dusthome/list_bg_1.png);
  60. }
  61. }
  62. @{theme-deepblue} {
  63. .list {
  64. --image-img-3: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-3.png);
  65. --image-img-7: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-7.png);
  66. --image-img-8: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-8.png);
  67. --image-img-9: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/img-9.png);
  68. --image-list_bg_1: url(/@/assets/images/themify/deepblue/home-container/configurable/dusthome/list_bg_1.png);
  69. }
  70. }
  71. .list {
  72. --image-img-3: url(/@/assets/images/home-container/configurable/firehome/img-3.png);
  73. --image-img-7: url(/@/assets/images/home-container/configurable/firehome/img-7.png);
  74. --image-img-8: url(/@/assets/images/home-container/configurable/firehome/img-8.png);
  75. --image-img-9: url(/@/assets/images/home-container/configurable/firehome/img-9.png);
  76. --image-list_bg_1: url(/@/assets/images/home-container/configurable/dusthome/list_bg_1.png);
  77. --image-list_bg_h_title: url(/@/assets/images/home-container/configurable/minehome/list-bg-h-title.png);
  78. --image-list_bg_h_border: url(/@/assets/images/home-container/configurable/minehome/list-bg-h-border.png);
  79. --image-list_bg_h_content: url(/@/assets/images/home-container/configurable/minehome/list-bg-h-content.png);
  80. --image-linear-gradient-1: linear-gradient(to right, #39a3ff50, #39a3ff00);
  81. --image-linear-gradient-2: linear-gradient(to right, #3df6ff40, #3df6ff00);
  82. --image-linear-gradient-3: linear-gradient(to right, #39deff15, #3977e500);
  83. --image-linear-gradient-4: linear-gradient(to right, #091d34, #0b223b);
  84. padding: 5px 20px;
  85. position: relative;
  86. width: 100%;
  87. height: 100%;
  88. }
  89. .list-item_A {
  90. position: relative;
  91. height: 140px;
  92. background-repeat: no-repeat;
  93. background-image: var(--image-img-3);
  94. background-size: auto 100%;
  95. background-position: center;
  96. }
  97. .list-item__title_A {
  98. position: absolute;
  99. left: 41%;
  100. // font-size: 14px;
  101. top: 15px;
  102. }
  103. .list-item__content_A:nth-of-type(2) {
  104. position: absolute;
  105. top: 15px;
  106. left: 14%;
  107. width: 22%;
  108. text-align: center;
  109. display: block;
  110. .list-item__label {
  111. font-size: 18px;
  112. margin-bottom: 25px;
  113. }
  114. .list-item__info {
  115. display: none;
  116. }
  117. .list-item__value {
  118. font-size: 24px;
  119. }
  120. }
  121. .list-item__content_A:nth-of-type(3) {
  122. position: absolute;
  123. left: 41%;
  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(4) {
  133. position: absolute;
  134. left: 66%;
  135. top: 55px;
  136. .list-item__info {
  137. display: none;
  138. }
  139. .list-item__value {
  140. font-size: 20px;
  141. }
  142. }
  143. .list-item__content_A:nth-of-type(5) {
  144. position: absolute;
  145. left: 35%;
  146. bottom: 10px;
  147. display: flex;
  148. align-items: center;
  149. .list-item__info {
  150. display: none;
  151. }
  152. .list-item__value {
  153. font-size: 20px;
  154. margin-left: 5px;
  155. }
  156. }
  157. .list-item_B {
  158. background-repeat: no-repeat;
  159. background-size: 87% auto;
  160. background-position: center;
  161. background-image: var(--image-img-7);
  162. display: flex;
  163. align-items: center;
  164. justify-content: space-between;
  165. text-align: center;
  166. padding: 0 10%;
  167. margin-top: 5px;
  168. height: 33px;
  169. .list-item__label {
  170. font-size: 11px;
  171. }
  172. .list-item__value {
  173. font-size: 18px;
  174. margin-left: 5px;
  175. }
  176. .list-item__content_B {
  177. height: 100%;
  178. display: flex;
  179. align-items: center;
  180. flex-basis: 100px;
  181. flex-grow: 1;
  182. }
  183. .list-item__title_B {
  184. width: 40px;
  185. text-align: center;
  186. margin-right: 50px;
  187. }
  188. .list-item__info {
  189. display: none;
  190. }
  191. }
  192. .list_C {
  193. padding: 5px 10px;
  194. }
  195. .list__wrapper_C {
  196. display: flex;
  197. justify-content: space-between;
  198. flex-wrap: wrap;
  199. }
  200. .list-item_C {
  201. position: relative;
  202. height: 140px;
  203. width: 200px;
  204. background-repeat: no-repeat;
  205. background-image: var(--image-img-8);
  206. background-size: 100% 100%;
  207. background-position: left center;
  208. }
  209. .list-item__title_C {
  210. position: absolute;
  211. left: 99px;
  212. top: 15px;
  213. }
  214. .list-item__content_C:nth-of-type(2) {
  215. position: absolute;
  216. top: 15px;
  217. left: 19px;
  218. width: 30%;
  219. text-align: center;
  220. display: block;
  221. .list-item__label {
  222. margin-bottom: 25px;
  223. }
  224. .list-item__info {
  225. display: none;
  226. }
  227. .list-item__value {
  228. font-size: 18px;
  229. }
  230. }
  231. .list-item__content_C:nth-of-type(3) {
  232. position: absolute;
  233. left: 99px;
  234. top: 55px;
  235. .list-item__info {
  236. display: none;
  237. }
  238. .list-item__value {
  239. font-size: 18px;
  240. }
  241. }
  242. .list_D {
  243. padding: 5px 10px;
  244. }
  245. .list__wrapper_D {
  246. display: flex;
  247. justify-content: space-between;
  248. flex-wrap: wrap;
  249. }
  250. .list-item_D {
  251. position: relative;
  252. height: 110px;
  253. width: 200px;
  254. background-repeat: no-repeat;
  255. background-image: var(--image-img-9);
  256. background-size: 100% auto;
  257. background-position: center top;
  258. text-align: center;
  259. margin-bottom: 20px;
  260. }
  261. .list-item__title_D {
  262. position: absolute;
  263. width: 100%;
  264. bottom: 0;
  265. font-size: 16px;
  266. font-weight: bold;
  267. }
  268. .list-item__content_D:nth-of-type(2) {
  269. position: absolute;
  270. top: 10%;
  271. left: 10%;
  272. width: 30%;
  273. text-align: center;
  274. .list-item__info {
  275. display: none;
  276. }
  277. .list-item__value {
  278. font-size: 18px;
  279. }
  280. }
  281. .list-item__content_D:nth-of-type(3) {
  282. position: absolute;
  283. top: 10%;
  284. right: 10%;
  285. width: 30%;
  286. text-align: center;
  287. .list-item__info {
  288. display: none;
  289. }
  290. .list-item__value {
  291. font-size: 18px;
  292. }
  293. }
  294. .list_E {
  295. padding: 5px 10px;
  296. }
  297. .list__wrapper_E {
  298. display: flex;
  299. justify-content: space-between;
  300. flex-wrap: wrap;
  301. padding: 0 10px;
  302. }
  303. .list-item_E {
  304. position: relative;
  305. height: 104px;
  306. width: 188px;
  307. background-repeat: no-repeat;
  308. background-image: var(--image-list_bg_1);
  309. background-size: 100% auto;
  310. background-position: center top;
  311. text-align: center;
  312. margin-bottom: 20px;
  313. }
  314. .list-item__title_E {
  315. width: 100%;
  316. font-size: 16px;
  317. font-weight: bold;
  318. margin-top: 10px;
  319. }
  320. .list-item__content_E:nth-of-type(2) {
  321. position: absolute;
  322. top: 40%;
  323. left: 5%;
  324. text-align: left;
  325. .list-item__info {
  326. display: none;
  327. }
  328. .list-item__value {
  329. font-size: 16px;
  330. }
  331. }
  332. .list-item__content_E:nth-of-type(3) {
  333. position: absolute;
  334. top: 40%;
  335. right: 5%;
  336. text-align: right;
  337. .list-item__info {
  338. display: none;
  339. }
  340. .list-item__value {
  341. font-size: 16px;
  342. }
  343. }
  344. .list-item_F {
  345. background-repeat: no-repeat;
  346. background-size: 100% 100%;
  347. // background-size: auto 100%;
  348. background-position: center;
  349. background-image: @vent-gas-list-item-bg-img;
  350. display: flex;
  351. align-items: 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_G {
  378. margin-top: 5px;
  379. .list-item__title_G {
  380. position: relative;
  381. width: 100%;
  382. height: 16px;
  383. margin-top: 10px;
  384. margin-bottom: 5px;
  385. padding-left: 8px;
  386. top: -2px;
  387. background-image: var(--image-linear-gradient-1);
  388. &::before {
  389. position: absolute;
  390. content: '';
  391. width: 100%;
  392. height: 100%;
  393. top: 4px;
  394. left: 0;
  395. background-image: var(--image-linear-gradient-2);
  396. }
  397. }
  398. .list-item__content_G {
  399. display: flex;
  400. justify-content: space-between;
  401. align-items: center;
  402. padding: 4px;
  403. margin: 8px 0;
  404. background-image: var(--image-linear-gradient-3);
  405. }
  406. }
  407. .list_H {
  408. padding: 0 10px;
  409. }
  410. .list__wrapper_H {
  411. display: flex;
  412. justify-content: space-between;
  413. flex-wrap: wrap;
  414. gap: 20px;
  415. }
  416. .list-item_H {
  417. position: relative;
  418. height: 80px;
  419. width: calc((100% - 20px) / 2);
  420. background-image: var(--image-list_bg_h_border);
  421. background-size: 100% 100%;
  422. background-repeat: no-repeat;
  423. background-position: center top;
  424. margin-top: 25px;
  425. }
  426. .list-item__title_H {
  427. position: absolute;
  428. top: -26px;
  429. left: 0;
  430. width: 100%;
  431. height: 32px;
  432. line-height: 32px;
  433. background-repeat: no-repeat;
  434. background-image: var(--image-list_bg_h_title);
  435. background-size: 100% auto;
  436. background-position: center top;
  437. font-size: 16px;
  438. text-align: center;
  439. }
  440. .list-item__content_H {
  441. display: flex;
  442. flex-direction: row;
  443. align-items: center;
  444. justify-content: space-between;
  445. background-repeat: no-repeat;
  446. background-image: var(--image-list_bg_h_content);
  447. background-size: 100% auto;
  448. background-position: center top;
  449. margin: 13px 10px;
  450. }
  451. .list-item_I {
  452. display: flex;
  453. flex-wrap: wrap;
  454. margin-top: 5px;
  455. }
  456. .list-item__title_I {
  457. position: relative;
  458. width: 100%;
  459. height: 25px;
  460. margin-top: 10px;
  461. margin-bottom: 5px;
  462. padding-left: 8px;
  463. top: -2px;
  464. display: flex;
  465. align-items: center;
  466. gap: 8px;
  467. }
  468. .list-item__title_I.bg-1 {
  469. background-image: var(--image-linear-gradient-1);
  470. }
  471. .list-item__title_I.bg-2 {
  472. background-image: var(--image-linear-gradient-2);
  473. }
  474. .list-item__title_I .icon {
  475. display: inline-block;
  476. flex-shrink: 0;
  477. vertical-align: middle;
  478. }
  479. .list-item__title_I > div {
  480. flex: 1;
  481. line-height: 25px;
  482. font-size: 14px;
  483. }
  484. .list-item__content_I {
  485. width: 50%;
  486. display: flex;
  487. justify-content: space-around;
  488. align-items: center;
  489. padding: 4px;
  490. margin: 8px 0;
  491. background-image: var(--image-linear-gradient-4);
  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>