page9.css 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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: 160px;
  36. }
  37. /* 设备控制:占剩余空间的3/4 */
  38. .page-cbd .command-card {
  39. flex: 3;
  40. }
  41. /* 固件升级:占剩余空间的1/4 */
  42. .page-cbd .firmware-card {
  43. flex: 1;
  44. }
  45. /* 左侧内容区域 */
  46. .page-cbd .status-content,
  47. .page-cbd .command-content,
  48. .page-cbd .firmware-content {
  49. flex: 1;
  50. min-height: 0;
  51. overflow: auto;
  52. }
  53. /* 设备状态内容 */
  54. .page-cbd .status-content {
  55. display: flex;
  56. align-items: center;
  57. padding: 12px;
  58. }
  59. /* 设备状态 */
  60. .page-cbd .status-group {
  61. display: grid;
  62. grid-template-columns: repeat(3, minmax(0, 1fr));
  63. gap: 10px;
  64. width: 100%;
  65. margin-bottom: 0;
  66. }
  67. .page-cbd .status-item {
  68. display: flex;
  69. flex-direction: column;
  70. justify-content: center;
  71. gap: 8px;
  72. min-width: 0;
  73. padding: 12px 14px;
  74. border: 1px solid #263650;
  75. border-left: 3px solid #3b82f6;
  76. border-radius: 6px;
  77. background: #151f33;
  78. }
  79. /* 设备状态及控制分组标题 */
  80. .page-cbd .status-item span,
  81. .page-cbd .command-group h3 {
  82. color: #e2e8f0;
  83. font-size: 14px;
  84. font-weight: 500;
  85. }
  86. .page-cbd .status-item strong {
  87. color: #60a5fa;
  88. font-size: 16px;
  89. font-weight: 600;
  90. font-variant-numeric: tabular-nums;
  91. overflow-wrap: anywhere;
  92. }
  93. /* 设备控制内容 */
  94. .page-cbd .command-content {
  95. padding: 0;
  96. }
  97. /* 控制分组 */
  98. .page-cbd .command-group {
  99. padding: 14px;
  100. margin-bottom: 12px;
  101. border: 1px solid #263650;
  102. border-radius: 6px;
  103. background: #151f33;
  104. }
  105. .page-cbd .command-group:last-child {
  106. margin-bottom: 0;
  107. }
  108. /* 分组标题 */
  109. .page-cbd .command-group h3 {
  110. margin: 0 0 12px;
  111. padding-left: 9px;
  112. border-left: 3px solid #3b82f6;
  113. }
  114. /* 指令按钮布局 */
  115. .page-cbd .command-buttons {
  116. display: grid;
  117. grid-template-columns: repeat(2, minmax(0, 1fr));
  118. gap: 8px;
  119. }
  120. /* 指令按钮 */
  121. .page-cbd .cmd-btn {
  122. position: relative;
  123. width: 100%;
  124. min-width: 0;
  125. min-height: 38px;
  126. padding: 6px 8px 6px 18px;
  127. border: 1px solid #34445f;
  128. border-radius: 5px;
  129. background: #1c2940;
  130. color: #cbd5e1;
  131. font-size: 13px;
  132. cursor: pointer;
  133. white-space: nowrap;
  134. transition: background 0.15s, border-color 0.15s, color 0.15s;
  135. }
  136. .page-cbd .cmd-btn::before {
  137. content: "";
  138. position: absolute;
  139. left: 8px;
  140. top: 50%;
  141. width: 5px;
  142. height: 5px;
  143. border-radius: 50%;
  144. transform: translateY(-50%);
  145. }
  146. .page-cbd .cmd-btn-1::before {
  147. background: #36b99a;
  148. }
  149. .page-cbd .cmd-btn-0::before {
  150. background: #df826e;
  151. }
  152. .page-cbd .cmd-btn:hover {
  153. border-color: #52749c;
  154. background: #243750;
  155. color: #e2e8f0;
  156. }
  157. .page-cbd .cmd-btn:active {
  158. background: #293e58;
  159. color: #fff;
  160. }
  161. .page-cbd .cmd-btn:disabled {
  162. opacity: 0.5;
  163. cursor: not-allowed;
  164. }
  165. /* 固件升级内容 */
  166. .page-cbd .firmware-content {
  167. padding: 12px;
  168. }
  169. /* 右栏:应用日志 */
  170. .page-cbd .right-pane {
  171. flex: 1;
  172. display: flex;
  173. flex-direction: column;
  174. min-width: 0;
  175. min-height: 0;
  176. }
  177. .page-cbd .right-pane .log-card {
  178. flex: 1;
  179. display: flex;
  180. flex-direction: column;
  181. min-height: 0;
  182. overflow: hidden;
  183. }
  184. .page-cbd .right-pane .output {
  185. flex: 1;
  186. min-height: 0;
  187. }
  188. /* ================= 移动端适配 (≤768px) ================= */
  189. @media (max-width: 768px) {
  190. .page-cbd .panes {
  191. flex-direction: column;
  192. flex: none;
  193. overflow: visible;
  194. }
  195. .page-cbd .left-pane,
  196. .page-cbd .right-pane {
  197. width: 100%;
  198. flex: none;
  199. overflow: visible;
  200. }
  201. .page-cbd .status-card {
  202. flex: none;
  203. height: auto;
  204. min-height: 140px;
  205. }
  206. .page-cbd .status-content {
  207. flex: none;
  208. min-height: auto;
  209. align-items: stretch;
  210. overflow: visible;
  211. }
  212. .page-cbd .status-group {
  213. flex: none;
  214. grid-template-columns: 1fr;
  215. }
  216. .page-cbd .command-card {
  217. flex: none;
  218. min-height: 240px;
  219. }
  220. .page-cbd .firmware-card {
  221. flex: none;
  222. min-height: 180px;
  223. }
  224. .page-cbd .right-pane .log-card {
  225. min-height: 400px;
  226. }
  227. }
  228. /* ================= 小屏适配 (≤480px) ================= */
  229. @media (max-width: 480px) {
  230. .page-cbd .command-buttons {
  231. grid-template-columns: 1fr;
  232. }
  233. .page-cbd .log-actions {
  234. gap: 4px;
  235. }
  236. }