|
@@ -7,8 +7,8 @@ const routes: any = ref([
|
|
|
{
|
|
{
|
|
|
serialNumber: 'Leg 1',
|
|
serialNumber: 'Leg 1',
|
|
|
mode: 'Sea',
|
|
mode: 'Sea',
|
|
|
- origin: 'ShenzhenShwe',
|
|
|
|
|
- destination: 'Valenciaenzq',
|
|
|
|
|
|
|
+ origin: 'ShenzhenShw',
|
|
|
|
|
+ destination: 'ShenzhenS',
|
|
|
etd: 'Jun-08-2024 12:00 AM',
|
|
etd: 'Jun-08-2024 12:00 AM',
|
|
|
atd: 'Jun-10-2024 12:00 AM',
|
|
atd: 'Jun-10-2024 12:00 AM',
|
|
|
eta: 'Jun-14-2024 12:00 AM',
|
|
eta: 'Jun-14-2024 12:00 AM',
|
|
@@ -21,7 +21,7 @@ const routes: any = ref([
|
|
|
serialNumber: 'Leg 2',
|
|
serialNumber: 'Leg 2',
|
|
|
mode: 'Sea',
|
|
mode: 'Sea',
|
|
|
origin: 'Valenciaenz',
|
|
origin: 'Valenciaenz',
|
|
|
- destination: 'New York',
|
|
|
|
|
|
|
+ destination: 'ShenzhenShweShenzhenShweShenzhenShweShenzhenShwe',
|
|
|
etd: 'Jun-15-2024 12:00 AM',
|
|
etd: 'Jun-15-2024 12:00 AM',
|
|
|
atd: 'Jun-17-2024 12:00 AM',
|
|
atd: 'Jun-17-2024 12:00 AM',
|
|
|
eta: 'Jun-21-2024 12:00 AM',
|
|
eta: 'Jun-21-2024 12:00 AM',
|
|
@@ -50,10 +50,40 @@ watch(
|
|
|
const formatDate = (date: string) => {
|
|
const formatDate = (date: string) => {
|
|
|
return date ? dayjs(date).format('MMM-DD-YYYY HH:mm A') : '--'
|
|
return date ? dayjs(date).format('MMM-DD-YYYY HH:mm A') : '--'
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const basicDesWidth = ref('180px')
|
|
|
|
|
+const detailDesWidth = ref('220px')
|
|
|
|
|
+
|
|
|
|
|
+const getContainerWidth = () => {
|
|
|
|
|
+ let screenWidth = document.body.clientWidth
|
|
|
|
|
+ if (screenWidth < 1300) {
|
|
|
|
|
+ basicDesWidth.value = '180px'
|
|
|
|
|
+ detailDesWidth.value = '220px'
|
|
|
|
|
+ } else if (screenWidth < 1500) {
|
|
|
|
|
+ basicDesWidth.value = '220px'
|
|
|
|
|
+ detailDesWidth.value = '240px'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ basicDesWidth.value = '240px'
|
|
|
|
|
+ detailDesWidth.value = '260px'
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getContainerWidth()
|
|
|
|
|
+ window.addEventListener('resize', getContainerWidth)
|
|
|
|
|
+})
|
|
|
|
|
+onBeforeUnmount(() => {
|
|
|
|
|
+ window.removeEventListener('resize', getContainerWidth)
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="routes-view">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="routes-view"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ '--basic-destination-width': basicDesWidth,
|
|
|
|
|
+ '--detail-destination-width': detailDesWidth
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
<div class="title">Total number of legs: {{ routes.length }}</div>
|
|
<div class="title">Total number of legs: {{ routes.length }}</div>
|
|
|
<div class="routes">
|
|
<div class="routes">
|
|
|
<div class="route-item" v-for="(item, index) in routes" :key="item.serialNumber">
|
|
<div class="route-item" v-for="(item, index) in routes" :key="item.serialNumber">
|
|
@@ -67,16 +97,23 @@ const formatDate = (date: string) => {
|
|
|
<div class="origin">
|
|
<div class="origin">
|
|
|
<div class="title">Origin</div>
|
|
<div class="title">Origin</div>
|
|
|
<div class="content">
|
|
<div class="content">
|
|
|
- <span>{{ item.origin }}</span>
|
|
|
|
|
|
|
+ <el-tooltip placement="top">
|
|
|
|
|
+ <template #content>{{ item.origin }}</template>
|
|
|
|
|
+ <span class="single-line-ellipsis">{{ item.origin }}</span>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+
|
|
|
<div class="line_container">
|
|
<div class="line_container">
|
|
|
<hr color="#000000" />
|
|
<hr color="#000000" />
|
|
|
<div class="right-icon"></div>
|
|
<div class="right-icon"></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="destination">
|
|
|
|
|
|
|
+ <div class="destination" ref="">
|
|
|
<div class="title">Destination</div>
|
|
<div class="title">Destination</div>
|
|
|
- <div class="content">{{ item.destination }}</div>
|
|
|
|
|
|
|
+ <el-tooltip placement="top">
|
|
|
|
|
+ <template #content>{{ item.destination }}</template>
|
|
|
|
|
+ <div class="content single-line-ellipsis">{{ item.destination }}</div>
|
|
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="etd border-right">
|
|
<div class="etd border-right">
|
|
@@ -98,7 +135,11 @@ const formatDate = (date: string) => {
|
|
|
<div class="origin">
|
|
<div class="origin">
|
|
|
<div class="place">
|
|
<div class="place">
|
|
|
<span style="font-size: 24px" class="font_family icon-icon_location_fill_b"></span>
|
|
<span style="font-size: 24px" class="font_family icon-icon_location_fill_b"></span>
|
|
|
- <span class="label">{{ item.origin }}</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-tooltip placement="top">
|
|
|
|
|
+ <template #content>{{ item.origin }}</template>
|
|
|
|
|
+ <span class="label single-line-ellipsis">{{ item.origin }}</span>
|
|
|
|
|
+ </el-tooltip>
|
|
|
<div class="line_container">
|
|
<div class="line_container">
|
|
|
<hr color="#000000" />
|
|
<hr color="#000000" />
|
|
|
<div class="right-icon"></div>
|
|
<div class="right-icon"></div>
|
|
@@ -118,7 +159,11 @@ const formatDate = (date: string) => {
|
|
|
<div class="destination">
|
|
<div class="destination">
|
|
|
<div class="place">
|
|
<div class="place">
|
|
|
<span style="font-size: 24px" class="font_family icon-icon_location_fill_b"></span>
|
|
<span style="font-size: 24px" class="font_family icon-icon_location_fill_b"></span>
|
|
|
- <span class="label">{{ item.destination }}</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-tooltip placement="top">
|
|
|
|
|
+ <template #content>{{ item.destination }}</template>
|
|
|
|
|
+ <span class="label single-line-ellipsis">{{ item.destination }}</span>
|
|
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="eta">
|
|
<div class="eta">
|
|
|
<span class="font_family icon-icon_date_b"></span>
|
|
<span class="font_family icon-icon_date_b"></span>
|
|
@@ -192,31 +237,38 @@ const formatDate = (date: string) => {
|
|
|
font-size: 40px;
|
|
font-size: 40px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .origin {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
.destination {
|
|
.destination {
|
|
|
- flex-basis: 100px;
|
|
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ max-width: calc(var(--basic-destination-width) - 16px);
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
margin-left: 16px;
|
|
margin-left: 16px;
|
|
|
|
|
+ & > div.content {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.place {
|
|
.place {
|
|
|
- flex: 1 1 140px;
|
|
|
|
|
|
|
+ flex: 0 0 40%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
padding: 0 16px;
|
|
padding: 0 16px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
|
|
|
.title {
|
|
.title {
|
|
|
margin-top: 2px;
|
|
margin-top: 2px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .origin {
|
|
|
|
|
+ width: calc(100% - var(--basic-destination-width));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.content {
|
|
.content {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ width: 100%;
|
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
@@ -251,7 +303,12 @@ const formatDate = (date: string) => {
|
|
|
gap: 8px;
|
|
gap: 8px;
|
|
|
padding: 16px;
|
|
padding: 16px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .etd {
|
|
|
|
|
+ min-width: 180px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .eta {
|
|
|
|
|
+ min-width: 220px;
|
|
|
|
|
+ }
|
|
|
.place,
|
|
.place,
|
|
|
.etd,
|
|
.etd,
|
|
|
.eta {
|
|
.eta {
|
|
@@ -271,7 +328,9 @@ const formatDate = (date: string) => {
|
|
|
gap: 8px;
|
|
gap: 8px;
|
|
|
padding: 8px;
|
|
padding: 8px;
|
|
|
border-top: 1px solid var(--color-border);
|
|
border-top: 1px solid var(--color-border);
|
|
|
-
|
|
|
|
|
|
|
+ .line_container {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
.line_container hr {
|
|
.line_container hr {
|
|
|
border-color: #484c52;
|
|
border-color: #484c52;
|
|
|
border-top: none;
|
|
border-top: none;
|
|
@@ -286,94 +345,101 @@ const formatDate = (date: string) => {
|
|
|
width: 10px;
|
|
width: 10px;
|
|
|
height: 12px;
|
|
height: 12px;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.date-info {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- gap: 16px;
|
|
|
|
|
- padding: 12px 8px 12px;
|
|
|
|
|
- background-color: var(--color-header-bg);
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
-
|
|
|
|
|
- .origin {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+ .date-info {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .destination {
|
|
|
|
|
- flex-basis: 200px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- margin-left: 16px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .place {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
|
|
+ gap: 16px;
|
|
|
|
|
+ width: calc(100% - 248px);
|
|
|
|
|
+ padding: 12px 8px 12px;
|
|
|
|
|
+ background-color: var(--color-header-bg);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+
|
|
|
|
|
+ .origin {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
|
|
- .label {
|
|
|
|
|
- font-size: 18px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
|
|
+ min-width: var(--detail-destination-width);
|
|
|
|
|
+ max-width: calc(100% - var(--detail-destination-width));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .content {
|
|
|
|
|
- position: relative;
|
|
|
|
|
|
|
+ .destination {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-width: calc(var(--detail-destination-width) - 16px);
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
|
|
- margin-top: 8px;
|
|
|
|
|
- font-size: 18px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- color: var(--color-neutral-1);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .etd,
|
|
|
|
|
- .eta,
|
|
|
|
|
- .atd,
|
|
|
|
|
- .ata {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-left: 5px;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- line-height: 16px;
|
|
|
|
|
- color: var(--color-neutral-2);
|
|
|
|
|
-
|
|
|
|
|
- .font_family {
|
|
|
|
|
- margin-right: 12px;
|
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ .label {
|
|
|
|
|
+ width: calc(100% - 40px);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .value {
|
|
|
|
|
- margin-left: 4px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
|
|
+ .place {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+
|
|
|
|
|
+ .label {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .content {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
-.transport-info {
|
|
|
|
|
- width: 288px;
|
|
|
|
|
- padding: 8px 16px;
|
|
|
|
|
- background-color: var(--color-header-bg);
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
-
|
|
|
|
|
- .item {
|
|
|
|
|
- .title {
|
|
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
|
|
+ .etd,
|
|
|
|
|
+ .eta,
|
|
|
|
|
+ .atd,
|
|
|
|
|
+ .ata {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-left: 5px;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
|
|
+ line-height: 16px;
|
|
|
color: var(--color-neutral-2);
|
|
color: var(--color-neutral-2);
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .content {
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
|
|
+ .font_family {
|
|
|
|
|
+ margin-right: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .value {
|
|
|
|
|
+ margin-left: 4px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- & + .item {
|
|
|
|
|
- margin-top: 16px;
|
|
|
|
|
|
|
+ .transport-info {
|
|
|
|
|
+ width: 248px;
|
|
|
|
|
+ padding: 8px 16px;
|
|
|
|
|
+ background-color: var(--color-header-bg);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+
|
|
|
|
|
+ .item {
|
|
|
|
|
+ .title {
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .content {
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ & + .item {
|
|
|
|
|
+ margin-top: 16px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -384,6 +450,7 @@ const formatDate = (date: string) => {
|
|
|
|
|
|
|
|
.line_container {
|
|
.line_container {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
|
|
+ min-width: 26px;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
margin-left: 16px;
|
|
margin-left: 16px;
|
|
|
}
|
|
}
|
|
@@ -404,4 +471,11 @@ const formatDate = (date: string) => {
|
|
|
transform: rotate(30deg);
|
|
transform: rotate(30deg);
|
|
|
border-radius: 0 1px 0 0;
|
|
border-radius: 0 1px 0 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.single-line-ellipsis {
|
|
|
|
|
+ display: inline-block; /* 或者根据需要使用 inline-block */
|
|
|
|
|
+ white-space: nowrap; /* 不换行 */
|
|
|
|
|
+ overflow: hidden; /* 隐藏超出部分 */
|
|
|
|
|
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|