Files
lofyerandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> 71db82393a Initial commit
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-07-13 15:38:41 +08:00

60 lines
2.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# 单个子维度详情(含金字塔) #}
{# 需要外部传入: sub_dim, sd, part_id, sub_index, school #}
{# sub_index 从1开始,子维度编号从"二"开始("一"是"整体表现" #}
{% set cn_nums = ['', '二', '三', '四', '五', '六', '七', '八'] %}
<h2 id="sub-{{ part_id }}-{{ sub_index }}">{{ cn_nums[sub_index] }}、{{ sub_dim }}</h2>
<div class="score-cards" style="grid-template-columns: repeat(4, 1fr);">
<div class="score-card">
<div class="label">得分</div>
<div class="value" style="font-size:24px">{{ "%.1f"|format(sd.score) }}</div>
<div class="diff {{ 'positive' if sd.diff_district > 0 else 'negative' }}">
{{ "%+.1f"|format(sd.diff_district) }} vs 区均值
</div>
</div>
<div class="score-card">
<div class="label">区均值</div>
<div class="value" style="font-size:24px">{{ "%.1f"|format(sd.district_avg) }}</div>
</div>
<div class="score-card">
<div class="label">水平等级</div>
<div class="level-indicator level-{{ sd.level }}">水平{{ sd.level }}</div>
</div>
<div class="score-card">
<div class="label">排名</div>
<div class="value" style="font-size:24px">{{ sd.rank_in_district }}/{{ overall.total_schools }}</div>
</div>
</div>
<!-- C. 温度计条形图 -->
<div class="chart-box" style="padding:10px 16px;">
<div id="thermo-{{ part_id }}-{{ sub_index }}" class="chart" style="height:80px"></div>
</div>
<!-- 金字塔水平指示器(含各水平学校数量) -->
{% set lv_cn = {4: '四', 3: '三', 2: '二', 1: '一'} %}
<div class="pyramid-container">
{% for lv in [4, 3, 2, 1] %}
{% set lv_count = sd.level_distribution.get('水平' ~ lv, 0) if sd.level_distribution else '' %}
<div class="pyramid-row">
<div class="pyramid-block lv{{ lv }} {{ 'active' if sd.level == lv else 'dimmed' }}">
水平{{ lv_cn[lv] }}{% if lv_count is not none and lv_count != '' %} · {{ lv_count }}所{% endif %}
</div>
{% if sd.level == lv %}
<span class="pyramid-label"><span class="arrow"></span>{{ school }}</span>
{% endif %}
</div>
{% endfor %}
</div>
<p style="text-indent:0; margin:10px 0; color: var(--gray-500); font-size:14px;">
<strong>水平{{ sd.level }}含义:</strong>{{ sd.level_description }}
</p>
<!-- 三级维度LLM分析 -->
{% set sub_key = part_id + '_sub' + sub_index|string + '_' + sub_dim %}
<div class="llm-analysis">
{{ llm_sections.get(sub_key, '<p>分析加载中...</p>') | safe }}
</div>