{% extends "base.html" %} {% block title %}审核智能体{% endblock %} {% block content %} {% if conversation %}

顶部对话上下文

进入会话后,先用当前批次、产品和风险状态快速建立审核上下文。

推荐提问模板

用这些提问模板快速进入目录汇总、完整性检查、字段抽取和风险分析。

{% for item in prompt_templates %} {{ item }} {% endfor %}
{% endif %}

会话历史

左侧保留历史会话,标题默认使用解析后的产品名称。

    {% for item in conversation_history %}
  • {{ item.title }}
    产品:{{ item.product_name|default:"未识别" }}
    批次:{{ item.batch_id|default:"未绑定" }}
    风险:{{ item.risk_level }}
    最近更新:{{ item.updated_at|date:"Y-m-d H:i" }}
    {{ item.batch_binding_label }}
  • {% empty %}
  • 暂无历史会话
    可以直接在中间区域提问,Agent 会优先检索知识库。
  • {% endfor %}

对话区与节点导航

中间区域承接用户问题、Agent 回答和节点式结果摘要。

{% if node_results %}
{% for node in node_results %} {{ node.label }} / {{ node.status }} {% endfor %}
{% endif %}
{% csrf_token %}
{{ form.message.label_tag }} {{ form.message }} {% if form.message.errors %}

{{ form.message.errors|join:" " }}

{% endif %}
{{ form.document_ids.label_tag }}
{% for checkbox in form.document_ids %} {% empty %}
未选择文档时,Agent 会按问题检索当前知识库。
{% endfor %}
{% if result %}
Agent 回答
{{ result.answer|linebreaksbr }}
{% elif not conversation %}
可以先不上传资料,直接询问注册法规、资料清单、模板字段或历史知识库内容。
{% endif %}

节点式结果

{% if analysis_card or export_card or risk_card or notify_card %}
{% if analysis_card %}
{{ analysis_card.title }} {% if analysis_card.summary %}
{{ analysis_card.summary }}
{% endif %}

摘要指标

{% for item in analysis_card.stats %} {{ item.label }}:{{ item.value }} {% endfor %}

节点结果明细

    {% if analysis_card.kind == "overview" %} {% for item in analysis_card.items %}
  • {{ item.chapter_code }} / {{ item.document_count }} 份
  • {% empty %}
  • 当前无目录汇总结果。
  • {% endfor %} {% elif analysis_card.kind == "completeness" %} {% for item in analysis_card.items %}
  • {{ item.document_name|default:"必交项" }}
    章节点:{{ item.chapter_code|default:"-" }}
    {{ item.reason|default:"当前资料包未提供该资料。" }}
  • {% empty %}
  • 当前无缺失项。
  • {% endfor %} {% elif analysis_card.kind == "consistency" %} {% for item in analysis_card.items %}
  • {{ item.field_name|default:"冲突字段" }}
    {{ item.issue|default:item }}
  • {% empty %}
  • 当前无一致性冲突。
  • {% endfor %} {% elif analysis_card.kind == "field_extraction" %} {% for item in analysis_card.items %}
  • {{ item.field_name|default:"抽取字段" }}
    {{ item.field_value|default:"-" }}
    {% if item.source_document %}
    来源:{{ item.source_document }}
    {% endif %}
  • {% empty %}
  • 当前无抽取字段。
  • {% endfor %} {% else %} {% for item in analysis_card.items %}
  • {{ item }}
  • {% empty %}
  • 当前无明细结果。
  • {% endfor %} {% endif %}

提示与异常

    {% for item in analysis_card.warnings %}
  • {% if analysis_card.kind == "field_extraction" %} {{ item.field_name|default:"低置信度字段" }}
    {{ item.field_value|default:"-" }}
    {% if item.source_document %}
    来源:{{ item.source_document }}
    {% endif %} {% elif analysis_card.kind == "completeness" %} {{ item.document_name|default:"错放项" }}
    目标章节点:{{ item.chapter_code|default:"-" }}
    当前归类:{{ item.current_location|default:"未识别" }}
    {% else %} {{ item }} {% endif %}
  • {% empty %}
  • 当前无额外提示。
  • {% endfor %}
{% endif %} {% if risk_card %}
风险预警能力卡
总风险等级:{{ risk_card.highest_risk_level|default:"-" }}
是否通过:{{ risk_card.pass_status|default:"-" }}
{% if risk_card.summary %}
{{ risk_card.summary }}
{% endif %}

