From 16b6b187a9b54236dce22763042e1548f7094c95 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Wed, 21 Jan 2026 20:31:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E8=A1=A8=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/other/chartFullscreen.vue | 2 +- src/components/other/dataQuery.vue | 7 +++++-- src/components/other/index.vue | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/other/chartFullscreen.vue b/src/components/other/chartFullscreen.vue index 19fdc33..a4099ec 100644 --- a/src/components/other/chartFullscreen.vue +++ b/src/components/other/chartFullscreen.vue @@ -180,7 +180,7 @@ function loadChartData() { serialNum: serialNum.value, startTime: formatDateMin(start), endTime: formatDateMin(now), - intervalType: dayType.value === 1 ? 2 : dayType.value === 3 ? 2 : 3, + intervalType: dayType.value === 1 ? 1 : dayType.value === 3 ? 2 : 3, }; Taro.showLoading({ title: '加载中...' }); diff --git a/src/components/other/dataQuery.vue b/src/components/other/dataQuery.vue index 90e19fb..ed1d33c 100644 --- a/src/components/other/dataQuery.vue +++ b/src/components/other/dataQuery.vue @@ -253,14 +253,17 @@ function queryData() { } // 根据天数差确定 intervalType + // ≤3天: intervalType = 1 // ≤7天: intervalType = 2 // 7-14天: intervalType = 3 // 14-30天: intervalType = 4 // 30-60天: intervalType = 5 // >60天: intervalType = 6 - let intervalType = 2; - if (dayDiff > 7 && dayDiff <= 14) { + let intervalType = 1; + if (dayDiff > 3 && dayDiff <= 7) { + intervalType = 2; + } else if (dayDiff > 7 && dayDiff <= 14) { intervalType = 3; } else if (dayDiff > 14 && dayDiff <= 30) { intervalType = 4; diff --git a/src/components/other/index.vue b/src/components/other/index.vue index 03aabd1..72f9339 100644 --- a/src/components/other/index.vue +++ b/src/components/other/index.vue @@ -1502,7 +1502,7 @@ function getDaysAgo(days) { // 设置 intervalType:1天->1, 3天->2, 7天->3 if (days === 1) { - paramsHistory.value.intervalType = 2; + paramsHistory.value.intervalType = 1; } else if (days === 3) { paramsHistory.value.intervalType = 2; } else if (days === 7) {