From 593dad093ef391a71e44f34a0a567adf81f6d36d Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 24 Nov 2025 09:43:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E6=8E=92=E5=90=8D=E6=98=8E?= =?UTF-8?q?=E7=BB=86=EF=BC=8C=E8=A1=A8=E5=90=8D=E7=A7=B0=E5=B1=85=E4=B8=AD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style.css | 1 + src/views/BattleRanking.vue | 85 +++++++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 9 deletions(-) diff --git a/src/style.css b/src/style.css index 66dced9..2bcb6ff 100644 --- a/src/style.css +++ b/src/style.css @@ -142,6 +142,7 @@ h2.game-subtitle { font-size: 1.8rem; font-weight: 700; letter-spacing: 0.5px; + text-align: center; } /* 游戏化链接样式 */ diff --git a/src/views/BattleRanking.vue b/src/views/BattleRanking.vue index ff7945e..5db4183 100644 --- a/src/views/BattleRanking.vue +++ b/src/views/BattleRanking.vue @@ -41,7 +41,19 @@ - + +
+
+

总战绩

+
+
+ {{ localDisplayConfig.team?.totalScoreColumn?.displayStyle === 'amount' ? '¥' : '' }}{{ totalTeamScore }} +
+
+
+
+ +
@@ -60,14 +72,14 @@
-

👥 战区排名

+

战区排名

排名 战区名称 {{ localDisplayConfig.team?.totalScoreColumn?.displayName || '业绩' }} 人数 - 队长 + 将军 奖金
{{ index + 1 }} {{ item.name }} - {{ localDisplayConfig.team?.totalScoreColumn?.displayStyle === 'amount' ? '¥' + - item.totalScore : item.totalScore }} + {{ localDisplayConfig.team?.totalScoreColumn?.displayStyle === 'amount' ? '¥' : '' }}{{ formatNumber(item.totalScore) }} {{ item.memberCount }}人 {{ item.leader }} ¥{{ item.bonus }} @@ -118,7 +129,7 @@
-

👤 英雄排名

+

英雄排名

排名 @@ -144,8 +155,7 @@ {{ item.name || '-' }} {{ item.team || '-' }} - {{ localDisplayConfig.individual?.scoreColumn?.displayStyle === 'amount' ? '¥' + - item.score : item.score }} + {{ localDisplayConfig.individual?.scoreColumn?.displayStyle === 'amount' ? '¥' : '' }}{{ formatNumber(item.score) }} {{ item.level }} {{ item.department }} @@ -303,6 +313,29 @@ const filteredTeamRankings = computed(() => { } return filtered; }); + +// 格式化数字为中国人习惯的金额表达方式(使用万分位分隔符) +function formatNumber(num) { + if (num === null || num === undefined || isNaN(num)) return '0'; + const numStr = num.toString(); + // 先处理小数部分 + const parts = numStr.split('.'); + let integerPart = parts[0]; + const decimalPart = parts.length > 1 ? '.' + parts[1] : ''; + + // 对于整数部分,从右往左每四位添加一个逗号(万分位分隔) + const formattedInteger = integerPart.replace(/\B(?=(\d{4})+(?!\d))/g, ','); + + return formattedInteger + decimalPart; +} + +// 计算属性 - 所有战区业绩总和 +const totalTeamScore = computed(() => { + const total = teamRankings.value.reduce((total, team) => { + return total + (team.totalScore || 0); + }, 0); + return formatNumber(total); +}); // 确保即使displayConfig存在,也要和默认配置合并,保证结构完整性 const localDisplayConfig = ref(() => { if (displayConfig) { @@ -1735,7 +1768,41 @@ onUnmounted(() => { /* 移动端背景图片设置 - 全局样式 */ - @media (max-width: 768px) { + /* 总战绩部分样式 */ +.total-score-section { + margin: 20px auto; + max-width: 1200px; + padding: 20px; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); + animation: fadeIn 0.5s ease-in-out; +} + +.total-score-container { + display: flex; + flex-direction: column; + gap: 15px; +} + +.total-score-content { + +} + +.total-score-item { + display: flex; + justify-content: center; /* 水平居中 */ + align-items: center; /* 垂直居中 */ + padding: 10px; + min-height: 60px; /* 确保有足够的高度来展示垂直居中效果 */ +} + +.score-value { + font-size: 1.5rem; + font-weight: bold; + color: var(--gold-primary); + text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); +} + +@media (max-width: 768px) { /* 战区排名容器设置 - 根据配置决定显示行数和滚动行为 */ .team-rankings-container .rank-table { From 885f0a51dd98bf52fa84c8b2535bcf4c01958f23 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 24 Nov 2025 14:32:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E6=94=AF=E6=8C=81=E6=88=98?= =?UTF-8?q?=E5=8C=BA=E5=86=A0=E5=86=9B=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=8B=B1=E9=9B=84=E6=A6=9C=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=8F=8A=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AdminPanel.vue | 37 ++++++-- src/views/BattleRanking.vue | 175 ++++++++++++++++++++++++++++++------ 2 files changed, 179 insertions(+), 33 deletions(-) diff --git a/src/views/AdminPanel.vue b/src/views/AdminPanel.vue index b039f8a..0757665 100644 --- a/src/views/AdminPanel.vue +++ b/src/views/AdminPanel.vue @@ -475,30 +475,53 @@

🏆 冠军Logo配置

-

🎯 战区冠军Logo

+

🎯 战区冠军配置

+
+ +
- 战区冠军Logo + 战区冠军
- 未上传Logo + 未上传图片
-
- +
+ px
-

支持JPG、PNG、GIF格式,建议尺寸200x200像素,文件大小不超过5MB

+
+
+ + + px +
+
+ + + px +
+
+

支持JPG、PNG、GIF格式,建议尺寸200x200像素(头像)或400x300像素(照片),文件大小不超过5MB

diff --git a/src/views/BattleRanking.vue b/src/views/BattleRanking.vue index 5db4183..6756189 100644 --- a/src/views/BattleRanking.vue +++ b/src/views/BattleRanking.vue @@ -61,10 +61,21 @@
-