update pay promo
This commit is contained in:
@@ -17,9 +17,7 @@ import {
|
|||||||
Icon,
|
Icon,
|
||||||
useColorModeValue,
|
useColorModeValue,
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { Tag } from 'antd';
|
|
||||||
import { Star } from 'lucide-react';
|
import { Star } from 'lucide-react';
|
||||||
import { RobotOutlined } from '@ant-design/icons';
|
|
||||||
import { selectIsMobile } from '@store/slices/deviceSlice';
|
import { selectIsMobile } from '@store/slices/deviceSlice';
|
||||||
import { MiniTimelineChart } from '@components/Charts/Stock';
|
import { MiniTimelineChart } from '@components/Charts/Stock';
|
||||||
import MiniKLineChart from './MiniKLineChart';
|
import MiniKLineChart from './MiniKLineChart';
|
||||||
@@ -103,7 +101,7 @@ const StockListItem = ({
|
|||||||
return relationDesc.data
|
return relationDesc.data
|
||||||
.map(item => item.query_part || item.sentences || '')
|
.map(item => item.query_part || item.sentences || '')
|
||||||
.filter(s => s)
|
.filter(s => s)
|
||||||
.join(';') || '--';
|
.join('') || '--';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '--';
|
return '--';
|
||||||
@@ -325,76 +323,76 @@ const StockListItem = ({
|
|||||||
position="relative"
|
position="relative"
|
||||||
>
|
>
|
||||||
<Collapse in={isDescExpanded} startingHeight={56}>
|
<Collapse in={isDescExpanded} startingHeight={56}>
|
||||||
{/* AI 标识 - 行内显示在文字前面 */}
|
|
||||||
<Tag
|
|
||||||
icon={<RobotOutlined />}
|
|
||||||
color="purple"
|
|
||||||
style={{
|
|
||||||
fontSize: 12,
|
|
||||||
padding: '2px 8px',
|
|
||||||
marginRight: 8,
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
display: 'inline-flex',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
AI合成
|
|
||||||
</Tag>
|
|
||||||
{/* 渲染 query_part,每句带来源悬停提示 */}
|
{/* 渲染 query_part,每句带来源悬停提示 */}
|
||||||
<Text
|
<Text
|
||||||
as="span"
|
as="span"
|
||||||
fontSize="sm"
|
fontSize="xs"
|
||||||
color={PROFESSIONAL_COLORS.text.primary}
|
color={nameColor}
|
||||||
lineHeight="1.8"
|
lineHeight="1.5"
|
||||||
>
|
>
|
||||||
{Array.isArray(stock.relation_desc?.data) && stock.relation_desc.data.filter(item => item.query_part).map((item, index, arr) => (
|
{Array.isArray(stock.relation_desc?.data) && stock.relation_desc.data.filter(item => item.query_part).map((item, index) => (
|
||||||
<React.Fragment key={index}>
|
<Tooltip
|
||||||
<Tooltip
|
key={index}
|
||||||
label={
|
label={
|
||||||
<Box maxW="400px" p={2}>
|
<Box maxW="400px" p={2}>
|
||||||
{item.sentences && (
|
{item.sentences && (
|
||||||
<Text fontSize="xs" mb={2} whiteSpace="pre-wrap">
|
<Text fontSize="xs" mb={2} whiteSpace="pre-wrap">
|
||||||
{item.sentences}
|
{item.sentences}
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
<Text fontSize="xs" color="gray.300" mt={1}>
|
|
||||||
来源:{item.organization || '未知'}{item.author ? ` / ${item.author}` : ''}
|
|
||||||
</Text>
|
</Text>
|
||||||
{item.report_title && (
|
)}
|
||||||
<Text fontSize="xs" color="gray.300" noOfLines={2}>
|
<Text fontSize="xs" color="gray.300" mt={1}>
|
||||||
{item.report_title}
|
来源:{item.organization || '未知'}{item.author ? ` / ${item.author}` : ''}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
{item.report_title && (
|
||||||
{item.declare_date && (
|
<Text fontSize="xs" color="gray.300" noOfLines={2}>
|
||||||
<Text fontSize="xs" color="gray.400">
|
{item.report_title}
|
||||||
{new Date(item.declare_date).toLocaleDateString('zh-CN')}
|
</Text>
|
||||||
</Text>
|
)}
|
||||||
)}
|
{item.declare_date && (
|
||||||
</Box>
|
<Text fontSize="xs" color="gray.400">
|
||||||
}
|
{new Date(item.declare_date).toLocaleDateString('zh-CN')}
|
||||||
placement="top"
|
</Text>
|
||||||
hasArrow
|
)}
|
||||||
bg="rgba(20, 20, 20, 0.95)"
|
</Box>
|
||||||
color="white"
|
}
|
||||||
maxW="420px"
|
placement="top"
|
||||||
|
hasArrow
|
||||||
|
bg="rgba(20, 20, 20, 0.95)"
|
||||||
|
color="white"
|
||||||
|
maxW="420px"
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
as="span"
|
||||||
|
cursor="help"
|
||||||
|
borderBottom="1px dashed"
|
||||||
|
borderBottomColor="gray.500"
|
||||||
|
_hover={{
|
||||||
|
color: PROFESSIONAL_COLORS.gold[500],
|
||||||
|
borderBottomColor: PROFESSIONAL_COLORS.gold[500],
|
||||||
|
}}
|
||||||
|
transition="all 0.2s"
|
||||||
>
|
>
|
||||||
<Text
|
{item.query_part}
|
||||||
as="span"
|
</Text>
|
||||||
cursor="help"
|
</Tooltip>
|
||||||
borderBottom="1px dashed"
|
|
||||||
borderBottomColor="gray.400"
|
|
||||||
_hover={{
|
|
||||||
color: PROFESSIONAL_COLORS.gold[500],
|
|
||||||
borderBottomColor: PROFESSIONAL_COLORS.gold[500],
|
|
||||||
}}
|
|
||||||
transition="all 0.2s"
|
|
||||||
>
|
|
||||||
{item.query_part}
|
|
||||||
</Text>
|
|
||||||
</Tooltip>
|
|
||||||
{index < arr.length - 1 && ';'}
|
|
||||||
</React.Fragment>
|
|
||||||
))}
|
))}
|
||||||
</Text>
|
</Text>
|
||||||
|
{/* 引用来源 - 浅色显示在最后 */}
|
||||||
|
{isDescExpanded && (
|
||||||
|
<Text
|
||||||
|
fontSize="10px"
|
||||||
|
color="gray.500"
|
||||||
|
mt={2}
|
||||||
|
lineHeight="1.4"
|
||||||
|
>
|
||||||
|
来源:{Array.isArray(stock.relation_desc?.data) &&
|
||||||
|
[...new Set(stock.relation_desc.data
|
||||||
|
.filter(item => item.organization)
|
||||||
|
.map(item => item.organization)
|
||||||
|
)].join('、') || '研报数据'
|
||||||
|
}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Box>
|
</Box>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
Reference in New Issue
Block a user