From deea7e56cf0c51bc3e6c4014af35fc105a9b6c55 Mon Sep 17 00:00:00 2001 From: kongfp Date: Sat, 7 Oct 2023 16:06:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A5=E5=8F=8A=E6=A0=87=E8=AF=86bug?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/videoParse/hook.tsx | 3 ++- src/views/videoParse/index.vue | 41 +++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/views/videoParse/hook.tsx b/src/views/videoParse/hook.tsx index ed48aec..a143fca 100644 --- a/src/views/videoParse/hook.tsx +++ b/src/views/videoParse/hook.tsx @@ -10,7 +10,8 @@ export function videoUtil() { label: "视频内时间", prop: "relative_time", minWidth: 100, - sortable: true + sortable: true, + slot: "relative_time" }, { label: "异常类型", diff --git a/src/views/videoParse/index.vue b/src/views/videoParse/index.vue index 2dcbc50..e3693d7 100644 --- a/src/views/videoParse/index.vue +++ b/src/views/videoParse/index.vue @@ -227,6 +227,20 @@ function startAnalyse() { }); } +function dataFormate(time) { + const milliseconds = time * 1000; + let sec = Math.floor(milliseconds / 1000); + let min = Math.floor(sec / 60); + const hour = Math.floor(min / 60); + + sec %= 60; + min %= 60; + + return `${hour.toString().padStart(2, "0")}:${min + .toString() + .padStart(2, "0")}:${sec.toString().padStart(2, "0")}`; +} + onMounted(() => { onSearch(); setInterval(() => { @@ -304,7 +318,9 @@ onMounted(() => { :key="index" class="scrollbar-item" > - {{ item.id }} + {{ + 2 * index + 1 + }} { :key="index" class="scrollbar-item" > - {{ item.id }} + {{ + 2 * index + 2 + }} {
- {{ item.id }} + {{ + 2 * index + 1 + }}
{
- {{ item.id }} + {{ + 2 * index + 2 + }}
{ @page-size-change="handleSizeChange" @page-current-change="handleCurrentChange" > +