From 146ea172ea623cfb349c51bcafbbcade0ab1fd18 Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E8=BD=B4?= =?UTF-8?q?=E7=B2=BE=E7=A1=AE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/timeAxis.vue | 19 +++++++++++++++++-- .../GroupEvolution/component/groupGraph.vue | 2 +- .../GroupEvolution/component/groupPost.vue | 15 ++++++++++++++- .../groupIdentifyDiscovery/index.vue | 4 ++++ 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/components/timeAxis.vue b/src/components/timeAxis.vue index 50dbbc2..295cff8 100644 --- a/src/components/timeAxis.vue +++ b/src/components/timeAxis.vue @@ -9,7 +9,11 @@ placement="bottom" effect="light" > -
+ @@ -154,7 +158,7 @@ const play = () => { const getTimeFromPosition = (position) => { const ratio = Math.max(0, Math.min(1, position / axisWidth)) const timeOffset = totalDuration * ratio - return new Date(startTimeMs + timeOffset) + return TansTimestamp(startTimeMs + timeOffset, "YYYY-MM-DD HH:mm:ss") } // 在时间轴上点击任意时间 @@ -203,6 +207,17 @@ const handlePointPointerDown = (e) => { document.addEventListener("pointerup", handlePointerUp) } +// 点击时间段时的处理函数 +const timeSectionWidth = 4 // 与样式保持一致 +const handleSectionPointerDown = (time) => { + pause() + // 计算该时间点的中心位置 + const left = getTimeSectionLeft.value(time) + timeSectionWidth / 2 + currentPosition.value = left + currentTime.value = TansTimestamp(new Date(time), "YYYY-MM-DD HH:mm:ss") + emit("click:pointerDown", currentTime.value) +} + //重置时间轴 const reset = () => { currentPosition.value = props.initPosition diff --git a/src/views/GroupEvolution/component/groupGraph.vue b/src/views/GroupEvolution/component/groupGraph.vue index 52429fd..280bb34 100644 --- a/src/views/GroupEvolution/component/groupGraph.vue +++ b/src/views/GroupEvolution/component/groupGraph.vue @@ -6,7 +6,7 @@