1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <div class="icon-light">
- <template v-for="(item, index) in pointList" :key="index">
- <div class="icon-point" @click="openModal(item.code, item.leftV, item.topV)" :style="{ left: item.leftV, top: item.topV }">
- <img :src="item.imgSrc" alt="" />
- <span :style="{ color: item.textColor }">{{ item.label }}</span>
- </div>
- </template>
- </div>
- </template>
- <script setup lang="ts">
- import { ref, defineEmits } from 'vue';
- import { getAssetURL } from '/@/utils/ui';
- const emit = defineEmits(['showDetail']);
- const unselectBgPath = getAssetURL('company/home/unselect-bg.png');
- const selectBgPath = getAssetURL('company/home/select-bg.png');
- let pointList = ref<any[]>([
- // { code: 'liuTa', imgSrc: unselectBgPath, label: 'lt', leftV: '327px', topV: '40px', textColor: '#fff' },
- // { code: 'cunCaoErTa', imgSrc: unselectBgPath, label: 'cce', leftV: '291px', topV: '69px', textColor: '#fff' },
- // { code: 'buErTaiTa', imgSrc: selectBgPath, label: 'bet', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },
- // { code: 'wuLunTa', imgSrc: unselectBgPath, label: 'wlml', leftV: '327px', topV: '115px', textColor: '#fff' },
- // { code: 'cunCaoTa', imgSrc: selectBgPath, label: 'cc', leftV: '346px', topV: '132px', textColor: 'rgba(255, 231, 83,.9)' },
- // { code: 'shiKanTa', imgSrc: unselectBgPath, label: 'skt', leftV: '373px', topV: '149px', textColor: '#fff' },
- // { code: 'buLieTa', imgSrc: selectBgPath, label: 'blt', leftV: '408px', topV: '184px', textColor: 'rgba(255, 231, 83,.9)' },
- // { code: 'haLaGouTa', imgSrc: unselectBgPath, label: 'hlg', leftV: '445px', topV: '214px', textColor: '#fff' },
- // { code: 'shangWanTa', imgSrc: selectBgPath, label: 'sw', leftV: '439px', topV: '244px', textColor: 'rgba(255, 231, 83,.9)' },
- // { code: 'huoJiTuTa', imgSrc: unselectBgPath, label: 'hjt', leftV: '398px', topV: '265px', textColor: '#fff' },
- // { code: 'daLiuTa', imgSrc: unselectBgPath, label: 'dlt', leftV: '492px', topV: '260px', textColor: '#fff' },
- // { code: 'jinJieTa', imgSrc: selectBgPath, label: 'jj', leftV: '565px', topV: '413px', textColor: 'rgba(255, 231, 83,.9)' },
- // { code: 'yuJiaTa', imgSrc: unselectBgPath, label: 'yjl', leftV: '669px', topV: '308px', textColor: '#fff' },
- // { code: 'baoDeTa', imgSrc: selectBgPath, label: 'bd', leftV: '862px', topV: '340px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'liuTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '327px', topV: '40px', textColor: '#fff' },
- { code: 'cunCaoErTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '291px', topV: '69px', textColor: '#fff' },
- { code: 'buErTaiTa', imgSrc: selectBgPath, label: 'XXX', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'wuLunTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '327px', topV: '115px', textColor: '#fff' },
- { code: 'cunCaoTa', imgSrc: selectBgPath, label: 'XXX', leftV: '346px', topV: '132px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'shiKanTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '373px', topV: '149px', textColor: '#fff' },
- { code: 'buLieTa', imgSrc: selectBgPath, label: 'XXX', leftV: '408px', topV: '184px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'haLaGouTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '445px', topV: '214px', textColor: '#fff' },
- { code: 'shangWanTa', imgSrc: selectBgPath, label: 'XXX', leftV: '439px', topV: '244px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'huoJiTuTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '398px', topV: '265px', textColor: '#fff' },
- { code: 'daLiuTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '492px', topV: '260px', textColor: '#fff' },
- { code: 'jinJieTa', imgSrc: selectBgPath, label: 'XXX', leftV: '565px', topV: '413px', textColor: 'rgba(255, 231, 83,.9)' },
- { code: 'yuJiaTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '669px', topV: '308px', textColor: '#fff' },
- { code: 'baoDeTa', imgSrc: selectBgPath, label: 'XXX', leftV: '862px', topV: '340px', textColor: 'rgba(255, 231, 83,.9)' },
- ]);
- function openModal(code, leftV, topV) {
- emit('showDetail', code, leftV, topV);
- }
- </script>
- <style lang="less" scoped>
- .icon-light {
- position: relative;
- width: 100%;
- height: 100%;
- .icon-point {
- display: flex;
- align-items: center;
- position: absolute;
- img {
- width: 35px;
- height: 35px;
- cursor: pointer;
- }
- span {
- font-size: 12px;
- padding: 0px 5px;
- background-color: rgba(12, 13, 13);
- }
- }
- }
- </style>
|