diff --git a/src/pages/dashboard/Dashboard.jsx b/src/pages/dashboard/Dashboard.jsx index f49fd32..1bc7f0b 100644 --- a/src/pages/dashboard/Dashboard.jsx +++ b/src/pages/dashboard/Dashboard.jsx @@ -66,37 +66,96 @@ const Dashboard = () => { > -
-
{item.name} ({item.code})
- 0 ? 'success' : 'error'} - text={`${item.changePercent > 0 ? '+' : ''}${item.changePercent}%`} - /> +
+
+
{item.name}-{item.code}2603
+
ATR: {item.atr} | ADX: {item.adx}
+
+
+
胜率: {item.winRate}%
+ 0 ? 'success' : 'error'} + text={`${item.changePercent > 0 ? '+' : ''}${item.changePercent}%`} + /> +
+ {/* 当前价格、支撑、压力 */} - 0 ? '#52c41a' : '#ff4d4f' }} - suffix="元" - size="small" - /> + + +
0 ? '#52c41a' : '#ff4d4f' + }}> + {item.currentPrice} +
+ + +
+ 支撑: {item.support} +
+ + +
+ 压力: {item.resistance} +
+ +
- -
胜率: {item.winRate}%
- - -
ATR: {item.atr}
+ {/* 多周期趋势 */} + +
多周期趋势:
+ + {['15MIN', '30MIN', '60MIN', '1DAY'].map(period => ( + +
+ {period.replace('MIN', 'min').replace('DAY', 'day')}
+ {item.trends[period].direction}
+ {item.trends[period].status}
+ RSI: {item.trends[period].rsi} +
+ + ))} +
- -
ADX: {item.adx}
+ {/* 整体预判 */} + +
整体预判: + + {item.overallView} + +
- -
趋势: {item.adxStatus}
+ + {/* AI分析 */} + +
AI分析:
+
+ MACD: {item.aiAnalysis.macd}
+ {item.aiAnalysis.rsi} +
diff --git a/src/utils/mockData.js b/src/utils/mockData.js index 4c30a5f..0b51862 100644 --- a/src/utils/mockData.js +++ b/src/utils/mockData.js @@ -56,6 +56,13 @@ export const generateFutureData = (code, name) => { adxStatus = '弱趋势'; } + // 生成压力位和支撑位 + const support = (currentPrice * (1 - 0.03)).toFixed(2); + const resistance = (currentPrice * (1 + 0.03)).toFixed(2); + + // 生成整体预判 + const overallView = ['观望', '中线', '多头排列', '空头排列', '震荡'][Math.floor(Math.random() * 5)]; + return { code, name, @@ -68,8 +75,9 @@ export const generateFutureData = (code, name) => { winRate, trends: { '5MIN': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) }, + '15MIN': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) }, '30MIN': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) }, - '1HOUR': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) }, + '60MIN': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) }, '1DAY': { direction: Math.random() > 0.5 ? '看多' : '看空', status: Math.random() > 0.5 ? '多头趋势' : '空头趋势', rsi: Math.floor(Math.random() * 100) } }, indicators: { @@ -83,6 +91,15 @@ export const generateFutureData = (code, name) => { stopLoss: (currentPrice * (1 - 0.02)).toFixed(2), target: (currentPrice * (1 + 0.03)).toFixed(2) }, + support, + resistance, + overallView, + aiAnalysis: { + macd: Math.random() > 0.5 ? '金叉向上' : '死叉向下', + rsi: `RSI: ${Math.floor(Math.random() * 100)}`, + bollinger: `布林带: ${['触及上轨', '触及下轨', '在轨道内'][Math.floor(Math.random() * 3)]}`, + kdj: Math.random() > 0.5 ? 'KDJ:金叉向上' : 'KDJ:死叉向下' + }, riskLevel: ['低', '中等', '高'][Math.floor(Math.random() * 3)], volatility: ['低', '中等', '高'][Math.floor(Math.random() * 3)] };