From e99644937621f41d3caaa1409c92e44359674e37 Mon Sep 17 00:00:00 2001 From: jiangAB Date: Thu, 25 Dec 2025 17:00:58 +0800 Subject: [PATCH] update --- public/map/components/CompanyShorePower.vue | 8 ++++---- public/map/components/ShorePowerUsage.vue | 8 ++++---- .../map/components/ShorePowerUsageSingleData.vue | 15 ++++++++------- public/map/components/ShowData.vue | 8 ++++---- .../map/components/charts/ComparisonBarChart.vue | 5 ++--- public/map/index.vue | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/public/map/components/CompanyShorePower.vue b/public/map/components/CompanyShorePower.vue index af461ab..65a4b7b 100644 --- a/public/map/components/CompanyShorePower.vue +++ b/public/map/components/CompanyShorePower.vue @@ -224,10 +224,10 @@ interface TimeRangeOption { } const timeRangeOptions: TimeRangeOption[] = [ - { value: 'day', label: '本日' }, - { value: 'month', label: '本月' }, - { value: 'year', label: '本年' }, - { value: 'realtime', label: '总' }, + { value: 'day', label: '当日' }, + { value: 'month', label: '当月' }, + { value: 'year', label: '当年' }, + { value: 'realtime', label: '汇总' }, ] const closeShorePowerDetail = () => { diff --git a/public/map/components/ShorePowerUsage.vue b/public/map/components/ShorePowerUsage.vue index ded637d..1a11540 100644 --- a/public/map/components/ShorePowerUsage.vue +++ b/public/map/components/ShorePowerUsage.vue @@ -676,10 +676,10 @@ const timeRange = ref<'realtime' | 'day' | 'month' | 'quarter' | '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: '汇总' }, ] // 处理时间范围选择 diff --git a/public/map/components/ShorePowerUsageSingleData.vue b/public/map/components/ShorePowerUsageSingleData.vue index d46d1dd..d267493 100644 --- a/public/map/components/ShorePowerUsageSingleData.vue +++ b/public/map/components/ShorePowerUsageSingleData.vue @@ -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('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: '汇总' }, ] // 处理时间范围选择 diff --git a/public/map/components/ShowData.vue b/public/map/components/ShowData.vue index 86896b7..8523731 100644 --- a/public/map/components/ShowData.vue +++ b/public/map/components/ShowData.vue @@ -322,10 +322,10 @@ const shipHistoryVisible = ref({ const shipSelectedItem = ref(null) const periodOptions = [ - { label: '今日', value: 'day' }, - { label: '本月', value: 'month' }, - { label: '本年', value: 'year' }, - { label: '全部', value: 'realtime' }, + { label: '当日', value: 'day' }, + { label: '当月', value: 'month' }, + { label: '当年', value: 'year' }, + { label: '汇总', value: 'realtime' }, ] // 模拟不同时间段的数据 diff --git a/public/map/components/charts/ComparisonBarChart.vue b/public/map/components/charts/ComparisonBarChart.vue index 43851a2..d858a01 100644 --- a/public/map/components/charts/ComparisonBarChart.vue +++ b/public/map/components/charts/ComparisonBarChart.vue @@ -233,9 +233,8 @@ const handleResize = () => { // 组件挂载时初始化图表 onMounted(() => { - setTimeout(() => { - initChart() - }, 2000) + initChart() + window.addEventListener('resize', handleResize) }) diff --git a/public/map/index.vue b/public/map/index.vue index 55ff435..32945cc 100644 --- a/public/map/index.vue +++ b/public/map/index.vue @@ -43,9 +43,9 @@ :handleGoBack="handleGoBack" /> - +