project-list.scss 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397
  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. .loading-container {
  26. display: flex;
  27. flex-direction: column;
  28. align-items: center;
  29. justify-content: center;
  30. min-height: 400px;
  31. gap: 16px;
  32. .loading-spinner {
  33. width: 48px;
  34. height: 48px;
  35. border: 4px solid $border-color;
  36. border-top-color: $primary-color;
  37. border-radius: 50%;
  38. animation: spin 1s linear infinite;
  39. }
  40. p {
  41. color: $text-secondary;
  42. font-size: 14px;
  43. }
  44. }
  45. @keyframes spin {
  46. to {
  47. transform: rotate(360deg);
  48. }
  49. }
  50. // 错误状态
  51. .error-container {
  52. display: flex;
  53. flex-direction: column;
  54. align-items: center;
  55. justify-content: center;
  56. min-height: 400px;
  57. gap: 16px;
  58. svg {
  59. color: $danger-color;
  60. }
  61. p {
  62. color: $text-secondary;
  63. font-size: 14px;
  64. }
  65. .retry-btn {
  66. padding: 8px 24px;
  67. background-color: $primary-color;
  68. color: white;
  69. border: none;
  70. border-radius: 4px;
  71. cursor: pointer;
  72. font-size: 14px;
  73. transition: $transition;
  74. &:hover {
  75. background-color: darken($primary-color, 10%);
  76. }
  77. }
  78. }
  79. // 空列状态
  80. .empty-column {
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. justify-content: center;
  85. padding: 40px 20px;
  86. gap: 12px;
  87. svg {
  88. color: $text-light;
  89. }
  90. p {
  91. color: $text-light;
  92. font-size: 13px;
  93. }
  94. }
  95. // 顶部导航栏
  96. .top-navbar {
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. padding: 0 24px;
  101. height: 64px;
  102. background-color: $bg-white;
  103. border-bottom: 1px solid $border-color;
  104. box-shadow: $box-shadow;
  105. .navbar-left {
  106. display: flex;
  107. align-items: center;
  108. gap: 16px;
  109. .menu-toggle {
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. width: 40px;
  114. height: 40px;
  115. border: none;
  116. background: none;
  117. color: $text-primary;
  118. cursor: pointer;
  119. transition: $transition;
  120. &:hover {
  121. color: $primary-color;
  122. background-color: $bg-light;
  123. border-radius: 4px;
  124. }
  125. }
  126. .app-title {
  127. font-size: 18px;
  128. font-weight: 600;
  129. color: $text-primary;
  130. margin: 0;
  131. }
  132. }
  133. .navbar-right {
  134. display: flex;
  135. align-items: center;
  136. gap: 16px;
  137. .notification-btn {
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. width: 40px;
  142. height: 40px;
  143. border: none;
  144. background: none;
  145. color: $text-primary;
  146. cursor: pointer;
  147. position: relative;
  148. transition: $transition;
  149. &:hover {
  150. color: $primary-color;
  151. background-color: $bg-light;
  152. border-radius: 4px;
  153. }
  154. .notification-badge {
  155. position: absolute;
  156. top: 8px;
  157. right: 8px;
  158. display: flex;
  159. align-items: center;
  160. justify-content: center;
  161. width: 16px;
  162. height: 16px;
  163. font-size: 10px;
  164. font-weight: 600;
  165. color: white;
  166. background-color: $danger-color;
  167. border-radius: 50%;
  168. }
  169. }
  170. .user-profile {
  171. display: flex;
  172. align-items: center;
  173. gap: 8px;
  174. padding: 8px 12px;
  175. border-radius: 6px;
  176. transition: $transition;
  177. &:hover {
  178. background-color: $bg-light;
  179. }
  180. .user-avatar {
  181. width: 32px;
  182. height: 32px;
  183. border-radius: 50%;
  184. object-fit: cover;
  185. }
  186. .user-name {
  187. font-size: 14px;
  188. font-weight: 500;
  189. color: $text-primary;
  190. }
  191. }
  192. }
  193. }
  194. // 主要内容区
  195. .dashboard-content {
  196. display: flex;
  197. flex: 1;
  198. overflow: hidden;
  199. }
  200. // 左侧侧边栏
  201. .sidebar {
  202. width: 240px;
  203. background-color: $bg-white;
  204. border-right: 1px solid $border-color;
  205. overflow-y: auto;
  206. flex-shrink: 0;
  207. .sidebar-nav {
  208. padding: 16px 0;
  209. .nav-item {
  210. display: flex;
  211. align-items: center;
  212. gap: 12px;
  213. padding: 12px 24px;
  214. color: $text-secondary;
  215. text-decoration: none;
  216. transition: $transition;
  217. &:hover {
  218. color: $primary-color;
  219. background-color: $bg-light;
  220. }
  221. &.active {
  222. color: $primary-color;
  223. background-color: #e3f2fd;
  224. border-left: 3px solid $primary-color;
  225. padding-left: 21px;
  226. }
  227. svg {
  228. flex-shrink: 0;
  229. }
  230. span {
  231. font-size: 14px;
  232. font-weight: 500;
  233. }
  234. }
  235. }
  236. }
  237. // 右侧主要内容
  238. .project-content {
  239. flex: 1;
  240. overflow-y: auto;
  241. padding: 24px;
  242. // 页面标题和操作
  243. .page-header {
  244. display: flex;
  245. justify-content: space-between;
  246. align-items: center;
  247. margin-bottom: 24px;
  248. h2 {
  249. font-size: 24px;
  250. font-weight: 600;
  251. color: $text-primary;
  252. margin: 0;
  253. }
  254. .header-actions {
  255. .search-container {
  256. .search-box {
  257. display: flex;
  258. align-items: center;
  259. width: 320px;
  260. border: 1px solid $border-color;
  261. border-radius: 6px;
  262. overflow: hidden;
  263. transition: $transition;
  264. &:focus-within {
  265. border-color: $primary-color;
  266. box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  267. }
  268. svg:first-child {
  269. margin-left: 12px;
  270. color: $text-light;
  271. }
  272. input {
  273. flex: 1;
  274. padding: 8px 12px;
  275. border: none;
  276. outline: none;
  277. font-size: 14px;
  278. color: $text-primary;
  279. background-color: $bg-white;
  280. }
  281. .search-btn {
  282. display: flex;
  283. align-items: center;
  284. justify-content: center;
  285. width: 40px;
  286. height: 100%;
  287. border: none;
  288. color: $primary-color;
  289. background-color: $primary-light;
  290. cursor: pointer;
  291. transition: $transition;
  292. &:hover {
  293. background-color: $primary-color;
  294. color: white;
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. // 筛选和排序工具栏
  302. .filter-toolbar {
  303. display: flex;
  304. align-items: center;
  305. gap: 24px;
  306. padding: 16px 20px;
  307. margin-bottom: 24px;
  308. background-color: $bg-white;
  309. border-radius: 8px;
  310. box-shadow: $box-shadow;
  311. .filter-group {
  312. display: flex;
  313. align-items: center;
  314. gap: 8px;
  315. label {
  316. font-size: 14px;
  317. font-weight: 500;
  318. color: $text-secondary;
  319. white-space: nowrap;
  320. }
  321. select {
  322. padding: 6px 12px;
  323. border: 1px solid $border-color;
  324. border-radius: 4px;
  325. font-size: 14px;
  326. color: $text-primary;
  327. background-color: $bg-white;
  328. cursor: pointer;
  329. transition: $transition;
  330. &:focus {
  331. outline: none;
  332. border-color: $primary-color;
  333. box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  334. }
  335. &:hover {
  336. border-color: $primary-color;
  337. }
  338. }
  339. }
  340. .filter-results {
  341. margin-left: auto;
  342. font-size: 14px;
  343. color: $text-secondary;
  344. }
  345. }
  346. // 项目网格布局
  347. .project-grid {
  348. display: grid;
  349. grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  350. gap: 20px;
  351. margin-bottom: 24px;
  352. // 项目卡片
  353. .project-card {
  354. display: flex;
  355. flex-direction: column;
  356. padding: 20px;
  357. background-color: $bg-white;
  358. border-radius: 8px;
  359. box-shadow: $box-shadow;
  360. transition: $transition;
  361. border: 1px solid transparent;
  362. &:hover {
  363. transform: translateY(-2px);
  364. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  365. border-color: $primary-light;
  366. }
  367. // 卡片头部
  368. .card-header {
  369. margin-bottom: 16px;
  370. .card-title-section {
  371. display: flex;
  372. justify-content: space-between;
  373. align-items: flex-start;
  374. margin-bottom: 8px;
  375. .project-name {
  376. font-size: 16px;
  377. font-weight: 600;
  378. color: $text-primary;
  379. margin: 0;
  380. flex: 1;
  381. overflow: hidden;
  382. text-overflow: ellipsis;
  383. white-space: nowrap;
  384. }
  385. .project-id {
  386. font-size: 12px;
  387. color: $text-light;
  388. margin-left: 8px;
  389. }
  390. }
  391. .card-tags {
  392. display: flex;
  393. gap: 8px;
  394. flex-wrap: wrap;
  395. .project-tag {
  396. padding: 4px 12px;
  397. font-size: 12px;
  398. font-weight: 500;
  399. color: $primary-color;
  400. background-color: $primary-light;
  401. border-radius: 16px;
  402. }
  403. .urgent-tag {
  404. padding: 4px 12px;
  405. font-size: 12px;
  406. font-weight: 500;
  407. color: $danger-color;
  408. background-color: #ffebee;
  409. border-radius: 16px;
  410. }
  411. }
  412. }
  413. // 卡片内容
  414. .card-content {
  415. flex: 1;
  416. // 信息项
  417. .info-item {
  418. display: flex;
  419. justify-content: space-between;
  420. align-items: center;
  421. margin-bottom: 12px;
  422. .info-label {
  423. font-size: 13px;
  424. color: $text-light;
  425. }
  426. .info-value {
  427. font-size: 14px;
  428. font-weight: 500;
  429. color: $text-primary;
  430. }
  431. .status-badge {
  432. padding: 4px 12px;
  433. border-radius: 16px;
  434. font-size: 12px;
  435. font-weight: 500;
  436. }
  437. .stage-badge {
  438. padding: 4px 12px;
  439. border-radius: 16px;
  440. font-size: 12px;
  441. font-weight: 500;
  442. }
  443. // 状态样式
  444. .status-active {
  445. color: $primary-color;
  446. background-color: $primary-light;
  447. }
  448. .status-completed {
  449. color: $success-color;
  450. background-color: #e8f5e9;
  451. }
  452. .status-paused {
  453. color: $secondary-color;
  454. background-color: #f5f5f5;
  455. }
  456. .status-overdue {
  457. color: $danger-color;
  458. background-color: #ffebee;
  459. }
  460. // 阶段样式
  461. .stage-communication {
  462. color: #9c27b0;
  463. background-color: #f3e5f5;
  464. }
  465. .stage-modeling {
  466. color: #2196f3;
  467. background-color: #e3f2fd;
  468. }
  469. .stage-decoration {
  470. color: #009688;
  471. background-color: #e0f2f1;
  472. }
  473. .stage-rendering {
  474. color: #ff5722;
  475. background-color: #fbe9e7;
  476. }
  477. .stage-postproduction {
  478. color: #ff9800;
  479. background-color: #fff3e0;
  480. }
  481. .stage-completed {
  482. color: $success-color;
  483. background-color: #e8f5e9;
  484. }
  485. .stage-active {
  486. color: $danger-color;
  487. background-color: #ffebee;
  488. }
  489. }
  490. // 进度部分
  491. .progress-section {
  492. margin-bottom: 16px;
  493. .progress-header {
  494. display: flex;
  495. justify-content: space-between;
  496. align-items: center;
  497. margin-bottom: 8px;
  498. .progress-label {
  499. font-size: 13px;
  500. color: $text-light;
  501. }
  502. .progress-percentage {
  503. font-size: 14px;
  504. font-weight: 600;
  505. color: $primary-color;
  506. }
  507. }
  508. .progress-bar {
  509. height: 6px;
  510. background-color: $bg-light;
  511. border-radius: 3px;
  512. overflow: hidden;
  513. .progress-fill {
  514. height: 100%;
  515. border-radius: 3px;
  516. transition: width 0.6s ease;
  517. }
  518. }
  519. }
  520. // 时间信息
  521. .timeline-info {
  522. margin-bottom: 16px;
  523. .time-item {
  524. display: flex;
  525. justify-content: space-between;
  526. align-items: center;
  527. margin-bottom: 8px;
  528. .time-label {
  529. font-size: 13px;
  530. color: $text-light;
  531. }
  532. .time-value {
  533. font-size: 13px;
  534. color: $text-secondary;
  535. }
  536. .deadline {
  537. &.overdue {
  538. color: $danger-color;
  539. font-weight: 500;
  540. }
  541. &.urgent {
  542. color: $warning-color;
  543. font-weight: 500;
  544. }
  545. }
  546. }
  547. }
  548. // 高优先级需求
  549. .needs-section {
  550. padding-top: 12px;
  551. border-top: 1px solid $border-color;
  552. .needs-label {
  553. display: block;
  554. font-size: 13px;
  555. color: $text-light;
  556. margin-bottom: 8px;
  557. }
  558. .needs-list {
  559. margin: 0;
  560. padding: 0;
  561. list-style: none;
  562. li {
  563. display: flex;
  564. align-items: center;
  565. gap: 6px;
  566. font-size: 13px;
  567. color: $warning-color;
  568. margin-bottom: 4px;
  569. svg {
  570. flex-shrink: 0;
  571. color: $warning-color;
  572. }
  573. }
  574. }
  575. }
  576. }
  577. // 卡片底部
  578. .card-footer {
  579. display: flex;
  580. gap: 12px;
  581. margin-top: 16px;
  582. padding-top: 16px;
  583. border-top: 1px solid $border-color;
  584. .secondary-btn,
  585. .primary-btn {
  586. display: flex;
  587. align-items: center;
  588. gap: 6px;
  589. padding: 8px 16px;
  590. border: none;
  591. border-radius: 6px;
  592. font-size: 14px;
  593. font-weight: 500;
  594. cursor: pointer;
  595. transition: $transition;
  596. }
  597. .primary-btn {
  598. flex: 1;
  599. color: white;
  600. background-color: $primary-color;
  601. &:hover {
  602. background-color: #1565c0;
  603. }
  604. &:active {
  605. background-color: #0E42CB;
  606. }
  607. }
  608. .secondary-btn {
  609. flex: 1;
  610. color: $text-primary;
  611. background-color: $bg-light;
  612. &:hover {
  613. background-color: $border-color;
  614. }
  615. &:active {
  616. background-color: #D1D1D6;
  617. }
  618. }
  619. .card-action {
  620. justify-content: center;
  621. }
  622. }
  623. }
  624. }
  625. // 分页控件
  626. .pagination {
  627. display: flex;
  628. justify-content: center;
  629. align-items: center;
  630. gap: 8px;
  631. padding: 20px;
  632. background-color: $bg-white;
  633. border-radius: 8px;
  634. box-shadow: $box-shadow;
  635. .pagination-btn {
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. width: 36px;
  640. height: 36px;
  641. border: 1px solid $border-color;
  642. background-color: $bg-white;
  643. color: $text-secondary;
  644. border-radius: 4px;
  645. cursor: pointer;
  646. transition: $transition;
  647. font-size: 14px;
  648. font-weight: 500;
  649. &:hover:not(:disabled) {
  650. color: $primary-color;
  651. border-color: $primary-color;
  652. }
  653. &:active:not(:disabled):not(.active) {
  654. background-color: $primary-light;
  655. }
  656. &.active {
  657. color: white;
  658. background-color: $primary-color;
  659. border-color: $primary-color;
  660. }
  661. &.active:active {
  662. background-color: #0E42CB;
  663. }
  664. &:disabled {
  665. opacity: 0.5;
  666. cursor: not-allowed;
  667. }
  668. }
  669. .pagination-ellipsis {
  670. font-size: 14px;
  671. color: $text-light;
  672. padding: 0 8px;
  673. }
  674. }
  675. }
  676. // 响应式设计
  677. @media (max-width: 1200px) {
  678. .project-grid {
  679. grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  680. }
  681. }
  682. @media (max-width: 1024px) {
  683. .sidebar {
  684. width: 200px;
  685. }
  686. .project-content {
  687. padding: 16px;
  688. }
  689. .filter-toolbar {
  690. flex-wrap: wrap;
  691. }
  692. .page-header {
  693. flex-direction: column;
  694. align-items: flex-start !important;
  695. gap: 16px;
  696. }
  697. .header-actions {
  698. width: 100%;
  699. }
  700. .search-box {
  701. width: 100% !important;
  702. }
  703. }
  704. @media (max-width: 768px) {
  705. .top-navbar {
  706. padding: 0 16px;
  707. .navbar-right {
  708. gap: 8px;
  709. }
  710. .user-name {
  711. display: none;
  712. }
  713. }
  714. .sidebar {
  715. display: none;
  716. }
  717. .filter-toolbar {
  718. gap: 16px;
  719. padding: 12px 16px;
  720. .filter-group {
  721. flex: 1 1 calc(50% - 8px);
  722. }
  723. .filter-results {
  724. width: 100%;
  725. margin-left: 0;
  726. text-align: center;
  727. }
  728. }
  729. .project-grid {
  730. grid-template-columns: 1fr !important;
  731. gap: 16px !important;
  732. }
  733. .pagination {
  734. padding: 16px;
  735. }
  736. .pagination-btn {
  737. width: 32px !important;
  738. height: 32px !important;
  739. font-size: 13px !important;
  740. }
  741. }
  742. // 动画效果
  743. @keyframes fadeIn {
  744. from {
  745. opacity: 0;
  746. transform: translateY(10px);
  747. }
  748. to {
  749. opacity: 1;
  750. transform: translateY(0);
  751. }
  752. }
  753. .project-card {
  754. animation: fadeIn 0.4s ease-out;
  755. }
  756. .project-card:nth-child(2n) {
  757. animation-delay: 0.1s;
  758. }
  759. .project-card:nth-child(3n) {
  760. animation-delay: 0.2s;
  761. }
  762. .project-card:nth-child(4n) {
  763. animation-delay: 0.3s;
  764. }
  765. /* --- Kanban, toolbar, and modal styles (scoped to customer-service project list) --- */
  766. /* Header actions layout */
  767. .project-content .page-header .header-actions {
  768. display: flex;
  769. align-items: center;
  770. gap: 12px;
  771. }
  772. /* View toggle buttons */
  773. .project-content .page-header .header-actions .view-toggle {
  774. display: inline-flex;
  775. border: 1px solid $border-color;
  776. background-color: $bg-white;
  777. border-radius: 6px;
  778. overflow: hidden;
  779. }
  780. .project-content .page-header .header-actions .view-toggle button {
  781. padding: 8px 12px;
  782. border: none;
  783. background: transparent;
  784. color: $text-secondary;
  785. font-size: 14px;
  786. cursor: pointer;
  787. transition: $transition;
  788. }
  789. .project-content .page-header .header-actions .view-toggle button:hover:not(.active) {
  790. background-color: $bg-light;
  791. color: $text-primary;
  792. }
  793. .project-content .page-header .header-actions .view-toggle button.active {
  794. background-color: $primary-light;
  795. color: $primary-color;
  796. font-weight: 600;
  797. }
  798. /* Add project button */
  799. .project-content .page-header .header-actions .add-project-btn {
  800. display: inline-flex;
  801. align-items: center;
  802. gap: 6px;
  803. padding: 8px 12px;
  804. border: none;
  805. border-radius: 6px;
  806. color: #fff;
  807. background-color: $primary-color;
  808. cursor: pointer;
  809. transition: $transition;
  810. }
  811. .project-content .page-header .header-actions .add-project-btn:hover {
  812. background-color: #1565c0;
  813. }
  814. .project-content .page-header .header-actions .add-project-btn:active {
  815. background-color: #0E42CB;
  816. }
  817. /* Kanban layout */
  818. .project-content .kanban-container {
  819. background-color: transparent;
  820. width: 100%;
  821. overflow: hidden;
  822. }
  823. .project-content .kanban-scroll {
  824. overflow-x: auto;
  825. padding-bottom: 8px;
  826. width: 100%;
  827. }
  828. .project-content .kanban-header,
  829. .project-content .kanban-body {
  830. display: grid;
  831. grid-template-columns: repeat(4, 1fr); // 四列平均分布
  832. gap: 16px;
  833. width: 100%;
  834. min-width: 0; // 允许列收缩
  835. // 响应式设计
  836. @media (max-width: 1400px) {
  837. gap: 12px;
  838. }
  839. @media (max-width: 1200px) {
  840. grid-template-columns: repeat(2, 1fr); // 小屏幕显示2列
  841. }
  842. @media (max-width: 768px) {
  843. grid-template-columns: 1fr; // 移动端显示1列
  844. }
  845. }
  846. /* Column header */
  847. .project-content .kanban-header .kanban-column-header {
  848. display: flex;
  849. align-items: center;
  850. justify-content: space-between;
  851. padding: 12px;
  852. background-color: $bg-white;
  853. border: 1px solid $border-color;
  854. border-radius: 8px;
  855. box-shadow: $box-shadow;
  856. }
  857. .project-content .kanban-header .kanban-column-header .column-title {
  858. margin: 0;
  859. font-size: 14px;
  860. font-weight: 600;
  861. color: $text-primary;
  862. }
  863. .project-content .kanban-header .kanban-column-header .stage-count {
  864. font-size: 12px;
  865. color: $text-light;
  866. background-color: $bg-light;
  867. border-radius: 12px;
  868. padding: 2px 8px;
  869. }
  870. /* Column body */
  871. .project-content .kanban-body .kanban-column {
  872. min-height: 420px;
  873. max-height: calc(100vh - 300px); // 限制最大高度
  874. padding: 12px;
  875. background-color: $bg-white;
  876. border: 1px dashed $border-color;
  877. border-radius: 8px;
  878. box-shadow: $box-shadow;
  879. overflow-y: auto; // 内容超出时滚动
  880. overflow-x: hidden; // 禁止横向滚动
  881. min-width: 0; // 允许收缩
  882. // 自定义滚动条样式
  883. &::-webkit-scrollbar {
  884. width: 6px;
  885. }
  886. &::-webkit-scrollbar-track {
  887. background: transparent;
  888. }
  889. &::-webkit-scrollbar-thumb {
  890. background: rgba(0, 0, 0, 0.1);
  891. border-radius: 3px;
  892. &:hover {
  893. background: rgba(0, 0, 0, 0.2);
  894. }
  895. }
  896. }
  897. /* Card */
  898. .project-content .kanban-card {
  899. background-color: $bg-white;
  900. border: 1px solid rgba(0, 0, 0, 0.06);
  901. border-radius: 12px;
  902. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  903. padding: 18px;
  904. margin-bottom: 14px;
  905. cursor: pointer;
  906. transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  907. position: relative;
  908. overflow: hidden;
  909. // 卡片顶部装饰条
  910. &::before {
  911. content: '';
  912. position: absolute;
  913. top: 0;
  914. left: 0;
  915. right: 0;
  916. height: 3px;
  917. background: linear-gradient(90deg, $primary-color, lighten($primary-color, 15%));
  918. opacity: 0;
  919. transition: opacity 0.25s ease;
  920. }
  921. }
  922. .project-content .kanban-card:hover {
  923. transform: translateY(-4px);
  924. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  925. border-color: rgba($primary-color, 0.2);
  926. &::before {
  927. opacity: 1;
  928. }
  929. }
  930. .project-content .kanban-card:active {
  931. transform: translateY(-2px);
  932. }
  933. .project-content .kanban-card-header {
  934. display: flex;
  935. align-items: flex-start;
  936. justify-content: space-between;
  937. margin-bottom: 12px;
  938. gap: 8px;
  939. min-width: 0; // 允许收缩
  940. }
  941. .project-content .kanban-card-header .left {
  942. display: flex;
  943. flex-direction: column;
  944. gap: 4px;
  945. flex: 1;
  946. min-width: 0; // 允许收缩
  947. overflow: hidden;
  948. }
  949. .project-content .kanban-card-header .left .project-name {
  950. margin: 0;
  951. font-size: 15px;
  952. font-weight: 600;
  953. color: $text-primary;
  954. line-height: 1.4;
  955. letter-spacing: -0.01em;
  956. overflow: hidden;
  957. text-overflow: ellipsis;
  958. display: -webkit-box;
  959. -webkit-line-clamp: 2; // 最多显示2行
  960. line-clamp: 2; // 标准属性
  961. -webkit-box-orient: vertical;
  962. word-break: break-word;
  963. }
  964. .project-content .kanban-card-header .left .project-id {
  965. font-size: 11px;
  966. color: $text-light;
  967. font-weight: 500;
  968. white-space: nowrap;
  969. overflow: hidden;
  970. text-overflow: ellipsis;
  971. }
  972. .project-content .kanban-card-header .right {
  973. display: flex;
  974. align-items: center;
  975. gap: 6px;
  976. flex-shrink: 0; // 不收缩
  977. }
  978. /* Pending badge */
  979. .project-content .pending-badge {
  980. color: $warning-color;
  981. background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  982. border: 1px solid rgba($warning-color, 0.3);
  983. padding: 4px 10px;
  984. border-radius: 14px;
  985. font-size: 11px;
  986. font-weight: 600;
  987. letter-spacing: 0.02em;
  988. box-shadow: 0 2px 4px rgba($warning-color, 0.1);
  989. animation: pulse-badge 2s ease-in-out infinite;
  990. }
  991. @keyframes pulse-badge {
  992. 0%, 100% {
  993. box-shadow: 0 2px 4px rgba($warning-color, 0.1);
  994. }
  995. 50% {
  996. box-shadow: 0 2px 8px rgba($warning-color, 0.25);
  997. }
  998. }
  999. .project-content .kanban-card-content {
  1000. font-size: 13px;
  1001. color: $text-secondary;
  1002. min-width: 0; // 允许收缩
  1003. overflow: hidden;
  1004. // 确保所有子元素不溢出
  1005. > * {
  1006. min-width: 0;
  1007. overflow: hidden;
  1008. }
  1009. // 文本内容截断
  1010. p, div {
  1011. overflow: hidden;
  1012. text-overflow: ellipsis;
  1013. word-break: break-word;
  1014. }
  1015. }
  1016. .project-content .kanban-card-content .stage-badge {
  1017. padding: 2px 8px;
  1018. border-radius: 12px;
  1019. font-size: 12px;
  1020. }
  1021. .project-content .kanban-card-content .progress-line {
  1022. display: flex;
  1023. align-items: center;
  1024. gap: 8px;
  1025. }
  1026. .project-content .kanban-card-content .progress-line .progress-bar {
  1027. flex: 1;
  1028. height: 6px;
  1029. background-color: $bg-light;
  1030. border-radius: 3px;
  1031. overflow: hidden;
  1032. }
  1033. .project-content .kanban-card-content .progress-line .progress-fill {
  1034. height: 100%;
  1035. background-color: $primary-color;
  1036. }
  1037. .project-content .kanban-card-content .progress-line .progress-text {
  1038. font-size: 12px;
  1039. color: $text-secondary;
  1040. }
  1041. .project-content .kanban-card-footer {
  1042. display: flex;
  1043. justify-content: flex-end;
  1044. }
  1045. .project-content .kanban-card-footer .btn-link {
  1046. border: none;
  1047. background: none;
  1048. color: $primary-color;
  1049. cursor: pointer;
  1050. padding: 6px 8px;
  1051. }
  1052. .project-content .kanban-card-footer .btn-link:hover {
  1053. text-decoration: underline;
  1054. }
  1055. /* Modal */
  1056. .modal-backdrop {
  1057. position: fixed;
  1058. inset: 0;
  1059. background: rgba(0, 0, 0, 0.4);
  1060. z-index: 1000;
  1061. }
  1062. .modal {
  1063. position: fixed;
  1064. top: 50%;
  1065. left: 50%;
  1066. transform: translate(-50%, -50%);
  1067. width: 480px;
  1068. max-width: 90vw;
  1069. background: $bg-white;
  1070. border-radius: 8px;
  1071. box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  1072. z-index: 1001;
  1073. overflow: hidden;
  1074. }
  1075. .modal .modal-header {
  1076. display: flex;
  1077. align-items: center;
  1078. justify-content: space-between;
  1079. padding: 12px 16px;
  1080. border-bottom: 1px solid $border-color;
  1081. }
  1082. .modal .modal-header h3 {
  1083. margin: 0;
  1084. font-size: 18px;
  1085. color: $text-primary;
  1086. }
  1087. .modal .modal-header .close-btn {
  1088. border: none;
  1089. background: none;
  1090. font-size: 16px;
  1091. color: $text-secondary;
  1092. cursor: pointer;
  1093. }
  1094. .modal .modal-header .close-btn:hover {
  1095. color: $text-primary;
  1096. }
  1097. .modal .modal-body {
  1098. padding: 16px;
  1099. }
  1100. .modal .modal-body .form-item {
  1101. margin-bottom: 12px;
  1102. }
  1103. .modal .modal-body .form-item label {
  1104. display: block;
  1105. font-size: 13px;
  1106. color: $text-secondary;
  1107. margin-bottom: 6px;
  1108. }
  1109. .modal .modal-body .form-item input,
  1110. .modal .modal-body .form-item textarea {
  1111. width: 100%;
  1112. border: 1px solid $border-color;
  1113. border-radius: 6px;
  1114. padding: 8px 10px;
  1115. font-size: 14px;
  1116. background: $bg-white;
  1117. outline: none;
  1118. }
  1119. .modal .modal-body .form-item input:focus,
  1120. .modal .modal-body .form-item textarea:focus {
  1121. border-color: $primary-color;
  1122. box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  1123. }
  1124. .modal .modal-body .tip {
  1125. font-size: 12px;
  1126. color: $text-light;
  1127. margin-top: 8px;
  1128. }
  1129. .modal .modal-footer {
  1130. display: flex;
  1131. align-items: center;
  1132. justify-content: flex-end;
  1133. gap: 12px;
  1134. padding: 12px 16px;
  1135. border-top: 1px solid $border-color;
  1136. }
  1137. .modal .modal-footer .btn-secondary,
  1138. .modal .modal-footer .btn-primary {
  1139. border: none;
  1140. border-radius: 6px;
  1141. padding: 8px 16px;
  1142. font-size: 14px;
  1143. cursor: pointer;
  1144. }
  1145. .modal .modal-footer .btn-secondary {
  1146. background: $bg-light;
  1147. color: $text-primary;
  1148. }
  1149. .modal .modal-footer .btn-secondary:hover {
  1150. background: $border-color;
  1151. }
  1152. .modal .modal-footer .btn-primary {
  1153. background: $primary-color;
  1154. color: #fff;
  1155. }
  1156. .modal .modal-footer .btn-primary:hover {
  1157. background: #1565c0;
  1158. }
  1159. .modal .modal-footer .btn-primary:active {
  1160. background: #0E42CB;
  1161. }
  1162. // 监控大盘视图样式
  1163. .dashboard-container {
  1164. width: 100%;
  1165. height: 100%;
  1166. min-height: 800px;
  1167. border: none;
  1168. iframe {
  1169. width: 100%;
  1170. height: 100%;
  1171. min-height: 800px;
  1172. border: none;
  1173. border-radius: 8px;
  1174. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  1175. }
  1176. }
  1177. // 视图切换按钮样式优化
  1178. .view-toggle-buttons {
  1179. .btn-view-toggle {
  1180. &.active {
  1181. background-color: $primary-color;
  1182. color: white;
  1183. // 监控大盘按钮特殊样式
  1184. &[data-view="dashboard"] {
  1185. background-color: #9c27b0; // 紫色主题色
  1186. border-color: #9c27b0;
  1187. &:hover {
  1188. background-color: #7b1fa2;
  1189. border-color: #7b1fa2;
  1190. }
  1191. }
  1192. }
  1193. }
  1194. }