feat:Community 组件 (2个文件,8个console)

- EventDetailModal.js - 2个
  - InvestmentCalendar.js - 6个

  EventDetail 组件 (5个文件,54个console)

  - TransmissionChainAnalysis.js - 43个 ⚠️ 最复杂
  - RelatedConcepts.js - 14个
  - LimitAnalyse.js - 5个 (保留2个toast)
  - RelatedStocks.js - 3个 (保留4个toast)
  - HistoricalEvents.js - 1个

  StockChart 组件 (1个文件,4个console)
This commit is contained in:
zdl
2025-10-18 10:23:23 +08:00
parent 3a3cac75f7
commit 87b77af187
5 changed files with 106 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ import * as echarts from 'echarts';
import moment from 'moment';
import { stockService } from '../../services/eventService';
import CitedContent from '../Citation/CitedContent';
import { logger } from '../../utils/logger';
const { Text } = Typography;
@@ -43,14 +44,25 @@ const StockChartAntdModal = ({
}
}
} catch (e) {
console.warn('事件时间解析失败:', e);
logger.warn('StockChartAntdModal', '事件时间解析失败', {
eventTime,
error: e.message
});
}
}
const response = await stockService.getKlineData(stock.stock_code, type, adjustedEventTime);
setPreloadedData(prev => ({...prev, [type]: response}));
logger.debug('StockChartAntdModal', '数据预加载成功', {
stockCode: stock.stock_code,
type,
dataLength: response?.data?.length || 0
});
} catch (err) {
console.error(`预加载${type}数据失败:`, err);
logger.error('StockChartAntdModal', 'preloadData', err, {
stockCode: stock?.stock_code,
type
});
}
};
@@ -89,7 +101,10 @@ const StockChartAntdModal = ({
}
}
} catch (e) {
console.warn('事件时间解析失败:', e);
logger.warn('StockChartAntdModal', '事件时间解析失败', {
eventTime,
error: e.message
});
}
}
@@ -97,8 +112,16 @@ const StockChartAntdModal = ({
}
setChartData(data);
logger.debug('StockChartAntdModal', '图表数据加载成功', {
stockCode: stock.stock_code,
chartType: activeChartType,
dataLength: data?.data?.length || 0
});
} catch (error) {
console.error('加载图表数据失败:', error);
logger.error('StockChartAntdModal', 'loadChartData', error, {
stockCode: stock?.stock_code,
chartType: activeChartType
});
} finally {
setLoading(false);
}