无人机管理后台前端(已迁走)
张含笑
2025-06-14 74f3a7dcedba7e9aeac99287c3daf666a726d1d6
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
47
48
49
50
51
52
53
54
55
56
57
58
59
<!--
 * @Author       : yuan
 * @Date         : 2025-06-05 15:57:45
 * @LastEditors  : yuan
 * @LastEditTime : 2025-06-06 14:02:54
 * @FilePath     : \src\components\PanoramaPopup\PanoramaPopup.vue
 * @Description  : 
 * Copyright 2025 OBKoro1, All Rights Reserved. 
 * 2025-06-05 15:57:45
-->
<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(() => {
console.log('panoramaParamsShow',panoramaParamsShow.value ,panoramaParamsUrl.value);
 
    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>