style: DeepAnalysisTab 黑金主题样式优化

- ProcessNavigation: Tab 未选中状态字体白色,数量Badge与边框颜色统一(gray.600)
- KeyFactorCard: 适配黑金主题(cardBg #252D3A, 文字颜色调整)
- KeyFactorsCard: 黑金主题重构,移除免责声明组件
- TimelineCard: 黑金主题重构,移除免责声明组件
- ValueChainCard: 调整 CardHeader 和 CardBody padding
- ValueChainFilterBar: 暂时注释筛选下拉框

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-12 14:25:48 +08:00
parent 23112db115
commit e92cc09e06
6 changed files with 149 additions and 49 deletions

View File

@@ -3,6 +3,7 @@
*
* 显示单个关键因素的详细信息
* 使用位置:关键因素 Accordion 内
* 黑金主题设计
*/
import React from 'react';
@@ -19,6 +20,13 @@ import {
import { FaArrowUp, FaArrowDown } from 'react-icons/fa';
import type { KeyFactorCardProps, ImpactDirection } from '../types';
// 黑金主题样式常量
const THEME = {
cardBg: '#252D3A',
textColor: '#E2E8F0',
subtextColor: '#A0AEC0',
} as const;
/**
* 获取影响方向对应的颜色
*/
@@ -47,31 +55,43 @@ const getImpactLabel = (direction?: ImpactDirection): string => {
const KeyFactorCard: React.FC<KeyFactorCardProps> = ({ factor }) => {
const impactColor = getImpactColor(factor.impact_direction);
const bgColor = 'white';
const borderColor = 'gray.200';
return (
<Card bg={bgColor} borderColor={borderColor} size="sm">
<Card
bg={THEME.cardBg}
border="1px solid"
borderColor="whiteAlpha.100"
size="sm"
>
<CardBody p={3}>
<VStack align="stretch" spacing={2}>
<HStack justify="space-between">
<Text fontWeight="medium" fontSize="sm">
<Text fontWeight="medium" fontSize="sm" color={THEME.textColor}>
{factor.factor_name}
</Text>
<Badge colorScheme={impactColor} size="sm">
<Badge
bg="transparent"
border="1px solid"
borderColor={`${impactColor}.400`}
color={`${impactColor}.400`}
size="sm"
>
{getImpactLabel(factor.impact_direction)}
</Badge>
</HStack>
<HStack spacing={2}>
<Text fontSize="lg" fontWeight="bold" color={`${impactColor}.500`}>
<Text fontSize="lg" fontWeight="bold" color={`${impactColor}.400`}>
{factor.factor_value}
{factor.factor_unit && ` ${factor.factor_unit}`}
</Text>
{factor.year_on_year !== undefined && (
<Tag
size="sm"
colorScheme={factor.year_on_year > 0 ? 'red' : 'green'}
bg="transparent"
border="1px solid"
borderColor={factor.year_on_year > 0 ? 'red.400' : 'green.400'}
color={factor.year_on_year > 0 ? 'red.400' : 'green.400'}
>
<Icon
as={factor.year_on_year > 0 ? FaArrowUp : FaArrowDown}
@@ -84,17 +104,17 @@ const KeyFactorCard: React.FC<KeyFactorCardProps> = ({ factor }) => {
</HStack>
{factor.factor_desc && (
<Text fontSize="xs" color="gray.600" noOfLines={2}>
<Text fontSize="xs" color={THEME.subtextColor} noOfLines={2}>
{factor.factor_desc}
</Text>
)}
<HStack justify="space-between">
<Text fontSize="xs" color="gray.500">
<Text fontSize="xs" color={THEME.subtextColor}>
: {factor.impact_weight}
</Text>
{factor.report_period && (
<Text fontSize="xs" color="gray.500">
<Text fontSize="xs" color={THEME.subtextColor}>
{factor.report_period}
</Text>
)}

View File

@@ -16,19 +16,19 @@ const THEME = {
upstream: {
active: 'orange.500',
activeBg: 'orange.900',
inactive: 'gray.600',
inactive: 'white',
inactiveBg: 'gray.700',
},
core: {
active: 'blue.500',
activeBg: 'blue.900',
inactive: 'gray.600',
inactive: 'white',
inactiveBg: 'gray.700',
},
downstream: {
active: 'green.500',
activeBg: 'green.900',
inactive: 'gray.600',
inactive: 'white',
inactiveBg: 'gray.700',
},
};
@@ -70,7 +70,7 @@ const NavItem: React.FC<NavItemProps> = memo(({
cursor="pointer"
bg={isActive ? colors.activeBg : colors.inactiveBg}
borderWidth={2}
borderColor={isActive ? colors.active : 'transparent'}
borderColor={isActive ? colors.active : 'gray.600'}
onClick={onClick}
transition="all 0.2s"
_hover={{
@@ -88,7 +88,7 @@ const NavItem: React.FC<NavItemProps> = memo(({
{label}
</Text>
<Badge
bg={isActive ? colors.active : colors.inactive}
bg={isActive ? colors.active : 'gray.600'}
color="white"
borderRadius="full"
px={2}

View File

@@ -70,7 +70,7 @@ const ValueChainFilterBar: React.FC<ValueChainFilterBarProps> = memo(({
gap={3}
>
{/* 左侧筛选区 */}
<HStack spacing={3}>
{/* <HStack spacing={3}>
<Select
value={typeFilter}
onChange={(e) => onTypeChange(e.target.value)}
@@ -106,7 +106,7 @@ const ValueChainFilterBar: React.FC<ValueChainFilterBarProps> = memo(({
</option>
))}
</Select>
</HStack>
</HStack> */}
{/* 右侧视图切换 */}
<Tabs