From 578e88dbf0e5351d9c5c42baa217a4e803708d39 Mon Sep 17 00:00:00 2001 From: Lxy Date: Tue, 17 Feb 2026 23:50:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dashboard/Dashboard.css | 154 +++++++++++++++++------------- src/pages/dashboard/Dashboard.jsx | 122 +++++++++++------------ 2 files changed, 145 insertions(+), 131 deletions(-) diff --git a/src/pages/dashboard/Dashboard.css b/src/pages/dashboard/Dashboard.css index 90a2b2b..dbcf5cd 100644 --- a/src/pages/dashboard/Dashboard.css +++ b/src/pages/dashboard/Dashboard.css @@ -121,6 +121,7 @@ height: 100%; transition: all 0.3s ease; cursor: pointer; + padding: 20px; } .future-card:hover { @@ -128,128 +129,149 @@ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); } -.future-header { +/* 品种名称和胜率 */ +.future-header-new { display: flex; justify-content: space-between; - align-items: flex-start; - margin-bottom: 12px; + align-items: center; + margin-bottom: 8px; } -.future-name h4 { - margin: 0 0 4px 0; +.future-name-new h3 { + margin: 0; + font-size: 16px; + font-weight: 600; color: #262626; } -.future-change { +.future-winrate-new { font-size: 14px; - font-weight: 500; + color: #262626; } -.future-price { - font-size: 20px; - font-weight: bold; - color: #262626; +/* ATR/ADX和涨跌幅 */ +.future-info-new { + display: flex; + justify-content: space-between; + align-items: center; margin-bottom: 16px; + font-size: 14px; + color: #8c8c8c; } -.future-overview { - margin-bottom: 12px; - text-align: center; +.future-indicators-new { } -.future-metrics { - display: flex; - justify-content: space-between; - margin-bottom: 16px; - padding-bottom: 16px; - border-bottom: 1px solid #f0f0f0; +.future-change-new { + font-weight: 500; } -.future-levels { - display: flex; - justify-content: space-between; +/* 当前价格和支撑压力位 */ +.future-price-new { + font-size: 24px; + font-weight: bold; margin-bottom: 12px; - padding: 12px; - background: #fafafa; - border-radius: 4px; } -.level-item { +.future-levels-new { display: flex; - flex-direction: column; - align-items: center; - flex: 1; + justify-content: space-between; + margin-bottom: 16px; + font-size: 14px; + color: #262626; } -.level-label { - font-size: 12px; - color: #8c8c8c; - margin-bottom: 4px; +.level-label-new { } -.level-value { +/* 多周期趋势 */ +.future-trend-title-new { font-size: 14px; font-weight: 500; color: #262626; + margin-bottom: 12px; } -.future-ai-analysis { +.future-trends-new { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 12px; margin-bottom: 16px; +} + +.trend-item-new { + display: flex; + flex-direction: column; + align-items: center; padding: 12px; - background: #f0f8ff; + background: #fafafa; border-radius: 4px; - font-size: 12px; - line-height: 1.4; + text-align: center; } -.ai-label { +.trend-period-new { + font-size: 14px; font-weight: 500; - color: #1890ff; - margin-right: 8px; -} - -.ai-content { + margin-bottom: 8px; color: #262626; } -.metric-item { - display: flex; - flex-direction: column; - align-items: center; +.trend-direction-new { + font-size: 14px; + font-weight: 500; + margin-bottom: 4px; } -.metric-label { +.trend-status-new { font-size: 12px; color: #8c8c8c; margin-bottom: 4px; } -.metric-value { +.trend-rsi-new { + font-size: 12px; + color: #8c8c8c; +} + +/* 整体预判 */ +.future-overview-new { + display: flex; + align-items: center; + margin-bottom: 16px; + font-size: 14px; +} + +.overview-label-new { + color: #262626; + margin-right: 8px; +} + +/* AI分析 */ +.future-ai-analysis-new { + margin-bottom: 20px; +} + +.ai-title-new { font-size: 14px; font-weight: 500; color: #262626; + margin: 0 0 8px 0; } -.future-trends { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 8px; +.ai-content-new { + font-size: 14px; + color: #262626; + line-height: 1.4; } -.trend-item { - display: flex; - flex-direction: column; - align-items: center; - padding: 8px; - background: #fafafa; +/* 查看详细分析按钮 */ +.detail-button-new { + width: 100%; border-radius: 4px; + font-size: 14px; + padding: 10px; } -.trend-period { - font-size: 12px; - color: #8c8c8c; - margin-bottom: 4px; -} /* 加载容器 */ .loading-container { diff --git a/src/pages/dashboard/Dashboard.jsx b/src/pages/dashboard/Dashboard.jsx index 3ffabb6..bdc92f3 100644 --- a/src/pages/dashboard/Dashboard.jsx +++ b/src/pages/dashboard/Dashboard.jsx @@ -221,86 +221,78 @@ const Dashboard = () => { hoverable onClick={() => handleFutureClick(item)} > -
-
-

{item.name}

- {item.code} + {/* 品种名称和胜率 */} +
+
+

{item.name}-{item.code}

-
- {getChangeIcon(item.changePercent)} {Math.abs(item.changePercent)}% +
+ 胜率: {item.winRate}%
-
- ¥{item.currentPrice.toFixed(2)} + {/* ATR/ADX和涨跌幅 */} +
+
+ ATR: {item.atr} | ADX: {item.adx} +
+
+ ● {Math.abs(item.changePercent)}% +
- {/* 整体预判 */} -
- - {item.overallView} - + {/* 当前价格和支撑压力位 */} +
+ {item.currentPrice.toFixed(2)}
- -
-
- 胜率 - {item.winRate}% -
-
- ATR - {item.atr} -
-
- ADX - {item.adx} -
+
+ 支撑: {item.tradingAdvice?.support?.toFixed(2) || '-'} + 压力: {item.tradingAdvice?.resistance?.toFixed(2) || '-'}
- {/* 压力支撑位 */} -
-
- 压力 - ¥{item.tradingAdvice?.resistance?.toFixed(2) || '-'} -
-
- 支撑 - ¥{item.tradingAdvice?.support?.toFixed(2) || '-'} -
+ {/* 多周期趋势 */} +
+ 多周期趋势: +
+
+ {Object.entries(item.trends).map(([period, trend]) => ( +
+
{period.replace('MIN', 'min').replace('HOUR', 'min')}
+
+ {trend.direction} +
+
+ {trend.status} +
+
+ RSI: {trend.rsi} +
+
+ ))}
- {/* AI分析 */} -
- AI分析: - {item.aiAnalysis || '-'} + {/* 整体预判 */} +
+ 整体预判: + + {item.overallView} +
-
-
- 5MIN - - {item.trends['5MIN'].direction} - -
-
- 30MIN - - {item.trends['30MIN'].direction} - -
-
- 1HOUR - - {item.trends['1HOUR'].direction} - -
-
- 1DAY - - {item.trends['1DAY'].direction} - + {/* AI分析 */} +
+

AI分析:

+
+ {item.aiAnalysis?.split(' | ').map((item, index) => ( +
{item}
+ ))}
+ + {/* 查看详细分析按钮 */} + ))}