4 Commits 85a5dc32bf ... d5661ef162

Author SHA1 Message Date
  zhou d5661ef162 feat(gameEvent): 排行榜页面优化成绩显示格式并添加单位标识 2 weeks ago
  zhou 983d1a2d40 feat(gameScore): 新增看板排名数据接口 2 weeks ago
  zhou f4a0b0a619 fix(gameEvent): 注释掉默认事件获取调用 2 weeks ago
  zhou ccf18f3b44 feat(gameEvent): 使用赛事编码优化文件导出命名规则 2 weeks ago

+ 17 - 0
src/api/system/gameScore/index.ts

@@ -109,6 +109,23 @@ export const getProjectScoreData = (params: {
   });
 };
 
+/**
+ * 获取看板排名数据(极简接口,后端完成排序和排名)
+ * @param params
+ */
+export const getRankingBoardData = (params: {
+  eventId: string | number;
+  projectId: string | number;
+  classification: string;
+  rgId?: string | number;
+}) => {
+  return request({
+    url: '/system/gameScore/rankingBoard',
+    method: 'get',
+    params
+  });
+};
+
 /**
  * 更新成绩并重新计算排名积分
  * @param data 成绩数据

+ 4 - 2
src/views/system/gameAthlete/index.vue

@@ -218,8 +218,10 @@ import { GameAthleteVO, GameAthleteQuery, GameAthleteForm } from '@/api/system/g
 import { GameTeamVO } from '@/api/system/gameTeam/types';
 import { GameEventVO } from '@/api/system/gameEvent/types';
 import { globalHeaders } from '@/utils/request';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const { sys_user_sex, game_event_status } = toRefs<any>(proxy?.useDict('sys_user_sex','game_event_status'));
 const defaultEvent = ref<GameEventVO | null>(null); // 默认赛事信息
 
@@ -764,7 +766,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `运动员详情_${new Date().getTime()}.xlsx`
+    `${gameEventStore.defaultEventInfo?.eventCode || ''}_运动员详情.xlsx`
   );
 };
 
@@ -797,7 +799,7 @@ function submitFileForm() {
 
 /** 下载模板操作 */
 const importTemplate = () => {
-  proxy?.download('system/gameAthlete/importTemplate', {}, `game_athlete_template_${new Date().getTime()}.xlsx`);
+  proxy?.download('system/gameAthlete/importTemplate', {}, `${gameEventStore.defaultEventInfo?.eventCode || ''}_运动员导入模板.xlsx`);
 };
 
 onMounted(() => {

+ 69 - 135
src/views/system/gameEvent/RankingBoardPage.vue

@@ -107,8 +107,10 @@
                 <span class="item-name">{{ item.name || item.athleteName }}</span>
                 <span class="item-team">{{ item.teamName }}</span>
                 <span class="item-project-name">{{ selectedProjectName }}</span>
-                <span class="item-score" v-if="item.classification=='0'">{{item.individualPerformance || item.score || item.totalScore }}</span>
-                <span class="item-score" v-else-if="item.classification=='1'">{{item.teamPerformance || item.score || item.totalScore }}</span>
+                <span class="item-score">
+                  {{ item.score || '-' }}
+                  <span v-if="item.score && item.score !== '-' && item.score !== '无成绩'" class="score-unit">{{ personalUnit }}</span>
+                </span>
               </div>
             </div>
           </div>
@@ -220,8 +222,10 @@
                 <span class="item-project-name">{{ selectedTeamProjectName }}</span>
                 <span class="item-team-name">{{ item.name || item.teamName }}</span>
                 <span class="item-group">{{ item.rgName || '-' }}</span>
-                <span class="item-score" v-if="item.classification=='1'">{{ item.teamPerformance || item.score || item.totalScore }}</span>
-                <span class="item-score" v-else>{{ item.score || item.totalScore }}</span>
+                <span class="item-score">
+                  {{ item.score || '-' }}
+                  <span v-if="item.score && item.score !== '-' && item.score !== '无成绩'" class="score-unit">{{ teamUnit }}</span>
+                </span>
               </div>
             </div>
           </div>
@@ -233,8 +237,7 @@
 
 <script setup lang="ts">
 import { ref, computed, onMounted, onUnmounted, getCurrentInstance, toRefs } from 'vue';
-import { listScoreRanking, listPersonalRanking, listTeamRanking } from '@/api/system/gameEvent/eventRank';
-import { listGameScore, getBonusData, getProjectScoreData } from '@/api/system/gameScore';
+import { getProjectScoreData, getRankingBoardData, updateBonusData, exportBonusExcel } from '@/api/system/gameScore';
 import { listGameEventProject } from '@/api/system/gameEventProject';
 import { getProjectProgress } from '@/api/system/gameEvent/projectProgress';
 import { ProjectProgressVo, GroupProgressVo } from '@/api/system/gameEvent/types';
@@ -276,6 +279,33 @@ const projectProgress = ref<ProjectProgressVo[]>([]);
 const teamScores = ref<TeamScore[]>([]);
 const filteredTeamScores = ref<any[]>([]); // 用于显示筛选后的队伍积分
 
+// 获取当前项目的单位
+const getProjectUnit = (project: any) => {
+  if (!project) return '';
+  if (project.countUnit) return project.countUnit;
+  
+  // 自动兜底逻辑
+  const rule = String(project.scoreRule);
+  if (rule === '1') return '秒'; // 计时类
+  if (rule === '2' || rule === '3' || rule === '6') return '米'; // 距离/远度/高度类
+  
+  // 备选方案:按项目名称关键字识别
+  if (project.projectName?.includes('计时')) return '秒';
+  if (project.projectName?.includes('米') || project.projectName?.includes('远') || project.projectName?.includes('高')) return '米';
+  
+  return '';
+};
+
+const personalUnit = computed(() => {
+  const project = personalProjectOptions.value.find(p => p.projectId == selectedProjectId.value);
+  return getProjectUnit(project);
+});
+
+const teamUnit = computed(() => {
+  const project = teamProjectOptions.value.find(p => p.projectId == selectedTeamProjectId.value);
+  return getProjectUnit(project);
+});
+
 const ALL_GROUPS_VALUE = 'all';
 // 分组相关数据
 const rankGroupOptions = ref<RankGroupVO[]>([]);
@@ -359,51 +389,29 @@ const handleTeamCountChange = (value: number) => {
 // 获取团队项目排行榜数据
 const loadTeamProjectScores = async () => {
   if (!selectedTeamProjectId.value) return;
-  const res = await getProjectScoreData({
+  const res = await getRankingBoardData({
     eventId: defaultEventInfo.value.eventId,
     projectId: selectedTeamProjectId.value,
     classification: '1',
-    pageNum: 1,
-    pageSize: 1000 // 获取全量以便筛选
+    rgId: selectedRankGroupId.value || undefined
   });
   
-  // 创建分组ID到分组名称的映射
-  const groupMap = new Map();
-  rankGroupOptions.value.forEach(group => {
-    groupMap.set(group.rgId, group.rgName);
-  });
-  
-  const teamScoreList = (res.rows || []).map(item => {
-    return {
-      ...item,
-      classification: '1',
-      rgName: groupMap.get(item.rgId) || item.rgName || '-'
-    }
-  });
-
-  // 获取当前项目的排序方式
-  const currentProject = teamProjectOptions.value.find(p => p.projectId == selectedTeamProjectId.value);
-  const orderType = currentProject ? currentProject.orderType : '1'; // 默认降序
+  // 直接使用后端返回的有序且带排名的列表
+  const teamScoreList = res.data || [];
 
-  teamScores.value = sortAndRankList(teamScoreList, orderType);
-  // 应用分组筛选
-  handleRankGroupChange(selectedRankGroupId.value);
+  teamScores.value = teamScoreList.map(item => ({
+    ...item,
+    classification: '1'
+  }));
+  
+  // 更新过滤后的显示列表(由于后端已按分组过滤,这里直接同步)
+  filteredTeamScores.value = teamScores.value;
 };
 
 // 处理分组筛选变化
 const handleRankGroupChange = (rgId: string | number | null | undefined) => {
-  if (rgId === null || rgId === undefined || rgId === '' || rgId === ALL_GROUPS_VALUE) {
-    // 显示所有队伍
-    filteredTeamScores.value = teamScores.value;
-  } else {
-    // 筛选所属分组的队伍(现在后端已处理父子关系,但此处是前端过滤已加载的数据)
-    // 注意:如果看板是全量数据在前端筛选,前端依然需要知道哪些子分组属于该父分组
-    // 或者更简单的做法:看板数据在获取时就根据 rgId 传参给后端。
-    
-    // 鉴于看板通常是全量计算好后前端切分,我们这里保留一个简单的打平用于辅助过滤
-    const targetIds = getFlatIds(rgId);
-    filteredTeamScores.value = teamScores.value.filter(team => targetIds.includes(team.rgId));
-  }
+  // 分组筛选直接触发后端查询,不再在前端过滤
+  loadTeamProjectScores();
 };
 
 // 从扁平列表中获取某个节点下的所有子孙ID(用于前端筛选)
@@ -530,89 +538,6 @@ const loadProjectProgress = async () => {
   }
 };
 
-// 获取成绩的数值表示(用于排序)
-const getNumericValue = (val: string | number | null | undefined) => {
-  if (val === null || val === undefined || val === '' || val === '0' || val === '00:00:00.000') return 0;
-  if (typeof val === 'number') return val;
-  
-  const valStr = String(val);
-  // 处理计时格式 00:00:00.000
-  if (valStr.includes(':')) {
-    const parts = valStr.split(':');
-    if (parts.length === 3) {
-      const hours = parseInt(parts[0]) || 0;
-      const minutes = parseInt(parts[1]) || 0;
-      const secondsWithMs = parts[2];
-      let seconds = 0;
-      let ms = 0;
-      if (secondsWithMs.includes('.')) {
-        const secondsParts = secondsWithMs.split('.');
-        seconds = parseInt(secondsParts[0]) || 0;
-        ms = parseInt(secondsParts[1]) || 0;
-      } else {
-        seconds = parseInt(secondsWithMs) || 0;
-      }
-      return hours * 3600000 + minutes * 60000 + seconds * 1000 + ms;
-    }
-  }
-  
-  const parsed = parseFloat(valStr);
-  return isNaN(parsed) ? 0 : parsed;
-};
-
-// 前端排序与排名处理
-const sortAndRankList = (list: any[], orderType: string) => {
-  if (!list || list.length === 0) return [];
-  
-  // 成绩取值助手函数
-  const getScoreValue = (item: any) => {
-    if (item.classification == '0') {
-      return item.individualPerformance ?? item.score ?? item.totalScore;
-    } else {
-      return item.teamPerformance ?? item.score ?? item.totalScore;
-    }
-  };
-
-  // 1. 排序逻辑
-  const sorted = [...list].sort((a, b) => {
-    const valA = getScoreValue(a);
-    const valB = getScoreValue(b);
-    
-    const scoreA = getNumericValue(valA);
-    const scoreB = getNumericValue(valB);
-    
-    // 0 值(未参赛/无效成绩)永远排在最后
-    if (scoreA === 0 && scoreB === 0) return 0;
-    if (scoreA === 0) return 1;
-    if (scoreB === 0) return -1;
-    
-    if (orderType == '0') { // 升序(计时类,用时越短越好)
-      return scoreA - scoreB;
-    } else { // 降序(远度/积分,分值越高越好)
-      return scoreB - scoreA;
-    }
-  });
-  
-  // 2. 计算排名(支持并列)
-  let currentRank = 0;
-  let lastScoreValue = -1;
-  
-  return sorted.map((item, index) => {
-    const val = getScoreValue(item);
-    const scoreValue = getNumericValue(val);
-    
-    if (scoreValue === 0) {
-      item.rank = '-'; // 无效成绩不计排名
-    } else if (scoreValue !== lastScoreValue) {
-      currentRank = index + 1;
-      lastScoreValue = scoreValue;
-      item.rank = currentRank;
-    } else {
-      item.rank = currentRank;
-    }
-    return item;
-  });
-};
 
 // 获取排名显示文本
 const getRankDisplay = (item: any, index: number, list: any[]) => {
@@ -627,21 +552,15 @@ const refreshPersonalRanking = async () => {
   if (!selectedProjectId.value) return;
   personalRefreshing.value = true;
   try {
-    const res = await getProjectScoreData({
+    const res = await getRankingBoardData({
       eventId: defaultEventInfo.value.eventId,
       projectId: selectedProjectId.value,
-      classification: '0',
-      pageNum: 1,
-      pageSize: personalDisplayCount.value
+      classification: '0'
     });
-    // 接口返回的是分页数据,取 rows
-    const rows = (res.rows || []).map(item => ({ ...item, classification: '0' }));
     
-    // 获取当前项目的排序方式
-    const currentProject = personalProjectOptions.value.find(p => p.projectId == selectedProjectId.value);
-    const orderType = currentProject ? currentProject.orderType : '1'; // 默认降序
+    // 直接使用后端返回的成品数据
+    athleteScoreList.value = (res.data || []).map(item => ({ ...item, classification: '0' }));
     
-    athleteScoreList.value = sortAndRankList(rows, orderType);
     // 手动刷新时重置倒计时
     startCountdown();
     // 显示成功消息
@@ -909,7 +828,7 @@ onUnmounted(() => {
 onMounted(async () => {
   try{
     startAutoRefresh();
-    await gameEventStore.fetchDefaultEvent();
+    // await gameEventStore.fetchDefaultEvent();
     // 并行加载其他数据
     await Promise.all([
       // 加载所有项目选项并进行前端分类
@@ -1205,6 +1124,21 @@ onMounted(async () => {
 }
 
 /* 标题样式 */
+.item-score {
+  width: 120px;
+  /* text-align: right; */
+  font-weight: bold;
+  color: green;
+  font-family: 'Digital-7', 'Courier New', Courier, monospace;
+}
+
+.score-unit {
+  font-size: 0.8em;
+  /* margin-left: 4px; */
+  color: green;
+  font-family: 'Inter', sans-serif;
+}
+
 .header-title {
   text-align: center;
   font-weight: bold;

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

@@ -680,7 +680,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `赛事详情_${new Date().getTime()}.xlsx`
+    `赛事列表.xlsx`
   );
 };
 
@@ -691,7 +691,7 @@ const handleDownloadTemplate = (row: GameEventVO) => {
     {
       eventId: row.eventId
     },
-    `event_enroll_template_${new Date().getTime()}.xlsx`
+    `${row.eventCode}_报名表模板.xlsx`
   );
 };
 
@@ -1058,7 +1058,7 @@ const handleWriteArticleDefault = async () => {
 };
 
 const handleExportNumberTableDefault = async () => {
-  await proxy?.download('system/number/export', {}, `号码对照表_${new Date().getTime()}.xlsx`);
+  await proxy?.download('system/number/export', {}, `${gameEventStore.defaultEventInfo?.eventCode || ''}_号码对照表.xlsx`);
 };
 
 // 生成参赛证相关 - 已移动到 BibViewerDialog 组件中

+ 3 - 1
src/views/system/gameEventConfig/index.vue

@@ -142,8 +142,10 @@ import { getDefaultEvent } from '@/api/system/gameEvent';
 import { GameEventConfigVO, GameEventConfigQuery, GameEventConfigForm } from '@/api/system/gameEventConfig/types';
 import { GameEventVO } from '@/api/system/gameEvent/types';
 import { GameEventConfigTypeVO } from '@/api/system/gameEventConfigType/types';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const { game_event_status, game_yes_no } = toRefs<any>(proxy?.useDict('game_event_status', 'game_yes_no'));
 const defaultEvent = ref<GameEventVO | null>(null); // 默认赛事信息
 
@@ -343,7 +345,7 @@ const getConfigTypeList = async () => {
 const handleExport = () => {
   proxy?.download('system/gameEventConfig/export', {
     ...queryParams.value
-  }, `gameEventConfig_${new Date().getTime()}.xlsx`)
+  }, `${gameEventStore.defaultEventInfo?.eventCode || ''}_赛事配置.xlsx`)
 }
 
 onMounted(() => {

+ 3 - 1
src/views/system/gameEventConfigType/index.vue

@@ -130,8 +130,10 @@
 <script setup name="GameEventConfigType" lang="ts">
 import { listGameEventConfigType, getGameEventConfigType, delGameEventConfigType, addGameEventConfigType, updateGameEventConfigType } from '@/api/system/gameEventConfigType';
 import { GameEventConfigTypeVO, GameEventConfigTypeQuery, GameEventConfigTypeForm } from '@/api/system/gameEventConfigType/types';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const { game_yes_no } = toRefs<any>(proxy?.useDict('game_yes_no'));
 
 const gameEventConfigTypeList = ref<GameEventConfigTypeVO[]>([]);
@@ -316,7 +318,7 @@ const handleDelete = async (row?: GameEventConfigTypeVO) => {
 const handleExport = () => {
   proxy?.download('system/gameEventConfigType/export', {
     ...queryParams.value
-  }, `gameEventConfigType_${new Date().getTime()}.xlsx`)
+  }, `${gameEventStore.defaultEventInfo?.eventCode || ''}_赛事配置类型.xlsx`)
 }
 
 onMounted(() => {

+ 3 - 1
src/views/system/gameEventGroup/detail.vue

@@ -123,10 +123,12 @@ import { getGameEventGroup, generateGroups, getGroupResultFromDB } from '@/api/s
 import { getGameEventProject } from '@/api/system/gameEventProject';
 import { GameEventGroupVO } from '@/api/system/gameEventGroup/types';
 import type { ComponentInternalInstance } from 'vue';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const route = useRoute();
 const router = useRouter();
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 
 // 分组信息
 const groupInfo = ref<GameEventGroupVO>({} as GameEventGroupVO);
@@ -315,7 +317,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `分组详情_${new Date().getTime()}.xlsx`
+    `${gameEventStore.defaultEventInfo?.eventCode || ''}_${projectName.value}_分组详情.xlsx`
   );
 };
 onUpdated(() => { 

+ 3 - 1
src/views/system/gameEventGroup/index.vue

@@ -279,8 +279,10 @@ import { listGameAthlete, getAthleteCount as getAthleteCountApi } from '@/api/sy
 import AthleteListDialog from '@/components/AthleteListDialog/index.vue';
 import { GameEventGroupVO, GameEventGroupQuery, GameEventGroupForm } from '@/api/system/gameEventGroup/types';
 import { GameEventProjectVO } from '@/api/system/gameEventProject/types';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const router = useRouter();
 
 // 字典数据
@@ -775,7 +777,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `gameEventGroup_${new Date().getTime()}.xlsx`
+    `${gameEventStore.defaultEventInfo?.eventCode || ''}_赛事分组.xlsx`
   );
 };
 

+ 3 - 1
src/views/system/gameEventMenu/index.vue

@@ -254,8 +254,10 @@
 import { listMenu, getMenu, delMenu, addMenu, updateMenu } from '@/api/system/menu';
 import { MenuVO, MenuQuery, MenuForm } from '@/api/system/menu/types';
 import { MenuTypeEnum } from '@/enums/MenuTypeEnum';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const { sys_show_hide, sys_normal_disable } = toRefs<any>(proxy?.useDict('sys_show_hide', 'sys_normal_disable'));
 
 const menuList = ref<MenuVO[]>([]);
@@ -432,7 +434,7 @@ const handleDelete = async (row?: MenuVO) => {
 const handleExport = () => {
   proxy?.download('system/menu/export', {
     ...queryParams.value
-  }, `menu_${new Date().getTime()}.xlsx`)
+  }, `${gameEventStore.defaultEventInfo?.eventCode || ''}_赛事菜单.xlsx`)
 }
 
 onMounted(() => {

+ 16 - 3
src/views/system/gameEventProject/index.vue

@@ -21,7 +21,7 @@
       </div>
     </transition>
 
-    <el-card shadow="never">
+    <el-card shadow="never" class="table-card">
       <template #header>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
@@ -47,7 +47,13 @@
         </el-row>
       </template>
 
-      <el-table v-loading="loading" border :data="gameEventProjectList" @selection-change="handleSelectionChange">
+      <el-table 
+        v-loading="loading" 
+        border 
+        :data="gameEventProjectList" 
+        @selection-change="handleSelectionChange"
+        max-height="calc(100vh - 280px)"
+      >
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="序号" align="center" fixed="left" type="index" />
         <el-table-column label="项目id" align="center" fixed="left" prop="projectId" v-if="columns[0].visible" />
@@ -422,6 +428,7 @@ import RefereeGroupDialog from './RefereeGroupDialog.vue';
 import ProjectLibraryDialog from './ProjectLibraryDialog.vue';
 import StatsDetailDialog from './StatsDetailDialog.vue';
 import { ElMessageBox } from 'element-plus';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { game_score_type, game_project_type, game_project_classification, game_round, game_stage, sys_group_sex, game_order_type } = toRefs<any>(proxy?.useDict('game_score_type', 'game_project_type', 'game_project_classification', 'game_round', 'game_stage', 'sys_group_sex', 'game_order_type'));
@@ -716,7 +723,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `项目详情_${new Date().getTime()}.xlsx`
+    `${useGameEventStore().defaultEventInfo?.eventCode || ''}_项目列表.xlsx`
   );
 };
 
@@ -878,4 +885,10 @@ onMounted(() => {
 :deep(.el-form-item__label) {
   font-weight: 500;
 }
+.table-card :deep(.el-card__body) {
+  padding: 10px;
+}
+.el-table {
+  margin-bottom: 10px;
+}
 </style>

+ 1 - 1
src/views/system/gameEventSchedule/index.vue

@@ -407,7 +407,7 @@ const exportSchedule = () => {
   const blob = new Blob([html], { type: 'application/vnd.ms-excel;charset=utf-8' });
   const link = document.createElement('a');
   link.href = URL.createObjectURL(blob);
-  link.download = `赛事日程安排_${defaultEvent.value.eventName}_${parseTime(new Date(), '{y}{m}{d}')}.xls`;
+  link.download = `${defaultEvent.value.eventCode || ''}_赛事日程安排.xls`;
   link.click();
   URL.revokeObjectURL(link.href);
 };

+ 4 - 2
src/views/system/gameReferee/index.vue

@@ -118,8 +118,10 @@
 import { listGameReferee, getGameReferee, delGameReferee, addGameReferee, updateGameReferee, generateRefereeQRCode } from '@/api/system/gameReferee';
 import { getGameEventProject, listGameEventProject, updateGameEventProject } from '@/api/system/gameEventProject';
 import { GameRefereeVO, GameRefereeQuery, GameRefereeForm } from '@/api/system/gameReferee/types';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 
 const gameRefereeList = ref<GameRefereeVOExt[]>([]);
 const buttonLoading = ref(false);
@@ -426,7 +428,7 @@ const handleDownloadQRCode = () => {
   
   const link = document.createElement('a');
   link.href = qrCodeData.value;
-  link.download = `裁判二维码_${currentReferee.value.name}.png`;
+  link.download = `${gameEventStore.defaultEventInfo?.eventCode || ''}_裁判二维码_${currentReferee.value.name}.png`;
   link.click();
   proxy?.$modal.msgSuccess("二维码下载成功");
 };
@@ -435,7 +437,7 @@ const handleDownloadQRCode = () => {
 const handleExport = () => {
   proxy?.download('system/gameReferee/export', {
     ...queryParams
-  }, `gameReferee_${new Date().getTime()}.xlsx`)
+  }, `${gameEventStore.defaultEventInfo?.eventCode || ''}_裁判列表.xlsx`)
 }
 
 onMounted(() => {

+ 1 - 1
src/views/system/gameScore/gameScoreBonus.vue

@@ -354,7 +354,7 @@ const exportBonusData = async () => {
         data: JSON.stringify(bonusDataList.value),
         projects: JSON.stringify(bonusProjectList.value)
       },
-      `总成绩排名表_${new Date().toLocaleDateString()}.xlsx`
+      `${gameEventStore.defaultEventInfo?.eventCode || ''}_总成绩排名表.xlsx`
     );
     
     proxy?.$modal.msgSuccess("导出成功");

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

@@ -736,7 +736,7 @@ const exportScoresNames = async () => {
     };
 
     // 文件名动态调整
-    let fileName = `成绩详情表`;
+    let fileName = `${gameEventStore.defaultEventInfo?.eventCode || ''}_成绩详情表`;
     if (topN > 0) fileName += `_前${topN}名`;
     if (ids.value.length == 0) fileName += `_全部项目`;
     fileName += '.xlsx';

+ 4 - 2
src/views/system/gameTeam/index.vue

@@ -189,8 +189,10 @@ import { listGameEventProject } from '@/api/system/gameEventProject';
 import { GameTeamVO, GameTeamQuery, GameTeamForm } from '@/api/system/gameTeam/types';
 import { GameEventProjectVO } from '@/api/system/gameEventProject/types';
 import { globalHeaders } from '@/utils/request';
+import { useGameEventStore } from '@/store/modules/gameEvent';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const gameEventStore = useGameEventStore();
 const { sys_normal_disable } = toRefs<any>(proxy?.useDict('sys_normal_disable'));
 
 const gameTeamList = ref<GameTeamVO[]>([]);
@@ -442,7 +444,7 @@ const handleExport = () => {
     {
       ...queryParams.value
     },
-    `队伍详情_${new Date().getTime()}.xlsx`
+    `${gameEventStore.defaultEventInfo?.eventCode || ''}_队伍详情.xlsx`
   );
 };
 
@@ -475,7 +477,7 @@ function submitFileForm() {
 
 /** 下载模板操作 */
 const importTemplate = () => {
-  proxy?.download('system/gameTeam/importTemplate', {}, `参赛队伍_${new Date().getTime()}.xlsx`);
+  proxy?.download('system/gameTeam/importTemplate', {}, `${gameEventStore.defaultEventInfo?.eventCode || ''}_队伍导入模板.xlsx`);
 };
 
 onMounted(() => {

+ 1 - 1
src/views/system/rankGroup/index.vue

@@ -258,7 +258,7 @@ const handleDelete = async (row: RankGroupVO) => {
 const handleExport = () => {
   proxy?.download('system/rankGroup/export', {
     ...queryParams.value
-  }, `组别_${new Date().getTime()}.xlsx`)
+  }, `${gameEventStore.defaultEventInfo?.eventCode || ''}_排名分组组别.xlsx`)
 };
 
 onMounted(() => {