Przeglądaj źródła

feat(gameScore): 添加表格列排序功能并移除调试日志

- 为游戏积分页面的比赛时间、更新时间、参赛总人/队数、完赛人/队数、
  未完赛人/队数等列添加可排序功能
- 移除 SSE 连接失败时的调试日志输出
- 移除自动刷新功能启用时的调试日志输出
zhou 3 tygodni temu
rodzic
commit
19a6628037

+ 1 - 1
src/utils/sse.ts

@@ -14,7 +14,7 @@ export const initSSE = (url: any) => {
       retries: 10,
       delay: 3000,
       onFailed() {
-        console.log('Failed to connect after 10 retries');
+        // console.log('Failed to connect after 10 retries');
       }
     }
   });

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

@@ -203,7 +203,7 @@ const startAutoRefresh = () => {
   }, autoRefreshSeconds.value * 1000);
   
   startCountdown();
-  console.log(`自动刷新已开启,每${autoRefreshSeconds.value}秒刷新一次`);
+  // console.log(`自动刷新已开启,每${autoRefreshSeconds.value}秒刷新一次`);
 };
 
 // 获取分组选项

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

@@ -82,7 +82,7 @@
             <dict-tag :options="game_project_type" :value="scope.row.projectType" />
           </template>
         </el-table-column>
-        <el-table-column label="归类" align="center" prop="classification" v-if="columns[3].visible" >
+        <el-table-column label="归类" align="center" sortable prop="classification" v-if="columns[3].visible" >
           <template #default="scope">
             <el-tag :type="scope.row.classification === '0' ? 'success' : 'warning'">
               {{ scope.row.classification === '0' ? '个人项目' : '团体项目' }}
@@ -98,23 +98,23 @@
             </el-tag>
           </template>
         </el-table-column>
-        <el-table-column label="参赛总人/队数" align="center" prop="totalParticipants" v-if="columns[7].visible">
+        <el-table-column label="参赛总人/队数" align="center" sortable prop="totalParticipants" v-if="columns[7].visible">
           <template #default="scope">
             {{ scope.row.totalParticipants || 0 }}
           </template>
         </el-table-column>
-        <el-table-column label="完赛人/队数" align="center" prop="completedParticipants" v-if="columns[8].visible">
+        <el-table-column label="完赛人/队数" align="center" sortable prop="completedParticipants" v-if="columns[8].visible">
           <template #default="scope">
             {{ scope.row.completedParticipants || 0 }}
           </template>
         </el-table-column>
-        <el-table-column label="未完赛人/队数" align="center" prop="incompleteParticipants" v-if="columns[9].visible">
+        <el-table-column label="未完赛人/队数" align="center" sortable prop="incompleteParticipants" v-if="columns[9].visible">
           <template #default="scope">
             {{ scope.row.incompleteParticipants || 0 }}
           </template>
         </el-table-column>
-        <el-table-column label="比赛时间" align="center" prop="startTime" v-if="columns[5].visible" />
-        <el-table-column label="更新时间" align="center" prop="updateTime" v-if="columns[6].visible" />
+        <el-table-column label="比赛时间" align="center" sortable prop="startTime" v-if="columns[5].visible" />
+        <el-table-column label="更新时间" align="center" sortable prop="updateTime" v-if="columns[6].visible" />
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-tooltip content="查看成绩详情" placement="top">