|
@@ -5,38 +5,12 @@ const props = defineProps({
|
|
|
data: Object
|
|
data: Object
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const containerStatusData: any = ref([
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Empty Equipment Dispatched',
|
|
|
|
|
- date: 'May-31-2024 10:03(GMT+02)',
|
|
|
|
|
- country: 'CN,SHK'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'In-Gate',
|
|
|
|
|
- date: 'May-31-2024 10:03(GMT+02)',
|
|
|
|
|
- country: 'CN,SHK'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Loaded On Vessel',
|
|
|
|
|
- date: 'Jun-05-2024 10:03(GMT+02)',
|
|
|
|
|
- country: 'CN,SHK'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Vessel Departure',
|
|
|
|
|
- date: 'Jun-06-2024 10:03(GMT+02)',
|
|
|
|
|
- country: 'CN,SHK'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Vessel Arrival',
|
|
|
|
|
- date: 'Jun-07-2024 14:00(GMT+02)',
|
|
|
|
|
- country: 'ES,BCN'
|
|
|
|
|
- }
|
|
|
|
|
-])
|
|
|
|
|
|
|
+const containerStatusData: any = ref([])
|
|
|
watch(
|
|
watch(
|
|
|
() => props.data,
|
|
() => props.data,
|
|
|
(newVal) => {
|
|
(newVal) => {
|
|
|
if (newVal) {
|
|
if (newVal) {
|
|
|
- containerStatusData.value = newVal[0].content
|
|
|
|
|
|
|
+ containerStatusData.value = newVal
|
|
|
} else {
|
|
} else {
|
|
|
containerStatusData.value = []
|
|
containerStatusData.value = []
|
|
|
}
|
|
}
|
|
@@ -54,72 +28,138 @@ const formatDate = (date: string) => {
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<div class="container-status">
|
|
<div class="container-status">
|
|
|
- <div class="step-item" v-for="(item, index) in containerStatusData" :key="item.title">
|
|
|
|
|
- <div class="step-data">
|
|
|
|
|
- <div class="step-dot-icon"></div>
|
|
|
|
|
- <div class="info">
|
|
|
|
|
- <div class="left-info">
|
|
|
|
|
- <div class="title">{{ item.title }}</div>
|
|
|
|
|
- <div class="date">{{ formatDate(item.date) }}</div>
|
|
|
|
|
|
|
+ <el-scrollbar style="height: 394px">
|
|
|
|
|
+ <el-collapse class="container" v-model="activeNames" @change="handleChange">
|
|
|
|
|
+ <el-collapse-item
|
|
|
|
|
+ :title="containers.label"
|
|
|
|
|
+ v-for="(containers, name) in containerStatusData"
|
|
|
|
|
+ :key="name"
|
|
|
|
|
+ :name="name"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="title">
|
|
|
|
|
+ Container <span>{{ containers.label }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="step-item" v-for="(item, index) in containers.content" :key="item.title">
|
|
|
|
|
+ <div class="step-data">
|
|
|
|
|
+ <div class="step-dot-icon"></div>
|
|
|
|
|
+ <div class="info">
|
|
|
|
|
+ <div class="left-info">
|
|
|
|
|
+ <div class="title">{{ item.title }}</div>
|
|
|
|
|
+ <div class="date">{{ formatDate(item.date) }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="right-country">{{ item.country }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="line" v-if="index + 1 !== containers.content.length"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="right-country">{{ item.country }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="line" v-if="index + 1 !== containerStatusData.length"></div>
|
|
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ </el-scrollbar>
|
|
|
|
|
+ <div class="footer">
|
|
|
|
|
+ Tracking on carrier website:
|
|
|
|
|
+ <a href="http://www.rcjgroup.com/" target="_blank" class="link">http://www.rcjgroup.com/</a>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.container-status {
|
|
.container-status {
|
|
|
|
|
+ position: relative;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- padding: 22px 0 22px;
|
|
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ .container {
|
|
|
|
|
+ // height: 394px;
|
|
|
|
|
+ padding-bottom: 8px;
|
|
|
|
|
+ // overflow: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .footer {
|
|
|
|
|
+ line-height: 38px;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ border-top: 1px solid var(--color-border);
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ .link {
|
|
|
|
|
+ text-decoration: none;
|
|
|
|
|
+ color: var(--color-theme);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.step-data {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
- height: 8px;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- .step-dot-icon {
|
|
|
|
|
- height: 8px;
|
|
|
|
|
- width: 8px;
|
|
|
|
|
- background-color: var(--color-neutral-1);
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
|
|
+</style>
|
|
|
|
|
+<style lang="scss">
|
|
|
|
|
+.container-status {
|
|
|
|
|
+ .el-collapse {
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ border-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-collapse-item__content {
|
|
|
|
|
+ padding: 30px 16px 38px;
|
|
|
|
|
+ border-top: 1px solid var(--color-border);
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-collapse-item__header {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ padding-left: 16px;
|
|
|
|
|
+ padding-right: 8px;
|
|
|
|
|
+ line-height: 50px;
|
|
|
|
|
+ & > .title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ span {
|
|
|
|
|
+ margin-left: 4px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- .info {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+ .step-data {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- height: 52px;
|
|
|
|
|
- margin-top: -22px;
|
|
|
|
|
- background-color: var(--color-table-header-bg);
|
|
|
|
|
- border: 1px solid var(--color-border);
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
- color: var(--color-neutral-1);
|
|
|
|
|
- .left-info {
|
|
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ height: 8px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ .step-dot-icon {
|
|
|
|
|
+ height: 8px;
|
|
|
|
|
+ width: 8px;
|
|
|
|
|
+ background-color: var(--color-neutral-1);
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .info {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
- padding: 8px 10px;
|
|
|
|
|
- border-right: 1px solid var(--color-border);
|
|
|
|
|
- .title {
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ height: 52px;
|
|
|
|
|
+ margin-top: -22px;
|
|
|
|
|
+ background-color: var(--color-table-header-bg);
|
|
|
|
|
+ border: 1px solid var(--color-border);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ .left-info {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ padding: 8px 10px;
|
|
|
|
|
+ border-right: 1px solid var(--color-border);
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ }
|
|
|
|
|
+ .date {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- .date {
|
|
|
|
|
- margin-top: 4px;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
|
|
+ .right-country {
|
|
|
|
|
+ padding: 0 24px;
|
|
|
|
|
+ line-height: 52px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .right-country {
|
|
|
|
|
- padding: 0 24px;
|
|
|
|
|
- line-height: 52px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-.line {
|
|
|
|
|
- height: 60px;
|
|
|
|
|
- width: 0;
|
|
|
|
|
- margin-left: 3px;
|
|
|
|
|
- border-left: 1px solid var(--color-neutral-1);
|
|
|
|
|
|
|
+ .line {
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ width: 0;
|
|
|
|
|
+ margin-left: 3px;
|
|
|
|
|
+ border-left: 1px solid var(--color-neutral-1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|