feat:完善地图上车船图标

This commit is contained in:
zjc
2025-03-10 16:21:02 +08:00
parent e31a1bc2f4
commit 8c985befd7
8 changed files with 30 additions and 7 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -173,19 +173,23 @@
router.push(item.path) router.push(item.path)
} else { } else {
if (current.value === item.id) return if (current.value === item.id) return
otherLeftLabel.value = '其他酒店'
otherRightLabel.value = '其他场馆'
current.value = item.id current.value = item.id
switch (router.currentRoute.value.path) { switch (router.currentRoute.value.path) {
case '/scenic': case '/scenic':
title.value = item.name title.value = item.name
otherLeftLabel.value = '其他景区'
otherRightLabel.value = ''
pubSub.publish('scenicChange', item) pubSub.publish('scenicChange', item)
break break
case '/monitor': case '/monitor':
title.value = item.name title.value = item.name
otherLeftLabel.value = '其他景区'
otherRightLabel.value = ''
pubSub.publish('monitorChange', item) pubSub.publish('monitorChange', item)
break break
case '/hotel': case '/hotel':
otherLeftLabel.value = '其他酒店'
otherRightLabel.value = '其他场馆'
pubSub.publish('hotelChange', item) pubSub.publish('hotelChange', item)
break break
} }

View File

@@ -11,9 +11,6 @@
placeholder="设备号/设备名称SIM卡号" placeholder="设备号/设备名称SIM卡号"
@input="onInput" @input="onInput"
> >
<!-- <template #suffix>
<img src="@/assets/images/search-icon-1.png" alt="" />
</template> -->
</el-input> </el-input>
<ul class="tabs"> <ul class="tabs">
<li <li
@@ -62,7 +59,13 @@
import closeIcon from '@/assets/images/close.png' import closeIcon from '@/assets/images/close.png'
import carIcon from '@/assets/images/car.png' import carIcon from '@/assets/images/car.png'
import carStopIcon from '@/assets/images/car-stop.png'
import carOfflineIcon from '@/assets/images/car-offline.png'
import shipIcon from '@/assets/images/ship.png' import shipIcon from '@/assets/images/ship.png'
import shipStopIcon from '@/assets/images/ship-stop.png'
import shipOfflineIcon from '@/assets/images/ship-offline.png'
import icon13 from '@/assets/images/icon-13.png' import icon13 from '@/assets/images/icon-13.png'
import icon14 from '@/assets/images/icon-14.png' import icon14 from '@/assets/images/icon-14.png'
import icon15 from '@/assets/images/icon-15.png' import icon15 from '@/assets/images/icon-15.png'
@@ -184,7 +187,15 @@
} else { } else {
props.carList.map((item, i) => { props.carList.map((item, i) => {
if (item.lng && item.lat) { if (item.lng && item.lat) {
addMarker(carIcon, [item.lng, item.lat], [36, 50]) if (item.status == '行驶') {
addMarker(carIcon, [item.lng, item.lat], [36, 50])
}
if (item.status == '离线') {
addMarker(carOfflineIcon, [item.lng, item.lat], [36, 50])
}
if (item.status == '静止') {
addMarker(carStopIcon, [item.lng, item.lat], [36, 50])
}
marker.value.addEventListener('click', (e) => { marker.value.addEventListener('click', (e) => {
e.sim = e.target.sim e.sim = e.target.sim
currentMarker.value = e currentMarker.value = e
@@ -230,7 +241,15 @@
} else { } else {
props.shipList.map((item, i) => { props.shipList.map((item, i) => {
if (item.lng && item.lat) { if (item.lng && item.lat) {
addMarker(shipIcon, [item.lng, item.lat], [36, 50]) if (item.status == '行驶') {
addMarker(shipIcon, [item.lng, item.lat], [36, 50])
}
if (item.status == '离线') {
addMarker(shipOfflineIcon, [item.lng, item.lat], [36, 50])
}
if (item.status == '静止') {
addMarker(shipStopIcon, [item.lng, item.lat], [36, 50])
}
marker.value.addEventListener('click', (e) => { marker.value.addEventListener('click', (e) => {
currentMarker.value = e currentMarker.value = e
let obj = props.shipList.find((item) => item.sim == e.target.sim) let obj = props.shipList.find((item) => item.sim == e.target.sim)