123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788 |
- .designer-calendar-overlay {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 1000;
- backdrop-filter: blur(4px);
- }
- .designer-calendar-modal {
- background: white;
- border-radius: 16px;
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
- max-width: 800px;
- width: 90vw;
- max-height: 90vh;
- overflow-y: auto;
- animation: modalSlideIn 0.3s ease-out;
- }
- @keyframes modalSlideIn {
- from {
- opacity: 0;
- transform: translateY(-20px) scale(0.95);
- }
- to {
- opacity: 1;
- transform: translateY(0) scale(1);
- }
- }
- .modal-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 24px 24px 16px;
- border-bottom: 1px solid #f0f0f0;
- h3 {
- margin: 0;
- font-size: 20px;
- font-weight: 600;
- color: #2c3e50;
- }
- .close-btn {
- background: none;
- border: none;
- font-size: 24px;
- color: #95a5a6;
- cursor: pointer;
- padding: 4px;
- border-radius: 4px;
- transition: all 0.2s ease;
- &:hover {
- background: #f8f9fa;
- color: #e74c3c;
- }
- }
- }
- .designer-stats {
- padding: 20px 24px;
- background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
- border-bottom: 1px solid #dee2e6;
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
- gap: 16px;
- margin-bottom: 20px;
- }
- .stat-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 12px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- .stat-label {
- font-size: 12px;
- color: #6c757d;
- margin-bottom: 4px;
- }
- .stat-value {
- font-size: 18px;
- font-weight: 600;
- color: #2c3e50;
- &.warning {
- color: #e74c3c;
- }
- }
- }
- .workload-indicator {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 12px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- .workload-label {
- font-size: 14px;
- color: #6c757d;
- min-width: 60px;
- }
- .workload-bar {
- flex: 1;
- height: 8px;
- background: #e9ecef;
- border-radius: 4px;
- overflow: hidden;
- .workload-fill {
- height: 100%;
- border-radius: 4px;
- transition: width 0.3s ease;
- &.low {
- background: linear-gradient(90deg, #28a745, #20c997);
- }
- &.medium {
- background: linear-gradient(90deg, #ffc107, #fd7e14);
- }
- &.high {
- background: linear-gradient(90deg, #dc3545, #e74c3c);
- }
- }
- }
- .workload-percentage {
- font-size: 14px;
- font-weight: 600;
- color: #495057;
- min-width: 40px;
- text-align: right;
- }
- }
- }
- .calendar-nav {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px 24px;
- border-bottom: 1px solid #f0f0f0;
- .nav-btn {
- background: #f8f9fa;
- border: 1px solid #dee2e6;
- border-radius: 6px;
- width: 36px;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: all 0.2s ease;
- font-size: 18px;
- color: #495057;
- &:hover {
- background: #e9ecef;
- border-color: #adb5bd;
- }
- }
- .month-title {
- margin: 0;
- font-size: 18px;
- font-weight: 600;
- color: #2c3e50;
- }
- }
- .designer-calendar-modal {
- // 调整最大宽度,避免内容过窄导致日历看不全
- max-width: 1000px;
- width: 95vw;
- }
- .designer-stats {
- padding: 20px 24px;
- background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
- border-bottom: 1px solid #dee2e6;
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
- gap: 16px;
- margin-bottom: 20px;
- }
- .stat-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 12px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- .stat-label {
- font-size: 12px;
- color: #6c757d;
- margin-bottom: 4px;
- }
- .stat-value {
- font-size: 18px;
- font-weight: 600;
- color: #2c3e50;
- &.warning {
- color: #e74c3c;
- }
- }
- }
- .workload-indicator {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 12px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- margin-bottom: 16px;
- .workload-label {
- font-size: 14px;
- color: #6c757d;
- min-width: 60px;
- }
- .workload-bar {
- flex: 1;
- height: 8px;
- background: #e9ecef;
- border-radius: 4px;
- overflow: hidden;
- .workload-fill {
- height: 100%;
- border-radius: 4px;
- transition: width 0.3s ease;
- &.low {
- background: linear-gradient(90deg, #28a745, #20c997);
- }
- &.medium {
- background: linear-gradient(90deg, #ffc107, #fd7e14);
- }
- &.high {
- background: linear-gradient(90deg, #dc3545, #e74c3c);
- }
- }
- }
- .workload-percentage {
- font-size: 14px;
- font-weight: 600;
- color: #495057;
- min-width: 40px;
- text-align: right;
- }
- }
- .designer-status {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 16px;
- padding: 12px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- .status-badge {
- padding: 6px 16px;
- border-radius: 20px;
- color: white;
- font-size: 14px;
- font-weight: 600;
- }
- .last-order {
- font-size: 12px;
- color: #6c757d;
- }
- }
- }
- .calendar-container {
- // 当屏幕较窄时允许水平滚动,确保完整查看7列
- padding: 0 24px 20px;
- overflow-x: auto;
- }
- .calendar-header {
- display: grid;
- // 使用 minmax 保证每列有最低宽度,减少像素舍入造成的对不齐
- grid-template-columns: repeat(7, minmax(120px, 1fr));
- gap: 1px;
- margin-bottom: 8px;
- .weekday {
- box-sizing: border-box;
- padding: 12px 4px;
- text-align: center;
- font-size: 14px;
- font-weight: 600;
- color: #6c757d;
- background: #f8f9fa;
- }
- }
- .calendar-grid {
- display: grid;
- // 与 header 保持一致,保证列宽一致
- grid-template-columns: repeat(7, minmax(120px, 1fr));
- gap: 1px;
- background: #dee2e6;
- border-radius: 8px;
- overflow: hidden;
- // 统一行高,避免内容挤压导致错位
- grid-auto-rows: 100px;
- }
- .calendar-day {
- box-sizing: border-box;
- background: white;
- min-height: 100px;
- padding: 8px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: flex-start;
- cursor: pointer;
- transition: all 0.3s ease;
- position: relative;
- border-radius: 8px;
- border: 2px solid transparent;
- .day-number {
- font-size: 16px;
- font-weight: 600;
- margin-bottom: 6px;
- z-index: 2;
- color: #2c3e50;
- }
- .day-status-text {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- margin-bottom: 4px;
- .status-label {
- font-size: 12px;
- font-weight: 500;
- padding: 2px 8px;
- border-radius: 12px;
- color: white;
- gap: 4px;
- padding: 4px;
- border-radius: 6px;
- font-size: 10px;
- font-weight: 500;
- mat-icon {
- font-size: 16px;
- width: 16px;
- height: 16px;
- }
- &.idle {
- background: rgba(76, 175, 80, 0.1);
- color: #2e7d32;
-
- mat-icon {
- color: #4caf50;
- }
- }
- &.busy {
- background: rgba(33, 150, 243, 0.1);
- color: #1565c0;
-
- mat-icon {
- color: #2196f3;
- }
- }
- &.review {
- background: rgba(244, 67, 54, 0.1);
- color: #c62828;
-
- mat-icon {
- color: #f44336;
- }
- }
- }
- }
- .workload-indicator-bar {
- position: absolute;
- bottom: 4px;
- left: 8px;
- right: 8px;
- height: 4px;
- background: rgba(0, 0, 0, 0.1);
- border-radius: 3px;
- overflow: hidden;
- .workload-fill {
- height: 100%;
- border-radius: 3px;
- transition: width 0.3s ease;
- &.medium-fill {
- background: linear-gradient(90deg, #ffc107 0%, #ffb300 100%);
- }
- &.high-fill {
- background: linear-gradient(90deg, #ff9800 0%, #f57c00 100%);
- }
- &.review-fill {
- background: linear-gradient(90deg, #dc3545 0%, #b02a37 100%);
- }
- }
- }
- // 保留旧样式兼容
- .workload-bar-mini {
- position: absolute;
- bottom: 4px;
- left: 8px;
- right: 8px;
- height: 4px;
- background: rgba(0, 0, 0, 0.1);
- border-radius: 3px;
- overflow: hidden;
- .workload-fill-mini {
- height: 100%;
- border-radius: 3px;
- transition: width 0.3s ease;
- &.medium {
- background: linear-gradient(90deg, #ffc107 0%, #ffb300 100%);
- }
- &.high {
- background: linear-gradient(90deg, #ff9800 0%, #f57c00 100%);
- }
- &.review {
- background: linear-gradient(90deg, #dc3545 0%, #b02a37 100%);
- }
- }
- }
- &.other-month {
- color: #adb5bd;
- background: #f8f9fa;
- opacity: 0.6;
- .day-status {
- opacity: 0.5;
- }
- }
- &.weekend {
- background: #fff5f5;
- }
- &.today {
- border: 3px solid #ff6b35 !important;
- box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
- .day-number {
- color: #ff6b35;
- font-weight: 700;
- }
- }
- // 使用 data-status 属性进行样式控制
- &[data-status="idle"] {
- background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
- border: 2px solid #28a745;
- &:hover {
- background: linear-gradient(135deg, #c3e6cb 0%, #b1dfbb 100%);
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
- }
- .day-number {
- color: #155724;
- font-weight: 700;
- }
- .status-label.idle-label {
- background: #28a745;
- color: white;
- }
- }
- &[data-status="busy-medium"] {
- background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
- border: 2px solid #0d6efd;
- .day-number {
- color: #084298;
- font-weight: 700;
- }
- .status-label.busy-label {
- background: #0d6efd;
- color: white;
- }
- &:hover {
- background: linear-gradient(135deg, #b6d4fe 0%, #9ec5fe 100%);
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
- }
- }
- &[data-status="busy-high"] {
- background: linear-gradient(135deg, #9ec5fe 0%, #6ea8fe 100%);
- border: 2px solid #0a58ca;
- .day-number {
- color: #052c65;
- font-weight: 700;
- }
- .status-label.busy-label {
- background: #0a58ca;
- color: white;
- }
- &:hover {
- background: linear-gradient(135deg, #6ea8fe 0%, #3d8bfd 100%);
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(10, 88, 202, 0.5);
- }
- }
- &[data-status="review"] {
- background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
- border: 2px solid #dc3545;
- cursor: not-allowed;
- .day-number {
- color: #842029;
- font-weight: 700;
- }
- .status-label.review-label {
- background: #dc3545;
- color: white;
- }
- &:hover {
- transform: none;
- box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
- }
- }
- // 保留旧的类名兼容性
- &.idle {
- background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
- border: 2px solid #28a745;
- &:hover {
- background: linear-gradient(135deg, #c3e6cb 0%, #b1dfbb 100%);
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
- }
- .day-number {
- color: #155724;
- }
- }
- &.busy {
- background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
- border: 2px solid #0d6efd;
- .day-number {
- color: #084298;
- }
- &:hover {
- background: linear-gradient(135deg, #b6d4fe 0%, #9ec5fe 100%);
- transform: scale(1.05);
- box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
- }
- }
- &.review {
- background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
- border: 2px solid #dc3545;
- cursor: not-allowed;
- .day-number {
- color: #842029;
- }
- &:hover {
- transform: none;
- box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
- }
- }
- &.stagnant {
- background: #fff3e0;
- border: 1px solid #ff9800;
- .day-number {
- color: #ef6c00;
- }
- }
- }
- // 响应式设计
- @media (max-width: 768px) {
- .designer-calendar-modal {
- width: 95vw;
- margin: 10px;
- }
- .designer-stats {
- .stats-grid {
- grid-template-columns: repeat(2, 1fr);
- gap: 12px;
- }
- .workload-indicator {
- flex-direction: column;
- align-items: stretch;
- gap: 8px;
- .workload-label {
- min-width: auto;
- text-align: center;
- }
- }
- }
- .calendar-legend {
- flex-wrap: wrap;
- gap: 12px;
- }
- .calendar-day {
- min-height: 70px;
- padding: 6px;
- .day-number {
- font-size: 12px;
- }
- .day-indicators {
- .order-count,
- .review-indicator {
- font-size: 9px;
- padding: 1px 3px;
- }
- }
- }
- }
- .calendar-legend {
- display: flex;
- justify-content: center;
- gap: 20px;
- padding: 16px 24px;
- border-top: 1px solid #f0f0f0;
- background: #f8f9fa;
- .legend-item {
- display: flex;
- align-items: center;
- gap: 6px;
- .legend-color {
- width: 20px;
- height: 20px;
- border-radius: 4px;
- border: 1px solid rgba(0, 0, 0, 0.1);
- &.idle-color {
- background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
- border: 2px solid #28a745;
- }
- &.busy-color {
- background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
- border: 2px solid #0d6efd;
- }
- &.review-color {
- background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
- border: 2px solid #dc3545;
- }
- &.today-color {
- background: white;
- border: 3px solid #ff6b35;
- }
- // 保留旧样式兼容
- &.idle {
- background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
- border: 2px solid #28a745;
- }
- &.busy {
- background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
- border: 2px solid #0d6efd;
- }
- &.review {
- background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
- border: 2px solid #dc3545;
- }
- &.today {
- background: white;
- border: 3px solid #ff6b35;
- }
- }
- .legend-text {
- font-size: 12px;
- color: #6c757d;
- }
- }
- }
- .calendar-tips {
- padding: 16px 24px;
- background: #f8f9fa;
- border-top: 1px solid #dee2e6;
- p {
- margin: 0 0 8px;
- font-size: 14px;
- color: #495057;
- }
- ul {
- margin: 0;
- padding-left: 20px;
- font-size: 13px;
- color: #6c757d;
- line-height: 1.5;
- li {
- margin-bottom: 4px;
- }
- }
- }
|