page9.css 4.9 KB

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