feat: 添加告警详情H5页面,企微卡片点击可查看详情并操作

- 新增 H5 告警详情页面(截图+信息+3个操作按钮)
- 企微卡片"查看详情"跳转到 H5 页面
- 操作按钮改为:前往处理/已处理/误报忽略
- 新增 alarm_detail API 供 H5 页面获取告警+VLM分析数据
- 挂载 /static 目录提供 H5 页面访问
This commit is contained in:
2026-03-06 13:43:55 +08:00
parent 35386b8e6e
commit 5b00fd0464
5 changed files with 249 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ from app.models import (
AlarmEvent, AlarmLlmAnalysis,
CameraAreaBinding, AreaPersonBinding, NotifyArea,
)
from app.config import settings
from app.services.vlm_service import get_vlm_service
from app.services.wechat_service import get_wechat_service
@@ -94,6 +95,7 @@ async def process_alarm_notification(alarm_data: Dict):
snapshot_url=snapshot_url,
event_time=event_time_str,
alarm_level=alarm_level,
service_base_url=f"http://{settings.app.host}:{settings.app.port}",
)
logger.info(f"告警通知完成: {alarm_id}{len(persons)}")