test
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

This commit is contained in:
2026-06-05 10:33:56 -06:00
parent 6a97c7ee6e
commit 9920bc4aed

View File

@@ -70,28 +70,36 @@
<!-- 1. Grade pie chart --> <!-- 1. Grade pie chart -->
<n-gi> <n-gi>
<n-card title="等级分布"> <n-card title="等级分布">
<div class="chart-container">
<Doughnut :data="gradeChartData" :options="doughnutOptions" /> <Doughnut :data="gradeChartData" :options="doughnutOptions" />
</div>
</n-card> </n-card>
</n-gi> </n-gi>
<!-- 3. Completion doughnut --> <!-- 3. Completion doughnut -->
<n-gi v-if="data.person_count > 0"> <n-gi v-if="data.person_count > 0">
<n-card title="班级完成度"> <n-card title="班级完成度">
<div class="chart-container">
<Doughnut <Doughnut
:data="completionChartData" :data="completionChartData"
:options="doughnutOptions" :options="doughnutOptions"
/> />
</div>
</n-card> </n-card>
</n-gi> </n-gi>
<!-- 2. Radar chart --> <!-- 2. Radar chart -->
<n-gi v-if="hasRadarData"> <n-gi v-if="hasRadarData">
<n-card title="四维评分雷达图"> <n-card title="四维评分雷达图">
<div class="chart-container">
<Radar :data="radarChartData" :options="radarOptions" /> <Radar :data="radarChartData" :options="radarOptions" />
</div>
</n-card> </n-card>
</n-gi> </n-gi>
<!-- 4. Criteria bar chart (only when class exists, pairs with radar) --> <!-- 4. Criteria bar chart (only when class exists, pairs with radar) -->
<n-gi v-if="data.person_count > 0 && hasRadarData"> <n-gi v-if="data.person_count > 0 && hasRadarData">
<n-card title="各维度平均得分"> <n-card title="各维度平均得分">
<div class="chart-container">
<Bar :data="criteriaBarChartData" :options="barOptions" /> <Bar :data="criteriaBarChartData" :options="barOptions" />
</div>
</n-card> </n-card>
</n-gi> </n-gi>
<!-- 4. Word cloud --> <!-- 4. Word cloud -->
@@ -488,7 +496,7 @@ function renderWordCloud() {
label: "", label: "",
data: words.map((w) => 10 + (w.count / maxCount) * 50), data: words.map((w) => 10 + (w.count / maxCount) * 50),
color: words.map((_, i) => WORD_COLORS[i % WORD_COLORS.length]), color: words.map((_, i) => WORD_COLORS[i % WORD_COLORS.length]),
rotate: words.map(() => 0), rotate: 0,
} as any, } as any,
], ],
}, },
@@ -550,6 +558,11 @@ onUnmounted(() => {
gap: 4px; gap: 4px;
} }
.chart-container {
height: 280px;
position: relative;
}
.wordcloud-container { .wordcloud-container {
height: 300px; height: 300px;
position: relative; position: relative;