page9.css 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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: 12px;
  61. }
  62. /* 设备状态 */
  63. .page-cbd .status-group {
  64. display: grid;
  65. grid-template-columns: repeat(3, minmax(0, 1fr));
  66. gap: 10px;
  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: 12px 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. .page-cbd .firmware-item::before {
  242. content: "";
  243. position: absolute;
  244. left: 0;
  245. top: 0;
  246. bottom: 0;
  247. width: 3px;
  248. background: linear-gradient(to bottom, #60a5fa, #2563eb);
  249. }
  250. /* 固件升级名称 */
  251. .page-cbd .firmware-name {
  252. display: flex;
  253. align-items: center;
  254. gap: 7px;
  255. flex: none;
  256. width: 90px;
  257. color: #e2e8f0;
  258. font-size: 13px;
  259. font-weight: 500;
  260. }
  261. .page-cbd .firmware-name .icon {
  262. width: 17px;
  263. height: 17px;
  264. flex: none;
  265. fill: none;
  266. stroke: #60a5fa;
  267. stroke-width: 1.8;
  268. stroke-linecap: round;
  269. stroke-linejoin: round;
  270. }
  271. /* 固件文件选择 */
  272. .page-cbd .firmware-item input[type="file"] {
  273. flex: 1;
  274. min-width: 0;
  275. color: #cbd5e1;
  276. font-size: 12px;
  277. }
  278. /* 固件升级状态 */
  279. .page-cbd .firmware-status {
  280. min-width: 90px;
  281. color: #94a3b8;
  282. font-size: 12px;
  283. overflow-wrap: anywhere;
  284. }
  285. /* 固件升级按钮 */
  286. .page-cbd .firmware-item .btn {
  287. flex: none;
  288. }
  289. /* 右栏:应用日志 */
  290. .page-cbd .right-pane {
  291. flex: 1;
  292. display: flex;
  293. flex-direction: column;
  294. min-width: 0;
  295. min-height: 0;
  296. }
  297. .page-cbd .right-pane .log-card {
  298. flex: 1;
  299. display: flex;
  300. flex-direction: column;
  301. min-height: 0;
  302. overflow: hidden;
  303. }
  304. .page-cbd .right-pane .output {
  305. flex: 1;
  306. min-height: 0;
  307. }
  308. /* ================= 移动端适配 (≤768px) ================= */
  309. @media (max-width: 768px) {
  310. .page-cbd .panes {
  311. flex-direction: column;
  312. flex: none;
  313. overflow: visible;
  314. }
  315. .page-cbd .left-pane,
  316. .page-cbd .right-pane {
  317. width: 100%;
  318. flex: none;
  319. overflow: visible;
  320. }
  321. .page-cbd .status-card {
  322. flex: none;
  323. height: auto;
  324. min-height: 140px;
  325. }
  326. .page-cbd .status-content {
  327. flex: none;
  328. min-height: auto;
  329. align-items: stretch;
  330. overflow: visible;
  331. }
  332. .page-cbd .status-group {
  333. flex: none;
  334. grid-template-columns: 1fr;
  335. }
  336. .page-cbd .command-card {
  337. flex: none;
  338. min-height: 240px;
  339. }
  340. .page-cbd .firmware-card {
  341. flex: none;
  342. min-height: 180px;
  343. }
  344. .page-cbd .firmware-content {
  345. flex: none;
  346. overflow: visible;
  347. }
  348. .page-cbd .right-pane .log-card {
  349. min-height: 400px;
  350. }
  351. }
  352. /* ================= 小屏适配 (≤480px) ================= */
  353. @media (max-width: 480px) {
  354. .page-cbd .command-buttons {
  355. grid-template-columns: 1fr;
  356. }
  357. .page-cbd .log-actions {
  358. gap: 4px;
  359. }
  360. .page-cbd .firmware-item {
  361. flex-wrap: wrap;
  362. }
  363. .page-cbd .firmware-name {
  364. width: 100%;
  365. }
  366. .page-cbd .firmware-item input[type="file"] {
  367. flex-basis: 100%;
  368. }
  369. .page-cbd .firmware-status {
  370. flex: 1;
  371. min-width: 0;
  372. }
  373. }