From e2f9f3278f81fda6d7ca621d16f6020e82187d3a Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Tue, 16 Dec 2025 20:40:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ForecastReport):=203=E5=88=97=E5=B8=83?= =?UTF-8?q?=E5=B1=80=20+=20=E7=A7=BB=E9=99=A4=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除盈利预测报表标题和刷新按钮 - 3个图表改为3列等宽布局 - 统一图表高度使用 CHART_HEIGHT - 简化标题文字 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/IncomeProfitGrowthChart.tsx | 6 +- .../components/ForecastReport/index.tsx | 63 ++++--------------- 2 files changed, 16 insertions(+), 53 deletions(-) diff --git a/src/views/Company/components/ForecastReport/components/IncomeProfitGrowthChart.tsx b/src/views/Company/components/ForecastReport/components/IncomeProfitGrowthChart.tsx index 492a724a..29750490 100644 --- a/src/views/Company/components/ForecastReport/components/IncomeProfitGrowthChart.tsx +++ b/src/views/Company/components/ForecastReport/components/IncomeProfitGrowthChart.tsx @@ -5,7 +5,7 @@ import React, { useMemo } from 'react'; import ReactECharts from 'echarts-for-react'; import ChartCard from './ChartCard'; -import { CHART_COLORS, BASE_CHART_CONFIG, THEME } from '../constants'; +import { CHART_COLORS, BASE_CHART_CONFIG, CHART_HEIGHT, THEME } from '../constants'; import type { IncomeProfitTrend, GrowthBars } from '../types'; interface IncomeProfitGrowthChartProps { @@ -135,8 +135,8 @@ const IncomeProfitGrowthChart: React.FC = ({ }), [incomeProfitData, growthData]); return ( - - + + ); }; diff --git a/src/views/Company/components/ForecastReport/index.tsx b/src/views/Company/components/ForecastReport/index.tsx index 25c89ef7..f4eef29d 100644 --- a/src/views/Company/components/ForecastReport/index.tsx +++ b/src/views/Company/components/ForecastReport/index.tsx @@ -3,8 +3,7 @@ */ import React, { useState, useEffect, useCallback } from 'react'; -import { Box, SimpleGrid, HStack, Heading, Skeleton, IconButton } from '@chakra-ui/react'; -import { RefreshCw } from 'lucide-react'; +import { Box, SimpleGrid, Skeleton } from '@chakra-ui/react'; import { stockService } from '@services/eventService'; import { IncomeProfitGrowthChart, @@ -13,7 +12,7 @@ import { DetailTable, ChartCard, } from './components'; -import { THEME, CHART_HEIGHT } from './constants'; +import { CHART_HEIGHT } from './constants'; import type { ForecastReportProps, ForecastData } from './types'; const ForecastReport: React.FC = ({ stockCode: propStockCode }) => { @@ -50,40 +49,10 @@ const ForecastReport: React.FC = ({ stockCode: propStockCod return ( - {/* 标题栏 */} - - - 盈利预测报表 - - } - onClick={load} - isLoading={loading} - variant="outline" - size="sm" - aria-label="刷新数据" - borderColor={THEME.goldBorder} - color={THEME.gold} - _hover={{ - bg: THEME.goldLight, - borderColor: THEME.gold, - }} - /> - - - {/* 加载骨架屏 */} {loading && !data && ( - - {[1, 2, 3, 4].map((i) => ( + + {[1, 2, 3].map((i) => ( @@ -91,22 +60,16 @@ const ForecastReport: React.FC = ({ stockCode: propStockCod )} - {/* 图表区域 */} + {/* 图表区域 - 3列布局 */} {data && ( - <> - {/* 合并图表:营收/利润/增长率 */} - - - - {/* EPS 和 PE/PEG */} - - - - - + + + + + )} {/* 详细数据表格 */}