lrj
1 天以前 9f8395fab13ca4b230a0f7d62636e209745c91d4
web/src/views/ActivityList.vue
@@ -12,40 +12,40 @@
        <el-button type="primary" @click="handleAdd">新增比赛</el-button>
      </div>
      <el-table :data="tableData" style="width: 100%" v-loading="loading">
        <el-table-column prop="name" label="比赛名称" min-width="200">
      <el-table :data="tableData" style="width: 100%" v-loading="loading" size="small">
        <el-table-column prop="name" label="比赛名称" min-width="180">
          <template #default="{ row }">
            <el-link type="primary" @click="handleView(row.id)">{{ row.name }}</el-link>
          </template>
        </el-table-column>
        
        <el-table-column prop="playerCount" label="报名人数" width="100">
        <el-table-column prop="playerCount" label="报名人数" width="80" align="center">
          <template #default="{ row }">
            {{ row.playerCount || 0 }}
          </template>
        </el-table-column>
        
        <el-table-column prop="matchTime" label="比赛时间" width="180">
        <el-table-column prop="matchTime" label="比赛时间" width="140">
          <template #default="{ row }">
            {{ formatDateTime(row.matchTime) }}
            <span style="font-size: 12px;">{{ formatDateTime(row.matchTime) }}</span>
          </template>
        </el-table-column>
        
        <el-table-column prop="signupDeadline" label="报名截止时间" width="180">
        <el-table-column prop="signupDeadline" label="报名截止" width="140">
          <template #default="{ row }">
            {{ formatDateTime(row.signupDeadline) }}
            <span style="font-size: 12px;">{{ formatDateTime(row.signupDeadline) }}</span>
          </template>
        </el-table-column>
        
        <el-table-column prop="stateName" label="状态" width="100">
        <el-table-column prop="stateName" label="状态" width="80" align="center">
          <template #default="{ row }">
            <el-tag :type="getStateType(row.state)">{{ row.stateName }}</el-tag>
            <el-tag :type="getStateType(row.state)" size="small">{{ row.stateName }}</el-tag>
          </template>
        </el-table-column>
        
        <el-table-column label="操作" width="200" fixed="right">
        <el-table-column label="操作" width="220" fixed="right" align="center">
          <template #default="{ row }">
            <el-button size="small" @click="handleView(row.id)">查看选手</el-button>
            <el-button size="small" @click="handleView(row.id)">选手</el-button>
            <el-button size="small" type="primary" @click="handleEdit(row.id)">编辑</el-button>
            <el-button size="small" type="danger" @click="handleDelete(row.id)">删除</el-button>
          </template>
@@ -164,6 +164,7 @@
// 工具函数
const formatDateTime = (dateTime) => {
  if (!dateTime) return '-'
  // 处理后端返回的时间格式 "yyyy-MM-dd HH:mm:ss"
  return dayjs(dateTime).format('YYYY-MM-DD HH:mm')
}