community增加事件详情
This commit is contained in:
@@ -575,17 +575,26 @@ const DetailModal = ({ isOpen, onClose, selectedDate, ztDetail, events, loading
|
|||||||
title: '相关股票',
|
title: '相关股票',
|
||||||
dataIndex: 'related_stocks',
|
dataIndex: 'related_stocks',
|
||||||
key: 'stocks',
|
key: 'stocks',
|
||||||
width: 100,
|
width: 120,
|
||||||
render: (stocks) => {
|
render: (stocks) => {
|
||||||
const hasStocks = stocks && stocks.length > 0;
|
const hasStocks = stocks && stocks.length > 0;
|
||||||
|
if (!hasStocks) {
|
||||||
|
return <AntText type="secondary">无</AntText>;
|
||||||
|
}
|
||||||
|
// 构建股票列表内容
|
||||||
|
const stockContent = stocks.map(s => {
|
||||||
|
const code = s.stock_code || s.code || s;
|
||||||
|
const name = s.stock_name || s.name || code;
|
||||||
|
return `${name}(${code})`;
|
||||||
|
}).join('\n');
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
icon={<StockOutlined />}
|
icon={<StockOutlined />}
|
||||||
disabled={!hasStocks}
|
onClick={() => showContentDetail(stockContent, `相关股票 (${stocks.length}只)`)}
|
||||||
>
|
>
|
||||||
{hasStocks ? `${stocks.length}只` : '无'}
|
{stocks.length}只
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -706,12 +715,12 @@ const DetailModal = ({ isOpen, onClose, selectedDate, ztDetail, events, loading
|
|||||||
)}
|
)}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
||||||
{/* 投资事件 Tab */}
|
{/* 未来事件 Tab */}
|
||||||
<TabPane
|
<TabPane
|
||||||
tab={
|
tab={
|
||||||
<span style={{ fontSize: '16px' }}>
|
<span style={{ fontSize: '16px' }}>
|
||||||
<CalendarOutlined style={{ marginRight: 8 }} />
|
<CalendarOutlined style={{ marginRight: 8 }} />
|
||||||
投资事件 ({events?.length || 0})
|
未来事件 ({events?.length || 0})
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
key="event"
|
key="event"
|
||||||
@@ -1227,7 +1236,7 @@ const InfoModal = () => {
|
|||||||
<Text fontSize="md" fontWeight="bold" color="whiteAlpha.900" mb={2}>📅 综合日历</Text>
|
<Text fontSize="md" fontWeight="bold" color="whiteAlpha.900" mb={2}>📅 综合日历</Text>
|
||||||
<Text fontSize="md" color="whiteAlpha.800" lineHeight="1.8">
|
<Text fontSize="md" color="whiteAlpha.800" lineHeight="1.8">
|
||||||
日历同时展示<Text as="span" color="purple.300" fontWeight="bold">历史涨停数据</Text>和
|
日历同时展示<Text as="span" color="purple.300" fontWeight="bold">历史涨停数据</Text>和
|
||||||
<Text as="span" color="green.300" fontWeight="bold">未来投资事件</Text>,
|
<Text as="span" color="green.300" fontWeight="bold">未来事件</Text>,
|
||||||
点击日期查看详细信息。
|
点击日期查看详细信息。
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -1240,7 +1249,7 @@ const InfoModal = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box>
|
<Box>
|
||||||
<Text fontSize="md" fontWeight="bold" color="whiteAlpha.900" mb={2}>📊 投资事件</Text>
|
<Text fontSize="md" fontWeight="bold" color="whiteAlpha.900" mb={2}>📊 未来事件</Text>
|
||||||
<Text fontSize="md" color="whiteAlpha.800" lineHeight="1.8">
|
<Text fontSize="md" color="whiteAlpha.800" lineHeight="1.8">
|
||||||
点击未来日期,查看事件详情,包括<Text as="span" color="cyan.300" fontWeight="bold">背景分析</Text>、
|
点击未来日期,查看事件详情,包括<Text as="span" color="cyan.300" fontWeight="bold">背景分析</Text>、
|
||||||
<Text as="span" color="orange.300" fontWeight="bold">未来推演</Text>、
|
<Text as="span" color="orange.300" fontWeight="bold">未来推演</Text>、
|
||||||
|
|||||||
Reference in New Issue
Block a user