Files
report-admin/templates/era2/sections/sub_dimension.html
T
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

65 lines
3.1 KiB
HTML
Raw 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_display #}
{# sub_index 从1开始,子维度在维度页面中的小节号从"二/II"开始("一/I"是"整体表现" #}
{% set sub_section_label = sub_section_label_func(sub_index) if sub_section_label_func is defined else (cn_subnums[sub_index] if cn_subnums is defined else '') %}
{% set sub_display = t.sub(sub_dim) %}
<h2 id="sub-{{ part_id }}-{{ sub_index }}">{{ sub_section_label }} {{ sub_display }}</h2>
<div class="score-cards" style="grid-template-columns: repeat(4, 1fr);">
<div class="score-card">
<div class="label">{{ t.sd_score }}</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) }} {{ t.vs_district_avg }}
</div>
</div>
<div class="score-card">
<div class="label">{{ t.sd_district_avg }}</div>
<div class="value" style="font-size:24px">{{ "%.1f"|format(sd.district_avg) }}</div>
</div>
<div class="score-card">
<div class="label">{{ t.sd_level_grade }}</div>
<div class="level-indicator level-{{ sd.level }}">{{ t.level_label }} {{ sd.level }}</div>
</div>
<div class="score-card">
<div class="label">{{ t.sd_rank }}</div>
<div class="value" style="font-size:24px">{{ sd.rank_in_district }}/{{ overall.total_schools }}</div>
{% if overall.total_schools_in_city and sd.rank_in_city is defined %}
<div class="diff" style="color: var(--gray-500); font-size: 12px;">
{{ t.sd_city_rank_prefix }} {{ sd.rank_in_city }}/{{ overall.total_schools_in_city }}
</div>
{% endif %}
</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>
<!-- 金字塔水平指示器(含各水平学校数量) -->
<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' }}">
{{ t.level_label }} {{ lv }}{% if lv_count is not none and lv_count != '' %} · {{ lv_count }} {{ t.schools_unit }}{% endif %}
</div>
{% if sd.level == lv %}
<span class="pyramid-label"><span class="arrow"></span>{{ school_display }}</span>
{% endif %}
</div>
{% endfor %}
</div>
<p style="text-indent:0; margin:10px 0; color: var(--gray-500); font-size:14px;">
<strong>{{ t.sd_level_meaning.format(lv=sd.level) }}</strong>{{ t.level_desc(sub_dim, sd.level) or 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>' + t.loading + '</p>') | safe }}
</div>