refactor(CompanyOverview): 优化多个面板显示逻辑
- ValueChainCard: 流向关系视图时隐藏左侧导航选项 - AnnouncementsPanel: 移除重复的"最新公告"标题 - DisclosureSchedulePanel: 移除重复的"财报披露日程"标题 - CompetitiveAnalysisCard: 恢复竞争对手标签和雷达图显示 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
|||||||
HStack,
|
HStack,
|
||||||
Text,
|
Text,
|
||||||
Badge,
|
Badge,
|
||||||
Icon,
|
|
||||||
Card,
|
Card,
|
||||||
CardBody,
|
CardBody,
|
||||||
IconButton,
|
IconButton,
|
||||||
@@ -23,7 +22,6 @@ import {
|
|||||||
ModalFooter,
|
ModalFooter,
|
||||||
useDisclosure,
|
useDisclosure,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { FaBullhorn } from "react-icons/fa";
|
|
||||||
import { ExternalLinkIcon } from "@chakra-ui/icons";
|
import { ExternalLinkIcon } from "@chakra-ui/icons";
|
||||||
|
|
||||||
import { useAnnouncementsData } from "../../hooks/useAnnouncementsData";
|
import { useAnnouncementsData } from "../../hooks/useAnnouncementsData";
|
||||||
@@ -55,10 +53,6 @@ const AnnouncementsPanel: React.FC<AnnouncementsPanelProps> = ({ stockCode }) =>
|
|||||||
<VStack spacing={4} align="stretch">
|
<VStack spacing={4} align="stretch">
|
||||||
{/* 最新公告 */}
|
{/* 最新公告 */}
|
||||||
<Box>
|
<Box>
|
||||||
<HStack mb={3}>
|
|
||||||
<Icon as={FaBullhorn} color={THEME.gold} />
|
|
||||||
<Text fontWeight="bold" color={THEME.textPrimary}>最新公告</Text>
|
|
||||||
</HStack>
|
|
||||||
<VStack spacing={2} align="stretch">
|
<VStack spacing={2} align="stretch">
|
||||||
{announcements.map((announcement: any, idx: number) => (
|
{announcements.map((announcement: any, idx: number) => (
|
||||||
<Card
|
<Card
|
||||||
|
|||||||
@@ -5,15 +5,12 @@ import React from "react";
|
|||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
VStack,
|
VStack,
|
||||||
HStack,
|
|
||||||
Text,
|
Text,
|
||||||
Badge,
|
Badge,
|
||||||
Icon,
|
|
||||||
Card,
|
Card,
|
||||||
CardBody,
|
CardBody,
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { FaCalendarAlt } from "react-icons/fa";
|
|
||||||
|
|
||||||
import { useDisclosureData } from "../../hooks/useDisclosureData";
|
import { useDisclosureData } from "../../hooks/useDisclosureData";
|
||||||
import { THEME } from "../config";
|
import { THEME } from "../config";
|
||||||
@@ -42,10 +39,6 @@ const DisclosureSchedulePanel: React.FC<DisclosureSchedulePanelProps> = ({ stock
|
|||||||
return (
|
return (
|
||||||
<VStack spacing={4} align="stretch">
|
<VStack spacing={4} align="stretch">
|
||||||
<Box>
|
<Box>
|
||||||
<HStack mb={3}>
|
|
||||||
<Icon as={FaCalendarAlt} color={THEME.gold} />
|
|
||||||
<Text fontWeight="bold" color={THEME.textPrimary}>财报披露日程</Text>
|
|
||||||
</HStack>
|
|
||||||
<SimpleGrid columns={{ base: 2, md: 4 }} spacing={3}>
|
<SimpleGrid columns={{ base: 2, md: 4 }} spacing={3}>
|
||||||
{disclosureSchedule.map((schedule: any, idx: number) => (
|
{disclosureSchedule.map((schedule: any, idx: number) => (
|
||||||
<Card
|
<Card
|
||||||
|
|||||||
@@ -234,10 +234,10 @@ const CompetitiveAnalysisCard: React.FC<CompetitiveAnalysisCardProps> = memo(
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardBody>
|
<CardBody>
|
||||||
{/* 主要竞争对手 */}
|
{/* 主要竞争对手 */}
|
||||||
{/* {competitors.length > 0 && <CompetitorTags competitors={competitors} />} */}
|
{competitors.length > 0 && <CompetitorTags competitors={competitors} />}
|
||||||
|
|
||||||
{/* 评分和雷达图 */}
|
{/* 评分和雷达图 */}
|
||||||
{/* <Grid templateColumns="repeat(2, 1fr)" gap={6}>
|
<Grid templateColumns="repeat(2, 1fr)" gap={6}>
|
||||||
<GridItem colSpan={GRID_COLSPAN}>
|
<GridItem colSpan={GRID_COLSPAN}>
|
||||||
<ScoreSection scores={competitivePosition.scores} />
|
<ScoreSection scores={competitivePosition.scores} />
|
||||||
</GridItem>
|
</GridItem>
|
||||||
@@ -251,9 +251,9 @@ const CompetitiveAnalysisCard: React.FC<CompetitiveAnalysisCardProps> = memo(
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</GridItem>
|
</GridItem>
|
||||||
</Grid> */}
|
</Grid>
|
||||||
|
|
||||||
{/* <Divider my={4} borderColor="yellow.600" /> */}
|
<Divider my={4} borderColor="yellow.600" />
|
||||||
|
|
||||||
{/* 竞争优势和劣势 */}
|
{/* 竞争优势和劣势 */}
|
||||||
<AdvantagesSection
|
<AdvantagesSection
|
||||||
|
|||||||
@@ -155,7 +155,8 @@ const ValueChainCard: React.FC<ValueChainCardProps> = memo(({
|
|||||||
align="center"
|
align="center"
|
||||||
flexWrap="wrap"
|
flexWrap="wrap"
|
||||||
>
|
>
|
||||||
{/* 左侧:流程式导航 */}
|
{/* 左侧:流程式导航 - 仅在层级视图显示 */}
|
||||||
|
{viewMode === 'hierarchy' && (
|
||||||
<ProcessNavigation
|
<ProcessNavigation
|
||||||
activeTab={activeTab}
|
activeTab={activeTab}
|
||||||
onTabChange={setActiveTab}
|
onTabChange={setActiveTab}
|
||||||
@@ -163,6 +164,7 @@ const ValueChainCard: React.FC<ValueChainCardProps> = memo(({
|
|||||||
coreCount={coreNodes.length}
|
coreCount={coreNodes.length}
|
||||||
downstreamCount={downstreamNodes.length}
|
downstreamCount={downstreamNodes.length}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 右侧:筛选与视图切换 */}
|
{/* 右侧:筛选与视图切换 */}
|
||||||
<ValueChainFilterBar
|
<ValueChainFilterBar
|
||||||
|
|||||||
Reference in New Issue
Block a user