project-timeline.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  1. .project-timeline-container {
  2. width: 100%;
  3. height: 100%;
  4. display: flex;
  5. flex-direction: column;
  6. background: #ffffff;
  7. border-radius: 8px;
  8. overflow: hidden;
  9. }
  10. // 顶部筛选栏
  11. .timeline-header {
  12. padding: 16px;
  13. background: #f9fafb;
  14. border-bottom: 1px solid #e5e7eb;
  15. }
  16. .filter-section {
  17. display: flex;
  18. align-items: center;
  19. gap: 16px;
  20. flex-wrap: wrap;
  21. }
  22. .filter-group {
  23. display: flex;
  24. align-items: center;
  25. gap: 8px;
  26. label {
  27. font-size: 14px;
  28. font-weight: 500;
  29. color: #374151;
  30. white-space: nowrap;
  31. }
  32. }
  33. .filter-select {
  34. padding: 6px 12px;
  35. border: 1px solid #d1d5db;
  36. border-radius: 6px;
  37. font-size: 14px;
  38. background: #ffffff;
  39. cursor: pointer;
  40. transition: all 0.2s;
  41. &:hover {
  42. border-color: #9ca3af;
  43. }
  44. &:focus {
  45. outline: none;
  46. border-color: #3b82f6;
  47. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  48. }
  49. }
  50. .quick-filters {
  51. margin-left: auto;
  52. }
  53. .filter-btn {
  54. padding: 6px 12px;
  55. border: 1px solid #d1d5db;
  56. border-radius: 6px;
  57. background: #ffffff;
  58. font-size: 13px;
  59. cursor: pointer;
  60. transition: all 0.2s;
  61. &:hover {
  62. background: #f3f4f6;
  63. }
  64. &.active {
  65. background: #3b82f6;
  66. color: #ffffff;
  67. border-color: #3b82f6;
  68. }
  69. }
  70. .sort-controls,
  71. .time-scale-controls {
  72. border-left: 1px solid #e5e7eb;
  73. padding-left: 16px;
  74. }
  75. .sort-btn,
  76. .scale-btn,
  77. .refresh-btn {
  78. padding: 6px 12px;
  79. border: 1px solid #d1d5db;
  80. border-radius: 6px;
  81. background: #ffffff;
  82. font-size: 13px;
  83. cursor: pointer;
  84. transition: all 0.2s;
  85. &:hover {
  86. background: #f3f4f6;
  87. }
  88. &.active {
  89. background: #3b82f6;
  90. color: #ffffff;
  91. border-color: #3b82f6;
  92. }
  93. }
  94. // 时间尺度切换按钮特殊样式
  95. .time-scale-controls {
  96. .scale-btn.active {
  97. background: #10b981;
  98. border-color: #10b981;
  99. font-weight: 600;
  100. }
  101. }
  102. // 🆕 刷新按钮特殊样式
  103. .refresh-btn {
  104. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  105. color: #ffffff;
  106. border: none;
  107. font-weight: 600;
  108. &:hover {
  109. background: linear-gradient(135deg, #5568d3 0%, #63408b 100%);
  110. transform: scale(1.05);
  111. }
  112. &:active {
  113. animation: refresh-spin 0.6s ease-in-out;
  114. }
  115. }
  116. @keyframes refresh-spin {
  117. from {
  118. transform: rotate(0deg);
  119. }
  120. to {
  121. transform: rotate(360deg);
  122. }
  123. }
  124. // 设计师统计面板
  125. .designer-stats-panel {
  126. margin-top: 12px;
  127. padding: 12px 16px;
  128. background: #ffffff;
  129. border: 1px solid #e5e7eb;
  130. border-radius: 6px;
  131. }
  132. .stats-header {
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-between;
  136. margin-bottom: 12px;
  137. h3 {
  138. margin: 0;
  139. font-size: 16px;
  140. font-weight: 600;
  141. color: #111827;
  142. }
  143. }
  144. .workload-badge {
  145. padding: 4px 12px;
  146. border-radius: 12px;
  147. font-size: 13px;
  148. font-weight: 500;
  149. &.level-low {
  150. background: #d1fae5;
  151. color: #065f46;
  152. }
  153. &.level-medium {
  154. background: #fef3c7;
  155. color: #92400e;
  156. }
  157. &.level-high {
  158. background: #fee2e2;
  159. color: #991b1b;
  160. }
  161. }
  162. .stats-body {
  163. display: grid;
  164. grid-template-columns: repeat(3, 1fr);
  165. gap: 12px;
  166. }
  167. .stat-item {
  168. display: flex;
  169. flex-direction: column;
  170. padding: 8px;
  171. background: #f9fafb;
  172. border-radius: 4px;
  173. }
  174. .stat-label {
  175. font-size: 12px;
  176. color: #6b7280;
  177. margin-bottom: 4px;
  178. }
  179. .stat-value {
  180. font-size: 18px;
  181. font-weight: 600;
  182. color: #111827;
  183. &.urgent {
  184. color: #ea580c;
  185. }
  186. &.overdue {
  187. color: #dc2626;
  188. }
  189. }
  190. // 时间轴主体
  191. .timeline-body {
  192. flex: 1;
  193. overflow-y: auto;
  194. padding: 16px;
  195. }
  196. // 空状态
  197. .empty-state {
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. padding: 60px 20px;
  202. text-align: center;
  203. p {
  204. margin: 0;
  205. font-size: 15px;
  206. color: #9ca3af;
  207. }
  208. }
  209. // 时间轴视图容器
  210. .timeline-view-container {
  211. position: relative;
  212. width: 100%;
  213. min-height: 400px;
  214. }
  215. // 图例说明 - 简化版
  216. .timeline-legend {
  217. display: flex;
  218. align-items: center;
  219. padding: 12px 20px;
  220. background: #ffffff;
  221. border-bottom: 1px solid #f3f4f6;
  222. flex-wrap: wrap;
  223. gap: 24px;
  224. }
  225. .legend-group {
  226. display: flex;
  227. align-items: center;
  228. gap: 16px;
  229. }
  230. .legend-item {
  231. display: flex;
  232. align-items: center;
  233. gap: 6px;
  234. &.legend-highlight {
  235. background: #fff7ed;
  236. padding: 4px 10px;
  237. border-radius: 4px;
  238. border: 1px solid #fed7aa;
  239. .legend-label {
  240. color: #ea580c;
  241. font-weight: 600;
  242. }
  243. }
  244. }
  245. .legend-label {
  246. font-size: 12px;
  247. color: #4b5563;
  248. font-weight: 500;
  249. }
  250. .legend-separator {
  251. width: 1px;
  252. height: 16px;
  253. background: #e5e7eb;
  254. }
  255. .legend-dot {
  256. width: 10px;
  257. height: 10px;
  258. border-radius: 2px; // Slightly rounded square for status
  259. &.status-normal { background: #dcfce7; border: 1px solid #86efac; }
  260. &.status-warning { background: #fef9c3; border: 1px solid #fde047; }
  261. &.status-urgent { background: #ffedd5; border: 1px solid #fdba74; }
  262. &.status-overdue { background: #fee2e2; border: 1px solid #fca5a5; }
  263. }
  264. .legend-icon {
  265. display: flex;
  266. align-items: center;
  267. justify-content: center;
  268. width: 20px;
  269. height: 20px;
  270. font-size: 14px;
  271. &.start-icon { color: #10b981; }
  272. &.delivery-icon { color: #f59e0b; }
  273. &.phase-icon {
  274. width: 20px;
  275. height: 20px;
  276. border-radius: 50%;
  277. background: #f3f4f6;
  278. color: #6b7280;
  279. font-size: 10px;
  280. font-weight: 600;
  281. border: 1px solid #e5e7eb;
  282. }
  283. &.review-icon {
  284. font-size: 16px;
  285. }
  286. }
  287. // 项目标签区 - 优化
  288. .project-label {
  289. width: 200px; // Slightly wider
  290. min-width: 200px;
  291. padding: 12px 16px;
  292. display: flex;
  293. flex-direction: column;
  294. justify-content: center;
  295. gap: 6px;
  296. border-right: 1px solid #f3f4f6; // Lighter border
  297. background: #ffffff;
  298. }
  299. .project-main-info {
  300. display: flex;
  301. align-items: center;
  302. gap: 6px;
  303. overflow: hidden;
  304. }
  305. .project-name-label {
  306. font-size: 14px;
  307. font-weight: 600;
  308. color: #111827;
  309. white-space: nowrap;
  310. overflow: hidden;
  311. text-overflow: ellipsis;
  312. }
  313. .priority-icon {
  314. font-size: 14px;
  315. flex-shrink: 0;
  316. }
  317. .project-sub-info {
  318. display: flex;
  319. align-items: center;
  320. gap: 10px;
  321. }
  322. .designer-label {
  323. font-size: 12px;
  324. color: #9ca3af;
  325. }
  326. .deliverable-info {
  327. display: flex;
  328. align-items: center;
  329. gap: 4px;
  330. font-size: 11px;
  331. color: #d1d5db; // Inactive color
  332. padding: 1px 6px;
  333. border-radius: 4px;
  334. background: #f9fafb;
  335. &.has-data {
  336. color: #6b7280;
  337. background: #f3f4f6;
  338. .count {
  339. font-weight: 500;
  340. color: #4b5563;
  341. }
  342. }
  343. .icon { font-size: 12px; }
  344. }
  345. // 时间刻度尺
  346. .timeline-ruler {
  347. display: flex;
  348. position: sticky;
  349. top: 0;
  350. z-index: 10;
  351. background: #ffffff;
  352. border-bottom: 1px solid #f3f4f6;
  353. padding: 8px 0;
  354. }
  355. .ruler-header {
  356. width: 200px;
  357. min-width: 200px;
  358. padding: 12px 16px;
  359. font-weight: 600;
  360. font-size: 14px;
  361. color: #111827;
  362. border-right: 1px solid #f3f4f6;
  363. background: #ffffff;
  364. display: flex;
  365. align-items: center;
  366. }
  367. .ruler-ticks {
  368. flex: 1;
  369. display: flex;
  370. position: relative;
  371. }
  372. .ruler-tick {
  373. flex: 1;
  374. text-align: center;
  375. border-right: 1px solid #f3f4f6;
  376. padding: 8px 4px;
  377. display: flex;
  378. flex-direction: column;
  379. gap: 2px;
  380. &:last-child {
  381. border-right: none;
  382. }
  383. &.first {
  384. border-left: 1px solid #e5e7eb;
  385. background: #f9fafb;
  386. }
  387. }
  388. .tick-date {
  389. font-size: 13px;
  390. color: #374151;
  391. font-weight: 600;
  392. line-height: 1.2;
  393. }
  394. .tick-weekday {
  395. font-size: 11px;
  396. color: #9ca3af;
  397. font-weight: 500;
  398. line-height: 1.2;
  399. }
  400. // 时间轴轨道
  401. .timeline-track {
  402. flex: 1;
  403. position: relative;
  404. height: 72px; // Slightly taller for breathing room
  405. padding: 0; // Remove padding, center bar vertically
  406. display: flex;
  407. align-items: center;
  408. background: repeating-linear-gradient(
  409. 90deg,
  410. transparent,
  411. transparent calc(100% / 7 - 1px),
  412. #e5e7eb calc(100% / 7 - 1px), // Slightly darker grid line
  413. #e5e7eb calc(100% / 7)
  414. );
  415. }
  416. // 项目条形图 - 扁平化
  417. .project-bar {
  418. position: absolute;
  419. height: 36px; // Slightly taller
  420. border-radius: 6px;
  421. transition: all 0.2s;
  422. box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  423. border: 1px solid rgba(0,0,0,0.1); // Explicit border for better definition
  424. opacity: 1;
  425. &::before {
  426. display: none; // Remove the top gloss effect
  427. }
  428. &:hover {
  429. transform: scaleY(1.05);
  430. box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  431. z-index: 5;
  432. }
  433. }
  434. // 进度条容器 - 简化
  435. .progress-bar-container {
  436. position: absolute;
  437. top: 0;
  438. bottom: 0;
  439. border-radius: 5px;
  440. background: rgba(0,0,0,0.05); // Subtle darkening for progress area
  441. .progress-fill {
  442. background: rgba(0,0,0,0.15) !important; // Darker overlay for completion
  443. box-shadow: none;
  444. .progress-text {
  445. font-size: 11px;
  446. color: #374151; // Darker text for contrast
  447. text-shadow: none;
  448. font-weight: 700;
  449. }
  450. }
  451. }
  452. // 任务完成度标记 - 简化
  453. .completion-marker {
  454. top: -26px; // Closer to bar
  455. .marker-label {
  456. color: #374151;
  457. background: #ffffff !important;
  458. border: 1px solid #d1d5db;
  459. box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  460. font-size: 11px;
  461. padding: 2px 8px;
  462. }
  463. .marker-dot {
  464. width: 8px;
  465. height: 8px;
  466. border: 2px solid #ffffff;
  467. box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  468. }
  469. }
  470. // 事件标记 - 简化重构
  471. .event-marker {
  472. position: absolute;
  473. top: 50%;
  474. transform: translateY(-50%);
  475. display: flex;
  476. align-items: center;
  477. justify-content: center;
  478. transition: all 0.2s;
  479. cursor: pointer;
  480. // 🔵 小圆点样式 (开始、阶段截止) - 极简,无文字,不占空间
  481. &.dot-marker {
  482. width: 10px;
  483. height: 10px;
  484. border-radius: 50%;
  485. border: 2px solid #ffffff;
  486. box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  487. z-index: 7; // Above progress bar, below icons
  488. &:hover {
  489. transform: translateY(-50%) scale(1.5);
  490. z-index: 10;
  491. }
  492. }
  493. // 🔶 图标样式 (交付、小图对图) - 保留视觉重心
  494. &.icon-marker {
  495. z-index: 8;
  496. color: #ffffff;
  497. border-radius: 50%;
  498. border: 2px solid #ffffff;
  499. box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  500. &.delivery {
  501. width: 24px;
  502. height: 24px;
  503. font-size: 14px;
  504. border-radius: 4px; // Square for box
  505. transform: translateY(-50%) rotate(45deg); // Diamond shape
  506. &:hover {
  507. transform: translateY(-50%) rotate(45deg) scale(1.2);
  508. z-index: 15;
  509. }
  510. }
  511. &.review {
  512. width: 32px;
  513. height: 32px;
  514. font-size: 18px;
  515. // border-color: #f59e0b; // Gold border
  516. box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
  517. z-index: 9;
  518. &:hover {
  519. transform: translateY(-50%) scale(1.15);
  520. z-index: 15;
  521. }
  522. }
  523. }
  524. &.blink {
  525. animation: blink 1s infinite;
  526. }
  527. }
  528. // 今日标记线 - 修复版
  529. .today-line {
  530. position: absolute;
  531. top: 0;
  532. bottom: 0;
  533. z-index: 20;
  534. pointer-events: none;
  535. // left is set dynamically via style attribute
  536. width: 0; // Container width is 0, content flows from it
  537. }
  538. .today-bar {
  539. position: absolute;
  540. top: 0;
  541. bottom: 0;
  542. left: 0;
  543. width: 2px;
  544. background: #ef4444;
  545. box-shadow: 0 0 4px rgba(239, 68, 68, 0.3);
  546. }
  547. .today-dot {
  548. position: absolute;
  549. top: -5px; // Align with ruler ticks
  550. left: -4px; // Center on the 2px line
  551. width: 10px;
  552. height: 10px;
  553. background: #ef4444;
  554. border-radius: 50%;
  555. border: 2px solid #ffffff;
  556. box-shadow: 0 0 0 1px #ef4444;
  557. animation: none;
  558. }
  559. .today-label {
  560. position: absolute;
  561. top: -35px;
  562. left: 0;
  563. transform: translateX(-50%);
  564. background: #ef4444;
  565. color: #ffffff;
  566. padding: 4px 10px;
  567. font-size: 11px;
  568. font-weight: 600;
  569. border-radius: 20px;
  570. box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
  571. white-space: nowrap;
  572. animation: none;
  573. &::after {
  574. content: '';
  575. position: absolute;
  576. top: 100%;
  577. left: 50%;
  578. transform: translateX(-50%);
  579. width: 0;
  580. height: 0;
  581. border-left: 5px solid transparent;
  582. border-right: 5px solid transparent;
  583. border-top: 5px solid #ef4444;
  584. }
  585. }
  586. // 移除之前的复杂样式
  587. .space-deliverable-badge, .priority-badge {
  588. display: none; // We moved these or restyled them
  589. }
  590. // 动画
  591. @keyframes pulse {
  592. 0%, 100% {
  593. opacity: 1;
  594. }
  595. 50% {
  596. opacity: 0.7;
  597. }
  598. }
  599. @keyframes blink {
  600. 0%, 100% {
  601. opacity: 1;
  602. }
  603. 50% {
  604. opacity: 0.3;
  605. }
  606. }
  607. // 🔥 小图对图高亮脉冲动画
  608. @keyframes pulse-highlight {
  609. 0%, 100% {
  610. transform: translateY(-50%) scale(1);
  611. box-shadow: 0 0 25px rgba(245, 158, 11, 0.8), 0 4px 15px rgba(0, 0, 0, 0.3);
  612. }
  613. 50% {
  614. transform: translateY(-50%) scale(1.15);
  615. box-shadow: 0 0 35px rgba(245, 158, 11, 1), 0 6px 20px rgba(0, 0, 0, 0.4);
  616. }
  617. }
  618. // 🔥 图例发光动画
  619. @keyframes legend-glow {
  620. 0%, 100% {
  621. box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  622. }
  623. 50% {
  624. box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
  625. }
  626. }
  627. // 响应式设计
  628. @media (max-width: 768px) {
  629. .filter-section {
  630. flex-direction: column;
  631. align-items: stretch;
  632. }
  633. .filter-group {
  634. width: 100%;
  635. &.quick-filters {
  636. margin-left: 0;
  637. }
  638. &.view-controls,
  639. &.sort-controls {
  640. border-left: none;
  641. border-top: 1px solid #e5e7eb;
  642. padding-left: 0;
  643. padding-top: 12px;
  644. }
  645. }
  646. .stats-body {
  647. grid-template-columns: 1fr;
  648. }
  649. // 时间轴视图响应式
  650. .timeline-legend {
  651. flex-wrap: wrap;
  652. gap: 12px;
  653. padding: 8px 12px;
  654. }
  655. .legend-item {
  656. gap: 6px;
  657. }
  658. .legend-label {
  659. font-size: 11px;
  660. }
  661. .ruler-header,
  662. .project-label {
  663. width: 100px;
  664. min-width: 100px;
  665. padding: 8px;
  666. }
  667. .project-name-label {
  668. font-size: 11px;
  669. }
  670. .designer-label {
  671. font-size: 10px;
  672. }
  673. .tick-date {
  674. font-size: 11px;
  675. }
  676. .tick-weekday {
  677. font-size: 9px;
  678. }
  679. .timeline-track {
  680. height: 50px;
  681. padding: 14px 0;
  682. }
  683. .project-bar {
  684. height: 22px;
  685. }
  686. .event-marker {
  687. width: 20px;
  688. height: 20px;
  689. font-size: 14px;
  690. &.start {
  691. width: 18px;
  692. height: 18px;
  693. font-size: 12px;
  694. }
  695. &.review {
  696. width: 19px;
  697. height: 19px;
  698. font-size: 13px;
  699. }
  700. &.delivery {
  701. width: 22px;
  702. height: 22px;
  703. font-size: 16px;
  704. }
  705. }
  706. }
  707. @keyframes fadeInDown {
  708. from {
  709. opacity: 0;
  710. transform: translateX(-50%) translateY(-10px);
  711. }
  712. to {
  713. opacity: 1;
  714. transform: translateX(-50%) translateY(0);
  715. }
  716. }