|
@@ -51,9 +51,17 @@
|
|
|
<el-table-column
|
|
|
v-for="project in bonusProjectList"
|
|
|
:key="project.projectId"
|
|
|
- :label="project.projectName"
|
|
|
align="center"
|
|
|
width="120">
|
|
|
+ <template #header>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="goToProjectDetail(project)"
|
|
|
+ class="project-header-link">
|
|
|
+ {{ project.projectName }}
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<template #default="scope">
|
|
|
{{ scope.row.projectScores[project.projectName] || 0 }}
|
|
|
</template>
|
|
@@ -91,12 +99,14 @@
|
|
|
|
|
|
<script setup name="GameScoreBonus" lang="ts">
|
|
|
import { ref, onMounted, onUnmounted, getCurrentInstance, toRefs } from 'vue';
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
import { Timer } from '@element-plus/icons-vue';
|
|
|
import { getBonusData, updateBonusData, exportBonusExcel } from '@/api/system/gameScore';
|
|
|
import { useGameEventStore } from '@/store/modules/gameEvent';
|
|
|
import type { ComponentInternalInstance } from 'vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const router = useRouter();
|
|
|
|
|
|
// 默认赛事信息
|
|
|
const gameEventStore = useGameEventStore();
|
|
@@ -312,6 +322,36 @@ const refreshBonusData = async () => {
|
|
|
startCountdown();
|
|
|
};
|
|
|
|
|
|
+// 跳转到项目详情页
|
|
|
+const goToProjectDetail = (project: any) => {
|
|
|
+ const event = gameEventStore.defaultEventInfo;
|
|
|
+ const eventId = event?.eventId;
|
|
|
+
|
|
|
+ if (!eventId) {
|
|
|
+ proxy?.$modal.msgWarning('未指定赛事,无法跳转');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!project.projectId) {
|
|
|
+ proxy?.$modal.msgWarning('项目信息不完整,无法跳转');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 构建路由参数
|
|
|
+ const routeParams = {
|
|
|
+ projectId: project.projectId,
|
|
|
+ projectName: project.projectName || '未知项目',
|
|
|
+ projectType: project.projectType || '0',
|
|
|
+ eventId: eventId,
|
|
|
+ classification: project.projectClassification || '0' // 默认为个人项目
|
|
|
+ };
|
|
|
+
|
|
|
+ // 跳转到项目详情页
|
|
|
+ router.push({
|
|
|
+ path: `/system/gameScore/edit/${routeParams.projectId}/${routeParams.projectName}/${routeParams.projectType}/${routeParams.eventId}/${routeParams.classification}`
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
onUnmounted(() => {
|
|
|
if (autoRefreshInterval.value) {
|
|
|
clearInterval(autoRefreshInterval.value);
|
|
@@ -389,6 +429,40 @@ onMounted(async () => {
|
|
|
text-align: center;
|
|
|
} */
|
|
|
|
|
|
+/* 项目表头链接样式 */
|
|
|
+.project-header-link {
|
|
|
+ padding: 4px 8px !important;
|
|
|
+ height: auto !important;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #409eff !important;
|
|
|
+ text-decoration: none;
|
|
|
+ border: none !important;
|
|
|
+ background: none !important;
|
|
|
+ box-shadow: none !important;
|
|
|
+ border-radius: 4px;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.project-header-link:hover {
|
|
|
+ color: #66b1ff !important;
|
|
|
+ background: rgba(64, 158, 255, 0.1) !important;
|
|
|
+ transform: translateY(-1px);
|
|
|
+}
|
|
|
+
|
|
|
+.project-header-link:focus {
|
|
|
+ outline: none;
|
|
|
+ box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表头样式增强 */
|
|
|
+.el-table .el-table__header .project-header-link {
|
|
|
+ font-weight: 600;
|
|
|
+ text-align: center;
|
|
|
+ display: inline-block;
|
|
|
+ min-width: 80px;
|
|
|
+}
|
|
|
+
|
|
|
/* 响应式设计 */
|
|
|
@media (max-width: 1200px) {
|
|
|
.countdown-info {
|