待复核与风险项

    {% for item in risk_card.manual_review_items %}
  • {{ item }}
  • {% empty %} {% for item in risk_card.risk_items %}
  • {{ item.title|default:item.issue }}
    {{ item.risk_level|default:"-" }}
  • {% empty %}
  • 当前无待复核项。
  • {% endfor %} {% endfor %}

责任角色

{% for item in risk_card.owner_roles %} {% empty %} {% endfor %}
owner_role owner_name department chapter_scope risk_scope feishu_user_id feishu_open_id feishu_name notify_enabled
{{ item.owner_role }} {{ item.owner_name }} {{ item.department }} {{ item.chapter_scope }} {{ item.risk_scope }} {{ item.feishu_user_id }} {{ item.feishu_open_id }} {{ item.feishu_name }} {{ item.notify_enabled|yesno:"True,False" }}
当前无责任角色。
{% endif %}
{% if export_card %} Word 导出能力卡
模板:{{ export_card.template_name }} / {{ export_card.template_version|default:"-" }}
当前导出状态:{{ export_card.export_status|default:"-" }}
{% elif notify_card %} 飞书通知能力卡
通知原因:{{ notify_card.notify_reason|default:"-" }}
消息状态:{{ notify_card.message_status|default:"-" }}
{% endif %}
{% if export_card %}

回填字段表

{% for item in export_card.filled_fields %} {% empty %} {% endfor %}
占位符 字段名 字段值 来源 回填状态 是否必填
{{ item.placeholder }} {{ item.field_name }} {{ item.field_value }} {{ item.source }} {{ item.fill_status }} {{ item.required|yesno:"是,否" }}
当前暂无回填字段。
{% endif %} {% if export_card %}

拦截项区

    {% for item in export_card.blocked_fields %}
  • {{ item.field_name }}
    拦截原因:{{ item.block_reason }}
    来源:{{ item.risk_source }}
  • {% empty %}
  • 当前无拦截项。
  • {% endfor %}
{% endif %} {% if notify_card %}

飞书通知能力卡

  • 通知原因
    {{ notify_card.notify_reason|default:"-" }}
  • 消息状态
    {{ notify_card.message_status|default:"-" }}
  • 被 @ 处理人
    {{ notify_card.mentioned_users|join:" / "|default:"-" }}
  • Web 详情链接
    {{ notify_card.web_detail_url|default:"-" }}
{% endif %}
{% if export_card %} 维护 Word 模板 维护字段映射 查看导出记录 {% endif %} {% if risk_card %} 查看责任人映射 {% endif %} {% if notify_card %} 查看飞书配置 {% endif %}
{% elif result and result.structured_output %} {% for key, value in result.structured_output.items %} {% endfor %}
{{ key }}
{{ value }}
{% else %}
执行任务后,这里会展示结构化节点结果。
{% endif %}

上传区

右侧保留资料包上传入口和当前会话的资料上下文。

{% if batch %}
  • 当前资料包
    批次:{{ batch.batch_id }}
    文件数:{{ batch.file_count }}
    页数:{{ batch.page_count }}
    导入状态:{{ batch.get_import_status_display_text }}
{% csrf_token %}
{{ upload_form.files.label_tag }} {{ upload_form.files }}
返回资料包
{% csrf_token %}
{% else %}
暂无绑定资料包,仍可先通过中间对话区查询知识库。
{% csrf_token %}
{{ upload_form.files.label_tag }} {{ upload_form.files }}

支持 PDF、DOCX、MD、TXT、ZIP、7Z 与 RAR。上传后会自动形成资料包并绑定新的审核会话。

打开导入向导
{% endif %}

动态信息卡

  • 最高风险等级
    {{ workspace_summary.highest_risk_level }}
  • 是否允许正式导出
    {{ workspace_summary.export_allowed }}
  • 通知状态
    {{ workspace_summary.notify_status }}
  • 导出状态
    {{ workspace_summary.export_status }}
  • 导出下载地址
    {% if workspace_summary.download_url %} 下载导出文件 {% else %} - {% endif %}
  • 当前会话围绕 conversation_id / batch_id / product_name 串联;未绑定资料包时以知识库问答方式执行。
  • {% if audit_log %}
  • 查看本次处理历史
  • {% endif %}
{% endblock %}