From 258708fca024bf32f90e9720cc550f238ede2372 Mon Sep 17 00:00:00 2001
From: zdl <3489966805@qq.com>
Date: Tue, 9 Dec 2025 15:16:02 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/InvestmentCalendar/index.js | 6 ++++--
src/views/Company/CompanyOverview.js | 9 +++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/components/InvestmentCalendar/index.js b/src/components/InvestmentCalendar/index.js
index a24a16e9..5025efe7 100644
--- a/src/components/InvestmentCalendar/index.js
+++ b/src/components/InvestmentCalendar/index.js
@@ -524,7 +524,9 @@ const InvestmentCalendar = () => {
{concepts && concepts.length > 0 ? (
concepts.slice(0, 3).map((concept, index) => (
}>
- {Array.isArray(concept) ? concept[0] : concept}
+ {typeof concept === 'string'
+ ? concept
+ : (concept?.concept || concept?.name || '未知')}
))
) : (
@@ -919,7 +921,7 @@ const InvestmentCalendar = () => {
record[0]}
+ rowKey={(record) => record.code}
size="middle"
pagination={false}
/>
diff --git a/src/views/Company/CompanyOverview.js b/src/views/Company/CompanyOverview.js
index 5046280a..39d7d85b 100644
--- a/src/views/Company/CompanyOverview.js
+++ b/src/views/Company/CompanyOverview.js
@@ -1180,12 +1180,15 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
const links = [];
valueChainData.value_chain_flows.forEach(flow => {
+ // 检查 source 和 target 是否存在
+ if (!flow?.source?.node_name || !flow?.target?.node_name) return;
+
nodes.add(flow.source.node_name);
nodes.add(flow.target.node_name);
links.push({
source: flow.source.node_name,
target: flow.target.node_name,
- value: parseFloat(flow.flow_metrics.flow_ratio) || 1,
+ value: parseFloat(flow.flow_metrics?.flow_ratio) || 1,
lineStyle: { color: 'source', opacity: 0.6 }
});
});
@@ -2421,7 +2424,9 @@ const CompanyAnalysisComplete = ({ stockCode: propStockCode }) => {
<>
{event.keywords.slice(0, 4).map((keyword, kidx) => (
- {keyword}
+ {typeof keyword === 'string'
+ ? keyword
+ : (keyword?.concept || keyword?.name || '未知')}
))}
>