{% extends "layout/basic.html" %} {% block content %}

批量 ZIP 替换

选择 ZIP 中的源题,指定当前题库中要覆盖的目标题。目标题的 docId 和 PID 保持不变。

{% if messages and messages|length %}
{% for message in messages %}

{{ message }}

{% endfor %}
{% endif %}

1. 上传 Hydro ZIP

返回题库
{% if rows and rows|length %}

2. 编排覆盖映射

可调整顺序、跳过源题,或填写目标题号。填写 #123 可按 docId 精确选择。

{% if editable %}

顺序填充只修改目标输入框,仍需服务端校验每道目标题是否存在。

    {% for row in rows %}
  1. {{ row.index }}
    {{ row.sourceTitle|default('(未命名)') }} ZIP PID: {{ row.sourcePid|default('(空)') }} · {{ row.sourceFolder }} 数据 {{ row.testdataCount }} · 附件 {{ row.additionalCount }} · 题解 {{ row.solutionCount }}
    {% if row.targetDocId %}当前目标题:{{ row.targetTitle }} · {{ row.targetPid }} · docId={{ row.targetDocId }}{% endif %}

    {% if row.status == 'error' %}错误{% elif row.status == 'ok' %}可替换{% elif row.status == 'done' %}完成{% elif row.status == 'pending' %}未执行{% else %}跳过{% endif %} {{ row.message }}

  2. {% endfor %}
{% else %}
    {% for row in rows %}
  1. {{ row.index }}. {{ row.sourceTitle|default('(未命名)') }} → {{ row.targetPid|default('跳过') }}:{{ row.message }}{% if row.backupPath %}
    旧数据备份:{{ row.backupPath }}{% endif %}
  2. {% endfor %}
{% endif %}
{% if canExecute %}{% endif %}
{% endif %}
{% endblock %}