.employees-container { padding: 24px; background: #f5f5f5; min-height: 100vh; } .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; h1 { font-size: 24px; font-weight: 600; margin: 0 0 8px 0; } .subtitle { color: #666; margin: 0; font-size: 14px; } } .stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; } .stat-card { background: white; border-radius: 8px; padding: 20px; text-align: center; cursor: pointer; border: 2px solid transparent; transition: all 0.3s; &:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } &.active { border-color: #165DFF; background: #E6F7FF; } .stat-value { font-size: 32px; font-weight: 600; margin-bottom: 8px; } .stat-label { color: #666; font-size: 14px; } } .filter-bar { background: white; border-radius: 8px; padding: 16px; margin-bottom: 16px; display: flex; gap: 12px; .search-input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; } } .data-table { background: white; border-radius: 8px; overflow: hidden; table { width: 100%; border-collapse: collapse; th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; } th { background: #fafafa; font-weight: 600; } tr.disabled { opacity: 0.5; } .badge { padding: 4px 8px; background: #E6F7FF; color: #165DFF; border-radius: 4px; font-size: 12px; } .status { padding: 4px 8px; border-radius: 4px; font-size: 12px; &.active { background: #E6F9F0; color: #00B42A; } &.disabled { background: #FFECE8; color: #F53F3F; } } .empty-state { text-align: center; padding: 60px; color: #999; } } } .btn { padding: 8px 16px; border-radius: 4px; border: none; cursor: pointer; &.btn-primary { background: #165DFF; color: white; } &.btn-secondary { background: white; border: 1px solid #ddd; } &.btn-default { background: white; border: 1px solid #ddd; } &.btn-text { background: none; color: #165DFF; } } .btn-icon { background: none; border: none; cursor: pointer; padding: 4px 8px; } // 侧边面板(与departments样式相同,省略...) .side-panel { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 1000; &.open { pointer-events: auto; .panel-overlay { opacity: 1; } .panel-content { transform: translateX(0); } } .panel-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.3s; } .panel-content { position: absolute; top: 0; right: 0; bottom: 0; width: 480px; background: white; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s; } .panel-header { padding: 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; h2 { margin: 0; font-size: 18px; font-weight: 600; } .btn-close { background: none; border: none; font-size: 24px; cursor: pointer; } } .panel-body { padding: 24px; overflow: auto; background: #fafafa; } .panel-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 12px; background: white; .btn { min-width: 80px; padding: 10px 20px; font-size: 14px; font-weight: 500; border-radius: 6px; transition: all 0.2s; &.btn-default { background: white; border: 1px solid #ddd; color: #666; &:hover { border-color: #165DFF; color: #165DFF; } } &.btn-primary { background: #165DFF; color: white; border: none; &:hover { background: #0E4BD8; box-shadow: 0 2px 8px rgba(22, 93, 255, 0.3); } } } } // 详情视图 - 全新精美设计 .detail-view { display: flex; flex-direction: column; gap: 20px; } // 详情头部 .detail-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 16px; padding: 24px; color: white; box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25); } .detail-avatar-section { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; .detail-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255, 255, 255, 0.3); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); transition: transform 0.3s; &:hover { transform: scale(1.05); } } .detail-badge-container { display: flex; gap: 8px; margin-top: 12px; } .detail-role-badge { padding: 6px 14px; background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(10px); border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.3); } .detail-status-badge { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.3); &.active { background: rgba(0, 180, 42, 0.3); backdrop-filter: blur(10px); } &.disabled { background: rgba(245, 63, 63, 0.3); backdrop-filter: blur(10px); } } } .detail-info-section { text-align: center; } .detail-name-block { margin-bottom: 12px; .detail-realname { font-size: 24px; font-weight: 700; margin: 0 0 8px 0; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .detail-nickname { display: inline-block; padding: 4px 12px; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); border-radius: 16px; font-size: 12px; font-weight: 500; border: 1px solid rgba(255, 255, 255, 0.3); } } .detail-position { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); border-radius: 20px; font-size: 13px; font-weight: 500; margin-bottom: 12px; border: 1px solid rgba(255, 255, 255, 0.3); svg { opacity: 0.9; } } .detail-meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; } .detail-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: 0.95; svg { opacity: 0.8; } } // 详情分组 .detail-section { background: white; border-radius: 12px; padding: 20px; border: 1px solid #f0f0f0; transition: all 0.3s; &:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); border-color: #165DFF; } } .detail-section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #333; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; svg { color: #165DFF; flex-shrink: 0; } } .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .detail-item { label { display: block; color: #888; font-size: 12px; margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; } .detail-value { font-size: 14px; color: #333; font-weight: 600; word-break: break-word; } .badge { display: inline-block; padding: 4px 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 16px; font-size: 12px; font-weight: 600; } } // 保留旧的样式支持 .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #f0f0f0; } .title-block { .name { font-size: 20px; font-weight: 600; color: #333; margin-bottom: 4px; } .position { font-size: 13px; color: #888; } } .skills { margin-top: 8px; padding: 16px; background: white; border-radius: 12px; label { display: block; color: #666; font-size: 13px; margin-bottom: 12px; font-weight: 500; } } .tags { display: flex; gap: 8px; flex-wrap: wrap; } .tag { padding: 6px 12px; border-radius: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-size: 12px; font-weight: 500; } .workload { padding: 16px; background: white; border-radius: 12px; label { display: block; color: #666; font-size: 13px; margin-bottom: 12px; font-weight: 500; } } // 表单视图 .form-view { display: flex; flex-direction: column; gap: 24px; } .form-avatar-section { display: flex; align-items: center; gap: 16px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white; .form-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, 0.3); } .form-avatar-info { flex: 1; .form-avatar-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; } .form-avatar-id { font-size: 12px; opacity: 0.9; } } } .form-section { padding: 20px; background: white; border-radius: 12px; border: 1px solid #f0f0f0; .form-section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #333; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; svg { color: #165DFF; } } } .form-group { margin-bottom: 20px; &:last-child { margin-bottom: 0; } .form-label { display: block; font-size: 13px; font-weight: 500; color: #333; margin-bottom: 8px; &.required::after { content: ' *'; color: #F53F3F; } } .form-input, .form-select { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; color: #333; transition: all 0.2s; background: white; &:focus { outline: none; border-color: #165DFF; box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1); } &:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; } &::placeholder { color: #bbb; } } .form-hint { margin-top: 6px; font-size: 12px; color: #888; } } .status-toggle { display: flex; gap: 12px; .status-option { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 8px; cursor: pointer; transition: all 0.2s; background: white; input[type="radio"] { display: none; } .status-dot { width: 12px; height: 12px; border-radius: 50%; &.active { background: #00B42A; box-shadow: 0 0 0 3px rgba(0, 180, 42, 0.2); } &.disabled { background: #F53F3F; box-shadow: 0 0 0 3px rgba(245, 63, 63, 0.2); } } span:not(.status-dot) { font-size: 14px; font-weight: 500; color: #666; } &.active { border-color: #165DFF; background: #f0f7ff; span:not(.status-dot) { color: #165DFF; } } &:hover { border-color: #165DFF; } } } .form-notice { display: flex; gap: 12px; padding: 16px; background: #fff7e6; border: 1px solid #ffd666; border-radius: 8px; svg { flex-shrink: 0; color: #fa8c16; margin-top: 2px; } .form-notice-title { font-size: 13px; font-weight: 600; color: #d46b08; margin-bottom: 4px; } .form-notice-text { font-size: 12px; color: #ad6800; line-height: 1.5; } } .panel-header h2 { display: flex; align-items: center; gap: 10px; &::before { content: "👤"; font-size: 20px; } } } // ======================================== // 员工管理移动端适配 // ======================================== @media (max-width: 768px) { .employees-container { padding: 12px; } .page-header { flex-direction: column; align-items: flex-start; gap: 16px; h1 { font-size: 20px; } .header-actions { width: 100%; button { width: 100%; } } } // 统计卡片适配 .stats-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; } .stat-card { padding: 16px; .stat-value { font-size: 24px; } .stat-label { font-size: 12px; } } // 搜索筛选区域 .search-filter-section { flex-direction: column; gap: 12px; .search-input, .department-filter, .status-filter { width: 100%; min-width: 100%; } } // 员工列表表格卡片式 .employees-table { thead { display: none; } tbody { display: block; } tr { display: block; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin-bottom: 12px; background: white; } td { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border: none; &::before { content: attr(data-label); font-weight: 600; color: #666; font-size: 13px; margin-right: 12px; } &:not(:last-child) { border-bottom: 1px solid #f5f5f5; } } .employee-info { flex-direction: row; justify-content: flex-start; .avatar { width: 40px; height: 40px; } .info { .name { font-size: 14px; } .mobile, .userid { font-size: 12px; } } } .action-buttons { justify-content: center; gap: 8px; button { min-width: 32px; padding: 6px; } } } // 编辑面板全屏显示 .edit-panel-overlay { padding: 0; } .edit-panel { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; .panel-header { padding: 16px; position: sticky; top: 0; z-index: 10; h2 { font-size: 18px; } .close-btn { width: 36px; height: 36px; } } .panel-body { padding: 16px; height: calc(100vh - 140px); .form-avatar-section { padding: 20px 16px; .avatar-container { width: 80px; height: 80px; } .employee-name { font-size: 18px; } .employee-id { font-size: 13px; } } .form-section { padding: 16px; margin-bottom: 12px; .section-title { font-size: 15px; } .form-group { margin-bottom: 16px; .form-label { font-size: 13px; } .form-input, .form-select { font-size: 16px; // 防止iOS自动缩放 padding: 12px; } } .status-toggle { .toggle-option { padding: 12px; .option-label { font-size: 14px; } } } } .form-notice { padding: 12px; font-size: 12px; } } .panel-footer { padding: 16px; position: sticky; bottom: 0; flex-direction: column; gap: 12px; button { width: 100%; } } } } @media (max-width: 480px) { .employees-container { padding: 8px; } .page-header h1 { font-size: 18px; } .stats-cards { grid-template-columns: 1fr; } .stat-card { padding: 12px; .stat-value { font-size: 20px; } } }