<div class="distance">
<el-table class="th" border empty-text=" ">
<el-table-column label="车牌号码" align="center" />
<el-table-column label="公司名称" align="center" />
<el-table-column label="状态" align="center" width="60" />
<el-table-column label="时间" align="center" />
</el-table>
<div
class="box"
@mouseover="pauseAnimation"
@mouseout="resumeAnimation"
>
<el-table
:data="tableData"
:show-header="false"
style="width: 100%"
class="table"
empty-text=" "
ref="table"
>
<el-table-column
prop="license"
label="车牌号码"
align="center"
/>
<el-table-column
prop="orgName"
label="公司名称"
align="center"
/>
<el-table-column
prop="onoff"
label="状态"
align="center"
width="60"
>
<template #default="scope">
<div class="on" v-if="scope.row.onoff">在线</div>
<div class="off" v-else>下线</div>
</template>
</el-table-column>
<el-table-column prop="time" label="时间" align="center" />
</el-table>
<el-table
:data="tableData"
:show-header="false"
style="width: 100%"
class="table"
empty-text=" "
>
<el-table-column
prop="license"
label="车牌号码"
align="center"
/>
<el-table-column
prop="orgName"
label="公司名称"
align="center"
/>
<el-table-column
prop="onoff"
label="状态"
align="center"
width="60"
>
<template #default="scope">
<div v-if="scope.row.onoff" class="on">在线</div>
<div class="off" v-else>下线</div>
</template>
</el-table-column>
<el-table-column prop="time" label="时间" align="center" />
</el-table>
</div>
</div>
pauseAnimation() {
const tables = document.querySelectorAll('.table');
tables.forEach((table) => {
table.style.animationPlayState = 'paused';
});
},
resumeAnimation() {
const tables = document.querySelectorAll('.table');
tables.forEach((table) => {
table.style.animationPlayState = 'running';
});
},
.box {
/* overflow: hidden; */
/* border: 1px solid #eaeef2; */
height: 25vh;
overflow: hidden;
@media (max-width: 1560px) {
height: 23vh;
/* border: 1px solid #eaeef2; */
}
}
.table {
animation: table 15s infinite linear;
}
@keyframes table {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-100%);
}
}
:deep .th .el-table__empty-block,
:deep .th .el-table__body-wrapper {
height: 0px !important;
min-height: 0px !important;
display: none;
}
.rightFirst :deep .el-table tr .cell,
.rightSecond :deep .el-table tr .cell {
padding: 15px !important;
background-color: #1d2775 !important;
}
:deep .th thead {
box-sizing: border-box;
height: 7vh !important;
background-color: #1d2775;
}
:deep .th thead tr .cell {
color: #05c4e3;
}
.box :deep .cell {
color: #f2f2f2;
}