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

View File

@@ -11,9 +11,6 @@
placeholder="设备号/设备名称SIM卡号"
@input="onInput"
>
<!-- <template #suffix>
<img src="@/assets/images/search-icon-1.png" alt="" />
</template> -->
</el-input>
<ul class="tabs">
<li
@@ -62,7 +59,13 @@
import closeIcon from '@/assets/images/close.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 shipStopIcon from '@/assets/images/ship-stop.png'
import shipOfflineIcon from '@/assets/images/ship-offline.png'
import icon13 from '@/assets/images/icon-13.png'
import icon14 from '@/assets/images/icon-14.png'
import icon15 from '@/assets/images/icon-15.png'
@@ -184,7 +187,15 @@
} else {
props.carList.map((item, i) => {
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) => {
e.sim = e.target.sim
currentMarker.value = e
@@ -230,7 +241,15 @@
} else {
props.shipList.map((item, i) => {
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) => {
currentMarker.value = e
let obj = props.shipList.find((item) => item.sim == e.target.sim)