diff --git a/src/components/EventDetailPanel/StockListItem.js b/src/components/EventDetailPanel/StockListItem.js index 7a38c882..3105a5d3 100644 --- a/src/components/EventDetailPanel/StockListItem.js +++ b/src/components/EventDetailPanel/StockListItem.js @@ -17,9 +17,7 @@ import { Icon, useColorModeValue, } from '@chakra-ui/react'; -import { Tag } from 'antd'; import { Star } from 'lucide-react'; -import { RobotOutlined } from '@ant-design/icons'; import { selectIsMobile } from '@store/slices/deviceSlice'; import { MiniTimelineChart } from '@components/Charts/Stock'; import MiniKLineChart from './MiniKLineChart'; @@ -103,7 +101,7 @@ const StockListItem = ({ return relationDesc.data .map(item => item.query_part || item.sentences || '') .filter(s => s) - .join(';') || '--'; + .join('') || '--'; } return '--'; @@ -325,76 +323,76 @@ const StockListItem = ({ position="relative" > - {/* AI 标识 - 行内显示在文字前面 */} - } - color="purple" - style={{ - fontSize: 12, - padding: '2px 8px', - marginRight: 8, - verticalAlign: 'middle', - display: 'inline-flex', - }} - > - AI合成 - {/* 渲染 query_part,每句带来源悬停提示 */} - {Array.isArray(stock.relation_desc?.data) && stock.relation_desc.data.filter(item => item.query_part).map((item, index, arr) => ( - - - {item.sentences && ( - - {item.sentences} - - )} - - 来源:{item.organization || '未知'}{item.author ? ` / ${item.author}` : ''} + {Array.isArray(stock.relation_desc?.data) && stock.relation_desc.data.filter(item => item.query_part).map((item, index) => ( + + {item.sentences && ( + + {item.sentences} - {item.report_title && ( - - {item.report_title} - - )} - {item.declare_date && ( - - {new Date(item.declare_date).toLocaleDateString('zh-CN')} - - )} - - } - placement="top" - hasArrow - bg="rgba(20, 20, 20, 0.95)" - color="white" - maxW="420px" + )} + + 来源:{item.organization || '未知'}{item.author ? ` / ${item.author}` : ''} + + {item.report_title && ( + + {item.report_title} + + )} + {item.declare_date && ( + + {new Date(item.declare_date).toLocaleDateString('zh-CN')} + + )} + + } + placement="top" + hasArrow + bg="rgba(20, 20, 20, 0.95)" + color="white" + maxW="420px" + > + - - {item.query_part} - - - {index < arr.length - 1 && ';'} - + {item.query_part} + + ))} + {/* 引用来源 - 浅色显示在最后 */} + {isDescExpanded && ( + + 来源:{Array.isArray(stock.relation_desc?.data) && + [...new Set(stock.relation_desc.data + .filter(item => item.organization) + .map(item => item.organization) + )].join('、') || '研报数据' + } + + )}