From 3714621173c606c4c58439ed8941100ce9ddea14 Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期三, 05 十一月 2025 15:10:49 +0800
Subject: [PATCH] bug
---
web/src/views/next-list.vue | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/web/src/views/next-list.vue b/web/src/views/next-list.vue
index addeb22..4158bf8 100644
--- a/web/src/views/next-list.vue
+++ b/web/src/views/next-list.vue
@@ -27,7 +27,6 @@
<el-icon><Search /></el-icon>
鎼滅储
</el-button>
- <el-button @click="resetSearch">閲嶇疆</el-button>
</div>
</div>
@@ -222,6 +221,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { Search, TrophyBase, InfoFilled } from '@element-plus/icons-vue'
import PromotionApi from '@/api/promotion'
+import { getActivity } from '@/api/activity'
const router = useRouter()
@@ -276,8 +276,15 @@
size: pagination.size
})
- competitions.value = data || []
- pagination.total = data ? data.length : 0
+ // 澶勭悊鍒嗛〉鍝嶅簲瀵硅薄
+ if (data && data.content) {
+ competitions.value = data.content
+ pagination.total = parseInt(data.totalElements) || 0
+ } else {
+ // 鍏煎鏃х殑杩斿洖鏍煎紡锛堝鏋滃悗绔繕娌℃洿鏂帮級
+ competitions.value = data || []
+ pagination.total = data ? data.length : 0
+ }
} catch (error) {
console.error('鑾峰彇姣旇禌鏅嬬骇鍒楄〃澶辫触:', error)
ElMessage.error('鑾峰彇姣旇禌鏁版嵁澶辫触: ' + (error.message || '鏈煡閿欒'))
@@ -393,6 +400,8 @@
selectedParticipants.value = selection
}
+
+
// 纭鏅嬬骇
const confirmPromotion = async () => {
if (selectedParticipants.value.length === 0) {
@@ -418,10 +427,10 @@
const participantIds = selectedParticipants.value.map(p => p.id)
const result = await PromotionApi.promoteParticipants(
- selectedCompetition.value.id,
- participantIds,
- null // 鐩爣闃舵ID锛岃繖閲屽彲浠ユ牴鎹渶瑕佽缃�
- )
+ selectedCompetition.value.competitionId, // 涓绘瘮璧汭D
+ participantIds,
+ selectedCompetition.value.id // 褰撳墠闃舵ID浣滀负鐩爣闃舵ID
+ )
if (result && result.success) {
ElMessage.success(result.message || `鎴愬姛鏅嬬骇 ${result.promotedCount} 鍚嶄汉鍛榒)
@@ -558,7 +567,7 @@
.search-toolbar {
display: flex;
align-items: center;
- justify-content: space-between;
+ justify-content: flex-end;
margin-bottom: 20px;
padding: 16px;
background-color: #f9fafb;
--
Gitblit v1.8.0