feat: 添加消息推送能力,添加新闻催化分析页的合规提示
This commit is contained in:
@@ -866,15 +866,10 @@ const TransmissionChainAnalysis = ({ eventId }) => {
|
||||
fontStyle="italic"
|
||||
>
|
||||
{selectedNode.extra.description?.data ? (
|
||||
<>
|
||||
<CitedContent
|
||||
data={selectedNode.extra.description}
|
||||
title=""
|
||||
showAIBadge={false}
|
||||
containerStyle={{ backgroundColor: 'transparent', padding: 0, display: 'inline-block', verticalAlign: 'baseline' }}
|
||||
/>
|
||||
(AI合成)
|
||||
</>
|
||||
<CitedContent
|
||||
data={selectedNode.extra.description}
|
||||
title=""
|
||||
/>
|
||||
) : (
|
||||
`${selectedNode.extra.description}(AI合成)`
|
||||
)}
|
||||
@@ -916,36 +911,43 @@ const TransmissionChainAnalysis = ({ eventId }) => {
|
||||
</Text>
|
||||
<List spacing={2}>
|
||||
{nodeDetail.parents.map((parent, index) => (
|
||||
<ListItem key={index} p={2} bg="gray.50" borderRadius="md" borderLeft="3px solid" borderColor="green.300">
|
||||
<HStack justify="space-between" align="flex-start">
|
||||
<VStack align="stretch" spacing={1} flex={1}>
|
||||
<Text fontWeight="bold" fontSize="sm">{parent.name}</Text>
|
||||
{parent.transmission_mechanism?.data ? (
|
||||
<Text fontSize="xs">
|
||||
<Text as="span" fontWeight="bold">机制: </Text>
|
||||
<CitedContent
|
||||
data={parent.transmission_mechanism}
|
||||
title=""
|
||||
showAIBadge={false}
|
||||
containerStyle={{ backgroundColor: 'transparent', padding: 0, display: 'inline-block', verticalAlign: 'baseline' }}
|
||||
/>
|
||||
(AI合成)
|
||||
</Text>
|
||||
) : parent.transmission_mechanism ? (
|
||||
<Text fontSize="xs" color="gray.600">
|
||||
机制: {parent.transmission_mechanism}(AI合成)
|
||||
</Text>
|
||||
) : null}
|
||||
</VStack>
|
||||
<HStack spacing={2}>
|
||||
<Badge colorScheme={parent.direction === 'positive' ? 'green' : parent.direction === 'negative' ? 'red' : 'gray'} size="sm">
|
||||
{parent.direction}
|
||||
<ListItem key={index} p={2} bg="gray.50" borderRadius="md" borderLeft="3px solid" borderColor="green.300" position="relative">
|
||||
<HStack position="absolute" top={2} right={2} spacing={2} zIndex={1}>
|
||||
{parent.direction && (
|
||||
<Badge
|
||||
colorScheme={
|
||||
parent.direction === 'positive' ? 'green' :
|
||||
parent.direction === 'negative' ? 'red' :
|
||||
'gray'
|
||||
}
|
||||
size="sm"
|
||||
>
|
||||
{parent.direction === 'positive' ? '正向影响' :
|
||||
parent.direction === 'negative' ? '负向影响' :
|
||||
parent.direction === 'neutral' ? '中性影响' : '未知'}
|
||||
</Badge>
|
||||
{parent.is_circular && (
|
||||
<Badge colorScheme="purple" size="sm">🔄 循环</Badge>
|
||||
)}
|
||||
</HStack>
|
||||
)}
|
||||
{parent.is_circular && (
|
||||
<Badge colorScheme="purple" size="sm">🔄 循环</Badge>
|
||||
)}
|
||||
</HStack>
|
||||
<VStack align="stretch" spacing={1}>
|
||||
<Text fontWeight="bold" fontSize="sm" pr={parent.direction || parent.is_circular ? 20 : 0}>{parent.name}</Text>
|
||||
{parent.transmission_mechanism?.data ? (
|
||||
<CitedContent
|
||||
data={parent.transmission_mechanism}
|
||||
title=""
|
||||
prefix="机制:"
|
||||
prefixStyle={{ fontSize: 12, color: '#666', fontWeight: 'bold' }}
|
||||
containerStyle={{ marginTop: 8 }}
|
||||
showAIBadge={false}
|
||||
/>
|
||||
) : parent.transmission_mechanism ? (
|
||||
<Text fontSize="xs" color="gray.600">
|
||||
机制: {parent.transmission_mechanism}(AI合成)
|
||||
</Text>
|
||||
) : null}
|
||||
</VStack>
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
@@ -967,33 +969,40 @@ const TransmissionChainAnalysis = ({ eventId }) => {
|
||||
</Text>
|
||||
<List spacing={2}>
|
||||
{nodeDetail.children.map((child, index) => (
|
||||
<ListItem key={index} p={2} bg="gray.50" borderRadius="md" borderLeft="3px solid" borderColor="orange.300">
|
||||
<HStack justify="space-between" align="flex-start">
|
||||
<VStack align="stretch" spacing={1} flex={1}>
|
||||
<Text fontWeight="bold" fontSize="sm">{child.name}</Text>
|
||||
{child.transmission_mechanism?.data ? (
|
||||
<Text fontSize="xs">
|
||||
<Text as="span" fontWeight="bold">机制: </Text>
|
||||
<CitedContent
|
||||
data={child.transmission_mechanism}
|
||||
title=""
|
||||
showAIBadge={false}
|
||||
containerStyle={{ backgroundColor: 'transparent', padding: 0, display: 'inline-block', verticalAlign: 'baseline' }}
|
||||
/>
|
||||
(AI合成)
|
||||
</Text>
|
||||
) : child.transmission_mechanism ? (
|
||||
<Text fontSize="xs" color="gray.600">
|
||||
机制: {child.transmission_mechanism}(AI合成)
|
||||
</Text>
|
||||
) : null}
|
||||
</VStack>
|
||||
<HStack spacing={2}>
|
||||
<Badge colorScheme={child.direction === 'positive' ? 'green' : child.direction === 'negative' ? 'red' : 'gray'} size="sm">
|
||||
{child.direction}
|
||||
<ListItem key={index} p={2} bg="gray.50" borderRadius="md" borderLeft="3px solid" borderColor="orange.300" position="relative">
|
||||
{child.direction && (
|
||||
<Box position="absolute" top={2} right={2} zIndex={1}>
|
||||
<Badge
|
||||
colorScheme={
|
||||
child.direction === 'positive' ? 'green' :
|
||||
child.direction === 'negative' ? 'red' :
|
||||
'gray'
|
||||
}
|
||||
size="sm"
|
||||
>
|
||||
{child.direction === 'positive' ? '正向影响' :
|
||||
child.direction === 'negative' ? '负向影响' :
|
||||
child.direction === 'neutral' ? '中性影响' : '未知'}
|
||||
</Badge>
|
||||
</HStack>
|
||||
</HStack>
|
||||
</Box>
|
||||
)}
|
||||
<VStack align="stretch" spacing={1}>
|
||||
<Text fontWeight="bold" fontSize="sm" pr={child.direction ? 20 : 0}>{child.name}</Text>
|
||||
{child.transmission_mechanism?.data ? (
|
||||
<CitedContent
|
||||
data={child.transmission_mechanism}
|
||||
title=""
|
||||
prefix="机制:"
|
||||
prefixStyle={{ fontSize: 12, color: '#666', fontWeight: 'bold' }}
|
||||
containerStyle={{ marginTop: 8 }}
|
||||
showAIBadge={false}
|
||||
/>
|
||||
) : child.transmission_mechanism ? (
|
||||
<Text fontSize="xs" color="gray.600">
|
||||
机制: {child.transmission_mechanism}(AI合成)
|
||||
</Text>
|
||||
) : null}
|
||||
</VStack>
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
|
||||
Reference in New Issue
Block a user