community增加事件详情

This commit is contained in:
2026-01-08 18:34:10 +08:00
parent d088bcbd12
commit 86158d1dd5
3 changed files with 25 additions and 25 deletions

4
app.py
View File

@@ -11123,7 +11123,7 @@ def get_events_effectiveness_stats():
return jsonify({
'success': True,
'data': {
'currentDate': end_date.strftime('%Y-%m-%d'),
'currentDate': current_trading_day.strftime('%Y-%m-%d') if hasattr(current_trading_day, 'strftime') else str(current_trading_day),
'summary': {
'totalEvents': 0,
'avgChg': 0,
@@ -11222,7 +11222,7 @@ def get_events_effectiveness_stats():
return jsonify({
'success': True,
'data': {
'currentDate': end_date.strftime('%Y-%m-%d'),
'currentDate': current_trading_day.strftime('%Y-%m-%d') if hasattr(current_trading_day, 'strftime') else str(current_trading_day),
'summary': summary,
'dailyStats': daily_stats,
'topPerformers': top_performers_list

View File

@@ -2710,14 +2710,9 @@ const HeroPanel = () => {
</HStack>
</Flex>
{/* AI舆情时空决策驾驶舱 - 左侧统计面板,中间词频流星图,右侧日历 */}
{/* AI舆情时空决策驾驶舱 - 左侧连板情绪,中间今日统计,右侧日历 */}
<Flex gap={5}>
{/* 左侧:今日事件统计 */}
<Box flex="0.7" minW="0">
<EventDailyStats />
</Box>
{/* 中间:词频流星图 */}
{/* 左侧:连板情绪监测 */}
<Box flex="1.15" minW="0">
<ThemeCometChart
onThemeSelect={(data) => {
@@ -2737,6 +2732,11 @@ const HeroPanel = () => {
/>
</Box>
{/* 中间:今日事件统计 */}
<Box flex="0.7" minW="0">
<EventDailyStats />
</Box>
{/* 右侧:综合日历 */}
<Box flex="1.15" minW="0">
<CombinedCalendar />

View File

@@ -89,7 +89,7 @@ const generateChartOption = (themes) => {
formatter: (params) => params.data.name,
position: 'right',
color: '#fff',
fontSize: 12,
fontSize: 14,
fontWeight: 'bold',
textShadowColor: 'rgba(0,0,0,0.8)',
textShadowBlur: 4,
@@ -145,9 +145,9 @@ const generateChartOption = (themes) => {
top: 5,
right: 10,
orient: 'horizontal',
textStyle: { color: 'rgba(255, 255, 255, 0.7)', fontSize: 11 },
itemWidth: 12,
itemHeight: 12,
textStyle: { color: 'rgba(255, 255, 255, 0.7)', fontSize: 13 },
itemWidth: 14,
itemHeight: 14,
data: Object.values(STATUS_CONFIG).map((s) => ({
name: s.name,
icon: 'circle',
@@ -165,25 +165,25 @@ const generateChartOption = (themes) => {
type: 'value',
name: '辨识度(最高板)',
nameLocation: 'middle',
nameGap: 25,
nameTextStyle: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 11 },
nameGap: 28,
nameTextStyle: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 13 },
min: 0,
max: maxX,
interval: 1,
axisLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.2)' } },
axisLabel: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 10, formatter: '{value}板' },
axisLabel: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 12, formatter: '{value}板' },
splitLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.05)' } },
},
yAxis: {
type: 'value',
name: '热度(家数)',
nameLocation: 'middle',
nameGap: 35,
nameTextStyle: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 11 },
nameGap: 40,
nameTextStyle: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 13 },
min: 0,
max: maxY,
axisLine: { show: false },
axisLabel: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 10 },
axisLabel: { color: 'rgba(255, 255, 255, 0.6)', fontSize: 12 },
splitLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.05)' } },
},
series,
@@ -289,16 +289,16 @@ const ThemeCometChart = ({ onThemeSelect }) => {
{/* 标题栏 */}
<HStack spacing={3} mb={2}>
<Box p={2} bg="rgba(255,215,0,0.15)" borderRadius="lg" border="1px solid rgba(255,215,0,0.3)">
<ThunderboltOutlined style={{ color: '#FFD700', fontSize: '18px' }} />
<ThunderboltOutlined style={{ color: '#FFD700', fontSize: '20px' }} />
</Box>
<VStack align="start" spacing={0} flex={1}>
<HStack>
<Text fontSize="md" fontWeight="bold" color="#FFD700">
<Text fontSize="lg" fontWeight="bold" color="#FFD700">
连板情绪监测
</Text>
{loading && <Spinner size="xs" color="yellow.400" />}
{loading && <Spinner size="sm" color="yellow.400" />}
</HStack>
<Text fontSize="xs" color="whiteAlpha.500">
<Text fontSize="sm" color="whiteAlpha.500">
{data.currentDate}
</Text>
</VStack>
@@ -324,7 +324,7 @@ const ThemeCometChart = ({ onThemeSelect }) => {
{data.availableDates.length > 1 && (
<Box px={2} pt={2}>
<HStack spacing={3}>
<Text fontSize="xs" color="whiteAlpha.500" whiteSpace="nowrap">
<Text fontSize="sm" color="whiteAlpha.500" whiteSpace="nowrap">
{data.availableDates[data.availableDates.length - 1]?.formatted?.slice(5) || ''}
</Text>
<ChakraTooltip
@@ -359,7 +359,7 @@ const ThemeCometChart = ({ onThemeSelect }) => {
/>
</Slider>
</ChakraTooltip>
<Text fontSize="xs" color="whiteAlpha.500" whiteSpace="nowrap">
<Text fontSize="sm" color="whiteAlpha.500" whiteSpace="nowrap">
{data.availableDates[0]?.formatted?.slice(5) || ''}
</Text>
</HStack>