修改选中船

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) $(".departure_time").html(data.departure_time)
$(".status").html(data.status) $(".status").html(data.status)
$(".arrival_time").html(data.arrival_time) $(".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() { 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) // console.log(isshow)
// 从世界数据中移除中国部分 // 从世界数据中移除中国部分
@@ -2910,19 +2910,29 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
echarts.registerMap('china-africa', africa); echarts.registerMap('china-africa', africa);
// console.log(lineDatas) // console.log(lineDatas)
var shipList = function(){ var shipList = function(){
var routePoints = shipListdatas.map(point => ({ var routePoints=[]
name: point.ship_name, $.each(shipListdatas,function(){
id: point.id, var imgs = 'image://img/luncx.png'
dest: point.port, var symbolSize = 60
eta: point.last_time, if(shipid&&shipid==this.id){
value:[point.lng,point.lat], imgs = 'image://img/luncin.png'
num:point.count, symbolSize =80
symbol: 'image://img/luncx.png', }
symbolSize:60, var obj = {
itemStyle: { name: this.ship_name,
color: '#fff' 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 return routePoints
} }
//生产城市 //生产城市