125 lines
5.1 KiB
HTML
125 lines
5.1 KiB
HTML
{% extends "base.html" %}
|
|
{% set has_running_tasks = tasks | selectattr("status", "equalto", "running") | list | length > 0 %}
|
|
{% block title %}热榜评论雷达 - 热榜评论分析工具{% endblock %}
|
|
{% block breadcrumbs %}{% endblock %}
|
|
{% block content %}
|
|
<section class="control-hero">
|
|
<div class="control-hero-copy">
|
|
<p class="section-kicker">COMMENT INTELLIGENCE</p>
|
|
<p class="control-subtitle">内容平台评论分析控制台</p>
|
|
<h1>用默认配置快速启动一次评论分析</h1>
|
|
<p>选择平台后直接开始抓取,系统会按 5 个热点、25 条内容、最多 1,250 条评论完成采集、AI 分析和报告生成。</p>
|
|
</div>
|
|
<section class="quick-launch-panel" id="create-task" aria-label="快速创建抓取任务">
|
|
<div class="panel-title-row">
|
|
<div>
|
|
<p class="section-kicker">采集配置</p>
|
|
<h2>默认抓取方案</h2>
|
|
</div>
|
|
<span class="soft-badge soft-badge-success">推荐</span>
|
|
</div>
|
|
<div id="form-error" class="alert alert-danger d-none" role="alert"></div>
|
|
<form id="task-form" onsubmit="submitTask(event)">
|
|
<div class="default-scale-grid" aria-label="默认任务规模">
|
|
<div class="scale-tile">
|
|
<strong>5</strong>
|
|
<span>热点</span>
|
|
</div>
|
|
<div class="scale-tile">
|
|
<strong>25</strong>
|
|
<span>内容</span>
|
|
</div>
|
|
<div class="scale-tile">
|
|
<strong id="scale-calc">1250</strong>
|
|
<span>评论上限</span>
|
|
</div>
|
|
</div>
|
|
<div class="quick-form-grid">
|
|
<div>
|
|
<label class="form-label" for="platform">平台</label>
|
|
<select class="form-select" id="platform" name="platform">
|
|
<option value="xiaohongshu">小红书</option>
|
|
<option value="douyin">抖音</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="hotspot_limit">热点数</label>
|
|
<input class="form-control scale-input" id="hotspot_limit" name="hotspot_limit" type="number" min="1" max="10" value="5">
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="item_limit_per_hotspot">每热点内容</label>
|
|
<input class="form-control scale-input" id="item_limit_per_hotspot" name="item_limit_per_hotspot" type="number" min="1" max="10" value="5">
|
|
</div>
|
|
<div>
|
|
<label class="form-label" for="comment_limit_per_item">每内容评论</label>
|
|
<input class="form-control scale-input" id="comment_limit_per_item" name="comment_limit_per_item" type="number" min="10" max="100" value="50">
|
|
</div>
|
|
<button class="btn btn-primary quick-start-btn" id="submit-btn" type="submit">开始抓取</button>
|
|
</div>
|
|
<p class="scale-hint" id="scale-hint">实际数量可能受平台返回数量、去重、失败、限流影响。</p>
|
|
</form>
|
|
</section>
|
|
</section>
|
|
|
|
<section class="overview-grid" aria-label="任务指标概览">
|
|
<div class="overview-card">
|
|
<span>最近任务</span>
|
|
<strong>{{ tasks | length }}</strong>
|
|
<small>{% if has_running_tasks %}1 个任务运行中{% else %}暂无运行中任务{% endif %}</small>
|
|
</div>
|
|
<div class="overview-card">
|
|
<span>默认规模</span>
|
|
<strong>1,250</strong>
|
|
<small>5 热点 / 25 内容 / 评论上限</small>
|
|
</div>
|
|
<div class="overview-card">
|
|
<span>平台范围</span>
|
|
<strong>2</strong>
|
|
<small>小红书与抖音</small>
|
|
</div>
|
|
<div class="overview-card">
|
|
<span>任务策略</span>
|
|
<strong>1</strong>
|
|
<small>同一时间只运行一个任务</small>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="dashboard-workspace">
|
|
<section class="task-history-panel" id="task-history">
|
|
<div class="panel-title-row">
|
|
<div>
|
|
<p class="section-kicker">任务历史</p>
|
|
<h2>最近任务</h2>
|
|
</div>
|
|
<span class="panel-note">{% if has_running_tasks %}自动更新中{% else %}卡片化展示,减少表格压迫感 · 运行中任务自动刷新{% endif %}</span>
|
|
</div>
|
|
<div class="task-card-list" {% if has_running_tasks %}data-task-list-auto-poll="true"{% endif %}>
|
|
{% include "partials/task_cards.html" %}
|
|
</div>
|
|
</section>
|
|
|
|
<aside class="task-status-sidepanel">
|
|
<section class="sidepanel-card">
|
|
<div class="sidepanel-icon">↻</div>
|
|
<h2>运行中任务</h2>
|
|
<p>当前最多只允许一个任务运行,避免外部 API 限流和结果混淆。</p>
|
|
<div class="stage-list">
|
|
<span><i class="stage-dot stage-dot-success"></i>热点抓取</span>
|
|
<span><i class="stage-dot stage-dot-success"></i>内容采集</span>
|
|
<span><i class="stage-dot stage-dot-active"></i>评论分页</span>
|
|
<span><i class="stage-dot"></i>AI 分析</span>
|
|
</div>
|
|
</section>
|
|
<section class="sidepanel-card sidepanel-card-blue">
|
|
<div class="sidepanel-icon">✦</div>
|
|
<h2>看板重点回到动作</h2>
|
|
<p>首页围绕“开始抓取、看状态、进详情”组织信息,弱化表格压迫感。</p>
|
|
</section>
|
|
</aside>
|
|
</div>
|
|
|
|
{% if has_running_tasks %}
|
|
<script>document.addEventListener("DOMContentLoaded", () => pollTaskListStatus());</script>
|
|
{% endif %}
|
|
{% endblock %}
|