diff --git a/meshmap_frontend/src/components/NodeDetailedPage.vue b/meshmap_frontend/src/components/NodeDetailedPage.vue index e1a674d..608c992 100644 --- a/meshmap_frontend/src/components/NodeDetailedPage.vue +++ b/meshmap_frontend/src/components/NodeDetailedPage.vue @@ -270,13 +270,19 @@ async function loadTrajectoryRange() { } } -function applyTodayTrajectory() { - const today = toDateInputValue() - trajectoryStartDate.value = today - trajectoryEndDate.value = today +function applyRecentTrajectory(days: number) { + const end = new Date() + const start = new Date() + start.setDate(end.getDate() - days + 1) + trajectoryStartDate.value = toDateInputValue(start) + trajectoryEndDate.value = toDateInputValue(end) loadTrajectoryRange() } +function applyTodayTrajectory() { + applyRecentTrajectory(1) +} + async function loadInitialMessages() { const response = await getTextMessages(chatPageSize, 0, props.nodeId) messages.value = toChronological(response.items) @@ -639,6 +645,8 @@ onBeforeUnmount(() => { {{ trajectoryLoading ? '查询中...' : '查询轨迹' }} + +

{{ trajectoryError }}

轨迹点较多,仅显示前 {{ maxTrajectoryPoints }} 条,请缩小日期范围。