CustomGalleryNew.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div class="custom-gallery-new">
  3. <div class="custom-top">
  4. <div class="gallery-new-box">
  5. <div class="gallery-content" v-for="(item, index) in option" :key="index">
  6. <div :class="index % 2 == 0 ? 'gallery-content-text' : 'gallery-content-text-r'">{{ item.label }}</div>
  7. <div :class="index % 2 == 0 ? 'gallery-content-value' : 'gallery-content-value-r'">{{ galleryData ?
  8. galleryData[item.value] : 0 }}</div>
  9. </div>
  10. <div class="gallery-content">
  11. <SvgIcon class="icon-style2" size="30" name="device-status" />
  12. </div>
  13. </div>
  14. </div>
  15. <div class="custom-bottom">
  16. <CommonTable :columns="deviceColumns" :table-data="tableData"></CommonTable>
  17. </div>
  18. </div>
  19. </template>
  20. <script setup lang="ts">
  21. import { computed, onMounted, ref } from 'vue';
  22. import { SvgIcon } from '/@/components/Icon';
  23. import CommonTable from './CommonTable.vue';
  24. import { deviceColumns } from '../hsqHome.data.js';
  25. let props = defineProps({
  26. option: {
  27. type: Array as any
  28. },
  29. galleryData: {
  30. type: Object
  31. },
  32. tableData: {
  33. type: Array as any
  34. },
  35. })
  36. </script>
  37. <style lang="less" scoped>
  38. @import '/@/design/theme.less';
  39. .custom-gallery-new {
  40. --image-gallery-bg: url('@/assets/images/home-container/configurable/dusthome/gallery-bg.png');
  41. --image-gallery-bg-b: url('@/assets/images/home-container/configurable/dusthome/gallery-bg-b.png');
  42. --image-content-label: url('/@/assets/images/home-container/configurable/hsq/1-5.png');
  43. --image-content-text: url('/@/assets/images/company/content-text.png');
  44. --image-list-head: url('/@/assets/images/home-container/configurable/firehome/list-head.png');
  45. --image-content-label-d: url(/@/assets/images/home-container/configurable/minehome/content-label.png);
  46. --image-content-body-d: url('/@/assets/images/home-container/configurable/minehome/content-body.png');
  47. position: relative;
  48. width: 100%;
  49. height: 100%;
  50. padding: 10px;
  51. box-sizing: border-box;
  52. .custom-top {
  53. width: 100%;
  54. height: 40%;
  55. }
  56. .custom-bottom {
  57. width: 100%;
  58. height: 60%;
  59. box-sizing: border-box;
  60. display: flex;
  61. flex-direction: column;
  62. align-items: center;
  63. }
  64. .gallery-new-box {
  65. position: relative;
  66. width: 100%;
  67. height: 100%;
  68. background: var(--image-gallery-bg) no-repeat;
  69. background-size: 100% 100%;
  70. }
  71. .gallery-content {
  72. position: absolute;
  73. &:nth-child(1) {
  74. left: 22px;
  75. top: 4px;
  76. }
  77. &:nth-child(2) {
  78. display: flex;
  79. flex-direction: column;
  80. align-items: flex-end;
  81. right: 24px;
  82. top: 4px;
  83. }
  84. &:nth-child(3) {
  85. left: 22px;
  86. top: 72px;
  87. }
  88. &:nth-child(4) {
  89. display: flex;
  90. flex-direction: column;
  91. align-items: flex-end;
  92. right: 24px;
  93. top: 72px;
  94. }
  95. &:nth-child(5) {
  96. left: 50%;
  97. top: 50%;
  98. transform: translate(-50%, -50%);
  99. }
  100. .gallery-content-text {
  101. margin-bottom: 2px;
  102. }
  103. .gallery-content-text-r {
  104. margin-bottom: 2px;
  105. }
  106. .gallery-content-text1 {
  107. font-size: 24px;
  108. font-family: 'douyuFont';
  109. }
  110. .gallery-content-value,
  111. .gallery-content-value-r {
  112. font-family: 'douyuFont';
  113. color: #fff;
  114. }
  115. }
  116. }
  117. </style>