workload-gantt.component.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* ========== 工作负载甘特图样式 ========== */
  2. .workload-gantt-card {
  3. background: white;
  4. border-radius: 12px;
  5. padding: 20px;
  6. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  7. margin-bottom: 24px;
  8. .gantt-header {
  9. display: flex;
  10. align-items: center;
  11. justify-content: space-between;
  12. margin-bottom: 16px;
  13. flex-wrap: wrap;
  14. gap: 12px;
  15. h3 {
  16. font-size: 18px;
  17. font-weight: 700;
  18. color: #1f2937;
  19. margin: 0;
  20. }
  21. .gantt-subtitle {
  22. width: 100%;
  23. font-size: 13px;
  24. color: #6b7280;
  25. margin: 4px 0 8px 0;
  26. }
  27. .gantt-controls {
  28. display: flex;
  29. align-items: center;
  30. gap: 20px;
  31. .scale-switch {
  32. display: flex;
  33. background: #f3f4f6;
  34. border-radius: 8px;
  35. padding: 2px;
  36. button {
  37. padding: 8px 16px;
  38. border: none;
  39. background: transparent;
  40. border-radius: 6px;
  41. font-size: 14px;
  42. font-weight: 500;
  43. color: #6b7280;
  44. cursor: pointer;
  45. transition: all 0.2s ease;
  46. &:hover {
  47. color: #1f2937;
  48. }
  49. &.active {
  50. background: white;
  51. color: #3b82f6;
  52. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  53. }
  54. }
  55. }
  56. .legend {
  57. display: flex;
  58. gap: 16px;
  59. align-items: center;
  60. .legend-item {
  61. display: flex;
  62. align-items: center;
  63. gap: 6px;
  64. font-size: 14px;
  65. color: #6b7280;
  66. .dot {
  67. width: 12px;
  68. height: 12px;
  69. border-radius: 3px;
  70. &.idle {
  71. background: #f3f4f6; // 空闲
  72. }
  73. &.busy {
  74. background: #3b82f6; // 忙碌
  75. }
  76. &.overload {
  77. background: #ef4444; // 超负荷
  78. }
  79. &.leave {
  80. background: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 2px, #f3f4f6 2px, #f3f4f6 4px); // 请假纹理
  81. }
  82. }
  83. }
  84. }
  85. }
  86. }
  87. .gantt-container {
  88. width: 100%;
  89. height: 500px;
  90. min-height: 400px;
  91. cursor: pointer; // 提示可点击
  92. // ECharts会覆盖cursor,所以在全局添加
  93. canvas {
  94. cursor: pointer !important;
  95. }
  96. }
  97. }