page9.css 4.3 KB

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