{% extends "base.html" %} {% block title %}任务 {{ task.display_id }} - 热榜评论分析工具{% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %} {% set label, cls = status_badge_config(task.status) %} {% set percent = progress_percent(task.processed_items_count, task.total_items_count) %} {% set ai_percent = rate_percent(task.analysis_success_rate) %} {% set target_comments = task.hotspot_limit * task.item_limit_per_hotspot * task.comment_limit_per_item %}

TASK DETAIL

{{ task.platform | platform_label }}热点评论采集任务 {{ task.display_id }}

创建时间 {{ task.created_at_label }},当前阶段 {{ task.current_stage_label or "等待启动" }}。任务执行过程会隔离单条内容失败,并保留失败原因用于复查。

{% for stage, desc, state in [ ("创建任务", "参数校验完成", "done"), ("热点抓取", (task.hotspots_count or 0) ~ " 个热点入库", "done" if (task.hotspots_count or 0) > 0 or task.status == "success" else "pending"), ("内容采集", task.processed_items_count ~ " / " ~ task.total_items_count ~ " 条内容", "done" if task.processed_items_count >= task.total_items_count and task.total_items_count > 0 else "active"), ("评论分页", (task.comments_count or 0) ~ " 条评论", "done" if (task.comments_count or 0) > 0 else "pending"), ("AI 分析", "成功率 " ~ ai_percent ~ "%", "done" if ai_percent >= 80 else "active"), ("报告生成", (task.reports_count or 0) ~ " 份报告", "done" if (task.reports_count or 0) > 0 else "pending") ] %}
{% if state == "done" %}✓{% elif state == "active" %}•{% else %}○{% endif %} {{ stage }} {{ desc }}
{% endfor %}
{% if task.status == "running" and not hotspots %}

正在抓取热点数据,请稍候...

{% endif %}

执行阶段

热点结果

按热度与评论完成度查看
{% for hotspot in hotspots %}
{{ "%02d"|format(hotspot.rank or loop.index) }}

热点 {{ hotspot.rank or loop.index }}:{{ hotspot.title }}

{{ hotspot.content_items | length }} 内容 {{ hotspot.comments | length }} 评论 {{ task.platform | platform_label }}
查看报告
{% else %}
暂无热点结果
{% endfor %}
{% if task.is_progress_stale %}
超过 {{ task.stale_threshold_minutes }} 分钟没有进度更新,可能仍在等待外部接口或 AI 响应;如果长时间不恢复,请刷新状态或查看后端日志。
{% endif %} {% if task.status == "success" and (task.comments_count or 0) < target_comments %}
少于理论上限通常是内容本身评论不足或平台返回不足,不直接代表任务失败。若失败内容数大于 0,请结合失败原因判断。
{% endif %} {% if task.analysis_status == "insufficient" %}
AI 成功率 {{ ai_percent }}%,当前样本可能不足,报告结论请结合评论明细判断。
{% endif %} {% if task.status == "running" %} {% endif %} {% endblock %}