feat:完善景区首页-车船状态区分
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
import { getGpsListApi, getGpsStatusListApi } from '@/api/scenic'
|
import { getGpsListApi, getGpsStatusListApi } from '@/api/scenic'
|
||||||
|
|
||||||
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 carStopIcon from '@/assets/images/car-stop.png'
|
||||||
import carOfflineIcon from '@/assets/images/car-offline.png'
|
import carOfflineIcon from '@/assets/images/car-offline.png'
|
||||||
@@ -219,7 +220,7 @@
|
|||||||
lat: props.shipList[j].lat
|
lat: props.shipList[j].lat
|
||||||
})
|
})
|
||||||
flag = true
|
flag = true
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,7 +312,12 @@
|
|||||||
import PubSub from 'pubsub-js'
|
import PubSub from 'pubsub-js'
|
||||||
|
|
||||||
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 age from './age'
|
import age from './age'
|
||||||
import jam from './jam'
|
import jam from './jam'
|
||||||
@@ -382,13 +387,21 @@
|
|||||||
lat: val.car.list[j].lat
|
lat: val.car.list[j].lat
|
||||||
})
|
})
|
||||||
flag = true
|
flag = true
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val.car.list.map((item, i) => {
|
val.car.list.map((item, i) => {
|
||||||
|
if (item.status == '行驶') {
|
||||||
addMarker(carIcon, [item.lng, item.lat], [36, 50])
|
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])
|
||||||
|
}
|
||||||
carOverlays.value[i] = marker.value
|
carOverlays.value[i] = marker.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -404,13 +417,21 @@
|
|||||||
lat: val.ship.list[j].lat
|
lat: val.ship.list[j].lat
|
||||||
})
|
})
|
||||||
flag = true
|
flag = true
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val.ship.list.map((item, i) => {
|
val.ship.list.map((item, i) => {
|
||||||
|
if (item.status == '行驶') {
|
||||||
addMarker(shipIcon, [item.lng, item.lat], [36, 50])
|
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])
|
||||||
|
}
|
||||||
shipOverlays.value[i] = marker.value
|
shipOverlays.value[i] = marker.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user