76 lines
2.3 KiB
HTML
76 lines
2.3 KiB
HTML
{% extends 'base.html' %}
|
||
{% load unicorn %}
|
||
{% block navbar_item %}
|
||
<a href="/" class="button is-primary">
|
||
返回首页
|
||
</a>
|
||
{% endblock %}
|
||
{% block content %}
|
||
<div class="container">
|
||
<div class="content">
|
||
{# <h5 class="title is-6">查找关键词: <span class="tag is-danger is-light is-medium">{{ current_task.task_keywords }}</span></h5>#}
|
||
<div>
|
||
{% if not current_task.task_status %}
|
||
<b>搜索状态: <span class="tag is-danger is-light is-medium">正在检索</span></b>
|
||
<progress class="progress is-small is-primary" max="100">15%</progress>
|
||
|
||
{% endif %}
|
||
{% if current_task.task_status %}
|
||
<b>搜索状态: <span class="tag is-success is-light is-medium">已完成</span></b>
|
||
{% endif %}
|
||
<br>
|
||
</div>
|
||
{% for task_file in current_task.attachment.all %}
|
||
|
||
<div class="block">
|
||
<span class="tag is-info is-medium">
|
||
{{ task_file.file_name }}
|
||
</span>
|
||
{% if task_file.file_keyword_str %}
|
||
<b>检索到的敏感词:{{ task_file.file_keyword_str }}</b>
|
||
<br>
|
||
{% for paragraph in task_file.keyword_paragraph.all %}
|
||
<p><b>{{ forloop.counter }}.</b>{{ paragraph.paragraph | safe }}</p>
|
||
{% endfor %}
|
||
{% endif %}
|
||
{% if not task_file.file_keyword_str %}
|
||
<b>未检索到敏感词</b>
|
||
{% endif %}
|
||
</div>
|
||
|
||
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
|
||
{% endblock %}
|
||
|
||
|
||
|
||
|
||
|
||
{#{% block content %}#}
|
||
{# <div>#}
|
||
{# {% unicorn 'paragraph_render' current_task.task_uuid %}#}
|
||
{# </div>#}
|
||
{##}
|
||
{#{% endblock %}#}
|
||
|
||
|
||
{% block script %}
|
||
function monitorAndRefresh() {
|
||
// 获取要监控的值
|
||
const targetElement = "{{ current_task.task_status }}"; // 请将 "yourTargetElementId" 替换为实际的标签ID
|
||
|
||
if (targetElement !== "True") {
|
||
// 如果标签的值不是true,等待两秒后刷新页面
|
||
setTimeout(function () {
|
||
location.reload();
|
||
}, 1000); // 1000毫秒(1秒)后刷新页面
|
||
}
|
||
}
|
||
|
||
// 调用监控函数
|
||
monitorAndRefresh();
|
||
|
||
{% endblock %} |