lrj
21 小时以前 7ad9c3c93f0cc103347ae2e2429e0122fb512e24
web/src/views/employee-list.vue
File was renamed from web/src/views/employee/index.vue
@@ -35,11 +35,25 @@
            {{ formatDateTime(row.createTime) }}
          </template>
        </el-table-column>
        <el-table-column label="操作" width="120" fixed="right">
        <el-table-column label="操作" width="120" fixed="right" align="center">
          <template #default="{ row }">
            <div class="table-actions">
              <el-button type="warning" size="small" @click="handleEdit(row)" :icon="Edit" circle title="编辑"></el-button>
              <el-button type="danger" size="small" @click="handleDelete(row)" :icon="Delete" circle title="删除"></el-button>
              <el-button
                text
                :icon="Edit"
                size="small"
                @click="handleEdit(row)"
                class="action-btn edit-btn"
                title="编辑"
              />
              <el-button
                text
                :icon="Delete"
                size="small"
                @click="handleDelete(row)"
                class="action-btn delete-btn"
                title="删除"
              />
            </div>
          </template>
        </el-table-column>
@@ -65,7 +79,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { Search, Plus, Edit, Delete } from '@element-plus/icons-vue'
import { employeeApi, type Employee } from '@/api/employee'
import EmployeeForm from './EmployeeForm.vue'
import EmployeeForm from './employee-detail.vue'
const loading = ref(false)
const formVisible = ref(false)
@@ -82,10 +96,10 @@
// 获取角色标签类型
const getRoleType = (roleId: string) => {
  const typeMap: Record<string, string> = {
    'ADMIN': 'danger',
    'MANAGER': 'warning',
    'STAFF': 'primary',
    'REVIEWER': 'success'
    'SUPER_ADMIN': 'danger',
    'AUDITOR': 'warning',
    'JUDGE_MANAGER': 'success',
    'PLAYER': 'primary'
  }
  return typeMap[roleId] || 'info'
}
@@ -93,10 +107,10 @@
// 获取角色文本
const getRoleText = (roleId: string) => {
  const textMap: Record<string, string> = {
    'ADMIN': '管理员',
    'MANAGER': '经理',
    'STAFF': '工作人员',
    'REVIEWER': '审核员'
    'SUPER_ADMIN': '超级管理员',
    'AUDITOR': '平台工作人员',
    'JUDGE_MANAGER': '评委',
    'PLAYER': '参赛人员'
  }
  return textMap[roleId] || roleId
}
@@ -202,7 +216,27 @@
  .table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap; // 确保不换行
    .action-btn {
      &.edit-btn {
        color: #409eff;
        &:hover {
          color: #66b1ff;
        }
      }
      &.delete-btn {
        color: #f56c6c;
        &:hover {
          color: #f78989;
        }
      }
    }
  }
  
  .pagination {