diff --git a/src/oj/class/pk.vue b/src/oj/class/pk.vue
index a66d8fc..26b0b94 100644
--- a/src/oj/class/pk.vue
+++ b/src/oj/class/pk.vue
@@ -52,13 +52,13 @@ interface ClassComparison {
iqr: number
std_dev: number
top_10_avg: number
+ middle_80_avg: number
bottom_10_avg: number
- top_25_avg: number
- bottom_25_avg: number
excellent_rate: number
pass_rate: number
active_rate: number
ac_rate: number
+ composite_score: number
recent_total_ac?: number
recent_avg_ac?: number
recent_median_ac?: number
@@ -170,6 +170,24 @@ function getClassColor(index: number) {
return colors[index % colors.length]
}
+// 综合分对比图
+const compositeScoreChartData = computed(() => {
+ if (comparisons.value.length === 0) return null
+
+ const labels = comparisons.value.map((c) => c.class_name)
+ const datasets = [
+ {
+ label: "综合分",
+ data: comparisons.value.map((c) => c.composite_score),
+ backgroundColor: comparisons.value.map((_, i) => getClassColor(i).bg),
+ borderColor: comparisons.value.map((_, i) => getClassColor(i).border),
+ borderWidth: 2,
+ },
+ ]
+
+ return { labels, datasets }
+})
+
// 总AC数对比图 - 每个班级用不同颜色
const totalAcChartData = computed(() => {
if (comparisons.value.length === 0) return null
@@ -278,14 +296,14 @@ const activeRateChartData = computed(() => {
return { labels, datasets }
})
-// 前10名平均对比图
+// 前10%平均对比图
const top10AvgChartData = computed(() => {
if (comparisons.value.length === 0) return null
const labels = comparisons.value.map((c) => c.class_name)
const datasets = [
{
- label: "前10名平均",
+ label: "前10%平均",
data: comparisons.value.map((c) => c.top_10_avg),
backgroundColor: comparisons.value.map((_, i) => getClassColor(i).bg),
borderColor: comparisons.value.map((_, i) => getClassColor(i).border),
@@ -296,14 +314,14 @@ const top10AvgChartData = computed(() => {
return { labels, datasets }
})
-// 后10名平均对比图
+// 后10%平均对比图
const bottom10AvgChartData = computed(() => {
if (comparisons.value.length === 0) return null
const labels = comparisons.value.map((c) => c.class_name)
const datasets = [
{
- label: "后10名平均",
+ label: "后10%平均",
data: comparisons.value.map((c) => c.bottom_10_avg),
backgroundColor: comparisons.value.map((_, i) => getClassColor(i).bg),
borderColor: comparisons.value.map((_, i) => getClassColor(i).border),
@@ -314,33 +332,15 @@ const bottom10AvgChartData = computed(() => {
return { labels, datasets }
})
-// 前25%平均对比图
-const top25AvgChartData = computed(() => {
+// 中间80%均值对比图
+const middle80AvgChartData = computed(() => {
if (comparisons.value.length === 0) return null
const labels = comparisons.value.map((c) => c.class_name)
const datasets = [
{
- label: "前25%平均",
- data: comparisons.value.map((c) => c.top_25_avg),
- backgroundColor: comparisons.value.map((_, i) => getClassColor(i).bg),
- borderColor: comparisons.value.map((_, i) => getClassColor(i).border),
- borderWidth: 2,
- },
- ]
-
- return { labels, datasets }
-})
-
-// 后25%平均对比图
-const bottom25AvgChartData = computed(() => {
- if (comparisons.value.length === 0) return null
-
- const labels = comparisons.value.map((c) => c.class_name)
- const datasets = [
- {
- label: "后25%平均",
- data: comparisons.value.map((c) => c.bottom_25_avg),
+ label: "中间80%均值",
+ data: comparisons.value.map((c) => c.middle_80_avg),
backgroundColor: comparisons.value.map((_, i) => getClassColor(i).bg),
borderColor: comparisons.value.map((_, i) => getClassColor(i).border),
borderWidth: 2,
@@ -474,6 +474,17 @@ const chartOptions = {
},
}
+const compositeScoreChartOptions = {
+ ...chartOptions,
+ scales: {
+ ...chartOptions.scales,
+ y: {
+ ...chartOptions.scales.y,
+ max: 100,
+ },
+ },
+}
+
const radarChartOptions = {
responsive: true,
maintainAspectRatio: false,
@@ -575,6 +586,9 @@ const radarChartOptions = {
#{{ getRankColor(index).text }}
+
+ {{ classData.composite_score }} 分
+
@@ -676,26 +690,21 @@ const radarChartOptions = {
-
+
{{
classData.top_10_avg.toFixed(2)
}}
-
+
+ {{
+ classData.middle_80_avg.toFixed(2)
+ }}
+
+
{{
classData.bottom_10_avg.toFixed(2)
}}
-
- {{
- classData.top_25_avg.toFixed(2)
- }}
-
-
- {{
- classData.bottom_25_avg.toFixed(2)
- }}
-
@@ -793,6 +802,17 @@ const radarChartOptions = {
+
+
+
+
+
+
+
@@ -859,9 +879,9 @@ const radarChartOptions = {
-
+
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
@@ -928,6 +939,17 @@ const radarChartOptions = {
render: (_, index) => getRankColor(index).text,
width: 80,
},
+ {
+ title: '综合分',
+ key: 'composite_score',
+ width: 90,
+ render: (row) =>
+ h(
+ 'span',
+ { style: { color: '#722ed1', fontWeight: '700', fontSize: '15px' } },
+ row.composite_score.toFixed(1),
+ ),
+ },
{
title: '班级',
key: 'class_name',
@@ -980,7 +1002,7 @@ const radarChartOptions = {
),
},
{
- title: '前10名平均',
+ title: '前10%均值',
key: 'top_10_avg',
width: 100,
render: (row) =>
@@ -991,7 +1013,18 @@ const radarChartOptions = {
),
},
{
- title: '后10名平均',
+ title: '中间80%均值',
+ key: 'middle_80_avg',
+ width: 110,
+ render: (row) =>
+ h(
+ 'span',
+ { style: { color: '#389e0d', fontWeight: '600' } },
+ row.middle_80_avg.toFixed(2),
+ ),
+ },
+ {
+ title: '后10%均值',
key: 'bottom_10_avg',
width: 100,
render: (row) =>