fix(file-summary): 调整工作流批次轮播展示

This commit is contained in:
2026-06-06 22:20:26 +08:00
parent 7e561ea213
commit 3c6ec67371
4 changed files with 254 additions and 3 deletions

View File

@@ -215,9 +215,14 @@
<div class="summary-subheading">
<h3>工作流</h3>
</div>
<div class="workflow-card-list" id="workflowCardList">
<div class="workflow-card-list workflow-batch-carousel" id="workflowCardList" data-active-index="0">
{% for batch in summary_batches %}
<article class="workflow-card" data-batch-id="{{ batch.pk }}">
<article
class="workflow-card{% if forloop.first %} active{% endif %}"
data-batch-id="{{ batch.pk }}"
data-workflow-index="{{ forloop.counter0 }}"
aria-hidden="{% if forloop.first %}false{% else %}true{% endif %}"
>
<header>
<strong>{{ batch.batch_no }}</strong>
<span class="workflow-status status-{{ batch.status }}">{{ batch.status }}</span>
@@ -240,6 +245,23 @@
{% empty %}
<div class="panel-empty">暂无工作流</div>
{% endfor %}
{% if summary_batches %}
<div class="workflow-batch-controls">
<button type="button" class="workflow-batch-btn" data-workflow-action="prev" aria-label="上一个工作流">&lsaquo;</button>
<div class="workflow-batch-dots" aria-label="工作流批次">
{% for batch in summary_batches %}
<button
type="button"
class="workflow-batch-dot{% if forloop.first %} active{% endif %}"
data-workflow-index-dot="{{ forloop.counter0 }}"
aria-label="查看{{ batch.batch_no }}状态"
aria-current="{% if forloop.first %}true{% else %}false{% endif %}"
></button>
{% endfor %}
</div>
<button type="button" class="workflow-batch-btn" data-workflow-action="next" aria-label="下一个工作流">&rsaquo;</button>
</div>
{% endif %}
</div>
</section>
</aside>