73 lines
4.2 KiB
HTML
73 lines
4.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% set active_page = "result" %}
|
|
{% block title %}预测结果 | 供水管道健康评估系统{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if result %}
|
|
<div class="mb-6 flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between">
|
|
<div>
|
|
<h1 class="text-3xl font-extrabold tracking-tight sm:text-4xl">预测结果</h1>
|
|
<p class="mt-2 text-sm text-textSub">文件:<span class="font-semibold text-textMain">{{ result.original_filename }}</span> · 生成于 {{ result.generated_at }}</p>
|
|
</div>
|
|
<div class="flex flex-wrap gap-3">
|
|
<a href="{{ url_for('main.home') }}" class="ui-btn ui-btn-secondary">
|
|
<span class="material-symbols-outlined text-lg">refresh</span>
|
|
重新分析
|
|
</a>
|
|
<a href="{{ result.excel_url }}" class="ui-btn ui-btn-primary">
|
|
<span class="material-symbols-outlined text-lg">download</span>
|
|
导出结果表
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid items-stretch gap-6 lg:grid-cols-[minmax(0,1fr)_360px]">
|
|
<section class="flex h-full flex-col rounded-lg border border-line bg-white p-5 shadow-panel sm:p-6">
|
|
<div class="mb-4 shrink-0">
|
|
<h2 class="text-xl font-extrabold">管道剩余寿命动态评估</h2>
|
|
<p class="mt-1 text-sm text-textSub">管道剩余寿命随时间变化的分析曲线。</p>
|
|
</div>
|
|
<div class="flex min-h-[360px] flex-1 items-center justify-center rounded-md border border-line bg-slate-50 p-3">
|
|
<img src="{{ result.image_url }}" alt="管道的剩余寿命分析图" class="max-h-full w-full rounded bg-white object-contain">
|
|
</div>
|
|
</section>
|
|
|
|
<aside class="flex h-full flex-col gap-6">
|
|
<section class="rounded-lg border border-line bg-white p-5 shadow-panel">
|
|
<h2 class="text-lg font-extrabold">报告摘要</h2>
|
|
<dl class="mt-4 space-y-3 text-sm">
|
|
<div class="flex justify-between gap-4"><dt class="text-textSub">样本数量</dt><dd class="font-bold">{{ result.sample_count }}</dd></div>
|
|
<div class="flex justify-between gap-4"><dt class="text-textSub">输出文件</dt><dd class="font-bold">电子表格</dd></div>
|
|
</dl>
|
|
<a href="{{ result.excel_url }}" class="ui-btn ui-btn-secondary mt-5 w-full text-primary">
|
|
<span class="material-symbols-outlined text-lg">table_view</span>
|
|
查看完整样本列表
|
|
</a>
|
|
</section>
|
|
|
|
<section class="flex flex-1 flex-col rounded-lg border border-line bg-white p-5 shadow-panel">
|
|
<h2 class="text-lg font-extrabold">健康等级说明</h2>
|
|
<div class="mt-4 grid gap-2 text-sm">
|
|
<div class="rounded-md border border-red-100 bg-dangerSoft p-3"><div class="font-extrabold text-dangerText">I级 · (0, 0.2]</div><p class="mt-1 text-xs leading-5">风险十分严重,需立刻抢修或更新改造。</p></div>
|
|
<div class="rounded-md border border-orange-100 bg-orange-50 p-3"><div class="font-extrabold text-orange-600">II级 · (0.2, 0.4]</div><p class="mt-1 text-xs leading-5">风险较为严重,需尽快检修并加频巡检。</p></div>
|
|
<div class="rounded-md border border-amber-100 bg-amber-50 p-3"><div class="font-extrabold text-amber-600">III级 · (0.4, 0.6]</div><p class="mt-1 text-xs leading-5">风险较低,安排定期巡检。</p></div>
|
|
<div class="rounded-md border border-blue-100 bg-blue-50 p-3"><div class="font-extrabold text-blue-600">IV级 · (0.6, 0.8]</div><p class="mt-1 text-xs leading-5">风险较小,维持常规巡视。</p></div>
|
|
<div class="rounded-md border border-blue-100 bg-blueSoft p-3"><div class="font-extrabold text-primary">V级 · (0.8, 1]</div><p class="mt-1 text-xs leading-5">管道安全,维持常规巡视。</p></div>
|
|
</div>
|
|
</section>
|
|
</aside>
|
|
</div>
|
|
{% else %}
|
|
<section class="rounded-lg border border-line bg-white p-10 text-center shadow-panel">
|
|
<span class="material-symbols-outlined text-5xl text-primary">monitoring</span>
|
|
<h1 class="mt-4 text-2xl font-extrabold">当前还没有预测结果</h1>
|
|
<p class="mt-2 text-sm text-textSub">请先从主页上传文件并运行预测。</p>
|
|
<a href="{{ url_for('main.home') }}" class="ui-btn ui-btn-primary mt-6">
|
|
<span class="material-symbols-outlined text-lg">upload_file</span>
|
|
去上传数据
|
|
</a>
|
|
</section>
|
|
{% endif %}
|
|
{% endblock %}
|