无人机管理后台前端(已迁走)
张含笑
2025-09-01 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
    <el-dialog
        modal-class="showFullScreenDlg"
        v-model="panoramaParamsShow"
        :close-on-click-modal="false"
        :destroy-on-close="true"
        fullscreen
    >
        <iframe :src="iframeSrc" frameborder="0"></iframe>
    </el-dialog>
</template>
 
<script setup>
import { getPanoramaDetails } from '@/api/panorama/index'
import { getShowImg } from '@/utils/util'
 
import EventBus from '@/utils/eventBus'
 
const panoramaParamsShow = defineModel('panoramaParamsShow', {
    default: false,
})
const panoramaParamsUrl = defineModel('panoramaParamsUrl', {
    default: '',
})
const iframeSrc = computed(() => {
    if (!panoramaParamsUrl.value) return ''
    return `https://wrj.shuixiongit.com/dronePanorama/html/simple-index.html?path=${getShowImg(panoramaParamsUrl.value)}`
})
 
const initPanorama = id => {
    getPanoramaDetails(id).then(res => {
        panoramaParamsUrl.value = res.data.data.link
        panoramaParamsShow.value = true
    })
}
 
onMounted(() => {
    EventBus.on('initPanorama', initPanorama)
})
 
onBeforeUnmount(() => {
    EventBus.off('initPanorama', initPanorama)
})
</script>
 
<style lang="scss" scoped></style>