|
|
|
@ -251,6 +251,7 @@ import { ref, computed, onMounted, onBeforeUnmount } from 'vue' |
|
|
|
import WaveLineChart from './charts/WaveLineChart.vue' |
|
|
|
import { MapApi } from "@/api/shorepower/map"; |
|
|
|
import dayjs from 'dayjs'; |
|
|
|
import ComparisonBarChart from './charts/ComparisonBarChart.vue' |
|
|
|
import { RealtimeDeviceData } from '@/types/shorepower'; |
|
|
|
import { formatTimestamp, parseRangeToTimestamp } from './utils'; |
|
|
|
|
|
|
|
@ -347,19 +348,19 @@ const so2Reduction = ref<string>('0') |
|
|
|
|
|
|
|
// 年度对比数据 (今年 vs 去年) |
|
|
|
const yearlyData = [ |
|
|
|
{ name: '同期上期对比', currentValue: 1200, previousValue: 1100 }, |
|
|
|
{ name: '本期上期对比', currentValue: 1200, previousValue: 1100 }, |
|
|
|
// { name: '2025', currentValue: 1300, previousValue: 1250 }, |
|
|
|
] |
|
|
|
|
|
|
|
// 月度对比数据 (今月 vs 上月) |
|
|
|
const monthlyData = [ |
|
|
|
{ name: '同期上期对比', currentValue: 450, previousValue: 420 }, |
|
|
|
{ name: '本期上期对比', currentValue: 450, previousValue: 420 }, |
|
|
|
// { name: '上月', currentValue: 480, previousValue: 460 }, |
|
|
|
] |
|
|
|
|
|
|
|
// 日度对比数据 (今日 vs 昨天) |
|
|
|
const dailyData = [ |
|
|
|
{ name: '同期上期对比', currentValue: 20, previousValue: 18 }, |
|
|
|
{ name: '本期上期对比', currentValue: 20, previousValue: 18 }, |
|
|
|
// { name: '昨日', currentValue: 15, previousValue: 14 }, |
|
|
|
] |
|
|
|
|
|
|
|
@ -684,10 +685,10 @@ const timeRange = ref<'realtime' | 'day' | 'month' | 'year'>('day') |
|
|
|
|
|
|
|
// 时间范围选项定义 |
|
|
|
const timeRangeOptions = [ |
|
|
|
{ value: 'day', label: '本日' }, |
|
|
|
{ value: 'month', label: '本月' }, |
|
|
|
{ value: 'year', label: '本年' }, |
|
|
|
{ value: 'realtime', label: '总' }, |
|
|
|
{ value: 'day', label: '当日' }, |
|
|
|
{ value: 'month', label: '当月' }, |
|
|
|
{ value: 'year', label: '当年' }, |
|
|
|
{ value: 'realtime', label: '汇总' }, |
|
|
|
] |
|
|
|
|
|
|
|
// 处理时间范围选择 |
|
|
|
|