team-assign.component.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /* 设计师分配组件样式(复用 StageOrder 风格) */
  2. .card{
  3. background: var(--white);
  4. border-radius: 12px;
  5. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  6. padding: 15px;
  7. }
  8. .add-designer-section {
  9. margin-bottom: 24px;
  10. .btn {
  11. display: inline-flex;
  12. align-items: center;
  13. gap: 8px;
  14. padding: 12px 24px;
  15. border: none;
  16. border-radius: 8px;
  17. font-size: 14px;
  18. font-weight: 500;
  19. cursor: pointer;
  20. transition: all 0.2s ease;
  21. .icon {
  22. width: 18px;
  23. height: 18px;
  24. }
  25. &.btn-primary {
  26. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  27. color: white;
  28. &:hover {
  29. transform: translateY(-1px);
  30. box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  31. }
  32. &:active {
  33. transform: translateY(0);
  34. }
  35. }
  36. }
  37. }
  38. .empty-state {
  39. text-align: center;
  40. padding: 48px 24px;
  41. color: #6b7280;
  42. .empty-icon {
  43. width: 64px;
  44. height: 64px;
  45. margin: 0 auto 16px;
  46. color: #d1d5db;
  47. }
  48. p {
  49. margin: 8px 0;
  50. font-size: 16px;
  51. font-weight: 500;
  52. color: #374151;
  53. &.empty-hint {
  54. font-size: 14px;
  55. font-weight: 400;
  56. color: #9ca3af;
  57. }
  58. }
  59. }
  60. .btn-icon {
  61. width: 32px;
  62. height: 32px;
  63. padding: 0;
  64. border: none;
  65. background: #fee2e2;
  66. border-radius: 6px;
  67. cursor: pointer;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. transition: all 0.2s ease;
  72. .icon {
  73. width: 18px;
  74. height: 18px;
  75. color: #dc2626;
  76. }
  77. &:hover {
  78. background: #fecaca;
  79. }
  80. }
  81. .designer-card {
  82. .section-title {
  83. font-size: 15px;
  84. font-weight: 600;
  85. color: var(--dark-color);
  86. margin: 0 0 12px;
  87. &:not(:first-child) {
  88. margin-top: 24px;
  89. }
  90. }
  91. .loading-spinner {
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. gap: 12px;
  96. padding: 40px 20px;
  97. .spinner-sm {
  98. width: 24px;
  99. height: 24px;
  100. border: 3px solid var(--light-shade);
  101. border-top-color: var(--primary-color);
  102. border-radius: 50%;
  103. animation: spin 0.8s linear infinite;
  104. }
  105. p {
  106. margin: 0;
  107. font-size: 14px;
  108. color: var(--medium-color);
  109. }
  110. }
  111. /* 已分配组员列表(基础样式) */
  112. .assigned-teams-section {
  113. margin-bottom: 24px;
  114. .team-list {
  115. display: grid;
  116. grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  117. gap: 12px;
  118. }
  119. .team-item {
  120. display: flex;
  121. align-items: center;
  122. justify-content: space-between;
  123. padding: 12px;
  124. border: 2px solid var(--light-shade);
  125. border-radius: 8px;
  126. background: var(--white);
  127. transition: all 0.2s;
  128. &.clickable {
  129. cursor: pointer;
  130. &:hover {
  131. border-color: rgba(var(--primary-rgb), 0.3);
  132. background: rgba(var(--primary-rgb), 0.03);
  133. }
  134. }
  135. .team-member {
  136. display: flex;
  137. align-items: center;
  138. gap: 12px;
  139. .member-avatar {
  140. width: 32px;
  141. height: 32px;
  142. border-radius: 50%;
  143. overflow: hidden;
  144. background: var(--light-shade);
  145. display: flex;
  146. align-items: center;
  147. justify-content: center;
  148. img {
  149. width: 100%;
  150. height: 100%;
  151. object-fit: cover;
  152. }
  153. .avatar-icon {
  154. width: 32px;
  155. height: 32px;
  156. color: var(--primary-color);
  157. }
  158. }
  159. .member-info {
  160. flex: 1;
  161. min-width: 0;
  162. h5 {
  163. margin: 0 0 6px;
  164. font-size: 16px;
  165. font-weight: 700;
  166. color: var(--dark-color);
  167. white-space: nowrap;
  168. overflow: hidden;
  169. text-overflow: ellipsis;
  170. }
  171. .member-spaces {
  172. margin: 0;
  173. font-size: 13px;
  174. color: var(--primary-color);
  175. font-weight: 500;
  176. display: flex;
  177. align-items: center;
  178. gap: 4px;
  179. &::before {
  180. content: '📦';
  181. font-size: 14px;
  182. }
  183. }
  184. }
  185. }
  186. .edit-icon {
  187. width: 20px;
  188. height: 20px;
  189. color: var(--medium-color);
  190. }
  191. }
  192. }
  193. /* 项目组选择 */
  194. .department-section {
  195. margin-bottom: 24px;
  196. .department-grid {
  197. display: grid;
  198. grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  199. gap: 12px;
  200. }
  201. .department-item {
  202. position: relative;
  203. padding: 14px;
  204. border: 2px solid var(--light-shade);
  205. border-radius: 8px;
  206. background: var(--white);
  207. cursor: pointer;
  208. transition: all 0.3s;
  209. &:hover {
  210. border-color: rgba(var(--primary-rgb), 0.3);
  211. background: rgba(var(--primary-rgb), 0.03);
  212. }
  213. &.selected {
  214. border-color: var(--primary-color);
  215. background: rgba(var(--primary-rgb), 0.08);
  216. box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
  217. .selected-icon {
  218. color: var(--primary-color);
  219. }
  220. }
  221. h5 {
  222. margin: 0 0 6px;
  223. font-size: 16px;
  224. font-weight: 700;
  225. color: var(--dark-color);
  226. }
  227. p {
  228. margin: 0;
  229. font-size: 12px;
  230. color: var(--medium-color);
  231. }
  232. .selected-icon {
  233. position: absolute;
  234. top: 8px;
  235. right: 8px;
  236. width: 20px;
  237. height: 20px;
  238. color: var(--primary-color);
  239. }
  240. }
  241. }
  242. /* 组员选择 */
  243. .designer-section {
  244. .designer-grid {
  245. display: grid;
  246. grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  247. gap: 12px;
  248. }
  249. .designer-item {
  250. position: relative;
  251. display: flex;
  252. align-items: center;
  253. gap: 12px;
  254. padding: 12px;
  255. border: 2px solid var(--light-shade);
  256. border-radius: 8px;
  257. background: var(--white);
  258. cursor: pointer;
  259. transition: all 0.3s;
  260. &:hover {
  261. background-color: var(--light-shade);
  262. transform: translateX(2px);
  263. }
  264. &.selected {
  265. border-color: var(--primary-color);
  266. background: rgba(var(--primary-rgb), 0.08);
  267. box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
  268. .designer-info h4 {
  269. color: var(--primary-color);
  270. }
  271. }
  272. .designer-avatar {
  273. width: 48px;
  274. height: 48px;
  275. border-radius: 50%;
  276. overflow: hidden;
  277. background: var(--light-shade);
  278. display: flex;
  279. align-items: center;
  280. justify-content: center;
  281. img {
  282. width: 100%;
  283. height: 100%;
  284. object-fit: cover;
  285. }
  286. .avatar-icon {
  287. width: 48px;
  288. height: 48px;
  289. color: var(--medium-color);
  290. }
  291. }
  292. .designer-info {
  293. flex: 1;
  294. min-width: 0;
  295. h4 {
  296. margin: 0 0 4px;
  297. font-size: 15px;
  298. font-weight: 600;
  299. color: var(--dark-color);
  300. white-space: nowrap;
  301. overflow: hidden;
  302. text-overflow: ellipsis;
  303. transition: color 0.3s;
  304. }
  305. p {
  306. margin: 0;
  307. font-size: 12px;
  308. color: var(--medium-color);
  309. }
  310. }
  311. .selected-icon {
  312. position: absolute;
  313. top: 8px;
  314. right: 8px;
  315. width: 20px;
  316. height: 20px;
  317. color: var(--primary-color);
  318. }
  319. }
  320. }
  321. }
  322. /* 模态框样式 */
  323. .modal-overlay {
  324. position: fixed;
  325. top: 0;
  326. left: 0;
  327. right: 0;
  328. bottom: 0;
  329. background: rgba(0, 0, 0, 0.5);
  330. display: flex;
  331. align-items: center;
  332. justify-content: center;
  333. z-index: 10000;
  334. animation: fadeIn 0.2s ease-out;
  335. }
  336. @keyframes fadeIn {
  337. from { opacity: 0; }
  338. to { opacity: 1; }
  339. }
  340. .modal-dialog {
  341. background: var(--white);
  342. border-radius: 12px;
  343. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  344. width: 90%;
  345. max-width: 500px;
  346. max-height: 90vh;
  347. overflow: hidden;
  348. display: flex;
  349. flex-direction: column;
  350. animation: slideUp 0.3s ease-out;
  351. }
  352. @keyframes slideUp {
  353. from { opacity: 0; transform: translateY(20px); }
  354. to { opacity: 1; transform: translateY(0); }
  355. }
  356. .modal-header {
  357. display: flex;
  358. align-items: center;
  359. justify-content: space-between;
  360. padding: 20px 24px;
  361. .modal-title {
  362. margin: 0;
  363. font-size: 20px;
  364. font-weight: 600;
  365. color: var(--dark-color);
  366. }
  367. .modal-close {
  368. background: none;
  369. border: none;
  370. cursor: pointer;
  371. padding: 4px;
  372. width: 32px;
  373. height: 32px;
  374. display: flex;
  375. align-items: center;
  376. justify-content: center;
  377. border-radius: 4px;
  378. transition: all 0.2s;
  379. .icon {
  380. width: 20px;
  381. height: 20px;
  382. color: var(--medium-color);
  383. }
  384. &:hover {
  385. background: var(--light-color);
  386. .icon { color: var(--dark-color); }
  387. }
  388. }
  389. }
  390. .modal-content {
  391. flex: 1;
  392. overflow-y: auto;
  393. padding: 24px;
  394. .designer-preview {
  395. display: flex;
  396. flex-direction: column;
  397. align-items: center;
  398. gap: 12px;
  399. padding: 20px;
  400. background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.02) 100%);
  401. border-radius: 10px;
  402. margin-bottom: 24px;
  403. .designer-avatar {
  404. width: 64px;
  405. height: 64px;
  406. border-radius: 50%;
  407. overflow: hidden;
  408. background: var(--white);
  409. border: 3px solid var(--primary-color);
  410. display: flex;
  411. align-items: center;
  412. justify-content: center;
  413. box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
  414. img { width: 100%; height: 100%; object-fit: cover; }
  415. .avatar-icon { width: 36px; height: 36px; }
  416. }
  417. .designer-name {
  418. font-size: 18px;
  419. font-weight: 600;
  420. color: var(--dark-color);
  421. }
  422. }
  423. .space-selection-section {
  424. .form-label {
  425. display: block;
  426. font-weight: 500;
  427. color: var(--dark-color);
  428. margin-bottom: 8px;
  429. font-size: 14px;
  430. .required { color: var(--danger-color); margin-left: 4px; }
  431. }
  432. .form-help {
  433. margin: 0 0 12px;
  434. font-size: 13px;
  435. color: var(--medium-color);
  436. }
  437. .space-checkbox-list {
  438. display: flex;
  439. flex-direction: column;
  440. gap: 10px;
  441. .space-checkbox-item {
  442. display: flex;
  443. align-items: center;
  444. gap: 12px;
  445. padding: 12px 16px;
  446. background: var(--light-color);
  447. border: 2px solid transparent;
  448. border-radius: 8px;
  449. cursor: pointer;
  450. transition: all 0.3s;
  451. user-select: none;
  452. &:hover {
  453. background: var(--light-shade);
  454. border-color: rgba(var(--primary-rgb), 0.3);
  455. }
  456. input[type="checkbox"] {
  457. position: absolute;
  458. opacity: 0;
  459. cursor: pointer;
  460. width: 0;
  461. height: 0;
  462. &:checked + .checkbox-custom {
  463. background-color: var(--primary-color);
  464. border-color: var(--primary-color);
  465. &::after { display: block; }
  466. }
  467. &:checked ~ .space-name { font-weight: 600; }
  468. }
  469. .checkbox-custom {
  470. position: relative;
  471. height: 20px;
  472. width: 20px;
  473. background-color: var(--white);
  474. border: 2px solid var(--medium-color);
  475. border-radius: 4px;
  476. transition: all 0.3s;
  477. display: flex;
  478. align-items: center;
  479. justify-content: center;
  480. flex-shrink: 0;
  481. &::after {
  482. content: '';
  483. display: none;
  484. width: 5px;
  485. height: 10px;
  486. border: solid white;
  487. border-width: 0 2px 2px 0;
  488. transform: rotate(45deg);
  489. }
  490. }
  491. .space-name {
  492. flex: 1;
  493. font-size: 14px;
  494. color: var(--dark-color);
  495. transition: all 0.3s;
  496. }
  497. }
  498. }
  499. }
  500. }
  501. .modal-footer {
  502. display: flex;
  503. align-items: center;
  504. justify-content: flex-end;
  505. gap: 12px;
  506. padding: 16px 24px;
  507. border-top: 1px solid var(--light-shade);
  508. .btn {
  509. padding: 10px 20px;
  510. border-radius: 8px;
  511. font-size: 14px;
  512. font-weight: 600;
  513. cursor: pointer;
  514. transition: all 0.3s;
  515. border: none;
  516. outline: none;
  517. display: flex;
  518. align-items: center;
  519. justify-content: center;
  520. gap: 8px;
  521. &.btn-outline {
  522. background: white;
  523. color: var(--dark-color);
  524. border: 2px solid var(--light-shade);
  525. }
  526. &.btn-primary {
  527. background: var(--primary-color);
  528. color: white;
  529. }
  530. &.btn-danger {
  531. background: #e53e3e;
  532. color: white;
  533. }
  534. &:disabled { opacity: 0.5; cursor: not-allowed; }
  535. }
  536. }