{# 单个子维度详情(含金字塔) #} {# 需要外部传入: 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) %}

{{ sub_section_label }} {{ sub_display }}

{{ t.sd_score }}
{{ "%.1f"|format(sd.score) }}
{{ "%+.1f"|format(sd.diff_district) }} {{ t.vs_district_avg }}
{{ t.sd_district_avg }}
{{ "%.1f"|format(sd.district_avg) }}
{{ t.sd_level_grade }}
{{ t.level_label }} {{ sd.level }}
{{ t.sd_rank }}
{{ sd.rank_in_district }}/{{ overall.total_schools }}
{% if overall.total_schools_in_city and sd.rank_in_city is defined %}
{{ t.sd_city_rank_prefix }} {{ sd.rank_in_city }}/{{ overall.total_schools_in_city }}
{% endif %}
{% for lv in [4, 3, 2, 1] %} {% set lv_count = sd.level_distribution.get('水平' ~ lv, 0) if sd.level_distribution else '' %}
{{ t.level_label }} {{ lv }}{% if lv_count is not none and lv_count != '' %} · {{ lv_count }} {{ t.schools_unit }}{% endif %}
{% if sd.level == lv %} {{ school_display }} {% endif %}
{% endfor %}

{{ t.sd_level_meaning.format(lv=sd.level) }}:{{ t.level_desc(sub_dim, sd.level) or sd.level_description }}

{% set sub_key = part_id + '_sub' + sub_index|string + '_' + sub_dim %}
{{ llm_sections.get(sub_key, '

' + t.loading + '

') | safe }}