// ========== 员工信息侧边栏面板样式 ========== // ⭐ 真正的组件复用:不需要引入样式,组件自带样式 // 只需要调整嵌入模式下的显示 // ⭐ 嵌入模式适配:覆盖 employee-detail-panel 组件的外层样式 .tab-content.workload-tab { padding: 0; height: 100%; // 使用 ::ng-deep 调整嵌入组件的样式 ::ng-deep app-employee-detail-panel { // 隐藏组件的遮罩层和面板容器(embedMode=true 时应该自动处理) .employee-detail-overlay { position: static; background: transparent; backdrop-filter: none; z-index: auto; padding: 0; animation: none; } .employee-detail-panel { box-shadow: none; border-radius: 0; max-width: 100%; max-height: none; animation: none; // 隐藏嵌入模式下的头部(因为父组件已经有头部了) .panel-header { display: none; } // 让内容区域填满可用空间 .panel-content { max-height: none; padding: 0; } } } } // 加载状态样式 .loading-state-workload { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #8c8c8c; .spinner { width: 40px; height: 40px; border: 3px solid #f0f0f0; border-top-color: #1890ff; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 16px; } p { font-size: 14px; margin: 0; } } @keyframes spin { to { transform: rotate(360deg); } } .employee-info-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 9999; display: flex; justify-content: flex-end; animation: fadeIn 0.2s ease; } .employee-info-panel { width: 600px; max-width: 90vw; height: 100vh; background: #fff; box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; animation: slideInRight 0.3s ease; } // ========== 面板头部 ========== .panel-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 0; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .header-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; } .panel-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 20px; font-weight: 600; .employee-avatar-small { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.3); } .title-content { display: flex; flex-direction: column; gap: 4px; .employee-name { font-size: 18px; font-weight: 600; } .employee-role-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); width: fit-content; &[data-role="组长"] { background: rgba(255, 193, 7, 0.3); } &[data-role="组员"] { background: rgba(33, 150, 243, 0.3); } &[data-role="客服"] { background: rgba(76, 175, 80, 0.3); } &[data-role="管理员"] { background: rgba(156, 39, 176, 0.3); } } } } .btn-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; &:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); } svg { width: 20px; height: 20px; } } // ========== 导航标签页 ========== .panel-tabs { display: flex; gap: 0; padding: 0 24px; background: rgba(0, 0, 0, 0.05); } .tab-button { flex: 1; padding: 12px 16px; border: none; background: transparent; color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.3s; border-bottom: 2px solid transparent; position: relative; .tab-icon { width: 18px; height: 18px; } &:hover { color: white; background: rgba(255, 255, 255, 0.05); } &.active { color: white; border-bottom-color: white; background: rgba(255, 255, 255, 0.1); } } // ========== 面板内容 ========== .panel-content { flex: 1; overflow-y: auto; padding: 20px 24px; background: #f5f7fa; /* 自定义滚动条 */ &::-webkit-scrollbar { width: 8px; } &::-webkit-scrollbar-track { background: #f1f1f1; } &::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; &:hover { background: #a1a1a1; } } } .tab-content { animation: fadeIn 0.3s ease; } // ========== 基本信息标签页(查看模式) ========== .view-mode { .detail-header { background: white; border-radius: 12px; padding: 24px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); display: flex; gap: 20px; } .detail-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 12px; .detail-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #f0f0f0; } .detail-badge-container { display: flex; flex-direction: column; gap: 6px; align-items: center; .detail-role-badge { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .detail-status-badge { padding: 4px 10px; border-radius: 10px; font-size: 11px; font-weight: 500; &.active { background: #e8f5e9; color: #2e7d32; } &.disabled { background: #ffebee; color: #c62828; } } } } .detail-info-section { flex: 1; display: flex; flex-direction: column; gap: 8px; .detail-name-block { .detail-realname { margin: 0 0 4px 0; font-size: 22px; font-weight: 600; color: #333; } .detail-nickname { font-size: 13px; color: #666; } } .detail-position { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; svg { color: #999; } } .detail-meta { display: flex; gap: 16px; margin-top: 8px; .detail-meta-item { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #666; svg { color: #999; } } } } .detail-section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); .detail-section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: #333; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; svg { color: #667eea; } } .detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; .detail-item { label { display: block; font-size: 12px; color: #999; margin-bottom: 4px; } .detail-value { font-size: 14px; color: #333; font-weight: 500; .badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } } } } .skill-tags { display: flex; flex-wrap: wrap; gap: 8px; .skill-tag { padding: 6px 12px; border-radius: 16px; font-size: 13px; background: #f0f4ff; color: #667eea; font-weight: 500; } } .workload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; .workload-item { text-align: center; padding: 16px; background: #f8f9fa; border-radius: 8px; label { display: block; font-size: 12px; color: #999; margin-bottom: 8px; } .workload-value { font-size: 24px; font-weight: 700; color: #667eea; } } } } .action-bar { display: flex; justify-content: center; margin-top: 20px; } } // ========== 基本信息标签页(编辑模式) ========== .edit-mode { .form-avatar-section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); .form-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #f0f0f0; } .form-avatar-info { flex: 1; .form-avatar-name { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 4px; } .form-avatar-id { font-size: 13px; color: #999; } } } .form-section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); .form-section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: #333; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; svg { color: #667eea; } } .form-group { margin-bottom: 16px; &:last-child { margin-bottom: 0; } .form-label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 8px; &.required::after { content: '*'; color: #f44336; margin-left: 4px; } } .form-input, .form-select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: all 0.2s; &:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } &:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; } } .form-hint { font-size: 12px; color: #999; margin-top: 6px; } .status-toggle { display: flex; gap: 12px; .status-option { flex: 1; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; input[type="radio"] { display: none; } .status-dot { width: 12px; height: 12px; border-radius: 50%; &.active { background: #4caf50; } &.disabled { background: #f44336; } } &.active { border-color: #667eea; background: rgba(102, 126, 234, 0.05); } &:hover { border-color: #999; } } } } } .form-notice { background: #fff3cd; border-left: 4px solid #ffc107; padding: 16px; border-radius: 8px; margin-bottom: 16px; display: flex; gap: 12px; svg { flex-shrink: 0; color: #ffc107; margin-top: 2px; } .form-notice-title { font-weight: 600; color: #856404; margin-bottom: 4px; } .form-notice-text { font-size: 13px; color: #856404; line-height: 1.5; } } .action-bar-horizontal { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; } } // ========== 项目负载标签页 ========== .workload-tab { .section { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); .section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; .section-icon { width: 20px; height: 20px; color: #667eea; } h4 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; color: #333; } .btn-view-designer-calendar { padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; color: #667eea; font-size: 13px; cursor: pointer; transition: all 0.2s; &:hover { background: #f0f4ff; border-color: #667eea; } } } .workload-info { .workload-stat { font-size: 15px; color: #555; margin-bottom: 12px; .stat-label { font-weight: 500; } .stat-value { font-size: 18px; font-weight: 700; &.normal-workload { color: #4caf50; } &.high-workload { color: #ff9800; } } } .project-list { .project-label { font-size: 13px; color: #999; display: block; margin-bottom: 8px; } .project-tags { display: flex; flex-wrap: wrap; gap: 8px; .project-tag { padding: 8px 12px; border-radius: 16px; font-size: 13px; background: #f0f4ff; color: #667eea; font-weight: 500; display: flex; align-items: center; gap: 4px; &.clickable { cursor: pointer; transition: all 0.2s; &:hover { background: #667eea; color: white; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3); } .icon-arrow { width: 14px; height: 14px; } } &.more { background: #e0e0e0; color: #666; } } } } } // 日历样式 .employee-calendar { .calendar-month-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; .btn-prev-month, .btn-next-month { width: 32px; height: 32px; border: 1px solid #ddd; border-radius: 6px; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; svg { width: 18px; height: 18px; color: #666; } &:hover { background: #f5f5f5; border-color: #999; } } .month-title { font-size: 16px; font-weight: 600; color: #333; } } .calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; .weekday { text-align: center; font-size: 12px; font-weight: 600; color: #999; padding: 8px 0; } } .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; .calendar-day { aspect-ratio: 1; border: 1px solid #e0e0e0; border-radius: 6px; padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; color: #333; transition: all 0.2s; &.other-month { color: #bbb; background: #fafafa; } &.today { background: #fff3e0; border-color: #ff9800; font-weight: 600; .day-number { color: #ff9800; } } &.has-projects { background: #f0f4ff; border-color: #667eea; } &.clickable { cursor: pointer; &:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); } } .day-number { font-weight: 600; margin-bottom: 2px; } .day-badge { font-size: 10px; padding: 2px 6px; border-radius: 8px; background: #667eea; color: white; white-space: nowrap; &.high-load { background: #f44336; } } } } .calendar-legend { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e0e0e0; .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; .legend-dot { width: 12px; height: 12px; border-radius: 50%; &.today-dot { background: #ff9800; } &.project-dot { background: #667eea; } &.high-dot { background: #f44336; } } } } } // 请假表格 .leave-table { table { width: 100%; border-collapse: collapse; thead { background: #f8f9fa; th { padding: 12px; text-align: left; font-size: 13px; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; } } tbody { tr { &.leave-day { background: #ffebee; } &.work-day { background: white; } &:hover { background: #f5f5f5; } td { padding: 12px; font-size: 14px; color: #333; border-bottom: 1px solid #e0e0e0; .status-badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; &.leave { background: #ffebee; color: #c62828; } &.work { background: #e8f5e9; color: #2e7d32; } } } } } } .no-leave { text-align: center; padding: 40px 20px; color: #999; .no-data-icon { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.5; } p { margin: 0; font-size: 14px; } } } // 说明内容 .explanation-content { .explanation-text { font-size: 14px; color: #555; line-height: 1.6; margin: 0; } } // 问卷样式 .survey-content { .survey-status { display: flex; align-items: center; gap: 8px; padding: 12px; background: #e8f5e9; border-radius: 8px; margin-bottom: 16px; svg { flex-shrink: 0; } span { font-size: 14px; font-weight: 500; color: #2e7d32; } .survey-time { margin-left: auto; font-size: 12px; color: #666; font-weight: 400; } } .capability-summary { h5 { font-size: 15px; font-weight: 600; color: #333; margin: 0 0 12px 0; } .summary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; .summary-item { padding: 12px; background: #f8f9fa; border-radius: 8px; font-size: 13px; .label { font-weight: 600; color: #555; } .value { color: #333; margin-left: 8px; .limit-hint { font-size: 12px; color: #999; } } } } .btn-view-full { width: 100%; padding: 10px; border: 1px solid #667eea; border-radius: 8px; background: white; color: #667eea; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: all 0.2s; &:hover { background: #667eea; color: white; } } } .survey-answers { h5 { font-size: 15px; font-weight: 600; color: #333; margin: 0 0 12px 0; } .answer-item { margin-bottom: 16px; padding: 12px; background: #f8f9fa; border-radius: 8px; .question-text { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 8px; } .answer-text { display: flex; flex-wrap: wrap; gap: 8px; .answer-tag { padding: 4px 10px; border-radius: 12px; font-size: 13px; &.empty { background: #e0e0e0; color: #999; } &.single { background: #e3f2fd; color: #1976d2; } &.multiple { background: #f3e5f5; color: #7b1fa2; } } .answer-scale { width: 100%; .scale-bar { height: 24px; background: #e0e0e0; border-radius: 12px; overflow: hidden; .scale-fill { height: 100%; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 12px; font-weight: 600; transition: width 0.3s; } } } } } .btn-collapse { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: white; color: #666; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; margin-top: 8px; transition: all 0.2s; &:hover { background: #f5f5f5; border-color: #999; } } } } .survey-empty { text-align: center; padding: 40px 20px; color: #999; .no-data-icon { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.5; } p { margin: 0; font-size: 14px; } } .btn-refresh-survey { padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; color: #667eea; cursor: pointer; transition: all 0.2s; &:hover:not(:disabled) { background: #f0f4ff; border-color: #667eea; } &:disabled { opacity: 0.6; cursor: not-allowed; } svg.rotating { animation: rotate 1s linear infinite; } } } } // ========== 通用按钮样式 ========== .btn { padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; svg { width: 16px; height: 16px; } &.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; &:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); } } &.btn-default { background: white; border: 1px solid #ddd; color: #666; &:hover { background: #f5f5f5; border-color: #999; } } } // ========== 模态弹窗样式 ========== .calendar-project-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease; } .calendar-project-modal { background: white; border-radius: 16px; width: 90%; max-width: 500px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); animation: scaleIn 0.3s ease; &.large { max-width: 800px; } .modal-header { padding: 20px 24px; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; justify-content: space-between; h3 { margin: 0; font-size: 18px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 8px; .header-icon { width: 20px; height: 20px; color: #667eea; } } .btn-close { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; &:hover { background: #f5f5f5; border-color: #999; } svg { width: 18px; height: 18px; color: #666; } } } .modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; .project-count-info { font-size: 14px; color: #666; margin-bottom: 16px; strong { color: #667eea; font-size: 16px; } } .project-list { display: flex; flex-direction: column; gap: 12px; .project-item { padding: 16px; border: 1px solid #e0e0e0; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: all 0.2s; &:hover { background: #f8f9fa; border-color: #667eea; transform: translateX(4px); } .project-info { display: flex; gap: 12px; flex: 1; .project-icon { width: 24px; height: 24px; color: #667eea; flex-shrink: 0; } .project-details { flex: 1; .project-name { margin: 0 0 4px 0; font-size: 15px; font-weight: 600; color: #333; } .project-deadline { margin: 0; font-size: 12px; color: #999; } } } .arrow-icon { width: 20px; height: 20px; color: #999; flex-shrink: 0; } } } } } // ========== 动画 ========== @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } } @keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } // ========== 响应式 ========== @media (max-width: 768px) { .employee-info-panel { width: 100%; max-width: 100vw; } .detail-header { flex-direction: column; align-items: center; text-align: center; } .detail-grid { grid-template-columns: 1fr !important; } .workload-grid { grid-template-columns: 1fr !important; } .calendar-project-modal { width: 95%; &.large { width: 95%; } } }