project-list.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. // 全局变量
  2. $primary-color: #1976d2;
  3. $primary-light: #e3f2fd;
  4. $secondary-color: #6c757d;
  5. $success-color: #4caf50;
  6. $warning-color: #ff9800;
  7. $danger-color: #f44336;
  8. $text-primary: #333;
  9. $text-secondary: #666;
  10. $text-light: #999;
  11. $bg-light: #f5f7fa;
  12. $bg-white: #fff;
  13. $border-color: #e1e5e9;
  14. $box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  15. $transition: all 0.3s ease;
  16. // 主容器
  17. .project-list-container {
  18. display: flex;
  19. flex-direction: column;
  20. height: 100vh;
  21. overflow: hidden;
  22. background-color: $bg-light;
  23. }
  24. // 顶部导航栏
  25. .top-navbar {
  26. display: flex;
  27. justify-content: space-between;
  28. align-items: center;
  29. padding: 0 24px;
  30. height: 64px;
  31. background-color: $bg-white;
  32. border-bottom: 1px solid $border-color;
  33. box-shadow: $box-shadow;
  34. .navbar-left {
  35. display: flex;
  36. align-items: center;
  37. gap: 16px;
  38. .menu-toggle {
  39. display: flex;
  40. align-items: center;
  41. justify-content: center;
  42. width: 40px;
  43. height: 40px;
  44. border: none;
  45. background: none;
  46. color: $text-primary;
  47. cursor: pointer;
  48. transition: $transition;
  49. &:hover {
  50. color: $primary-color;
  51. background-color: $bg-light;
  52. border-radius: 4px;
  53. }
  54. }
  55. .app-title {
  56. font-size: 18px;
  57. font-weight: 600;
  58. color: $text-primary;
  59. margin: 0;
  60. }
  61. }
  62. .navbar-right {
  63. display: flex;
  64. align-items: center;
  65. gap: 16px;
  66. .notification-btn {
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. width: 40px;
  71. height: 40px;
  72. border: none;
  73. background: none;
  74. color: $text-primary;
  75. cursor: pointer;
  76. position: relative;
  77. transition: $transition;
  78. &:hover {
  79. color: $primary-color;
  80. background-color: $bg-light;
  81. border-radius: 4px;
  82. }
  83. .notification-badge {
  84. position: absolute;
  85. top: 8px;
  86. right: 8px;
  87. display: flex;
  88. align-items: center;
  89. justify-content: center;
  90. width: 16px;
  91. height: 16px;
  92. font-size: 10px;
  93. font-weight: 600;
  94. color: white;
  95. background-color: $danger-color;
  96. border-radius: 50%;
  97. }
  98. }
  99. .user-profile {
  100. display: flex;
  101. align-items: center;
  102. gap: 8px;
  103. padding: 8px 12px;
  104. border-radius: 6px;
  105. transition: $transition;
  106. &:hover {
  107. background-color: $bg-light;
  108. }
  109. .user-avatar {
  110. width: 32px;
  111. height: 32px;
  112. border-radius: 50%;
  113. object-fit: cover;
  114. }
  115. .user-name {
  116. font-size: 14px;
  117. font-weight: 500;
  118. color: $text-primary;
  119. }
  120. }
  121. }
  122. }
  123. // 主要内容区
  124. .dashboard-content {
  125. display: flex;
  126. flex: 1;
  127. overflow: hidden;
  128. }
  129. // 左侧侧边栏
  130. .sidebar {
  131. width: 240px;
  132. background-color: $bg-white;
  133. border-right: 1px solid $border-color;
  134. overflow-y: auto;
  135. flex-shrink: 0;
  136. .sidebar-nav {
  137. padding: 16px 0;
  138. .nav-item {
  139. display: flex;
  140. align-items: center;
  141. gap: 12px;
  142. padding: 12px 24px;
  143. color: $text-secondary;
  144. text-decoration: none;
  145. transition: $transition;
  146. &:hover {
  147. color: $primary-color;
  148. background-color: $bg-light;
  149. }
  150. &.active {
  151. color: $primary-color;
  152. background-color: #e3f2fd;
  153. border-left: 3px solid $primary-color;
  154. padding-left: 21px;
  155. }
  156. svg {
  157. flex-shrink: 0;
  158. }
  159. span {
  160. font-size: 14px;
  161. font-weight: 500;
  162. }
  163. }
  164. }
  165. }
  166. // 右侧主要内容
  167. .project-content {
  168. flex: 1;
  169. overflow-y: auto;
  170. padding: 24px;
  171. // 页面标题和操作
  172. .page-header {
  173. display: flex;
  174. justify-content: space-between;
  175. align-items: center;
  176. margin-bottom: 24px;
  177. h2 {
  178. font-size: 24px;
  179. font-weight: 600;
  180. color: $text-primary;
  181. margin: 0;
  182. }
  183. .header-actions {
  184. .search-container {
  185. .search-box {
  186. display: flex;
  187. align-items: center;
  188. width: 320px;
  189. border: 1px solid $border-color;
  190. border-radius: 6px;
  191. overflow: hidden;
  192. transition: $transition;
  193. &:focus-within {
  194. border-color: $primary-color;
  195. box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  196. }
  197. svg:first-child {
  198. margin-left: 12px;
  199. color: $text-light;
  200. }
  201. input {
  202. flex: 1;
  203. padding: 8px 12px;
  204. border: none;
  205. outline: none;
  206. font-size: 14px;
  207. color: $text-primary;
  208. background-color: $bg-white;
  209. }
  210. .search-btn {
  211. display: flex;
  212. align-items: center;
  213. justify-content: center;
  214. width: 40px;
  215. height: 100%;
  216. border: none;
  217. color: $primary-color;
  218. background-color: $primary-light;
  219. cursor: pointer;
  220. transition: $transition;
  221. &:hover {
  222. background-color: $primary-color;
  223. color: white;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. // 筛选和排序工具栏
  231. .filter-toolbar {
  232. display: flex;
  233. align-items: center;
  234. gap: 24px;
  235. padding: 16px 20px;
  236. margin-bottom: 24px;
  237. background-color: $bg-white;
  238. border-radius: 8px;
  239. box-shadow: $box-shadow;
  240. .filter-group {
  241. display: flex;
  242. align-items: center;
  243. gap: 8px;
  244. label {
  245. font-size: 14px;
  246. font-weight: 500;
  247. color: $text-secondary;
  248. white-space: nowrap;
  249. }
  250. select {
  251. padding: 6px 12px;
  252. border: 1px solid $border-color;
  253. border-radius: 4px;
  254. font-size: 14px;
  255. color: $text-primary;
  256. background-color: $bg-white;
  257. cursor: pointer;
  258. transition: $transition;
  259. &:focus {
  260. outline: none;
  261. border-color: $primary-color;
  262. box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  263. }
  264. &:hover {
  265. border-color: $primary-color;
  266. }
  267. }
  268. }
  269. .filter-results {
  270. margin-left: auto;
  271. font-size: 14px;
  272. color: $text-secondary;
  273. }
  274. }
  275. // 项目网格布局
  276. .project-grid {
  277. display: grid;
  278. grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  279. gap: 20px;
  280. margin-bottom: 24px;
  281. // 项目卡片
  282. .project-card {
  283. display: flex;
  284. flex-direction: column;
  285. padding: 20px;
  286. background-color: $bg-white;
  287. border-radius: 8px;
  288. box-shadow: $box-shadow;
  289. transition: $transition;
  290. border: 1px solid transparent;
  291. &:hover {
  292. transform: translateY(-2px);
  293. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  294. border-color: $primary-light;
  295. }
  296. // 卡片头部
  297. .card-header {
  298. margin-bottom: 16px;
  299. .card-title-section {
  300. display: flex;
  301. justify-content: space-between;
  302. align-items: flex-start;
  303. margin-bottom: 8px;
  304. .project-name {
  305. font-size: 16px;
  306. font-weight: 600;
  307. color: $text-primary;
  308. margin: 0;
  309. flex: 1;
  310. overflow: hidden;
  311. text-overflow: ellipsis;
  312. white-space: nowrap;
  313. }
  314. .project-id {
  315. font-size: 12px;
  316. color: $text-light;
  317. margin-left: 8px;
  318. }
  319. }
  320. .card-tags {
  321. display: flex;
  322. gap: 8px;
  323. flex-wrap: wrap;
  324. .project-tag {
  325. padding: 4px 12px;
  326. font-size: 12px;
  327. font-weight: 500;
  328. color: $primary-color;
  329. background-color: $primary-light;
  330. border-radius: 16px;
  331. }
  332. .urgent-tag {
  333. padding: 4px 12px;
  334. font-size: 12px;
  335. font-weight: 500;
  336. color: $danger-color;
  337. background-color: #ffebee;
  338. border-radius: 16px;
  339. }
  340. }
  341. }
  342. // 卡片内容
  343. .card-content {
  344. flex: 1;
  345. // 信息项
  346. .info-item {
  347. display: flex;
  348. justify-content: space-between;
  349. align-items: center;
  350. margin-bottom: 12px;
  351. .info-label {
  352. font-size: 13px;
  353. color: $text-light;
  354. }
  355. .info-value {
  356. font-size: 14px;
  357. font-weight: 500;
  358. color: $text-primary;
  359. }
  360. .status-badge {
  361. padding: 4px 12px;
  362. border-radius: 16px;
  363. font-size: 12px;
  364. font-weight: 500;
  365. }
  366. .stage-badge {
  367. padding: 4px 12px;
  368. border-radius: 16px;
  369. font-size: 12px;
  370. font-weight: 500;
  371. }
  372. // 状态样式
  373. .status-active {
  374. color: $primary-color;
  375. background-color: $primary-light;
  376. }
  377. .status-completed {
  378. color: $success-color;
  379. background-color: #e8f5e9;
  380. }
  381. .status-paused {
  382. color: $secondary-color;
  383. background-color: #f5f5f5;
  384. }
  385. .status-overdue {
  386. color: $danger-color;
  387. background-color: #ffebee;
  388. }
  389. // 阶段样式
  390. .stage-communication {
  391. color: #9c27b0;
  392. background-color: #f3e5f5;
  393. }
  394. .stage-modeling {
  395. color: #2196f3;
  396. background-color: #e3f2fd;
  397. }
  398. .stage-decoration {
  399. color: #009688;
  400. background-color: #e0f2f1;
  401. }
  402. .stage-rendering {
  403. color: #ff5722;
  404. background-color: #fbe9e7;
  405. }
  406. .stage-postproduction {
  407. color: #ff9800;
  408. background-color: #fff3e0;
  409. }
  410. .stage-completed {
  411. color: $success-color;
  412. background-color: #e8f5e9;
  413. }
  414. }
  415. // 进度部分
  416. .progress-section {
  417. margin-bottom: 16px;
  418. .progress-header {
  419. display: flex;
  420. justify-content: space-between;
  421. align-items: center;
  422. margin-bottom: 8px;
  423. .progress-label {
  424. font-size: 13px;
  425. color: $text-light;
  426. }
  427. .progress-percentage {
  428. font-size: 14px;
  429. font-weight: 600;
  430. color: $primary-color;
  431. }
  432. }
  433. .progress-bar {
  434. height: 6px;
  435. background-color: $bg-light;
  436. border-radius: 3px;
  437. overflow: hidden;
  438. .progress-fill {
  439. height: 100%;
  440. border-radius: 3px;
  441. transition: width 0.6s ease;
  442. }
  443. }
  444. }
  445. // 时间信息
  446. .timeline-info {
  447. margin-bottom: 16px;
  448. .time-item {
  449. display: flex;
  450. justify-content: space-between;
  451. align-items: center;
  452. margin-bottom: 8px;
  453. .time-label {
  454. font-size: 13px;
  455. color: $text-light;
  456. }
  457. .time-value {
  458. font-size: 13px;
  459. color: $text-secondary;
  460. }
  461. .deadline {
  462. &.overdue {
  463. color: $danger-color;
  464. font-weight: 500;
  465. }
  466. &.urgent {
  467. color: $warning-color;
  468. font-weight: 500;
  469. }
  470. }
  471. }
  472. }
  473. // 高优先级需求
  474. .needs-section {
  475. padding-top: 12px;
  476. border-top: 1px solid $border-color;
  477. .needs-label {
  478. display: block;
  479. font-size: 13px;
  480. color: $text-light;
  481. margin-bottom: 8px;
  482. }
  483. .needs-list {
  484. margin: 0;
  485. padding: 0;
  486. list-style: none;
  487. li {
  488. display: flex;
  489. align-items: center;
  490. gap: 6px;
  491. font-size: 13px;
  492. color: $warning-color;
  493. margin-bottom: 4px;
  494. svg {
  495. flex-shrink: 0;
  496. color: $warning-color;
  497. }
  498. }
  499. }
  500. }
  501. }
  502. // 卡片底部
  503. .card-footer {
  504. display: flex;
  505. gap: 12px;
  506. margin-top: 16px;
  507. padding-top: 16px;
  508. border-top: 1px solid $border-color;
  509. .secondary-btn,
  510. .primary-btn {
  511. display: flex;
  512. align-items: center;
  513. gap: 6px;
  514. padding: 8px 16px;
  515. border: none;
  516. border-radius: 6px;
  517. font-size: 14px;
  518. font-weight: 500;
  519. cursor: pointer;
  520. transition: $transition;
  521. }
  522. .primary-btn {
  523. flex: 1;
  524. color: white;
  525. background-color: $primary-color;
  526. &:hover {
  527. background-color: #1565c0;
  528. }
  529. &:active {
  530. background-color: #0E42CB;
  531. }
  532. }
  533. .secondary-btn {
  534. flex: 1;
  535. color: $text-primary;
  536. background-color: $bg-light;
  537. &:hover {
  538. background-color: $border-color;
  539. }
  540. &:active {
  541. background-color: #D1D1D6;
  542. }
  543. }
  544. .card-action {
  545. justify-content: center;
  546. }
  547. }
  548. }
  549. }
  550. // 分页控件
  551. .pagination {
  552. display: flex;
  553. justify-content: center;
  554. align-items: center;
  555. gap: 8px;
  556. padding: 20px;
  557. background-color: $bg-white;
  558. border-radius: 8px;
  559. box-shadow: $box-shadow;
  560. .pagination-btn {
  561. display: flex;
  562. align-items: center;
  563. justify-content: center;
  564. width: 36px;
  565. height: 36px;
  566. border: 1px solid $border-color;
  567. background-color: $bg-white;
  568. color: $text-secondary;
  569. border-radius: 4px;
  570. cursor: pointer;
  571. transition: $transition;
  572. font-size: 14px;
  573. font-weight: 500;
  574. &:hover:not(:disabled) {
  575. color: $primary-color;
  576. border-color: $primary-color;
  577. }
  578. &:active:not(:disabled):not(.active) {
  579. background-color: $primary-light;
  580. }
  581. &.active {
  582. color: white;
  583. background-color: $primary-color;
  584. border-color: $primary-color;
  585. }
  586. &.active:active {
  587. background-color: #0E42CB;
  588. }
  589. &:disabled {
  590. opacity: 0.5;
  591. cursor: not-allowed;
  592. }
  593. }
  594. .pagination-ellipsis {
  595. font-size: 14px;
  596. color: $text-light;
  597. padding: 0 8px;
  598. }
  599. }
  600. }
  601. // 响应式设计
  602. @media (max-width: 1200px) {
  603. .project-grid {
  604. grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  605. }
  606. }
  607. @media (max-width: 1024px) {
  608. .sidebar {
  609. width: 200px;
  610. }
  611. .project-content {
  612. padding: 16px;
  613. }
  614. .filter-toolbar {
  615. flex-wrap: wrap;
  616. }
  617. .page-header {
  618. flex-direction: column;
  619. align-items: flex-start !important;
  620. gap: 16px;
  621. }
  622. .header-actions {
  623. width: 100%;
  624. }
  625. .search-box {
  626. width: 100% !important;
  627. }
  628. }
  629. @media (max-width: 768px) {
  630. .top-navbar {
  631. padding: 0 16px;
  632. .navbar-right {
  633. gap: 8px;
  634. }
  635. .user-name {
  636. display: none;
  637. }
  638. }
  639. .sidebar {
  640. display: none;
  641. }
  642. .filter-toolbar {
  643. gap: 16px;
  644. padding: 12px 16px;
  645. .filter-group {
  646. flex: 1 1 calc(50% - 8px);
  647. }
  648. .filter-results {
  649. width: 100%;
  650. margin-left: 0;
  651. text-align: center;
  652. }
  653. }
  654. .project-grid {
  655. grid-template-columns: 1fr !important;
  656. gap: 16px !important;
  657. }
  658. .pagination {
  659. padding: 16px;
  660. }
  661. .pagination-btn {
  662. width: 32px !important;
  663. height: 32px !important;
  664. font-size: 13px !important;
  665. }
  666. }
  667. // 动画效果
  668. @keyframes fadeIn {
  669. from {
  670. opacity: 0;
  671. transform: translateY(10px);
  672. }
  673. to {
  674. opacity: 1;
  675. transform: translateY(0);
  676. }
  677. }
  678. .project-card {
  679. animation: fadeIn 0.4s ease-out;
  680. }
  681. .project-card:nth-child(2n) {
  682. animation-delay: 0.1s;
  683. }
  684. .project-card:nth-child(3n) {
  685. animation-delay: 0.2s;
  686. }
  687. .project-card:nth-child(4n) {
  688. animation-delay: 0.3s;
  689. }