修改选中船

This commit is contained in:
浅念
2025-06-20 13:38:42 +08:00
parent cf78092197
commit d5544b1aef
3 changed files with 27 additions and 14 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

+3
View File
@@ -74,6 +74,9 @@ $(".citylist").on('click', '.item', function() {
$(".departure_time").html(data.departure_time)
$(".status").html(data.status)
$(".arrival_time").html(data.arrival_time)
if(data.ship_id&&data.ship_id!=null&&data.ship_id!=''){
Global(chinaGeoCoordMap,nameMap,localStorage.getItem("lang"),data.ship_id)
}
});
//初始化滚动
function listsc() {
+24 -14
View File
@@ -2898,7 +2898,7 @@ var roters=[
// }
// }));
function Global(chinaGeoCoordMap, nameMap, isshow) {
function Global(chinaGeoCoordMap, nameMap, isshow,shipid) {
// console.log(isshow)
// 从世界数据中移除中国部分
@@ -2910,19 +2910,29 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
echarts.registerMap('china-africa', africa);
// console.log(lineDatas)
var shipList = function(){
var routePoints = shipListdatas.map(point => ({
name: point.ship_name,
id: point.id,
dest: point.port,
eta: point.last_time,
value:[point.lng,point.lat],
num:point.count,
symbol: 'image://img/luncx.png',
symbolSize:60,
itemStyle: {
color: '#fff'
}
}))
var routePoints=[]
$.each(shipListdatas,function(){
var imgs = 'image://img/luncx.png'
var symbolSize = 60
if(shipid&&shipid==this.id){
imgs = 'image://img/luncin.png'
symbolSize =80
}
var obj = {
name: this.ship_name,
id: this.id,
dest: this.port,
eta: this.last_time,
value:[this.lng,this.lat],
num:this.count,
symbol: imgs,
symbolSize:symbolSize,
itemStyle: {
color: '#fff'
}
}
routePoints.push(obj)
});
return routePoints
}
//生产城市