feat: 增强资料包页导出回看与处理链路展示
This commit is contained in:
@@ -95,6 +95,9 @@
|
||||
{% if latest_export %}
|
||||
<div>{{ latest_export.file_name }}</div>
|
||||
<div class="muted">{{ latest_export.export_mode }} / {{ latest_export.template_version|default:"-" }}</div>
|
||||
<div class="button-row" style="margin-top: 8px;">
|
||||
<a class="button" href="{% url 'audit:list' %}?keyword={{ batch.batch_id }}">查看导出记录</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="muted">暂无导出记录</span>
|
||||
{% endif %}
|
||||
@@ -137,6 +140,38 @@
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="grid-2">
|
||||
<article class="panel">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
<h2 class="section-title">处理链路总览</h2>
|
||||
<p class="section-copy">资料包导入后,会沿固定链路进入解析、归类、切片和审核上下文准备。</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="detail-list">
|
||||
{% for item in processing_pipeline %}
|
||||
<li class="detail-item">
|
||||
<strong>{{ item.title }}</strong>
|
||||
<div class="muted">{{ item.detail }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<article class="panel">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
<h2 class="section-title">导出与处理回看</h2>
|
||||
<p class="section-copy">围绕 `batch_id / conversation_id / product_name` 回看审核、导出和通知留痕。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<a class="button" href="{% url 'audit:list' %}">查看处理历史</a>
|
||||
<a class="button" href="{% url 'platform_ui:knowledge-base' %}?view=template_mappings">维护导出模板</a>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
|
||||
@@ -540,3 +540,38 @@ def test_document_list_shows_latest_export_record_for_batch(client, db):
|
||||
assert response.status_code == 200
|
||||
assert "最近导出" in content
|
||||
assert "SUB-20260604-011-draft.docx" in content
|
||||
|
||||
|
||||
def test_document_list_shows_export_history_links_and_processing_pipeline(client, db):
|
||||
batch = SubmissionBatch.objects.create(
|
||||
batch_id="SUB-20260604-012",
|
||||
product_name="产品Z",
|
||||
workflow_type="registration",
|
||||
conversation_id="conv-012",
|
||||
file_count=3,
|
||||
page_count=18,
|
||||
import_status="review_required",
|
||||
)
|
||||
ExportedDocument.objects.create(
|
||||
batch=batch,
|
||||
conversation_id="conv-012",
|
||||
product_name="产品Z",
|
||||
template_name="注册证导出模板",
|
||||
template_version="V1.1",
|
||||
export_mode="draft",
|
||||
output_type="registration_word_export_report",
|
||||
file_name="SUB-20260604-012-draft.docx",
|
||||
relative_path="exports/20260604/SUB-20260604-012-draft.docx",
|
||||
download_url="/media/exports/20260604/SUB-20260604-012-draft.docx",
|
||||
)
|
||||
|
||||
response = client.get(reverse("documents:list"))
|
||||
|
||||
content = response.content.decode("utf-8")
|
||||
assert response.status_code == 200
|
||||
assert "处理链路总览" in content
|
||||
assert "原始文件接收" in content
|
||||
assert "切片与索引入库" in content
|
||||
assert reverse("audit:list") in content
|
||||
assert "查看导出记录" in content
|
||||
assert f"{reverse('audit:list')}?keyword=SUB-20260604-012" in content
|
||||
|
||||
Reference in New Issue
Block a user