feat: 支持处理历史按风险状态筛选

This commit is contained in:
2026-06-04 01:32:35 +08:00
parent 73c6336600
commit e7e3202714
4 changed files with 60 additions and 1 deletions

View File

@@ -21,6 +21,15 @@
<label for="id_keyword">产品名称 / 批次号</label>
<input id="id_keyword" type="text" name="keyword" value="{{ keyword }}" placeholder="例如:新型冠状病毒 或 SUB-20260604-001">
</div>
<div>
<label for="id_risk_status">风险状态</label>
<select id="id_risk_status" name="risk_status">
<option value="">全部风险</option>
<option value="high"{% if risk_status == "high" %} selected{% endif %}>high</option>
<option value="medium"{% if risk_status == "medium" %} selected{% endif %}>medium</option>
<option value="low"{% if risk_status == "low" %} selected{% endif %}>low</option>
</select>
</div>
<div>
<label for="id_notify_status">通知状态</label>
<select id="id_notify_status" name="notify_status">
@@ -55,6 +64,7 @@
<th>输入摘要</th>
<th>状态</th>
<th>风险状态</th>
<th>通知原因</th>
<th>通知状态</th>
<th>模型</th>
<th>时间</th>
@@ -74,13 +84,14 @@
<span class="pill {% if row.log.status == 'success' %}pill-success{% else %}pill-danger{% endif %}">{{ row.log.get_status_display_text }}</span>
</td>
<td>{{ row.risk_status }}</td>
<td>{{ row.notify_reason }}</td>
<td>{{ row.notify_status }}</td>
<td>{{ row.log.model_name }}</td>
<td>{{ row.log.created_at|date:"Y-m-d H:i" }}</td>
<td><a class="button" href="{% url 'audit:detail' row.log.id %}">查看详情</a></td>
</tr>
{% empty %}
<tr><td colspan="12">暂无处理历史,先去执行一次审核任务。</td></tr>
<tr><td colspan="13">暂无处理历史,先去执行一次审核任务。</td></tr>
{% endfor %}
</tbody>
</table>