3.0.2- rollback
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
|
||||
<span class="text-sm font-bold truncate w-full text-center dark:text-white mb-1" x-text="p.username || p.name"></span>
|
||||
<div class="px-2.5 py-1 bg-white dark:bg-slate-900 rounded-full text-xs text-gray-500 dark:text-gray-400 shadow-inner border border-gray-100 dark:border-slate-700">
|
||||
Rating: <span class="font-bold text-yrtv-600" x-text="(p.stats?.core_avg_rating2 || p.stats?.core_avg_rating || p.stats?.basic_avg_rating || 0).toFixed(2)"></span>
|
||||
Rating: <span class="font-bold text-yrtv-600" x-text="(p.stats?.basic_avg_rating || 0).toFixed(2)"></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -149,15 +149,9 @@
|
||||
<h4 class="font-bold text-xl text-gray-900 dark:text-white flex items-center gap-2">
|
||||
<span>📈</span> 综合评分
|
||||
</h4>
|
||||
<div class="flex items-baseline gap-6">
|
||||
<div class="flex items-baseline gap-2">
|
||||
<span class="text-sm text-gray-500">Team Rating</span>
|
||||
<span class="text-4xl font-black text-yrtv-600 tracking-tight" x-text="analysisResult.avg_stats.rating.toFixed(2)"></span>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-2">
|
||||
<span class="text-sm text-gray-500">Chemistry</span>
|
||||
<span class="text-3xl font-black text-yrtv-600 tracking-tight" x-text="analysisResult.chemistry.toFixed(1)"></span>
|
||||
</div>
|
||||
<div class="flex items-baseline gap-2">
|
||||
<span class="text-sm text-gray-500">Team Rating</span>
|
||||
<span class="text-4xl font-black text-yrtv-600 tracking-tight" x-text="analysisResult.avg_stats.rating.toFixed(2)"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -532,10 +526,13 @@ function tacticsApp() {
|
||||
// Unwrap proxy if needed
|
||||
const rawData = JSON.parse(JSON.stringify(this.dataResult));
|
||||
|
||||
const radarKeys = ['AIM', 'DEFENSE', 'UTILITY', 'CLUTCH', 'ECONOMY', 'PACE', 'PISTOL', 'STABILITY'];
|
||||
const datasets = rawData.map((p, idx) => {
|
||||
const color = this.getPlayerColor(idx);
|
||||
const d = radarKeys.map(k => (p.radar?.[k] || 0));
|
||||
const d = [
|
||||
p.radar.BAT || 0, p.radar.PTL || 0, p.radar.HPS || 0,
|
||||
p.radar.SIDE || 0, p.radar.UTIL || 0, p.radar.STA || 0
|
||||
];
|
||||
|
||||
return {
|
||||
label: p.username,
|
||||
data: d,
|
||||
@@ -546,49 +543,12 @@ function tacticsApp() {
|
||||
};
|
||||
});
|
||||
|
||||
const valuesByDim = radarKeys.map(() => []);
|
||||
rawData.forEach(p => {
|
||||
radarKeys.forEach((k, i) => {
|
||||
valuesByDim[i].push(Number(p.radar?.[k] || 0));
|
||||
});
|
||||
});
|
||||
const avgVals = valuesByDim.map(arr => arr.length ? arr.reduce((a, b) => a + b, 0) / arr.length : 0);
|
||||
const minVals = valuesByDim.map(arr => arr.length ? Math.min(...arr) : 0);
|
||||
const maxVals = valuesByDim.map(arr => arr.length ? Math.max(...arr) : 0);
|
||||
|
||||
datasets.push({
|
||||
label: 'Avg',
|
||||
data: avgVals,
|
||||
borderColor: '#64748b',
|
||||
backgroundColor: 'rgba(100, 116, 139, 0.08)',
|
||||
borderWidth: 2,
|
||||
pointRadius: 0
|
||||
});
|
||||
datasets.push({
|
||||
label: 'Max',
|
||||
data: maxVals,
|
||||
borderColor: '#16a34a',
|
||||
backgroundColor: 'rgba(22, 163, 74, 0.05)',
|
||||
borderWidth: 1,
|
||||
borderDash: [4, 3],
|
||||
pointRadius: 0
|
||||
});
|
||||
datasets.push({
|
||||
label: 'Min',
|
||||
data: minVals,
|
||||
borderColor: '#dc2626',
|
||||
backgroundColor: 'rgba(220, 38, 38, 0.05)',
|
||||
borderWidth: 1,
|
||||
borderDash: [4, 3],
|
||||
pointRadius: 0
|
||||
});
|
||||
|
||||
// Recreate Chart with Profile-aligned config
|
||||
const ctx = canvas.getContext('2d');
|
||||
this.radarChart = new Chart(ctx, {
|
||||
type: 'radar',
|
||||
data: {
|
||||
labels: ['枪法 (Aim)', '生存 (Defense)', '道具 (Utility)', '残局 (Clutch)', '经济 (Economy)', '节奏 (Pace)', '手枪 (Pistol)', '稳定 (Stability)'],
|
||||
labels: ['BAT (火力)', 'PTL (手枪)', 'HPS (抗压)', 'SIDE (阵营)', 'UTIL (道具)', 'STA (稳定)'],
|
||||
datasets: datasets
|
||||
},
|
||||
options: {
|
||||
@@ -635,7 +595,7 @@ function tacticsApp() {
|
||||
this.radarChart = new Chart(ctx, {
|
||||
type: 'radar',
|
||||
data: {
|
||||
labels: ['枪法 (Aim)', '生存 (Defense)', '道具 (Utility)', '残局 (Clutch)', '经济 (Economy)', '节奏 (Pace)', '手枪 (Pistol)', '稳定 (Stability)'],
|
||||
labels: ['BAT (火力)', 'PTL (手枪)', 'HPS (抗压)', 'SIDE (阵营)', 'UTIL (道具)', 'STA (稳定)'],
|
||||
datasets: []
|
||||
},
|
||||
options: {
|
||||
@@ -817,4 +777,4 @@ function tacticsApp() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user