Merge branch 'dev' into main

合并dev分支的时区修复和其他改进:
- 修复仪表板图表时区处理问题
- 修复自定义时间选择器的UTC转换
- 删除dist构建产物目录
This commit is contained in:
shaw
2025-07-30 12:50:20 +08:00
40 changed files with 359 additions and 257 deletions

View File

@@ -55,8 +55,12 @@ const createChart = () => {
const labels = dashboardStore.trendData.map(item => {
if (granularity.value === 'hour') {
const date = new Date(item.date)
return `${date.getMonth() + 1}/${date.getDate()} ${date.getHours()}:00`
// 小时粒度使用hour字段
const date = new Date(item.hour)
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hour = String(date.getHours()).padStart(2, '0')
return `${month}/${day} ${hour}:00`
}
return item.date
})