修改样式

This commit is contained in:
浅念
2025-06-13 16:41:18 +08:00
parent 94f378cadb
commit b6002cfa68
5 changed files with 144 additions and 55 deletions
+108 -22
View File
@@ -2913,6 +2913,8 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
var routePoints = shipListdatas.map(point => ({
name: point.ship_name,
id: point.id,
dest: point.dest,
eta: point.eta,
value:[point.lng,point.lat],
num:point.count,
symbol: 'image://img/luncx.png',
@@ -2935,6 +2937,7 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
}
var routePoints = production.map(point => ({
name: point.name,
name_en: point.name_en,
id: point.id,
value:[point.lng,point.lat],
num:point.vehicle_count,
@@ -3229,23 +3232,44 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
type: 'scatter',
coordinateSystem: 'geo',
data: shipList(),
symbolSize: 30,
// symbolSize: 30,
z: 9999,
label: {
show: true,
formatter: function(params) {
if (params.name) {
return params.name+' '+(params.data.num ? params.data.num : isNaN(params.data.num) ? 0 :
parseInt(params.data.num));
return [
'{name|' + params.name + '}{num|' + (params.data.num ? params.data.num : isNaN(params.data.num) ? 0 : parseInt(params.data.num)) + '}',
'{name| DEST:' + params.data.dest + '}',
'{name|ETA:' + params.data.eta + '}'
].join('\n');
}
},
position: 'top',
distance: 5,
color: '#fff',
fontSize: 12,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: [4, 4],
borderRadius: 2
backgroundColor: {
type: 'pattern',
image: 'img/mapbg1.png',
repeat: 'no-repeat'
},
padding: [20, 18],
rich: {
name: {
fontSize: 14,
color: '#fff',
padding: [4, 4]
},
num: {
fontSize: 12,
color: '#ffffff',
backgroundColor: '#ff0000',
padding: [4, 4],
borderRadius: 4,
align: 'right'
}
}
},
emphasis: {
label: {
@@ -3290,17 +3314,32 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
show: true,
formatter: function(params) {
if (params.name) {
return params.name+' '+(params.data.num ? params.data.num : isNaN(params.data.num) ? 0 :
parseInt(params.data.num));
return '{name|' + params.data.name_en + '}{num|' + (params.data.num ? params.data.num : isNaN(params.data.num) ? 0 : parseInt(params.data.num)) + '}';
}
},
position: 'top',
distance: 5,
color: '#fff',
fontSize: 12,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
backgroundColor: '#00a6c9',
padding: [4, 4],
borderRadius: 2,
rich: {
name: {
fontSize: 14,
color: '#fff',
padding: [4, 4]
},
num: {
fontSize: 12,
color: '#ffffff',
backgroundColor: '#ff0000',
padding: [4, 4],
borderRadius: 4,
align: 'right'
}
}
},
emphasis: {
label: {
@@ -3468,17 +3507,38 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
show: true,
formatter: function(params) {
if (params.name) {
return params.name+' '+(params.data.num ? params.data.num : isNaN(params.data.num) ? 0 :
parseInt(params.data.num));
return [
'{name|' + params.name + '}{num|' + (params.data.num ? params.data.num : isNaN(params.data.num) ? 0 : parseInt(params.data.num)) + '}',
'{name| DEST:' + params.data.dest + '}',
'{name|ETA:' + params.data.eta + '}'
].join('\n');
}
},
position: 'top',
distance: 5,
color: '#fff',
fontSize: 12,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: [4, 4],
borderRadius: 2
backgroundColor: {
type: 'pattern',
image: 'img/mapbg1.png',
repeat: 'no-repeat'
},
padding: [20, 18],
rich: {
name: {
fontSize: 14,
color: '#fff',
padding: [4, 4]
},
num: {
fontSize: 12,
color: '#ffffff',
backgroundColor: '#ff0000',
padding: [4, 4],
borderRadius: 4,
align: 'right'
}
}
},
emphasis: {
label: {
@@ -3523,17 +3583,32 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
show: true,
formatter: function(params) {
if (params.name) {
return params.name+' '+(params.data.num ? params.data.num : isNaN(params.data.num) ? 0 :
parseInt(params.data.num));
return '{name|' + params.data.name_en + '}{num|' + (params.data.num ? params.data.num : isNaN(params.data.num) ? 0 : parseInt(params.data.num)) + '}';
}
},
position: 'top',
distance: 5,
color: '#fff',
fontSize: 12,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
backgroundColor: '#00a6c9',
padding: [4, 4],
borderRadius: 2,
rich: {
name: {
fontSize: 14,
color: '#fff',
padding: [4, 4]
},
num: {
fontSize: 12,
color: '#ffffff',
backgroundColor: '#ff0000',
padding: [4, 4],
borderRadius: 4,
align: 'right'
}
}
},
emphasis: {
label: {
@@ -3600,7 +3675,6 @@ function vehicleshipData(id,lang,page){
<tr data-id="${item.id}">
<td>${item.brand}</td>
<td>${item.vin}</td>
<td>${item.model}</td>
<td>${item.status}</td>
</tr>
`).join('');
@@ -3669,7 +3743,6 @@ function Vehicleshipfn(id,lang){
<tr data-id="${item.id}">
<td>${item.brand}</td>
<td>${item.vin}</td>
<td>${item.model}</td>
<td>${item.status}</td>
</tr>
`).join('');
@@ -3703,7 +3776,6 @@ function loadTableData(id,lang,page){
<tr data-id="${item.id}">
<td>${item.brand}</td>
<td>${item.vin}</td>
<td>${item.model}</td>
<td>${item.status}</td>
</tr>
`).join('');
@@ -3744,7 +3816,6 @@ function Vehiclelocation(id,lang){
<tr data-id="${item.id}">
<td>${item.brand}</td>
<td>${item.vin}</td>
<td>${item.model}</td>
<td>${item.status}</td>
</tr>
`).join('');
@@ -3874,4 +3945,19 @@ $(function(){
this.style.display = 'none';
}
});
})
// 开关按钮功能
// document.getElementById('mapSwitch').addEventListener('change', function(e) {
// // 这里添加开关切换时的功能
// if(e.target.checked) {
// // 开关打开时的操作
// console.log('Switch is ON');
// } else {
// // 开关关闭时的操作
// console.log('Switch is OFF');
// }
// });
})