workbench.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. // 智能工作台通用页面样式(从源项目 AI 页面壳/搜索面板/表格工具栏移植,类名改为 wb- 前缀)
  2. :root {
  3. --wb-bg-page: #f4f6fa;
  4. --wb-bg-card: #ffffff;
  5. --wb-border: #e5e9f2;
  6. --wb-text: #1f2937;
  7. --wb-text-2: #64748b;
  8. --wb-text-muted: #94a3b8;
  9. --wb-primary: #2a50ec;
  10. --wb-primary-soft: #e8eefc;
  11. --wb-success: #16a34a;
  12. --wb-warning: #d97706;
  13. --wb-error: #dc2626;
  14. --wb-radius: 8px;
  15. // 源项目 AI 页面样式使用的 token 别名(移植 chat/markdown 样式时保持原变量名)
  16. --app-accent-soft: #e8eefc;
  17. --app-accent-strong: #2a50ec;
  18. --app-border-color: #e5e9f2;
  19. --app-elevated-bg: #ffffff;
  20. --app-elevated-soft-bg: #f8fafc;
  21. --app-radius-base: 8px;
  22. --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  23. --app-surface-bg: #ffffff;
  24. --app-surface-border: #e5e9f2;
  25. --app-text-muted: #94a3b8;
  26. --app-text-title: #1f2937;
  27. }
  28. .wb-page {
  29. display: flex;
  30. flex: 1 1 auto;
  31. flex-direction: column;
  32. gap: 12px;
  33. min-width: 0;
  34. min-height: 0;
  35. height: 100%;
  36. padding: 12px;
  37. overflow: auto;
  38. background: var(--wb-bg-page);
  39. }
  40. .wb-card {
  41. background: var(--wb-bg-card);
  42. border: 1px solid var(--wb-border);
  43. border-radius: var(--wb-radius);
  44. .ant-card-head {
  45. min-height: 46px;
  46. padding: 0 16px;
  47. border-bottom: 1px solid var(--wb-border);
  48. }
  49. .ant-card-head-title {
  50. padding: 12px 0;
  51. color: var(--wb-text);
  52. font-size: 15px;
  53. font-weight: 600;
  54. }
  55. .ant-card-body {
  56. padding: 16px;
  57. }
  58. }
  59. .wb-search-card {
  60. .ant-card-body {
  61. padding: 16px;
  62. }
  63. }
  64. .wb-table-card {
  65. display: flex;
  66. flex: 1 1 auto;
  67. flex-direction: column;
  68. min-height: 0;
  69. .ant-card-body {
  70. display: flex;
  71. flex: 1 1 auto;
  72. flex-direction: column;
  73. min-height: 0;
  74. padding: 12px 16px 16px;
  75. }
  76. }
  77. .wb-toolbar {
  78. display: flex;
  79. align-items: center;
  80. justify-content: space-between;
  81. flex-wrap: wrap;
  82. gap: 10px;
  83. margin-bottom: 12px;
  84. }
  85. .wb-toolbar__title {
  86. color: var(--wb-text);
  87. font-size: 15px;
  88. font-weight: 600;
  89. }
  90. .wb-toolbar__actions {
  91. display: flex;
  92. align-items: center;
  93. flex-wrap: nowrap;
  94. gap: 8px;
  95. margin-left: auto;
  96. overflow-x: auto;
  97. white-space: nowrap;
  98. &::-webkit-scrollbar {
  99. height: 0;
  100. }
  101. }
  102. .wb-form-grid {
  103. display: grid;
  104. grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  105. gap: 0 16px;
  106. .ant-form-item {
  107. margin-bottom: 14px;
  108. }
  109. }
  110. .wb-form-actions {
  111. display: flex;
  112. justify-content: flex-end;
  113. gap: 8px;
  114. }
  115. .wb-table {
  116. flex: 1 1 auto;
  117. min-height: 0;
  118. .ant-table-cell {
  119. font-size: 13px;
  120. }
  121. }
  122. .wb-pagination {
  123. display: flex;
  124. justify-content: flex-end;
  125. margin-top: 12px;
  126. }
  127. .wb-mono,
  128. .wb-pre {
  129. font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  130. font-size: 12px;
  131. line-height: 1.6;
  132. white-space: pre-wrap;
  133. word-break: break-all;
  134. }
  135. .wb-pre {
  136. max-height: 360px;
  137. margin: 0;
  138. padding: 10px 12px;
  139. overflow: auto;
  140. background: #f8fafc;
  141. border: 1px solid var(--wb-border);
  142. border-radius: 6px;
  143. }
  144. .wb-muted {
  145. color: var(--wb-text-muted);
  146. }
  147. .wb-tip {
  148. max-width: 320px;
  149. line-height: 1.6;
  150. }
  151. .wb-label-tip {
  152. display: inline-flex;
  153. align-items: center;
  154. gap: 4px;
  155. white-space: nowrap;
  156. }
  157. .wb-config-card {
  158. max-width: 980px;
  159. }
  160. .wb-detail-label {
  161. color: var(--wb-text-2);
  162. }
  163. .wb-empty {
  164. padding: 40px 0;
  165. }
  166. .wb-section-title {
  167. margin: 0 0 12px;
  168. color: var(--wb-text);
  169. font-size: 15px;
  170. font-weight: 600;
  171. }
  172. .wb-divider {
  173. margin: 8px 0 16px;
  174. }
  175. .wb-status-tag {
  176. margin: 0;
  177. }
  178. .wb-link-btn {
  179. padding: 0;
  180. }
  181. .wb-truncate {
  182. max-width: 320px;
  183. overflow: hidden;
  184. text-overflow: ellipsis;
  185. white-space: nowrap;
  186. }
  187. // 自定义头部页面的查询条件收起开关:与「筛选条件」卡片一致,点击标题展开 / 收起
  188. .wb-filter-toggle {
  189. display: inline-flex;
  190. align-items: center;
  191. gap: 6px;
  192. cursor: pointer;
  193. user-select: none;
  194. }
  195. .wb-filter-toggle__arrow {
  196. flex: 0 0 auto;
  197. color: #98a2b3;
  198. font-size: 14px;
  199. }
  200. // 工具与集成 / 审计与观测统一管理页视觉:紧凑筛选 + 列表卡片 + 内容滚动
  201. .wb-manage-page {
  202. gap: 8px;
  203. padding: 8px 10px;
  204. background: #f4f6fa;
  205. &.wb-manage-page--fixed {
  206. overflow: hidden;
  207. }
  208. .wb-card {
  209. background: #fff;
  210. border: 1px solid #e7ebf3;
  211. border-radius: 14px;
  212. box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
  213. > .ant-card-head {
  214. min-height: 42px;
  215. padding: 0 14px;
  216. border-bottom: 1px solid #eff2f7;
  217. }
  218. > .ant-card-head .ant-card-head-title {
  219. padding: 9px 0;
  220. overflow: visible;
  221. white-space: normal;
  222. }
  223. > .ant-card-body {
  224. padding: 14px;
  225. }
  226. }
  227. .wb-search-card {
  228. flex: 0 0 auto;
  229. > .ant-card-body {
  230. padding: 0;
  231. }
  232. > .ant-card-head .ant-card-extra {
  233. display: flex;
  234. align-items: center;
  235. gap: 8px;
  236. }
  237. .ant-card-extra .ant-btn {
  238. height: 32px;
  239. padding: 0 14px;
  240. border-radius: 8px;
  241. font-size: 12px;
  242. font-weight: 500;
  243. }
  244. }
  245. .wb-table-card {
  246. > .ant-card-head .ant-card-head-title {
  247. padding: 10px 0;
  248. }
  249. }
  250. &.wb-manage-page--fixed {
  251. .wb-table-card {
  252. flex: 1 1 auto;
  253. min-height: 0;
  254. > .ant-card-body {
  255. display: flex;
  256. flex: 1 1 auto;
  257. flex-direction: column;
  258. min-height: 0;
  259. padding: 0;
  260. overflow: hidden;
  261. }
  262. }
  263. }
  264. &.wb-manage-page--scroll {
  265. overflow: auto;
  266. > .wb-card {
  267. flex: 0 0 auto;
  268. }
  269. .wb-table-card {
  270. flex: 0 0 auto;
  271. }
  272. }
  273. .search-panel-toggle {
  274. display: flex;
  275. align-items: center;
  276. gap: 8px;
  277. width: 100%;
  278. cursor: pointer;
  279. user-select: none;
  280. h3 {
  281. position: relative;
  282. flex: 0 0 auto;
  283. margin: 0;
  284. padding-left: 11px;
  285. color: #111827;
  286. font-size: 15px;
  287. font-weight: 600;
  288. line-height: 22px;
  289. &::before {
  290. position: absolute;
  291. top: 4px;
  292. bottom: 4px;
  293. left: 0;
  294. width: 3px;
  295. border-radius: 2px;
  296. background: #2a50ec;
  297. content: '';
  298. }
  299. }
  300. }
  301. .search-panel-toggle__arrow {
  302. flex: 0 0 auto;
  303. color: #98a2b3;
  304. font-size: 14px;
  305. }
  306. .query-form {
  307. display: flex;
  308. flex-wrap: wrap;
  309. align-items: center;
  310. gap: 8px 14px;
  311. padding: 10px 14px 12px;
  312. .ant-form-item {
  313. display: inline-flex;
  314. align-items: center;
  315. margin: 0;
  316. }
  317. .ant-form-item-label {
  318. padding: 0 8px 0 0;
  319. > label {
  320. height: 32px;
  321. color: #5b6577;
  322. font-size: 12px;
  323. line-height: 32px;
  324. }
  325. }
  326. .ant-form-item-control {
  327. min-height: 32px;
  328. }
  329. .ant-input,
  330. .ant-input-affix-wrapper,
  331. .ant-select,
  332. .ant-select-selector,
  333. .ant-picker,
  334. .ant-input-number {
  335. height: 32px;
  336. border-color: #e7ebf3;
  337. border-radius: 8px;
  338. font-size: 12px;
  339. }
  340. .ant-input-affix-wrapper {
  341. padding: 0 10px;
  342. }
  343. .ant-input-affix-wrapper > .ant-input {
  344. height: 100%;
  345. padding: 0;
  346. background: transparent;
  347. border: 0;
  348. border-radius: 0;
  349. box-shadow: none;
  350. }
  351. .ant-select-selector {
  352. padding: 0 10px;
  353. }
  354. .ant-select-selection-item,
  355. .ant-select-selection-placeholder {
  356. font-size: 12px;
  357. line-height: 30px;
  358. }
  359. .ant-select-multiple .ant-select-selection-item {
  360. line-height: 22px;
  361. }
  362. .ant-picker {
  363. padding: 0 10px;
  364. }
  365. .ant-picker-input > input {
  366. font-size: 12px;
  367. }
  368. .ant-input-number {
  369. width: 100%;
  370. .ant-input-number-input {
  371. height: 30px;
  372. padding: 0 10px;
  373. font-size: 12px;
  374. }
  375. }
  376. .ant-checkbox-wrapper {
  377. font-size: 12px;
  378. }
  379. .ant-btn {
  380. height: 32px;
  381. padding: 0 14px;
  382. border-radius: 8px;
  383. font-size: 12px;
  384. font-weight: 500;
  385. }
  386. }
  387. .wb-toolbar {
  388. flex-wrap: wrap;
  389. gap: 12px;
  390. margin-bottom: 0;
  391. }
  392. .wb-table-heading {
  393. flex: 1 1 420px;
  394. min-width: 0;
  395. h3 {
  396. position: relative;
  397. margin: 0;
  398. padding-left: 11px;
  399. color: #111827;
  400. font-size: 15px;
  401. font-weight: 600;
  402. line-height: 22px;
  403. &::before {
  404. position: absolute;
  405. top: 4px;
  406. bottom: 4px;
  407. left: 0;
  408. width: 3px;
  409. border-radius: 2px;
  410. background: #2a50ec;
  411. content: '';
  412. }
  413. }
  414. p {
  415. margin: 4px 0 0;
  416. color: #98a2b3;
  417. font-size: 12px;
  418. line-height: 1.6;
  419. }
  420. }
  421. .wb-toolbar__actions .ant-btn {
  422. height: 32px;
  423. padding: 0 14px;
  424. border-radius: 8px;
  425. font-size: 12px;
  426. font-weight: 500;
  427. }
  428. .ant-btn.ant-btn-primary.ant-btn-background-ghost {
  429. color: #2a50ec !important;
  430. background: #fff !important;
  431. border-color: #b9c8f8;
  432. &:hover,
  433. &:focus {
  434. color: #1d3fd0 !important;
  435. background: #f5f8ff !important;
  436. border-color: #2a50ec;
  437. }
  438. &:disabled {
  439. color: #b7bfce !important;
  440. background: #f8fafc !important;
  441. border-color: #e7ebf3;
  442. }
  443. }
  444. .wb-table {
  445. .ant-table {
  446. font-size: 12px;
  447. }
  448. .ant-table-thead > tr > th {
  449. height: 40px;
  450. padding: 0 12px;
  451. color: #5b6577;
  452. font-size: 12px;
  453. font-weight: 600;
  454. background: #f8fafc;
  455. border-bottom: 1px solid #eff2f7;
  456. }
  457. .ant-table-thead > tr > th::before {
  458. display: none;
  459. }
  460. .ant-table-tbody > tr > td {
  461. height: 42px;
  462. padding: 0 12px;
  463. color: #1f2937;
  464. font-size: 12px;
  465. border-bottom: 1px solid #f4f6fa;
  466. }
  467. .ant-table-tbody > tr:hover > td {
  468. background: #eef4ff !important;
  469. }
  470. .ant-tag {
  471. margin-inline-end: 0;
  472. font-size: 11px;
  473. line-height: 20px;
  474. }
  475. .ant-btn-link {
  476. height: auto;
  477. padding: 0 2px;
  478. font-size: 12px;
  479. }
  480. }
  481. .wb-table-scroll {
  482. flex: 1 1 auto;
  483. min-height: 0;
  484. overflow: auto;
  485. }
  486. .wb-pagination {
  487. flex: 0 0 auto;
  488. justify-content: flex-end;
  489. margin-top: 0;
  490. padding: 8px 14px 10px;
  491. border-top: 1px solid #eff2f7;
  492. .ant-pagination {
  493. margin: 0;
  494. }
  495. }
  496. .detail-card {
  497. background: #fff;
  498. border: 1px solid #e7ebf3;
  499. border-radius: 12px;
  500. box-shadow: none;
  501. .ant-card-head {
  502. min-height: 42px;
  503. padding: 0 14px;
  504. border-bottom: 1px solid #eff2f7;
  505. }
  506. .ant-card-head-title {
  507. padding: 10px 0;
  508. font-size: 14px;
  509. }
  510. .ant-card-body {
  511. padding: 14px;
  512. }
  513. }
  514. }
  515. // 统一详情/编辑弹框尺寸;内容由 BasicModal 内部滚动
  516. .wb-ops-modal .ant-modal {
  517. height: auto !important;
  518. }
  519. .wb-ops-modal .ant-modal-content {
  520. overflow: hidden;
  521. border-radius: 14px;
  522. }
  523. .wb-ops-modal .ant-modal-header {
  524. margin: 0;
  525. padding: 15px 18px;
  526. border-bottom: 1px solid #eff2f7;
  527. }
  528. .wb-ops-modal .ant-modal-body {
  529. background: #fff;
  530. }
  531. .wb-ops-modal .ant-descriptions-item-label {
  532. white-space: nowrap;
  533. }
  534. .wb-detail-drawer .ant-drawer-header {
  535. padding: 14px 16px;
  536. border-bottom: 1px solid #eff2f7;
  537. }
  538. .wb-detail-drawer .ant-drawer-title {
  539. color: #111827;
  540. font-size: 15px;
  541. font-weight: 600;
  542. }
  543. .wb-detail-drawer .ant-drawer-body {
  544. padding: 14px;
  545. background: #f4f6fa;
  546. }
  547. .wb-detail-drawer .ant-drawer-footer {
  548. padding: 10px 16px;
  549. border-top: 1px solid #eff2f7;
  550. }
  551. // 表格操作列:统一按钮尺寸与图标大小,覆盖页面表格、详情弹框与抽屉内的表格
  552. .wb-page,
  553. .wb-ops-modal,
  554. .wb-detail-drawer,
  555. .memory-modal {
  556. .ant-table-tbody > tr > td:last-child,
  557. .ant-table-tbody > tr > td.ant-table-cell-fix-right {
  558. .ant-btn.ant-btn-link {
  559. display: inline-flex;
  560. align-items: center;
  561. justify-content: center;
  562. height: 30px;
  563. min-width: 30px;
  564. padding: 0 8px;
  565. border-radius: 6px;
  566. font-size: 13px;
  567. line-height: 1;
  568. }
  569. .ant-btn.ant-btn-link:has(> .anticon:only-child) {
  570. width: 30px;
  571. padding: 0;
  572. }
  573. > .ant-btn.ant-btn-link,
  574. > .ant-tooltip-disabled-compatible-wrapper {
  575. margin: 0 3px;
  576. }
  577. .ant-btn.ant-btn-link .anticon {
  578. font-size: 16px;
  579. }
  580. }
  581. }
  582. // 统一工作台内容区按钮圆角:使用紧凑的 6px,不使用大圆角
  583. .wb-page .ant-btn,
  584. .chat-workbench .ant-btn {
  585. border-radius: 6px !important;
  586. }