| | |
| | | <BasicMap |
| | | ref="normalMapRef" |
| | | v-show="!isFullscreen" |
| | | :isFullscreen="false" |
| | | class="h-full" |
| | | :data="data" |
| | | @markerClick="markerClick" |
| | | @closeInfoWindow="closeInfoWindow" |
| | | @toggleFullScreen="toggleFullScreen" |
| | | |
| | | /> |
| | | <!-- 全屏按钮 --> |
| | | <div class="absolute right-2 top-2 cursor-pointer" @click="toggleFullScreen"> |
| | | <!-- <div class="absolute right-2 top-2 cursor-pointer" @click="toggleFullScreen"> |
| | | <el-tooltip content="全屏展开" placement="top"> |
| | | <div class="ywifont text-[20px] text-black rounded-lg ywicon-fullscreen"></div> |
| | | <div class="ywifont !text-[20px] text-black rounded-lg ywicon-fullscreen"></div> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <!-- Teleport 全屏地图 --> |
| | | <Teleport to=".layout-parent"> |
| | | <Transition name="fullscreen"> |
| | | <div v-if="isRenderFullscreen" v-show="isFullscreen" class="absolute inset-0 z-50 w-full h-full"> |
| | | <BasicMap ref="fullScreenMapRef" :config="fullScreenMapConfig" class="h-full" :data="data" @markerClick="markerClick" @closeInfoWindow="closeInfoWindow" /> |
| | | <div class="absolute right-2 top-2 cursor-pointer" @click="toggleFullScreen"> |
| | | <BasicMap |
| | | ref="fullScreenMapRef" |
| | | :config="fullScreenMapConfig" |
| | | :isFullscreen="true" |
| | | class="h-full" |
| | | :data="data" |
| | | @markerClick="markerClick" |
| | | @closeInfoWindow="closeInfoWindow" |
| | | @toggleFullScreen="toggleFullScreen" |
| | | /> |
| | | <!-- <div class="absolute right-2 top-2 cursor-pointer" @click="toggleFullScreen"> |
| | | <el-tooltip content="退出全屏(Esc)" placement="top"> |
| | | <div class="ywifont text-[20px] text-black rounded-lg ywicon-tuichuquanping"></div> |
| | | <div class="ywifont !text-[20px] text-black rounded-lg ywicon-tuichuquanping"></div> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> --> |
| | | <div class="absolute bottom-0 w-full"> |
| | | <EquipCurve |
| | | v-model:isShow="chartDlgIsShow" |
| | |
| | | :tableHeight="240" |
| | | /> |
| | | </div> |
| | | <SmallChat class="absolute bottom-0 right-[50%] " :olMap="fullScreenOlMap" /> |
| | | </div> |
| | | </Transition> |
| | | </Teleport> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import 'ol/ol.css'; |
| | | import { nextTick, onDeactivated, onMounted, onUnmounted, ref } from 'vue'; |
| | | import { computed, nextTick, onDeactivated, onMounted, onUnmounted, ref } from 'vue'; |
| | | import EquipCurve from '../components/EquipCurve.vue'; |
| | | import BasicMap from './BasicMap.vue'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import SmallChat from '/@/components/chat/smallChat/index.vue'; |
| | | import { GaoDeSourceType } from '/@/model/map/OLMap'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | const isRenderFullscreen = ref(false); |
| | | |
| | | const isFullscreen = ref(false); |
| | | const props = defineProps(['data']); |
| | | const normalMapRef = useCompRef(BasicMap); |
| | | const fullScreenMapRef = useCompRef(BasicMap); |
| | | const fullScreenOlMap = computed(() => fullScreenMapRef.value?.olMap); |
| | | const emit = defineEmits(['equipClick', 'closeInfoWindow']); |
| | | |
| | | const markerClick = (row) => { |
| | |
| | | emit('closeInfoWindow'); |
| | | } |
| | | }; |
| | | |
| | | |
| | | const fullScreenMapConfig = ref({ |
| | | sourceType: GaoDeSourceType.Vector, |
| | |
| | | onMounted(async () => { |
| | | // 添加 ESC 键监听 |
| | | document.addEventListener('keydown', handleEscKey); |
| | | toggleFullScreen(); |
| | | }); |
| | | |
| | | onDeactivated(async () => { |