knowledge-base.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. @use '../ios-theme.scss' as *;
  2. .knowledge-base-main {
  3. padding: $ios-spacing-xl;
  4. background-color: $ios-background;
  5. min-height: calc(100vh - 60px);
  6. }
  7. /* 通用样式 */
  8. .section-header {
  9. display: flex;
  10. justify-content: space-between;
  11. align-items: center;
  12. margin-bottom: 20px;
  13. padding-bottom: 10px;
  14. border-bottom: 1px solid $ios-border;
  15. h2 {
  16. font-size: 20px;
  17. font-weight: 600;
  18. color: $ios-text-primary;
  19. }
  20. .search-filter {
  21. display: flex;
  22. gap: 10px;
  23. input[type="text"], select {
  24. padding: 8px 12px;
  25. border: 1px solid $ios-border;
  26. border-radius: $ios-radius-lg;
  27. font-size: 14px;
  28. background-color: $ios-background;
  29. color: $ios-text-primary;
  30. &:focus {
  31. outline: none;
  32. border-color: $ios-primary;
  33. box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.1);
  34. }
  35. }
  36. }
  37. }
  38. /* 按钮样式 */
  39. .btn-add, .btn-export, .btn-edit, .btn-play, .btn-assign, .btn-preview, .btn-view, .btn-extend, .btn-sync, .btn-create, .btn-generate {
  40. padding: 8px 16px;
  41. border: none;
  42. border-radius: $ios-radius-lg;
  43. font-size: 14px;
  44. font-weight: 500;
  45. cursor: pointer;
  46. transition: all 0.2s;
  47. &:hover {
  48. opacity: 0.9;
  49. transform: translateY(-1px);
  50. }
  51. &:disabled {
  52. opacity: 0.5;
  53. cursor: not-allowed;
  54. transform: none;
  55. }
  56. }
  57. .btn-add, .btn-create {
  58. background-color: $ios-primary;
  59. color: $ios-background;
  60. }
  61. .btn-export, .btn-sync {
  62. background-color: $ios-info;
  63. color: $ios-background;
  64. }
  65. .btn-edit {
  66. background-color: $ios-warning;
  67. color: $ios-background;
  68. }
  69. .btn-play {
  70. background-color: $ios-success;
  71. color: $ios-background;
  72. }
  73. .btn-assign, .btn-preview, .btn-view, .btn-extend, .btn-generate {
  74. background-color: $ios-background-secondary;
  75. color: $ios-text-primary;
  76. &:hover {
  77. background-color: $ios-background-tertiary;
  78. }
  79. }
  80. /* SOP管理样式 */
  81. .sop-tabs {
  82. background-color: $ios-background;
  83. border-radius: $ios-radius-lg;
  84. overflow: hidden;
  85. box-shadow: $ios-shadow-sm;
  86. .tab-buttons {
  87. display: flex;
  88. background-color: $ios-background-secondary;
  89. button {
  90. flex: 1;
  91. padding: $ios-spacing-lg $ios-spacing-xl;
  92. border: none;
  93. background-color: transparent;
  94. font-size: $ios-font-size-base;
  95. font-weight: $ios-font-weight-medium;
  96. color: $ios-text-secondary;
  97. cursor: pointer;
  98. transition: all 0.2s;
  99. &.active {
  100. background-color: $ios-background;
  101. color: $ios-primary;
  102. box-shadow: inset 0 -2px 0 $ios-primary;
  103. }
  104. &:hover:not(.active) {
  105. background-color: rgba(255, 255, 255, 0.5);
  106. }
  107. }
  108. }
  109. .tab-content {
  110. padding: $ios-spacing-xl;
  111. }
  112. }
  113. .sop-overview {
  114. .sop-summary {
  115. margin-bottom: $ios-spacing-xl;
  116. p {
  117. color: $ios-text-secondary;
  118. margin: 10px 0 20px 0;
  119. }
  120. }
  121. .sop-stages {
  122. display: grid;
  123. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  124. gap: 15px;
  125. .stage-item {
  126. padding: $ios-spacing-xl;
  127. background-color: $ios-background-secondary;
  128. border-radius: $ios-radius-lg;
  129. text-align: center;
  130. cursor: pointer;
  131. transition: all 0.2s;
  132. &:hover {
  133. background-color: $ios-primary-light;
  134. transform: translateY(-2px);
  135. box-shadow: $ios-shadow-md;
  136. }
  137. .stage-icon {
  138. display: inline-flex;
  139. justify-content: center;
  140. align-items: center;
  141. width: 40px;
  142. height: 40px;
  143. background-color: $ios-primary;
  144. color: $ios-background;
  145. border-radius: 50%;
  146. font-weight: $ios-font-weight-semibold;
  147. margin-bottom: 10px;
  148. }
  149. h4 {
  150. margin: 5px 0;
  151. color: $ios-text-primary;
  152. }
  153. p {
  154. color: $ios-text-secondary;
  155. font-size: 13px;
  156. margin: 0;
  157. }
  158. }
  159. }
  160. }
  161. .sop-detail {
  162. .sop-header {
  163. display: flex;
  164. justify-content: space-between;
  165. align-items: center;
  166. margin-bottom: $ios-spacing-xl;
  167. h3 {
  168. font-size: 18px;
  169. color: $ios-text-primary;
  170. }
  171. .sop-actions {
  172. display: flex;
  173. gap: 10px;
  174. }
  175. }
  176. .sop-content {
  177. .sop-section {
  178. margin-bottom: 25px;
  179. h4 {
  180. font-size: 16px;
  181. margin-bottom: 15px;
  182. color: $ios-text-primary;
  183. padding-bottom: 8px;
  184. border-bottom: 1px solid $ios-border;
  185. }
  186. .requirement-list {
  187. list-style: none;
  188. padding: 0;
  189. margin: 0;
  190. li {
  191. padding: 8px 0;
  192. padding-left: 24px;
  193. position: relative;
  194. color: $ios-text-primary;
  195. &::before {
  196. content: "•";
  197. position: absolute;
  198. left: 0;
  199. color: $ios-primary;
  200. font-weight: bold;
  201. }
  202. }
  203. }
  204. .timeline {
  205. position: relative;
  206. padding-left: 24px;
  207. &::before {
  208. content: '';
  209. position: absolute;
  210. left: 8px;
  211. top: 0;
  212. bottom: 0;
  213. width: 2px;
  214. background-color: $ios-border;
  215. }
  216. .timeline-item {
  217. position: relative;
  218. padding-bottom: 15px;
  219. &::before {
  220. content: '';
  221. position: absolute;
  222. left: -24px;
  223. top: 4px;
  224. width: 12px;
  225. height: 12px;
  226. border-radius: 50%;
  227. background-color: $ios-primary;
  228. }
  229. .time-marker {
  230. font-weight: $ios-font-weight-semibold;
  231. color: $ios-primary;
  232. margin-right: 10px;
  233. }
  234. .task {
  235. color: $ios-text-primary;
  236. }
  237. }
  238. }
  239. .quality-table {
  240. width: 100%;
  241. border-collapse: collapse;
  242. th, td {
  243. padding: 10px;
  244. text-align: left;
  245. border-bottom: 1px solid $ios-border;
  246. }
  247. th {
  248. background-color: $ios-background-secondary;
  249. color: $ios-text-primary;
  250. font-weight: $ios-font-weight-semibold;
  251. }
  252. td {
  253. color: $ios-text-primary;
  254. }
  255. tr:hover td {
  256. background-color: $ios-primary-light;
  257. }
  258. }
  259. .video-tutorials {
  260. display: grid;
  261. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  262. gap: 15px;
  263. .tutorial-item {
  264. display: flex;
  265. gap: 15px;
  266. padding: 15px;
  267. background-color: $ios-background-secondary;
  268. border-radius: $ios-radius-lg;
  269. .tutorial-thumbnail {
  270. position: relative;
  271. width: 120px;
  272. height: 80px;
  273. flex-shrink: 0;
  274. img {
  275. width: 100%;
  276. height: 100%;
  277. object-fit: cover;
  278. border-radius: $ios-radius-lg;
  279. }
  280. .duration {
  281. position: absolute;
  282. bottom: 5px;
  283. right: 5px;
  284. background-color: rgba(0, 0, 0, 0.7);
  285. color: $ios-background;
  286. padding: 2px 6px;
  287. border-radius: 4px;
  288. font-size: 12px;
  289. }
  290. }
  291. .tutorial-info {
  292. flex: 1;
  293. h5 {
  294. margin: 0 0 8px 0;
  295. color: $ios-text-primary;
  296. font-size: 14px;
  297. }
  298. p {
  299. margin: 0 0 10px 0;
  300. color: $ios-text-secondary;
  301. font-size: 12px;
  302. line-height: 1.4;
  303. }
  304. }
  305. }
  306. }
  307. }
  308. }
  309. }
  310. /* 视频教程样式 */
  311. .tutorial-grid {
  312. display: grid;
  313. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  314. gap: 20px;
  315. margin-bottom: 20px;
  316. }
  317. .tutorial-card {
  318. background-color: $ios-background;
  319. border-radius: $ios-radius-lg;
  320. overflow: hidden;
  321. box-shadow: $ios-shadow-sm;
  322. transition: all 0.2s;
  323. &:hover {
  324. transform: translateY(-2px);
  325. box-shadow: $ios-shadow-lg;
  326. }
  327. .tutorial-thumbnail {
  328. position: relative;
  329. width: 100%;
  330. height: 180px;
  331. img {
  332. width: 100%;
  333. height: 100%;
  334. object-fit: cover;
  335. }
  336. .duration {
  337. position: absolute;
  338. bottom: 10px;
  339. right: 10px;
  340. background-color: rgba(0, 0, 0, 0.7);
  341. color: $ios-background;
  342. padding: 4px 8px;
  343. border-radius: 4px;
  344. font-size: 12px;
  345. }
  346. }
  347. .tutorial-info {
  348. padding: 15px;
  349. h4 {
  350. margin: 0 0 10px 0;
  351. color: $ios-text-primary;
  352. font-size: 16px;
  353. }
  354. .tutorial-description {
  355. margin: 0 0 12px 0;
  356. color: $ios-text-secondary;
  357. font-size: 13px;
  358. line-height: 1.4;
  359. }
  360. .tutorial-meta {
  361. display: flex;
  362. flex-wrap: wrap;
  363. gap: 10px;
  364. margin-bottom: 15px;
  365. .stage-tag {
  366. background-color: $ios-primary-light;
  367. color: $ios-primary;
  368. padding: 2px 8px;
  369. border-radius: 12px;
  370. font-size: 12px;
  371. font-weight: 500;
  372. }
  373. .view-count, .upload-date {
  374. color: $ios-text-secondary;
  375. font-size: 12px;
  376. }
  377. }
  378. }
  379. }
  380. .pagination {
  381. display: flex;
  382. justify-content: center;
  383. align-items: center;
  384. gap: 20px;
  385. margin-top: 20px;
  386. .page-info {
  387. color: $ios-text-secondary;
  388. font-size: 14px;
  389. }
  390. }
  391. /* 实践考核样式 */
  392. .assessment-tabs {
  393. background-color: $ios-background;
  394. border-radius: $ios-radius-lg;
  395. overflow: hidden;
  396. box-shadow: $ios-shadow-sm;
  397. .tab-buttons {
  398. display: flex;
  399. background-color: $ios-background-secondary;
  400. button {
  401. flex: 1;
  402. padding: 12px 20px;
  403. border: none;
  404. background-color: transparent;
  405. font-size: 14px;
  406. font-weight: 500;
  407. color: $ios-text-secondary;
  408. cursor: pointer;
  409. transition: all 0.2s;
  410. &.active {
  411. background-color: $ios-background;
  412. color: $ios-primary;
  413. box-shadow: inset 0 -2px 0 $ios-primary;
  414. }
  415. &:hover:not(.active) {
  416. background-color: rgba(255, 255, 255, 0.5);
  417. }
  418. }
  419. }
  420. .tab-content {
  421. padding: 20px;
  422. }
  423. }
  424. .assessment-list {
  425. display: flex;
  426. flex-direction: column;
  427. gap: 15px;
  428. .assessment-item {
  429. padding: 20px;
  430. background-color: $ios-background-secondary;
  431. border-radius: $ios-radius-lg;
  432. .assessment-header {
  433. display: flex;
  434. justify-content: space-between;
  435. align-items: center;
  436. margin-bottom: 15px;
  437. h3 {
  438. margin: 0;
  439. color: $ios-text-primary;
  440. font-size: 16px;
  441. }
  442. .assessment-stage {
  443. background-color: $ios-primary-light;
  444. color: $ios-primary;
  445. padding: 4px 12px;
  446. border-radius: 16px;
  447. font-size: 12px;
  448. font-weight: 500;
  449. }
  450. }
  451. .assessment-info {
  452. margin-bottom: 15px;
  453. p {
  454. margin: 0 0 10px 0;
  455. color: $ios-text-secondary;
  456. font-size: 13px;
  457. line-height: 1.4;
  458. }
  459. .assessment-meta {
  460. display: flex;
  461. flex-wrap: wrap;
  462. gap: 15px;
  463. .difficulty, .duration, .assignee, .deadline, .status, .completion-date, .score {
  464. color: $ios-text-primary;
  465. font-size: 13px;
  466. }
  467. .difficulty.easy {
  468. color: $ios-success;
  469. }
  470. .difficulty.medium {
  471. color: $ios-warning;
  472. }
  473. .difficulty.hard {
  474. color: $ios-danger;
  475. }
  476. }
  477. .assessment-result {
  478. display: inline-block;
  479. padding: 4px 12px;
  480. border-radius: 16px;
  481. font-size: 12px;
  482. font-weight: 500;
  483. margin-top: 10px;
  484. &.pass {
  485. background-color: $ios-success;
  486. color: $ios-background;
  487. }
  488. &.fail {
  489. background-color: $ios-danger;
  490. color: $ios-background;
  491. }
  492. }
  493. }
  494. .assessment-actions {
  495. display: flex;
  496. gap: 10px;
  497. }
  498. }
  499. }
  500. /* 培训效果跟踪样式 */
  501. .effect-metrics {
  502. display: grid;
  503. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  504. gap: 20px;
  505. margin-bottom: 30px;
  506. .metric-card {
  507. padding: 20px;
  508. background-color: $ios-background;
  509. border-radius: $ios-radius-lg;
  510. box-shadow: $ios-shadow-sm;
  511. text-align: center;
  512. h3 {
  513. margin: 0 0 10px 0;
  514. color: $ios-text-secondary;
  515. font-size: 14px;
  516. font-weight: 500;
  517. }
  518. .metric-value {
  519. margin: 0 0 5px 0;
  520. color: $ios-text-primary;
  521. font-size: 28px;
  522. font-weight: 700;
  523. }
  524. .metric-change {
  525. margin: 0;
  526. font-size: 13px;
  527. font-weight: 500;
  528. &.positive {
  529. color: $ios-success;
  530. }
  531. &.negative {
  532. color: $ios-danger;
  533. }
  534. }
  535. .metric-description {
  536. margin: 0;
  537. color: $ios-text-secondary;
  538. font-size: 12px;
  539. }
  540. }
  541. }
  542. .effect-charts {
  543. display: grid;
  544. grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  545. gap: 20px;
  546. .chart-container {
  547. background-color: $ios-background;
  548. border-radius: $ios-radius-lg;
  549. padding: 20px;
  550. box-shadow: $ios-shadow-sm;
  551. h3 {
  552. margin: 0 0 20px 0;
  553. color: $ios-text-primary;
  554. font-size: 16px;
  555. text-align: center;
  556. }
  557. .chart-placeholder {
  558. display: flex;
  559. justify-content: center;
  560. align-items: center;
  561. }
  562. }
  563. }
  564. /* 响应式设计 */
  565. @media (max-width: 768px) {
  566. .knowledge-base-main {
  567. padding: 10px;
  568. }
  569. .section-header {
  570. flex-direction: column;
  571. align-items: flex-start;
  572. gap: 10px;
  573. .search-filter {
  574. width: 100%;
  575. flex-direction: column;
  576. input[type="text"], select {
  577. width: 100%;
  578. }
  579. }
  580. }
  581. .sop-tabs .tab-buttons, .assessment-tabs .tab-buttons {
  582. flex-direction: column;
  583. }
  584. .tutorial-grid {
  585. grid-template-columns: 1fr;
  586. }
  587. .effect-charts {
  588. grid-template-columns: 1fr;
  589. .chart-container {
  590. padding: 15px;
  591. .chart-placeholder svg {
  592. width: 100%;
  593. max-width: 300px;
  594. height: auto;
  595. }
  596. }
  597. }
  598. .pagination {
  599. flex-direction: column;
  600. gap: 10px;
  601. }
  602. }