This commit is contained in:
duanliang
2025-04-17 20:18:38 +08:00
parent d7eeea3efe
commit 09dcabadda
23 changed files with 1302 additions and 269 deletions

View File

@@ -20,7 +20,7 @@
</div>
</div>
<div class="main">
<!-- <div @click="hanldeToDetails" class="look-btn">查看详情</div> -->
<div @click="hanldeToDetails" class="look-btn">查看详情</div>
<iframe v-if="scenicSpotId == 'root000000'" width="100%" height="100%" src="/map/sxzd/bdc.html"></iframe>
<iframe v-if="scenicSpotId == 'root00000000'" width="100%" height="100%" src="/map/sxzd/sxzd.html"></iframe>
<iframe v-if="scenicSpotId == '龙桥河'" width="100%" height="100%" src="/map/lqh/lqh.html"></iframe>
@@ -103,14 +103,14 @@
<script setup>
import countup from 'vue-countup-v3'
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
import { getSpotListApi } from '@/api/sentiment'
import { useRouter } from 'vue-router'
import { useScenicStore } from '@/stores/scenic'
import { useMap } from '@/hooks/map'
import {getPreviewUrlApi} from "@/api/home.js";
import pubSub from 'pubsub-js'
const router = useRouter()
const scenicStore = useScenicStore()
const { initMap, addMarker, map, marker } = useMap()
@@ -126,8 +126,13 @@
const handleMore = () => {
router.push('/workOrder')
}
const hanldeToDetails = ()=>{
router.push('/traffic')
let hrefItem = ref(null)
const hanldeToDetails = async()=>{
// let spotRes = await getSpotListApi()
// return false;
pubSub.publish('navToChange',hrefItem.value)
router.push('/monitor')
}
let src = ref('')
let cameraIndexCode = ref('')
@@ -144,29 +149,31 @@
}
});
// onMounted(() => {
// scenicChange = PubSub.subscribe('scenicChange', (msg, data) => {
// initMap('scenic-map', data.lng, data.lat, 15)
// map.value.setDisplayOptions({
// poiText: false, // 隐藏poi标注
// poiIcon: false, // 隐藏poi图标
// building: false // 隐藏楼块
// })
// var bounds = new BMapGL.Bounds(
// new BMapGL.Point(109.604998,31.030391),
// new BMapGL.Point(109.624833,31.044965)
// )
// var imgOverlay = new BMapGL.GroundOverlay(bounds, {
// type: 'image',
// url: sxzd,
// opacity: 1
// })
// map.value.addOverlay(imgOverlay)
// })
// })
// onUnmounted(() => {
// PubSub.unsubscribe(scenicChange)
// })
onMounted(() => {
scenicChange = PubSub.subscribe('scenicChange', (msg, data) => {
hrefItem.value = data
console.log(data,'llllllllllllllllllllllllllllllll')
// initMap('scenic-map', data.lng, data.lat, 15)
// map.value.setDisplayOptions({
// poiText: false, // 隐藏poi标注
// poiIcon: false, // 隐藏poi图标
// building: false // 隐藏楼块
// })
// var bounds = new BMapGL.Bounds(
// new BMapGL.Point(109.604998,31.030391),
// new BMapGL.Point(109.624833,31.044965)
// )
// var imgOverlay = new BMapGL.GroundOverlay(bounds, {
// type: 'image',
// url: sxzd,
// opacity: 1
// })
// map.value.addOverlay(imgOverlay)
})
})
onUnmounted(() => {
PubSub.unsubscribe(scenicChange)
})
</script>
<style scoped lang="scss">
@@ -243,7 +250,7 @@
.look-btn{
position: absolute;
right: vw(20);
top: 50%;
top: 10%;
transform: translateY(-50%);
padding: vw(12);
display: flex;
@@ -252,6 +259,7 @@
border-radius: vw(4);
font-size: vw(14);
color: #fff;
z-index: 999;
}
.scenic-box {
width: 100%;