diff --git a/css/style.css b/css/style.css
index 625528f..b98c4af 100644
--- a/css/style.css
+++ b/css/style.css
@@ -49,7 +49,61 @@ body {
top: 0px;
width: 100%;
}
+.centers{
+ position: fixed;
+ top: 115px;
+ left: 23%;
+ width: 54%;
+ min-width: 1050px;
+ background: url(../img/shiplistbg.png);
+ background-repeat: no-repeat;
+ background-size: 100% 100%;
+ padding: 1% 3%;
+ max-height: 70%;
+}
+.cents-top{
+ display: flex;
+}
+.shiptopcard{
+ background: url(../img/shipbg.png);
+ background-repeat: no-repeat;
+ background-size: 100% 100%;
+ width: 24%;
+ padding: 10px 15px;
+ display: inline-block;
+ margin: 0.5%;
+ font-size: 0.8rem;
+ cursor: pointer;
+ transition: all 0.3s ease;
+}
+.shiptopcard:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 12px rgba(6, 244, 255, 0.2);
+}
+@media (max-width:1650px) {
+ .shiptopcard{
+ width: 32%;
+ }
+}
+@media (min-width:3800px) {
+ .centers{
+ padding: 4% 6%;
+ }
+ .shiptopcard{
+ padding: 40px 60px;
+ }
+
+}
+.tag{
+ background-color: #f70303;
+ padding: 0px 2px;
+ border-radius: 5px;
+}
+.displayflex{
+ display: flex;
+ justify-content: space-between;
+}
.left {
float: left;
background: -webkit-radial-gradient(50% 10%, farthest-corner, rgb(42 79 169 / 70%) 0%, rgb(16 30 66 / 70%) 50%, rgb(9 13 27 / 70%), rgb(0 0 0 / 70%));
@@ -1071,6 +1125,7 @@ body {
font-size: clamp(0.75rem, 1vw, 1.875rem);
padding: 8px 30px;
border-radius: 4px;
+ cursor: pointer;
}
#modalOverlay .modal-close{
top: auto;
@@ -1244,4 +1299,122 @@ body {
.statusbtn .status4.active {
background: linear-gradient(to bottom, #ff9f43, #e6ac0e);
color: #fff;
+}
+
+.centers-tabs {
+ width: 100px;
+ margin-right: 20px;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+.centers-cont {
+ flex: 1;
+ position: relative;
+}
+.centers-tab {
+ font-size: 0.875rem;
+ padding: 8px 10px;
+ background: rgba(255, 255, 255, 0.1);
+ border-radius: 4px;
+ cursor: pointer;
+ transition: all 0.3s;
+ color: rgba(255, 255, 255, 0.7);
+ position: relative;
+ overflow: hidden;
+ text-align: center;
+ white-space: nowrap;
+}
+
+.centers-tab:hover {
+ background: rgba(255, 255, 255, 0.15);
+ color: #fff;
+}
+
+.centers-tab.active {
+ background: linear-gradient(to bottom, #06f4ff, #00c6ff);
+ color: #142c64;
+ box-shadow: 0 2px 8px rgba(6, 244, 255, 0.3);
+}
+
+.centers-tab.active::before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 3px;
+ height: 20px;
+ background: #142c64;
+ border-radius: 3px;
+}
+
+.centers-content {
+ display: none;
+ animation: fadeIn 0.3s ease;
+ overflow: hidden;
+}
+
+.centers-content.active {
+ display: block;
+}
+
+.centers-content .content-wrapper {
+ max-height: 80px;
+ overflow: hidden;
+ transition: max-height 0.3s ease;
+}
+
+.expanded .centers-content .content-wrapper {
+ max-height: 2000px;
+}
+
+.mores {
+ text-align: center;
+ cursor: pointer;
+ padding: 10px 0 0px;
+ transition: all 0.3s ease;
+ display: none;
+}
+
+.mores:hover {
+ opacity: 0.8;
+}
+
+.mores img {
+ width: 20px;
+ transition: transform 0.3s ease;
+}
+
+.mores.expanded img {
+ transform: rotate(180deg);
+}
+
+.mores .more-text {
+ font-size: 0.875rem;
+ color: rgba(255, 255, 255, 0.7);
+ margin-left: 5px;
+}
+
+.mores .less-text {
+ display: none;
+}
+
+.mores.expanded .more-text {
+ display: none;
+}
+
+.mores.expanded .less-text {
+ display: inline;
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ transform: translateX(10px);
+ }
+ to {
+ opacity: 1;
+ transform: translateX(0);
+ }
}
\ No newline at end of file
diff --git a/img/la.png b/img/la.png
new file mode 100644
index 0000000..9fc794c
Binary files /dev/null and b/img/la.png differ
diff --git a/img/shipbg.png b/img/shipbg.png
new file mode 100644
index 0000000..154d9fe
Binary files /dev/null and b/img/shipbg.png differ
diff --git a/img/shiplistbg.png b/img/shiplistbg.png
new file mode 100644
index 0000000..3c259d8
Binary files /dev/null and b/img/shiplistbg.png differ
diff --git a/index.html b/index.html
index 2f1e2bb..3aacea9 100644
--- a/index.html
+++ b/index.html
@@ -114,6 +114,32 @@
+
diff --git a/js/i18n.js b/js/i18n.js
index d7128c1..cb8470b 100644
--- a/js/i18n.js
+++ b/js/i18n.js
@@ -207,6 +207,27 @@ function locationfn(lang,status){
success: function(result){
navigatedatas = result.data.navigate
shipListdatas = result.data.pending
+ var navigatedatashtml=''
+ var shipListdatashtml=''
+ $.each(navigatedatas,function(){
+ navigatedatashtml+=`
+
${this.ship_name} ${this.count}
+
DEST: ${this.port}
+
ETA:${this.last_time}
+
`
+ });
+ $.each(shipListdatas,function(){
+ shipListdatashtml+=`
+
${this.ship_name} ${this.count}
+
DEST: ${this.port}
+
ETA:${this.last_time}
+
`
+ });
+ $(".shipListdatas").html(shipListdatashtml)
+ $(".navigatedatas").html(navigatedatashtml)
+ if(navigatedatas.length>4||shipListdatas.length>4){
+ $('.mores').show()
+ }
}
});
$.ajax({
diff --git a/js/lang/ar.json b/js/lang/ar.json
index 21048d1..a87a338 100644
--- a/js/lang/ar.json
+++ b/js/lang/ar.json
@@ -30,6 +30,8 @@
"yujidaodashijian":"الوقت المتوقع للوصول",
"Nextstation":"المحطة التالية",
"Nexttime":"٢ دقيقة",
+ "Inport":"في الميناء",
+ "Intransit":"قيد النقل",
"history":"التاريخ",
"detail":"التفاصيل",
"prevPage":"الصفحة السابقة",
diff --git a/js/lang/en.json b/js/lang/en.json
index 9146ef9..423cbd6 100644
--- a/js/lang/en.json
+++ b/js/lang/en.json
@@ -30,6 +30,8 @@
"yujidaodashijian":"Estimated arrival time",
"Nextstation":"Next station",
"Nexttime":"Next Stop Arrival",
+ "Inport":"In port",
+ "Intransit":"In transit",
"history":"History",
"detail":"Detail",
"prevPage":"Previous page",
diff --git a/js/lang/ru.json b/js/lang/ru.json
index 199dd36..65d46ac 100644
--- a/js/lang/ru.json
+++ b/js/lang/ru.json
@@ -29,6 +29,8 @@
"yujidaodashijian":"Ожидаемое время прибытия",
"Nextstation":"Следующая станция",
"Nexttime":"Прибытие",
+ "Inport":" В порту",
+ "Intransit":"В пути",
"history":"История",
"detail":"Подробнее",
"close":"Закрыть",
diff --git a/js/lang/zh.json b/js/lang/zh.json
index d960451..56364dc 100644
--- a/js/lang/zh.json
+++ b/js/lang/zh.json
@@ -30,6 +30,8 @@
"yujidaodashijian":"预计到达时间",
"Nextstation":"下一站",
"Nexttime":"下站预计到达时间",
+ "Inport":"在港",
+ "Intransit":"运输中",
"history":"历史记录",
"detail":"详细信息",
"prevPage":"上一页",
diff --git a/js/public.js b/js/public.js
index 6b2b5c1..629f416 100644
--- a/js/public.js
+++ b/js/public.js
@@ -3668,7 +3668,9 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
$(".infotimes").hide();
$(".pagination-container1").show();
$(".pagination-container").hide();
- Vehiclelocation(params.data.id,langzh)
+ $(".pagination-containerkp").hide();
+ $(".pagination-containerkp1").hide();
+ Vehiclelocation(params.data.id,langzh,'pagination-container1')
return false
}else{
//获取船上车辆信息
@@ -3676,8 +3678,10 @@ function Global(chinaGeoCoordMap, nameMap, isshow) {
$('#globalLoading').show();
$(".infotimes").show();
$(".pagination-container").show();
+ $(".pagination-containerkp1").hide();
+ $(".pagination-containerkp").hide();
$(".pagination-container1").hide();
- Vehicleshipfn(params.data.id,langzh)
+ Vehicleshipfn(params.data.id,langzh,'pagination-container')
}
// 设置标题
// modalTitle.textContent = params.name;
@@ -3712,7 +3716,7 @@ function vehicleshipData(id,lang,page){
})
}
//船上车辆
-function Vehicleshipfn(id,lang){
+function Vehicleshipfn(id,lang,name){
$.ajax({
url:baseURL+'/Vehicle/ship',
type:'POST',
@@ -3760,7 +3764,7 @@ function Vehicleshipfn(id,lang){
const totalPages = Math.ceil(totalItems / pageSize);
// 分页配置
const pagination = new Pagination({
- container: document.querySelector('.pagination-container'),
+ container: document.querySelector(`.${name}`),
currentPage: 1,
totalPages: totalPages,
onPageChange: (page) => {
@@ -3819,7 +3823,7 @@ function loadTableData(id,lang,page){
}
})
}
-function Vehiclelocation(id,lang){
+function Vehiclelocation(id,lang,name){
$.ajax({
url:baseURL+'/Vehicle/location',
type:'POST',
@@ -3837,7 +3841,7 @@ function Vehiclelocation(id,lang){
const totalPages = Math.ceil(totalItems / pageSize);
// 分页配置
const pagination = new Pagination({
- container: document.querySelector('.pagination-container1'),
+ container: document.querySelector(`.${name}`),
currentPage: 1,
totalPages: totalPages,
onPageChange: (page) => {
@@ -3919,6 +3923,39 @@ function getcardetile(id){
});
}
$(function(){
+ // 为所有 shiptopcard 添加点击事件
+ $(document).on('click', '.shiptopcard', function() {
+ // 获取当前点击卡片的 data-id
+ document.getElementById('modalOverlay').style.display = 'block';
+ const id = this.getAttribute('data-id');
+ var names= this.getAttribute('data-name');
+ // 移除其他卡片的激活状态
+ document.querySelectorAll('.shiptopcard').forEach(c => c.classList.remove('active'));
+ // 添加当前卡片的激活状态
+ this.classList.add('active');
+ if(names=="navigate"){
+ $('.modal-tabs').children().not(':first').hide();
+ $('#globalLoading').show();
+ $(".infotimes").hide();
+
+ $(".pagination-containerkp1").show();
+ $(".pagination-container1").hide();
+ $(".pagination-containerkp").hide();
+ $(".pagination-container").hide();
+ Vehiclelocation(id,localStorage.getItem('lang')|| 'en','pagination-containerkp1')
+ return false
+ }else{
+ //获取船上车辆信息
+ $('.modal-tabs').children().show();
+ $('#globalLoading').show();
+ $(".infotimes").show();
+ $(".pagination-containerkp").show();
+ $(".pagination-container").hide();
+ $(".pagination-containerkp1").hide();
+ $(".pagination-container1").hide();
+ Vehicleshipfn(id,localStorage.getItem('lang')|| 'en','pagination-containerkp')
+ }
+ });
// 弹出层控制
const modalOverlay = document.getElementById('modalOverlay');
const modalClose = document.querySelector('.modal-close');
@@ -3996,6 +4033,32 @@ $(function(){
// console.log('Switch is OFF');
// }
// });
-
+ document.querySelectorAll('.centers-tab').forEach(tab => {
+ tab.addEventListener('click', () => {
+ // 移除所有标签的激活状态
+ document.querySelectorAll('.centers-tab').forEach(t => t.classList.remove('active'));
+ // 移除所有内容的激活状态
+ document.querySelectorAll('.centers-content').forEach(c => c.classList.remove('active'));
+ // 添加当前标签的激活状态
+ tab.classList.add('active');
+ // 添加对应内容的激活状态
+ const index = Array.from(tab.parentElement.children).indexOf(tab);
+ document.querySelectorAll('.centers-content')[index].classList.add('active');
+ });
+ });
+ document.querySelectorAll('.mores').forEach(button => {
+ button.addEventListener('click', () => {
+ const wrapper = button.previousElementSibling;
+ const isExpanded = wrapper.classList.contains('expanded');
+
+ if (isExpanded) {
+ wrapper.classList.remove('expanded');
+ button.classList.remove('expanded');
+ } else {
+ wrapper.classList.add('expanded');
+ button.classList.add('expanded');
+ }
+ });
+ });
})