project-management.scss 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. // 全局变量定义
  2. $primary-color: #165DFF;
  3. $secondary-color: #6B7280;
  4. $success-color: #00B42A;
  5. $warning-color: #FFAA00;
  6. $error-color: #F53F3F;
  7. $text-primary: #333333;
  8. $text-secondary: #666666;
  9. $text-tertiary: #999999;
  10. $border-color: #E5E7EB;
  11. $bg-light: #F9FAFB;
  12. $bg-white: #FFFFFF;
  13. $shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  14. $shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  15. $shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  16. // 主容器
  17. .project-management {
  18. padding: 24px;
  19. min-height: 100vh;
  20. background-color: $bg-light;
  21. }
  22. // 页面标题区域
  23. .page-header {
  24. display: flex;
  25. justify-content: space-between;
  26. align-items: center;
  27. margin-bottom: 24px;
  28. padding-bottom: 16px;
  29. border-bottom: 1px solid $border-color;
  30. .header-left {
  31. .page-title {
  32. font-size: 24px;
  33. font-weight: 600;
  34. color: $text-primary;
  35. margin: 0 0 4px 0;
  36. }
  37. .page-description {
  38. font-size: 14px;
  39. color: $text-tertiary;
  40. margin: 0;
  41. }
  42. }
  43. .header-right {
  44. .create-btn {
  45. display: flex;
  46. align-items: center;
  47. gap: 8px;
  48. background-color: $primary-color;
  49. color: $bg-white;
  50. border-radius: 8px;
  51. padding: 8px 16px;
  52. font-size: 14px;
  53. font-weight: 500;
  54. transition: all 0.2s ease;
  55. box-shadow: $shadow-sm;
  56. &:hover {
  57. background-color: #0E4BD8;
  58. box-shadow: $shadow-md;
  59. transform: translateY(-1px);
  60. }
  61. }
  62. }
  63. }
  64. // 搜索和筛选区域
  65. .search-filter-section {
  66. display: flex;
  67. gap: 16px;
  68. margin-bottom: 24px;
  69. flex-wrap: wrap;
  70. .search-input-wrapper {
  71. flex: 1;
  72. min-width: 300px;
  73. position: relative;
  74. display: flex;
  75. align-items: center;
  76. .search-icon {
  77. position: absolute;
  78. left: 12px;
  79. color: $text-tertiary;
  80. z-index: 1;
  81. }
  82. .search-input {
  83. width: 100%;
  84. padding: 10px 12px 10px 40px;
  85. border: 1px solid $border-color;
  86. border-radius: 8px;
  87. font-size: 14px;
  88. color: $text-primary;
  89. background-color: $bg-white;
  90. transition: all 0.2s ease;
  91. box-shadow: $shadow-sm;
  92. &:focus {
  93. outline: none;
  94. border-color: $primary-color;
  95. box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
  96. }
  97. &::placeholder {
  98. color: $text-tertiary;
  99. }
  100. }
  101. .clear-search-btn {
  102. position: absolute;
  103. right: 8px;
  104. color: $text-tertiary;
  105. padding: 4px;
  106. }
  107. }
  108. .filter-controls {
  109. display: flex;
  110. gap: 12px;
  111. align-items: center;
  112. .status-filter-wrapper {
  113. .status-filter {
  114. min-width: 160px;
  115. border: 1px solid $border-color;
  116. border-radius: 8px;
  117. background-color: $bg-white;
  118. box-shadow: $shadow-sm;
  119. .mat-select-trigger {
  120. height: 40px;
  121. font-size: 14px;
  122. color: $text-primary;
  123. }
  124. }
  125. }
  126. .filter-btn {
  127. display: flex;
  128. align-items: center;
  129. gap: 6px;
  130. color: $primary-color;
  131. border: 1px solid $primary-color;
  132. border-radius: 8px;
  133. padding: 8px 16px;
  134. font-size: 14px;
  135. font-weight: 500;
  136. background-color: $bg-white;
  137. transition: all 0.2s ease;
  138. &:hover {
  139. background-color: $primary-color;
  140. color: $bg-white;
  141. }
  142. }
  143. }
  144. }
  145. // 统计卡片区域
  146. .stats-cards {
  147. display: grid;
  148. grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  149. gap: 16px;
  150. margin-bottom: 24px;
  151. .stat-card {
  152. background-color: $bg-white;
  153. border-radius: 12px;
  154. padding: 20px;
  155. box-shadow: $shadow-sm;
  156. text-align: center;
  157. transition: all 0.2s ease;
  158. &:hover {
  159. box-shadow: $shadow-md;
  160. transform: translateY(-2px);
  161. }
  162. .stat-value {
  163. font-size: 28px;
  164. font-weight: 700;
  165. color: $text-primary;
  166. margin-bottom: 4px;
  167. }
  168. .stat-label {
  169. font-size: 14px;
  170. color: $text-tertiary;
  171. }
  172. }
  173. }
  174. // 项目表格容器
  175. .project-table-container {
  176. background-color: $bg-white;
  177. border-radius: 12px;
  178. box-shadow: $shadow-sm;
  179. overflow: hidden;
  180. margin-bottom: 24px;
  181. .project-table {
  182. width: 100%;
  183. border-collapse: collapse;
  184. .table-header {
  185. background-color: $bg-light;
  186. font-weight: 600;
  187. color: $text-secondary;
  188. font-size: 13px;
  189. text-align: left;
  190. padding: 16px 20px;
  191. border-bottom: 1px solid $border-color;
  192. cursor: pointer;
  193. transition: background-color 0.2s ease;
  194. &:hover {
  195. background-color: #F3F4F6;
  196. }
  197. .header-content {
  198. display: flex;
  199. align-items: center;
  200. justify-content: space-between;
  201. }
  202. .sort-icon {
  203. opacity: 0.5;
  204. }
  205. }
  206. .table-cell {
  207. padding: 16px 20px;
  208. border-bottom: 1px solid $border-color;
  209. font-size: 14px;
  210. color: $text-primary;
  211. vertical-align: middle;
  212. &:last-child {
  213. text-align: right;
  214. }
  215. .project-name {
  216. a {
  217. color: $primary-color;
  218. text-decoration: none;
  219. font-weight: 500;
  220. transition: color 0.2s ease;
  221. &:hover {
  222. color: #0E4BD8;
  223. text-decoration: underline;
  224. }
  225. }
  226. }
  227. .status-badge {
  228. display: inline-block;
  229. padding: 4px 12px;
  230. border-radius: 16px;
  231. font-size: 12px;
  232. font-weight: 500;
  233. color: $bg-white;
  234. text-align: center;
  235. }
  236. .progress-container {
  237. display: flex;
  238. align-items: center;
  239. gap: 12px;
  240. .progress-bar {
  241. flex: 1;
  242. height: 8px;
  243. border-radius: 4px;
  244. background-color: $border-color;
  245. overflow: hidden;
  246. position: relative;
  247. &::before {
  248. content: '';
  249. position: absolute;
  250. top: 0;
  251. left: 0;
  252. height: 100%;
  253. border-radius: 4px;
  254. transition: width 0.3s ease;
  255. }
  256. }
  257. .progress-text {
  258. min-width: 40px;
  259. font-size: 13px;
  260. color: $text-secondary;
  261. font-weight: 500;
  262. }
  263. }
  264. .action-buttons {
  265. display: flex;
  266. gap: 8px;
  267. justify-content: flex-end;
  268. .action-btn {
  269. width: 36px;
  270. height: 36px;
  271. border-radius: 6px;
  272. display: flex;
  273. align-items: center;
  274. justify-content: center;
  275. transition: all 0.2s ease;
  276. background-color: transparent;
  277. border: 1px solid $border-color;
  278. color: $text-secondary;
  279. &:hover {
  280. border-color: currentColor;
  281. transform: translateY(-1px);
  282. }
  283. &.mat-primary {
  284. color: $primary-color;
  285. }
  286. &.mat-accent {
  287. color: $warning-color;
  288. }
  289. &.mat-warn {
  290. color: $error-color;
  291. }
  292. }
  293. }
  294. }
  295. tr:last-child .table-cell {
  296. border-bottom: none;
  297. }
  298. tr:hover .table-cell {
  299. background-color: $bg-light;
  300. }
  301. }
  302. // 空状态
  303. .empty-state {
  304. display: flex;
  305. flex-direction: column;
  306. align-items: center;
  307. justify-content: center;
  308. padding: 60px 20px;
  309. text-align: center;
  310. svg {
  311. margin-bottom: 16px;
  312. opacity: 0.5;
  313. }
  314. p {
  315. font-size: 16px;
  316. color: $text-tertiary;
  317. margin-bottom: 24px;
  318. }
  319. button {
  320. border-radius: 8px;
  321. padding: 8px 24px;
  322. font-size: 14px;
  323. font-weight: 500;
  324. }
  325. }
  326. }
  327. // 分页控件
  328. .pagination-controls {
  329. display: flex;
  330. justify-content: space-between;
  331. align-items: center;
  332. padding: 16px 20px;
  333. background-color: $bg-white;
  334. border-radius: 12px;
  335. box-shadow: $shadow-sm;
  336. .pagination-info {
  337. font-size: 14px;
  338. color: $text-tertiary;
  339. }
  340. .pagination-buttons {
  341. display: flex;
  342. align-items: center;
  343. gap: 8px;
  344. button {
  345. padding: 6px 12px;
  346. border-radius: 6px;
  347. font-size: 13px;
  348. font-weight: 500;
  349. transition: all 0.2s ease;
  350. min-width: auto;
  351. &:disabled {
  352. opacity: 0.5;
  353. cursor: not-allowed;
  354. }
  355. &.active {
  356. background-color: $primary-color;
  357. color: $bg-white;
  358. }
  359. }
  360. .page-numbers {
  361. display: flex;
  362. gap: 4px;
  363. }
  364. }
  365. }
  366. // 响应式设计
  367. @media (max-width: 1200px) {
  368. .project-table {
  369. .table-header,
  370. .table-cell {
  371. padding: 12px 16px;
  372. }
  373. }
  374. }
  375. @media (max-width: 992px) {
  376. .project-management {
  377. padding: 16px;
  378. }
  379. .stats-cards {
  380. grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  381. }
  382. .search-filter-section {
  383. flex-direction: column;
  384. gap: 12px;
  385. }
  386. .search-input-wrapper {
  387. min-width: 100% !important;
  388. }
  389. .pagination-controls {
  390. flex-direction: column;
  391. gap: 16px;
  392. .pagination-buttons {
  393. flex-wrap: wrap;
  394. justify-content: center;
  395. }
  396. }
  397. }
  398. @media (max-width: 768px) {
  399. .page-header {
  400. flex-direction: column;
  401. gap: 16px;
  402. align-items: flex-start;
  403. }
  404. .stats-cards {
  405. grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  406. gap: 12px;
  407. }
  408. .stat-card {
  409. padding: 16px;
  410. .stat-value {
  411. font-size: 24px;
  412. }
  413. }
  414. .project-table-container {
  415. overflow-x: auto;
  416. }
  417. }
  418. @media (max-width: 480px) {
  419. .project-management {
  420. padding: 12px;
  421. }
  422. .stats-cards {
  423. grid-template-columns: 1fr 1fr;
  424. }
  425. }