update ui
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
import { stockService } from '../../../services/eventService';
|
||||
import { logger } from '../../../utils/logger';
|
||||
import CitedContent from '../../../components/Citation/CitedContent';
|
||||
import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme';
|
||||
|
||||
const HistoricalEvents = ({
|
||||
events = [],
|
||||
@@ -48,10 +49,10 @@ const HistoricalEvents = ({
|
||||
const [loadingStocks, setLoadingStocks] = useState({});
|
||||
|
||||
// 颜色主题
|
||||
const cardBg = useColorModeValue('white', 'gray.800');
|
||||
const borderColor = useColorModeValue('gray.200', 'gray.600');
|
||||
const textSecondary = useColorModeValue('gray.600', 'gray.400');
|
||||
const nameColor = useColorModeValue('gray.700', 'gray.300');
|
||||
const cardBg = PROFESSIONAL_COLORS.background.card;
|
||||
const borderColor = PROFESSIONAL_COLORS.border.default;
|
||||
const textSecondary = PROFESSIONAL_COLORS.text.secondary;
|
||||
const nameColor = PROFESSIONAL_COLORS.text.primary;
|
||||
|
||||
// 字段兼容函数
|
||||
const getEventDate = (event) => {
|
||||
|
||||
@@ -33,14 +33,15 @@ import { FaEye, FaExternalLinkAlt, FaChartLine, FaCalendarAlt } from 'react-icon
|
||||
import moment from 'moment';
|
||||
import tradingDayUtils from '../../../utils/tradingDayUtils'; // 引入交易日工具
|
||||
import { logger } from '../../../utils/logger';
|
||||
import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme';
|
||||
|
||||
// 增强版 ConceptCard 组件 - 展示更多数据细节
|
||||
const ConceptCard = ({ concept, tradingDate, onViewDetails }) => {
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
const cardBg = useColorModeValue('white', 'gray.800');
|
||||
const borderColor = useColorModeValue('gray.200', 'gray.600');
|
||||
const textColor = useColorModeValue('gray.600', 'gray.400');
|
||||
const highlightBg = useColorModeValue('yellow.50', 'yellow.900');
|
||||
const cardBg = PROFESSIONAL_COLORS.background.card;
|
||||
const borderColor = PROFESSIONAL_COLORS.border.default;
|
||||
const textColor = PROFESSIONAL_COLORS.text.secondary;
|
||||
const highlightBg = 'rgba(255, 195, 0, 0.1)';
|
||||
|
||||
// 计算涨跌幅颜色和符号
|
||||
const changeColor = concept.price_info?.avg_change_pct > 0 ? 'red' : 'green';
|
||||
@@ -69,8 +70,8 @@ const ConceptCard = ({ concept, tradingDate, onViewDetails }) => {
|
||||
borderWidth={2}
|
||||
_hover={{
|
||||
transform: 'translateY(-2px)',
|
||||
shadow: 'xl',
|
||||
borderColor: 'blue.400'
|
||||
boxShadow: '0 8px 20px rgba(0, 0, 0, 0.4)',
|
||||
borderColor: '#3B82F6'
|
||||
}}
|
||||
transition="all 0.3s"
|
||||
>
|
||||
@@ -80,17 +81,35 @@ const ConceptCard = ({ concept, tradingDate, onViewDetails }) => {
|
||||
<Box>
|
||||
<HStack justify="space-between" align="flex-start" mb={2}>
|
||||
<VStack align="start" spacing={1} flex={1}>
|
||||
<Text fontSize="lg" fontWeight="bold" color="blue.600">
|
||||
<Text fontSize="lg" fontWeight="bold" color="#3B82F6">
|
||||
{concept.concept}
|
||||
</Text>
|
||||
<HStack spacing={2} flexWrap="wrap">
|
||||
<Badge colorScheme="purple" fontSize="xs">
|
||||
<Badge
|
||||
bg="rgba(168, 85, 247, 0.15)"
|
||||
color="#A855F7"
|
||||
borderWidth="1px"
|
||||
borderColor="#A855F7"
|
||||
fontSize="xs"
|
||||
>
|
||||
相关度: {concept.score.toFixed(2)}
|
||||
</Badge>
|
||||
<Badge colorScheme="teal" fontSize="xs">
|
||||
<Badge
|
||||
bg="rgba(20, 184, 166, 0.15)"
|
||||
color="#14B8A6"
|
||||
borderWidth="1px"
|
||||
borderColor="#14B8A6"
|
||||
fontSize="xs"
|
||||
>
|
||||
{getMatchTypeName(concept.match_type)}
|
||||
</Badge>
|
||||
<Badge colorScheme="orange" fontSize="xs">
|
||||
<Badge
|
||||
bg="rgba(251, 146, 60, 0.15)"
|
||||
color="#FB923C"
|
||||
borderWidth="1px"
|
||||
borderColor="#FB923C"
|
||||
fontSize="xs"
|
||||
>
|
||||
{concept.stock_count} 只股票
|
||||
</Badge>
|
||||
</HStack>
|
||||
|
||||
Reference in New Issue
Block a user