From b2af88f870332f9acaae3dc687e69dc9472dfeea Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 4 Jun 2026 03:15:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=8C=85=E9=A1=B5=E5=AF=BC=E5=87=BA=E5=9B=9E=E7=9C=8B=E4=B8=8E?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=93=BE=E8=B7=AF=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/documents/document_list.html | 35 ++++++++++++++++++++++++++ tests/test_documents.py | 35 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/templates/documents/document_list.html b/templates/documents/document_list.html index be3a45c..a35fc31 100644 --- a/templates/documents/document_list.html +++ b/templates/documents/document_list.html @@ -95,6 +95,9 @@ {% if latest_export %}
{{ latest_export.file_name }}
{{ latest_export.export_mode }} / {{ latest_export.template_version|default:"-" }}
+
+ 查看导出记录 +
{% else %} 暂无导出记录 {% endif %} @@ -137,6 +140,38 @@ +
+
+
+
+

处理链路总览

+

资料包导入后,会沿固定链路进入解析、归类、切片和审核上下文准备。

+
+
+
    + {% for item in processing_pipeline %} +
  • + {{ item.title }} +
    {{ item.detail }}
    +
  • + {% endfor %} +
+
+ + +
+
diff --git a/tests/test_documents.py b/tests/test_documents.py index b91c953..ba5a27d 100644 --- a/tests/test_documents.py +++ b/tests/test_documents.py @@ -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