page9.css 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. /* 页面整体布局 */
  2. .page-cbd {
  3. display: flex;
  4. flex-direction: column;
  5. gap: 12px;
  6. overflow: hidden;
  7. }
  8. /* 左右拆分的栏 */
  9. .page-cbd .panes {
  10. display: flex;
  11. gap: 12px;
  12. flex: 1;
  13. min-height: 0;
  14. overflow: hidden;
  15. }
  16. /* 左栏 */
  17. .page-cbd .left-pane {
  18. flex: 1;
  19. display: flex;
  20. flex-direction: column;
  21. gap: 12px;
  22. min-width: 0;
  23. min-height: 0;
  24. overflow: hidden;
  25. }
  26. .page-cbd .left-pane .card {
  27. display: flex;
  28. flex-direction: column;
  29. min-height: 0;
  30. overflow: hidden;
  31. }
  32. /* 活动状态:固定高度 */
  33. .page-cbd .status-card {
  34. flex: none;
  35. height: 180px;
  36. white-space: normal;
  37. }
  38. /* 设备控制:占剩余空间 */
  39. .page-cbd .command-card {
  40. flex: 1;
  41. min-height: 0;
  42. }
  43. /* 固件升级:保持合适的最小高度 */
  44. .page-cbd .firmware-card {
  45. flex: none;
  46. min-height: 150px;
  47. }
  48. /* 左侧内容区域 */
  49. .page-cbd .status-content,
  50. .page-cbd .command-content,
  51. .page-cbd .firmware-content {
  52. flex: 1;
  53. min-height: 0;
  54. overflow: auto;
  55. }
  56. /* 设备状态内容 */
  57. .page-cbd .status-content {
  58. display: flex;
  59. align-items: center;
  60. padding: 0;
  61. }
  62. /* 设备状态 */
  63. .page-cbd .status-group {
  64. display: grid;
  65. grid-template-columns: repeat(3, minmax(0, 1fr));
  66. gap: 12px;
  67. width: 100%;
  68. margin-bottom: 0;
  69. }
  70. .page-cbd .status-item {
  71. position: relative;
  72. display: flex;
  73. flex-direction: column;
  74. justify-content: center;
  75. gap: 8px;
  76. min-width: 0;
  77. padding: 14px;
  78. border: 1px solid #2d405e;
  79. border-left: 3px solid #3b82f6;
  80. border-radius: 6px;
  81. background: linear-gradient(135deg, #192941, #151f33);
  82. transition: border-color 0.2s, background 0.2s;
  83. }
  84. .page-cbd .status-item:hover {
  85. border-color: #45658d;
  86. background: #1c2d48;
  87. }
  88. /* 设备状态及控制分组标题 */
  89. .page-cbd .status-item span,
  90. .page-cbd .command-group h3 {
  91. color: #e2e8f0;
  92. font-size: 14px;
  93. font-weight: 500;
  94. }
  95. .page-cbd .status-item span {
  96. position: relative;
  97. padding-left: 11px;
  98. }
  99. .page-cbd .status-item span::before {
  100. content: "";
  101. position: absolute;
  102. left: 0;
  103. top: 50%;
  104. width: 5px;
  105. height: 5px;
  106. border-radius: 50%;
  107. background: #3b82f6;
  108. box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
  109. transform: translateY(-50%);
  110. }
  111. .page-cbd .status-item strong {
  112. color: #60a5fa;
  113. font-size: 16px;
  114. font-weight: 600;
  115. font-variant-numeric: tabular-nums;
  116. overflow-wrap: anywhere;
  117. }
  118. /* 设备控制内容 */
  119. .page-cbd .command-content {
  120. padding: 0;
  121. }
  122. /* 控制分组 */
  123. .page-cbd .command-group {
  124. padding: 14px;
  125. margin-bottom: 12px;
  126. border: 1px solid #2d405e;
  127. border-radius: 6px;
  128. background: linear-gradient(135deg, #192941, #151f33);
  129. transition: border-color 0.2s;
  130. }
  131. .page-cbd .command-group:hover {
  132. border-color: #45658d;
  133. }
  134. .page-cbd .command-group:last-child {
  135. margin-bottom: 0;
  136. }
  137. /* 分组标题 */
  138. .page-cbd .command-group h3 {
  139. display: flex;
  140. align-items: center;
  141. gap: 9px;
  142. margin: 0 0 12px;
  143. padding: 0 0 10px;
  144. border-bottom: 1px solid #2b3d58;
  145. }
  146. .page-cbd .command-group h3::before {
  147. content: "";
  148. flex: none;
  149. width: 7px;
  150. height: 7px;
  151. border-radius: 50%;
  152. background: #3b82f6;
  153. box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
  154. }
  155. /* 指令按钮布局 */
  156. .page-cbd .command-buttons {
  157. display: grid;
  158. grid-template-columns: repeat(2, minmax(0, 1fr));
  159. gap: 8px;
  160. }
  161. /* 指令按钮 */
  162. .page-cbd .cmd-btn {
  163. position: relative;
  164. width: 100%;
  165. min-width: 0;
  166. min-height: 38px;
  167. padding: 6px 8px 6px 23px;
  168. border: 1px solid #344965;
  169. border-radius: 5px;
  170. background: #1c2940;
  171. color: #cbd5e1;
  172. font-size: 13px;
  173. cursor: pointer;
  174. white-space: nowrap;
  175. transition: background 0.15s, border-color 0.15s, color 0.15s;
  176. }
  177. .page-cbd .cmd-btn::before {
  178. content: "";
  179. position: absolute;
  180. left: 9px;
  181. top: 50%;
  182. width: 6px;
  183. height: 6px;
  184. border-radius: 50%;
  185. transform: translateY(-50%);
  186. }
  187. .page-cbd .cmd-btn-1::before {
  188. background: #36b99a;
  189. box-shadow: 0 0 6px rgba(54, 185, 154, 0.5);
  190. }
  191. .page-cbd .cmd-btn-0::before {
  192. background: #df826e;
  193. box-shadow: 0 0 6px rgba(223, 130, 110, 0.4);
  194. }
  195. .page-cbd .cmd-btn:hover {
  196. border-color: #52749c;
  197. background: #243750;
  198. color: #e2e8f0;
  199. }
  200. .page-cbd .cmd-btn:active {
  201. background: #293e58;
  202. color: #fff;
  203. }
  204. .page-cbd .cmd-btn:disabled {
  205. opacity: 0.5;
  206. cursor: not-allowed;
  207. }
  208. .page-cbd .cmd-btn:disabled::before {
  209. box-shadow: none;
  210. }
  211. /* 固件升级内容 */
  212. .page-cbd .firmware-content {
  213. display: flex;
  214. flex-direction: column;
  215. gap: 0;
  216. padding: 0;
  217. }
  218. /* 固件升级项目 */
  219. .page-cbd .firmware-item {
  220. position: relative;
  221. display: flex;
  222. align-items: center;
  223. gap: 10px;
  224. min-height: 38px;
  225. padding: 14px;
  226. margin-bottom: 12px;
  227. border: 1px solid #2d405e;
  228. border-radius: 6px;
  229. background: linear-gradient(135deg, #192941, #151f33);
  230. min-width: 0;
  231. overflow: hidden;
  232. transition: border-color 0.2s, background 0.2s;
  233. }
  234. .page-cbd .firmware-item:last-child {
  235. margin-bottom: 0;
  236. }
  237. .page-cbd .firmware-item:hover {
  238. border-color: #45658d;
  239. background: #1c2d48;
  240. }
  241. /* 固件项目左侧装饰线 */
  242. .page-cbd .firmware-item::before {
  243. content: "";
  244. position: absolute;
  245. left: 0;
  246. top: 0;
  247. bottom: 0;
  248. width: 3px;
  249. background: linear-gradient(to bottom, #60a5fa, #2563eb);
  250. }
  251. /* 固件升级名称 */
  252. .page-cbd .firmware-name {
  253. display: flex;
  254. align-items: center;
  255. gap: 7px;
  256. flex: none;
  257. width: 90px;
  258. color: #e2e8f0;
  259. font-size: 13px;
  260. font-weight: 500;
  261. }
  262. .page-cbd .firmware-name .icon {
  263. width: 17px;
  264. height: 17px;
  265. flex: none;
  266. fill: none;
  267. stroke: #60a5fa;
  268. stroke-width: 1.8;
  269. stroke-linecap: round;
  270. stroke-linejoin: round;
  271. }
  272. /* 固件文件选择 */
  273. .page-cbd .firmware-item input[type="file"] {
  274. flex: 1;
  275. min-width: 0;
  276. color: #cbd5e1;
  277. font-size: 12px;
  278. }
  279. /* 固件升级状态 */
  280. .page-cbd .firmware-status {
  281. min-width: 90px;
  282. color: #94a3b8;
  283. font-size: 12px;
  284. overflow-wrap: anywhere;
  285. }
  286. /* 固件升级按钮 */
  287. .page-cbd .firmware-item .btn {
  288. flex: none;
  289. }
  290. /* 右栏 */
  291. .page-cbd .right-pane {
  292. flex: 1;
  293. display: flex;
  294. flex-direction: column;
  295. gap: 12px;
  296. min-width: 0;
  297. min-height: 0;
  298. }
  299. /* 运行状态:与活动状态统一高度 */
  300. .page-cbd .runtime-card {
  301. flex: none;
  302. height: 180px;
  303. min-height: 0;
  304. display: flex;
  305. flex-direction: column;
  306. overflow: hidden;
  307. }
  308. .page-cbd .runtime-stamp {
  309. margin-left: auto;
  310. margin-right: 8px;
  311. color: var(--text-secondary);
  312. font-size: 12px;
  313. white-space: nowrap;
  314. }
  315. /* 运行状态网格:桌面端4列 */
  316. .page-cbd .runtime-grid {
  317. display: grid;
  318. grid-template-columns: repeat(4, minmax(0, 1fr));
  319. flex: 1;
  320. min-height: 0;
  321. overflow: auto;
  322. }
  323. /* 运行状态项目 */
  324. .page-cbd .runtime-item {
  325. display: flex;
  326. align-items: center;
  327. justify-content: flex-start;
  328. gap: 8px;
  329. min-width: 0;
  330. min-height: 36px;
  331. padding: 5px 0;
  332. border-bottom: 1px solid var(--border-color);
  333. }
  334. .page-cbd .runtime-item > span:first-child {
  335. color: var(--text-secondary);
  336. white-space: nowrap;
  337. }
  338. .page-cbd .runtime-value {
  339. min-width: 0;
  340. overflow: hidden;
  341. text-overflow: ellipsis;
  342. white-space: nowrap;
  343. text-align: left;
  344. font-weight: 500;
  345. font-variant-numeric: tabular-nums;
  346. }
  347. /* 中等宽度 */
  348. @media (max-width: 1100px) {
  349. .page-cbd .runtime-grid {
  350. grid-template-columns: repeat(3, minmax(0, 1fr));
  351. }
  352. }
  353. /* ================= 移动端适配 (≤768px) ================= */
  354. @media (max-width: 768px) {
  355. .page-cbd .panes {
  356. flex-direction: column;
  357. flex: none;
  358. overflow: visible;
  359. }
  360. .page-cbd .left-pane,
  361. .page-cbd .right-pane {
  362. width: 100%;
  363. flex: none;
  364. overflow: visible;
  365. }
  366. .page-cbd .status-card {
  367. flex: none;
  368. height: auto;
  369. min-height: 140px;
  370. }
  371. .page-cbd .status-content {
  372. flex: none;
  373. min-height: auto;
  374. align-items: stretch;
  375. overflow: visible;
  376. }
  377. .page-cbd .status-group {
  378. flex: none;
  379. grid-template-columns: 1fr;
  380. }
  381. .page-cbd .command-card {
  382. flex: none;
  383. min-height: 240px;
  384. }
  385. .page-cbd .firmware-card {
  386. flex: none;
  387. min-height: 180px;
  388. }
  389. .page-cbd .firmware-content {
  390. flex: none;
  391. overflow: visible;
  392. }
  393. /* 手机端运行状态 */
  394. .page-cbd .runtime-card {
  395. flex: none;
  396. height: auto;
  397. min-height: 180px;
  398. }
  399. .page-cbd .runtime-grid {
  400. flex: none;
  401. grid-template-columns: repeat(2, minmax(0, 1fr));
  402. overflow: visible;
  403. }
  404. .page-cbd .right-pane .log-card {
  405. min-height: 400px;
  406. }
  407. }
  408. /* ================= 小屏适配 (≤480px) ================= */
  409. @media (max-width: 480px) {
  410. .page-cbd .command-buttons {
  411. grid-template-columns: 1fr;
  412. }
  413. .page-cbd .log-actions {
  414. gap: 4px;
  415. }
  416. .page-cbd .firmware-item {
  417. flex-wrap: wrap;
  418. }
  419. .page-cbd .firmware-name {
  420. width: 100%;
  421. }
  422. .page-cbd .firmware-item input[type="file"] {
  423. flex-basis: 100%;
  424. }
  425. .page-cbd .firmware-status {
  426. flex: 1;
  427. min-width: 0;
  428. }
  429. .page-cbd .runtime-grid {
  430. grid-template-columns: 1fr;
  431. }
  432. }