peng
2025-11-07 f64693c0da5483d8670220bf3a5bf89a32e94a20
web/src/views/activity-list.vue
@@ -54,9 +54,17 @@
            <el-tag :type="getStatusType(row.stateName)">{{ row.stateName }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="120" fixed="right" align="center">
        <el-table-column label="操作" width="180" fixed="right" align="center">
          <template #default="{ row }">
            <div class="table-actions">
              <el-button
                text
                :icon="View"
                size="small"
                @click="handleView(row)"
                class="action-btn view-btn"
                title="详情"
              />
              <el-button
                text
                :icon="Edit"
@@ -99,7 +107,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
import { getActivities, updateActivityState } from '@/api/activity'
import { Search, Plus, Edit, Delete } from '@element-plus/icons-vue'
import { Search, Plus, Edit, Delete, View } from '@element-plus/icons-vue'
console.log('=== activity-list.vue 组件开始加载 ===')
@@ -177,6 +185,11 @@
// 编辑比赛
const handleEdit = (row: any) => {
  router.push(`/activity/edit/${row.id}`)
}
// 查看详情
const handleView = (row: any) => {
  router.push(`/activity/${row.id}`)
}
// 删除比赛
@@ -351,6 +364,16 @@
  background: rgba(245, 108, 108, 0.1) !important;
}
.view-btn {
  color: #67C23A;
}
.view-btn:hover {
  color: #5daf34;
  transform: scale(1.2);
  background: rgba(103, 194, 58, 0.1) !important;
}
.pagination {
  margin-top: 20px;
  display: flex;