Browse Source

refactor(system): 优化游戏团队列表显示字段

- 将游戏团队列表中的领队、人数、号码段字段设置为可见
- 移除了未使用的默认赛事相关代码
- 优化了成绩列表加载逻辑
zhou 2 days ago
parent
commit
a8b77e500d
2 changed files with 4 additions and 39 deletions
  1. 1 36
      src/views/system/gameScore/index.vue
  2. 3 3
      src/views/system/gameTeam/index.vue

+ 1 - 36
src/views/system/gameScore/index.vue

@@ -173,26 +173,6 @@ const data = reactive<PageData<GameScoreForm, GameScoreQuery>>({
 });
 
 const { queryParams, form, rules } = toRefs(data);
-// 添加额外的ref用于处理默认事件ID
-// const defaultEventId = computed(() => defaultEvent.value?.eventId);
-
-// 监听默认事件变化
-// watchEffect(() => {
-//   if (defaultEventId.value) {
-//     form.value.eventId = defaultEventId.value;
-//     queryParams.value.eventId = defaultEventId.value;
-//   }
-// });
-
-// 获取默认赛事
-// const getDefaultEventInfo = async () => {
-//   try {
-//     const res = await getDefaultEvent()
-//     defaultEvent.value = res.data
-//   } catch (error) {
-//     ElMessage.error('获取默认赛事失败')
-//   }
-// }
 
 /** 查询成绩列表 */
 const getList = async () => {
@@ -201,7 +181,7 @@ const getList = async () => {
   //   loading.value = false;
   //   return;
   // }
-  // loading.value = true;
+  loading.value = true;
   const res = await listGameScore(queryParams.value);
   gameScoreList.value = res.rows;
   total.value = res.total;
@@ -496,21 +476,6 @@ const getProjectTypeName = (type: string) => {
   return typeMap[type] || '未知';
 };
 
-/**
- * 获取分组类型名称
- */
-const getGroupTypeName = (groupNum: number) => {
-  if (!groupNum) return '未知组';
-  
-  const groupMap: Record<number, string> = {
-    1: '甲组',
-    2: '乙组',
-    3: '丙组',
-    4: '丁组'
-  };
-  return groupMap[groupNum] || `${groupNum}组`;
-};
-
 const exportScoresNames = async () => { 
   try {
     // 显示加载状态

+ 3 - 3
src/views/system/gameTeam/index.vue

@@ -169,9 +169,9 @@ const columns = ref<FieldOption[]>([
   { key: 2, label: '赛事名称', visible: false },
   { key: 3, label: '队伍名称', visible: true },
   { key: 4, label: '团队描述', visible: true },
-  { key: 5, label: '领队', visible: false },
-  { key: 6, label: '人数', visible: false },
-  { key: 7, label: '号码段', visible: false },
+  { key: 5, label: '领队', visible: true },
+  { key: 6, label: '人数', visible: true },
+  { key: 7, label: '号码段', visible: true },
   { key: 8, label: '状态', visible: false },
   { key: 9, label: '备注', visible: false }
 ]);