123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- <!-- eslint-disable vue/multi-word-component-names -->
- <template>
- <!-- 基准的画廊模块,通过不同的 type 展示不同的样式 -->
- <div class="gallery" :class="`gallery_${type}`">
- <!-- 部分类型的画廊需要加一张图片 -->
- <div :class="`gallery-item_center_${type}`"></div>
- <div v-for="item in galleryConfig" :key="item.prop" :class="`gallery-item_${type}`">
- <!-- 画廊项的具体内容填充剩余宽度 -->
- <div class="gallery-item__label">{{ item.label }}</div>
- <div class="gallery-item__value" :class="`gallery-item__value_${item.color}`">{{ item.value }}</div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- // import { get } from 'lodash-es';
- // import { computed } from 'vue';
- withDefaults(
- defineProps<{
- galleryConfig: {
- value: string;
- color: string;
- label: string;
- prop: string;
- }[];
- /** A | B | C | D */
- type: string;
- }>(),
- {
- galleryConfig: () => [],
- type: 'A',
- }
- );
- // defineEmits(['click']);
- </script>
- <style lang="less" scoped>
- @import '@/design/theme.less';
- @import '@/design/theme.less';
- @{theme-deepblue} {
- .gallery {
- --image-gallery_center: url(/@/assets/images/themify/deepblue/configurable/gallery_center.png);
- --image-gallery_1: url(/@/assets/images/themify/deepblue/configurable/gallery_1.png);
- --image-deco_2: url(/@/assets/images/themify/deepblue/configurable/deco_2.png);
- --image-deco_3: url(/@/assets/images/themify/deepblue/configurable/deco_3.png);
- --image-deco_4: url(/@/assets/images/themify/deepblue/configurable/deco_4.png);
- --image-img-2: url(/@/assets/images/themify/deepblue/configurable/firehome/img-2.png);
- --image-img-1: url(/@/assets/images/themify/deepblue/configurable/firehome/img-1.png);
- --image-img-8: url(/@/assets/images/themify/deepblue/configurable/dusthome/img-8.png);
- --image-img-9: url(/@/assets/images/themify/deepblue/configurable/dusthome/img-9.png);
- --image-sbzs: url(/@/assets/images/themify/deepblue/configurable/dusthome/sbzs.png);
- --image-pwkqs: url(/@/assets/images/themify/deepblue/configurable/dusthome/pwkqs.png);
- --image-lwsl: url(/@/assets/images/themify/deepblue/configurable/dusthome/lwsl.png);
- --image-dwsl: url(/@/assets/images/themify/deepblue/configurable/dusthome/dwsl.png);
- --image-img-1: url(/@/assets/images/themify/deepblue/configurable/firehome/img-1.png);
- --image-img-7: url(/@/assets/images/themify/deepblue/configurable/dusthome/img-7.png);
- --image-img-4: url(/@/assets/images/themify/deepblue/configurable/firehome/img-4.png);
- --image-bottom1: url('/@/assets/images/themify/deepblue/alarm/bottom1.png');
- --image-center-bg: url('/@/assets/images/themify/deepblue/alarm/center-bg.png');
- --image-warning-icon-bg1: url(/@/assets/images/themify/deepblue/alarm/warning-icon-bg1.png);
- --image-warning-icon-bg-a1: url(/@/assets/images/themify/deepblue/alarm/warning-icon-bg-a1.png);
- --image-data-bg: url(/@/assets/images/themify/deepblue/alarm/data-bg.png);
- --image-icon-vent: url(/@/assets/images/themify/deepblue/alarm/icon-vent.svg);
- --image-icon-bg: url(/@/assets/images/themify/deepblue/alarm/icon-bg.png);
- --image-icon-device: url(/@/assets/images/themify/deepblue/alarm/icon-device.svg);
- --image-icon-dust: url(/@/assets/images/themify/deepblue/alarm/icon-dust.svg);
- --image-icon-gas: url(/@/assets/images/themify/deepblue/alarm/icon-gas.svg);
- --image-gallery_I_2: url(/@/assets/images/themify/deepblue/configurable/dusthome/gallery_I_2.png);
- --image-gallery_I_1: url(/@/assets/images/themify/deepblue/configurable/dusthome/gallery_I_1.png);
- }
- }
- .gallery {
- --image-gallery_center: url(/@/assets/images/home-container/configurable/gallery_center.png);
- --image-gallery_1: url(/@/assets/images/home-container/configurable/gallery_1.png);
- --image-deco_2: url(/@/assets/images/home-container/configurable/deco_2.png);
- --image-deco_3: url(/@/assets/images/home-container/configurable/deco_3.png);
- --image-deco_4: url(/@/assets/images/home-container/configurable/deco_4.png);
- --image-img-2: url(/@/assets/images/home-container/configurable/firehome/img-2.png);
- --image-img-1: url(/@/assets/images/home-container/configurable/firehome/img-1.png);
- --image-img-8: url(/@/assets/images/home-container/configurable/dusthome/img-8.png);
- --image-img-9: url(/@/assets/images/home-container/configurable/dusthome/img-9.png);
- --image-sbzs: url(/@/assets/images/home-container/configurable/dusthome/sbzs.png);
- --image-pwkqs: url(/@/assets/images/home-container/configurable/dusthome/pwkqs.png);
- --image-lwsl: url(/@/assets/images/home-container/configurable/dusthome/lwsl.png);
- --image-dwsl: url(/@/assets/images/home-container/configurable/dusthome/dwsl.png);
- --image-img-1: url(/@/assets/images/home-container/configurable/firehome/img-1.png);
- --image-img-7: url(/@/assets/images/home-container/configurable/dusthome/img-7.png);
- --image-img-4: url(/@/assets/images/home-container/configurable/firehome/img-4.png);
- --image-bottom1: url('/@/assets/images/vent/alarm/bottom1.png');
- --image-center-bg: url('/@/assets/images/vent/alarm/center-bg.png');
- --image-warning-icon-bg1: url(/@/assets/images/vent/alarm/warning-icon-bg1.png);
- --image-warning-icon-bg-a1: url(/@/assets/images/vent/alarm/warning-icon-bg-a1.png);
- --image-data-bg: url(/@/assets/images/vent/alarm/data-bg.png);
- --image-icon-vent: url(/@/assets/images/vent/alarm/icon-vent.svg);
- --image-icon-bg: url(/@/assets/images/vent/alarm/icon-bg.png);
- --image-icon-device: url(/@/assets/images/vent/alarm/icon-device.svg);
- --image-icon-dust: url(/@/assets/images/vent/alarm/icon-dust.svg);
- --image-icon-gas: url(/@/assets/images/vent/alarm/icon-gas.svg);
- --image-gallery_I_2: url(/@/assets/images/home-container/configurable/dusthome/gallery_I_2.png);
- --image-gallery_I_1: url(/@/assets/images/home-container/configurable/dusthome/gallery_I_1.png);
- position: relative;
- width: 100%;
- height: 100%;
- }
- .gallery-item_center_A {
- background: var(--image-gallery_center) no-repeat;
- width: 144px;
- height: 126px;
- left: calc(50% - 72px);
- top: calc(50% - 63px);
- position: absolute;
- background-size: 100% 100%;
- }
- .gallery > .gallery-item_A {
- background: var(--image-gallery_1) no-repeat;
- width: 90px;
- height: 90px;
- position: absolute;
- text-align: center;
- background-size: 100% 90px;
- }
- .gallery > .gallery-item_A:nth-child(2) {
- top: 20px;
- left: 60px;
- }
- .gallery > .gallery-item_A:nth-child(3) {
- top: 20px;
- right: 60px;
- }
- .gallery > .gallery-item_A:nth-child(4) {
- bottom: 20px;
- left: 60px;
- }
- .gallery > .gallery-item_A:nth-child(5) {
- bottom: 20px;
- right: 60px;
- }
- .gallery-item_center_B {
- background: var(--image-deco_2) no-repeat;
- width: 100%;
- height: 90%;
- top: 5%;
- position: absolute;
- background-position: center;
- background-size: auto 100%;
- }
- .gallery > .gallery-item_B {
- background: var(--image-deco_3) no-repeat;
- position: absolute;
- text-align: center;
- background-position: center;
- background-size: auto 100%;
- }
- .gallery > .gallery-item_B:nth-child(2) {
- width: 70px;
- height: 70px;
- line-height: 70px;
- top: 20px;
- left: calc(50% - 70px);
- }
- .gallery > .gallery-item_B:nth-child(3) {
- width: 60px;
- height: 60px;
- line-height: 60px;
- top: 50px;
- right: calc(50% - 70px);
- }
- .gallery > .gallery-item_B:nth-child(4) {
- width: 55px;
- height: 55px;
- line-height: 55px;
- bottom: 90px;
- left: calc(50% - 55px);
- }
- .gallery > .gallery-item_B:nth-child(5) {
- width: 50px;
- height: 50px;
- line-height: 50px;
- bottom: 70px;
- right: calc(50% - 50px);
- }
- .gallery-item_B > .gallery-item__label {
- display: none;
- }
- .gallery-item_center_C {
- background: var(--image-deco_4) no-repeat;
- width: 100%;
- height: 100%;
- position: absolute;
- background-position: center;
- background-size: auto 100%;
- z-index: -1;
- }
- .gallery_C {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-around;
- text-align: center;
- }
- .gallery-item_C > .gallery-item__value {
- font-size: 20px;
- }
- .gallery_D {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .gallery-item_center_D {
- background: var(--image-img-2) no-repeat;
- background-size: auto 100%;
- width: 100px;
- height: 100px;
- }
- .gallery > .gallery-item_D {
- background-image: var(--image-img-1);
- background-size: 100% auto;
- width: 213px;
- height: 87px;
- text-align: center;
- padding-top: 17px;
- padding-left: 40px;
- display: none;
- .gallery-item__value {
- font-size: 24px;
- }
- }
- .gallery > .gallery-item_D:nth-child(2) {
- display: block;
- }
- .gallery-item_center_E {
- background: var(--image-img-8) no-repeat;
- width: 200px;
- height: 200px;
- left: calc(50% - 100px);
- top: calc(50% - 100px);
- position: absolute;
- background-size: 100% auto;
- }
- .gallery > .gallery-item_E {
- background: var(--image-img-9) no-repeat;
- width: 100px;
- height: 90px;
- position: absolute;
- text-align: center;
- background-size: 100% 100%;
- .gallery-item__label {
- height: 60px;
- text-align: center;
- background-size: 30px 30px;
- background-position: center top;
- background-repeat: no-repeat;
- padding-top: 30px;
- }
- }
- .gallery > .gallery-item_E:nth-child(2) {
- top: calc(50% - 100px);
- left: calc(50% - 150px);
- .gallery-item__label {
- background-image: var(--image-sbzs);
- }
- }
- .gallery > .gallery-item_E:nth-child(3) {
- top: calc(50% - 100px);
- right: calc(50% - 150px);
- .gallery-item__label {
- background-image: var(--image-pwkqs);
- }
- }
- .gallery > .gallery-item_E:nth-child(4) {
- bottom: calc(50% - 100px);
- left: calc(50% - 150px);
- .gallery-item__label {
- background-image: var(--image-lwsl);
- }
- }
- .gallery > .gallery-item_E:nth-child(5) {
- bottom: calc(50% - 100px);
- right: calc(50% - 150px);
- .gallery-item__label {
- background-image: var(--image-dwsl);
- }
- }
- .gallery > .gallery-item_F {
- width: 120px;
- height: 60px;
- position: absolute;
- text-align: center;
- padding-left: 20px;
- padding-top: 5px;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- background-position: center;
- background-image: var(--image-img-1);
- .gallery-item__value {
- font-size: 20px;
- }
- }
- .gallery > .gallery-item_F:nth-child(2) {
- top: calc(50% - 60px);
- left: calc(50% - 180px);
- width: 120px;
- height: 120px;
- line-height: 120px;
- padding: 0;
- background-image: var(--image-img-7);
- .gallery-item__label {
- display: none;
- }
- }
- .gallery > .gallery-item_F:nth-child(3) {
- top: calc(50% - 62px);
- left: calc(50% - 60px);
- }
- .gallery > .gallery-item_F:nth-child(4) {
- top: calc(50% - 62px);
- left: calc(50% + 60px);
- }
- .gallery > .gallery-item_F:nth-child(5) {
- bottom: calc(50% - 62px);
- left: calc(50% - 60px);
- }
- .gallery > .gallery-item_F:nth-child(6) {
- bottom: calc(50% - 62px);
- left: calc(50% + 60px);
- }
- .gallery > .gallery-item_G {
- width: 120px;
- height: 120px;
- position: absolute;
- text-align: center;
- padding-top: 34px;
- background-size: 100% 100%;
- background-repeat: no-repeat;
- background-position: center;
- background-image: var(--image-img-4);
- .gallery-item__value {
- font-size: 20px;
- }
- }
- .gallery > .gallery-item_G:nth-child(2) {
- top: calc(50% - 60px);
- left: calc(50% - 60px);
- }
- .gallery > .gallery-item_G:nth-child(3) {
- top: calc(50% - 60px);
- left: calc(50% - 160px);
- transform: scale(0.8);
- }
- .gallery > .gallery-item_G:nth-child(4) {
- top: calc(50% - 60px);
- right: calc(50% - 160px);
- transform: scale(0.8);
- }
- .gallery > .gallery-item_G:nth-child(5) {
- top: calc(50% - 110px);
- left: calc(50% - 230px);
- transform: scale(0.7);
- }
- .gallery > .gallery-item_G:nth-child(6) {
- bottom: calc(50% - 110px);
- left: calc(50% - 230px);
- transform: scale(0.7);
- }
- .gallery > .gallery-item_G:nth-child(7) {
- top: calc(50% - 110px);
- right: calc(50% - 230px);
- transform: scale(0.7);
- }
- .gallery > .gallery-item_G:nth-child(8) {
- bottom: calc(50% - 110px);
- right: calc(50% - 230px);
- transform: scale(0.7);
- }
- .gallery_H {
- background-image: var(--image-bottom1), var(--image-center-bg);
- background-repeat: no-repeat, no-repeat;
- background-size:
- auto 90%,
- auto 90%;
- background-position: center, center;
- position: relative;
- }
- .gallery > .gallery-item_H {
- width: 100px;
- height: 70px;
- display: flex;
- position: absolute;
- text-align: center;
- justify-content: space-evenly;
- background-repeat: no-repeat;
- }
- .gallery > .gallery-item_H:nth-child(2) {
- top: 0%;
- left: calc(50% - 150px);
- width: 300px;
- height: 200px;
- padding-top: 50px;
- background-image: var(--image-warning-icon-bg1), var(--image-warning-icon-bg-a1);
- background-size:
- auto 100%,
- auto 46%;
- background-position:
- center top,
- center 28%;
- display: block;
- }
- .gallery > .gallery-item_H:nth-child(3) {
- top: calc(50% - 60px);
- left: calc(50% - 170px);
- background-image: var(--image-data-bg), var(--image-icon-vent), var(--image-icon-bg);
- background-size:
- 100% auto,
- auto 46%,
- 50% 20%;
- background-position:
- center top,
- center 80%,
- center bottom;
- }
- .gallery > .gallery-item_H:nth-child(4) {
- top: calc(50% + 10px);
- left: calc(50% - 170px);
- background-image: var(--image-data-bg), var(--image-icon-device), var(--image-icon-bg);
- background-size:
- 100% auto,
- auto 46%,
- 50% 20%;
- background-position:
- center top,
- center 80%,
- center bottom;
- }
- .gallery > .gallery-item_H:nth-child(5) {
- top: calc(50% - 60px);
- right: calc(50% - 170px);
- background-image: var(--image-data-bg), var(--image-icon-dust), var(--image-icon-bg);
- background-size:
- 100% auto,
- auto 46%,
- 50% 20%;
- background-position:
- center top,
- center 80%,
- center bottom;
- }
- .gallery > .gallery-item_H:nth-child(6) {
- top: calc(50% + 10px);
- right: calc(50% - 170px);
- background-image: var(--image-data-bg), var(--image-icon-gas), var(--image-icon-bg);
- background-size:
- 100% auto,
- auto 46%,
- 50% 20%;
- background-position:
- center top,
- center 80%,
- center bottom;
- }
- .gallery > .gallery-item_I {
- width: 120px;
- height: 30px;
- position: absolute;
- background-size: 100% auto;
- background-repeat: no-repeat;
- background-position: bottom;
- background-image: var(--image-gallery_I_2);
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 10px;
- .gallery-item__value {
- font-size: 20px;
- }
- }
- .gallery > .gallery-item_I:nth-child(2) {
- top: calc(50% - 51px);
- left: calc(50% - 200px);
- width: 110px;
- height: 102px;
- line-height: 102px;
- padding: 0;
- background-image: var(--image-gallery_I_1);
- .gallery-item__label {
- display: none;
- }
- .gallery-item__value {
- width: 100%;
- text-align: center;
- font-size: 24px;
- }
- }
- .gallery > .gallery-item_I:nth-child(3) {
- top: calc(50% - 35px);
- left: calc(50% - 70px);
- }
- .gallery > .gallery-item_I:nth-child(4) {
- top: calc(50% - 35px);
- left: calc(50% + 70px);
- }
- .gallery > .gallery-item_I:nth-child(5) {
- bottom: calc(50% - 35px);
- left: calc(50% - 70px);
- }
- .gallery > .gallery-item_I:nth-child(6) {
- bottom: calc(50% - 35px);
- left: calc(50% + 70px);
- }
- .gallery-item__value_red {
- color: red;
- }
- .gallery-item__value_orange {
- color: orange;
- }
- .gallery-item__value_yellow {
- color: yellow;
- }
- .gallery-item__value_green {
- color: yellowgreen;
- }
- .gallery-item__value_blue {
- color: @vent-table-action-link;
- }
- .gallery-item__value_white {
- color: white;
- }
- .gallery-item__value_lightblue {
- color: @vent-configurable-home-light-border;
- }
- </style>
|