This commit is contained in:
duanliang
2025-04-28 23:30:33 +08:00
3 changed files with 28 additions and 28 deletions

View File

@@ -107,10 +107,10 @@
import { getWeatherApi } from '@/api/home'
import { getSpotListApi } from '@/api/sentiment'
import { getHotelListApi } from '@/api/hotel'
import pubSub from 'pubsub-js'
import { useScenicStore } from '@/stores/scenic'
const scenicStore = useScenicStore()
const router = useRouter()
@@ -156,7 +156,7 @@
router.push('/home')
}
const handleCommand = (item, type) => {
current.value = ''
if (type === 'hotel') {
otherRightLabel.value = '其他场馆'
@@ -177,7 +177,7 @@
break
}
}
// 点击导航
const handleNav = (item) => {
console.log(item,router.currentRoute.value.path,'测试一下 ')
@@ -241,7 +241,7 @@
{ name:'车船', path:'/vehicles'},
// { name: '工单', path: '/workOrder' },
{ name: '舆情', path: '/sentiment' },
{ name: '酒店', path: '/hotel' }
{ name: '场馆', path: '/hotel' }
]
break
case '/vehicles':
@@ -254,7 +254,7 @@
isBack.value = true
let res = await getSpotListApi()
navLeft.value = res.data
current.value = res.data[0].id
title.value = navLeft.value[0].name
pubSub.publish('scenicChange', navLeft.value[0])
@@ -304,8 +304,8 @@
current.value = navLeft.value[0].id
title.value = navLeft.value[0].name
}
break
case '/sceneTesting':
title.value = '三峡之巅-异常检测'
@@ -374,8 +374,8 @@
)
onMounted(async() => {
// 获取查询参数
PubSub.subscribe('navToChange', (msg, data) => {
monitorDefaultData.value = data
console.log(monitorDefaultData.value,'monitorDefaultData.valuemonitorDefaultData.value')
@@ -389,8 +389,8 @@
// pubSub.publish('monitorChange', res.data[1])
// },2000)
// })
})
getWeather()
getSpotList()

View File

@@ -1,7 +1,7 @@
<template>
<div class="box-1">
<div class="statistics">
<Title1 title="总路段拥堵情况" />
<Title1 title="拥堵情况" />
<!-- <div class="item-box">
<div class="item-t flex"> <img src="@/assets/images/t-icon-1.png" alt="" />拥堵总数 </div>
<div class="item-num">
@@ -55,9 +55,9 @@
</div>
</div>
</div>
<div class="chart-item">
<Title3 title="拥堵类型频次占比" />
<Title3 title="拥堵类型频次" />
<div class="chart__inner">
<div class="new-vehicle">
<vehicle-source :list="chartData.typeNum" />
@@ -71,11 +71,11 @@
>
<p class="dot" :style="{ background: colors[index] }" />
<p class="name">{{ item.name }}</p>
<p class="value">{{ item.value }}%</p>
<p class="value">{{ item.value }}</p>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
@@ -102,9 +102,9 @@
</div>
</div>
</div>
<div class="chart-item">
<Title3 title="拥堵类型时长占比" />
<Title3 title="拥堵类型时长" />
<div class="chart__inner">
<div class="new-vehicle">
<!-- <spotRate
@@ -122,11 +122,11 @@
>
<p class="dot" :style="{ background: colors[index] }" />
<p class="name">{{ item.name }}</p>
<p class="value">{{ item.value }}%</p>
<p class="value">{{ item.value }}分钟</p>
</li>
</ul>
</div>
</div>
</div>
</div>
@@ -206,7 +206,7 @@
display: flex;
justify-content: center;
height: vh(380);
}
&__legend {

View File

@@ -14,7 +14,7 @@
<div>
<div class="title-1">
<div class="title">
<span> 核心路段 </span>
<span> 核心路段 </span>
</div>
</div>
<div id="traffic-map" class="traffic-map-big" :class="{ 'traffic-map': routers.length > 0 }" />
@@ -131,12 +131,12 @@
watch(
() => [markerList.value,map.value],
(val) => {
if(val[0].length&&val[1]){
nextTick(()=>{
val[0].forEach((item,index)=>{
addMarker(mapIcon,[item.longitude,item.latitude],[40, 60])
marker.value.addEventListener('click', (e) => {
console.log(item,'111111111111')
cameraIndexCode.value = item.cameraIndexCode
@@ -171,10 +171,10 @@
label.setStyle({
display:'none'
});
})
})
})
}
},