factory-overview.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /* 组件容器样式 */
  2. :host {
  3. display: block;
  4. width: 100%;
  5. padding: 15px;
  6. }
  7. .dashboard {
  8. max-width: 1400px;
  9. margin: 0 auto;
  10. padding: 20px;
  11. background: white;
  12. border-radius: 8px;
  13. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  14. }
  15. /* 头部样式 */
  16. .dashboard-header {
  17. display: flex;
  18. justify-content: space-between;
  19. align-items: center;
  20. margin-bottom: 24px;
  21. padding-bottom: 16px;
  22. border-bottom: 1px solid #eee;
  23. }
  24. .dashboard-header h2 {
  25. display: flex;
  26. align-items: center;
  27. gap: 10px;
  28. font-size: 24px;
  29. color: #2c3e50;
  30. }
  31. .time-display {
  32. background: #2c3e50;
  33. color: white;
  34. padding: 8px 16px;
  35. border-radius: 20px;
  36. font-size: 14px;
  37. display: flex;
  38. align-items: center;
  39. gap: 8px;
  40. }
  41. /* 指标网格样式 */
  42. .metric-grid {
  43. display: grid;
  44. grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  45. gap: 20px;
  46. margin-bottom: 20px;
  47. }
  48. .metric-card {
  49. background: white;
  50. border-radius: 8px;
  51. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  52. padding: 20px;
  53. display: flex;
  54. align-items: center;
  55. gap: 15px;
  56. }
  57. .metric-icon {
  58. width: 60px;
  59. height: 60px;
  60. border-radius: 50%;
  61. display: flex;
  62. align-items: center;
  63. justify-content: center;
  64. font-size: 24px;
  65. color: white;
  66. }
  67. .metric-icon.blue { background: #3498db; }
  68. .metric-icon.green { background: #27ae60; }
  69. .metric-icon.orange { background: #f39c12; }
  70. .metric-icon.purple { background: #9b59b6; }
  71. .metric-data h3 {
  72. font-size: 16px;
  73. font-weight: 600;
  74. margin-bottom: 5px;
  75. color: #2c3e50;
  76. }
  77. .metric-value {
  78. font-size: 24px;
  79. font-weight: 700;
  80. color: #2c3e50;
  81. }
  82. .metric-label {
  83. font-size: 14px;
  84. color: #95a5a6;
  85. }
  86. /* 饼图样式 */
  87. .pie-chart {
  88. display: flex;
  89. align-items: center;
  90. gap: 30px;
  91. padding: 20px 0;
  92. }
  93. .chart-container {
  94. width: 180px;
  95. height: 180px;
  96. position: relative;
  97. border-radius: 50%;
  98. background: conic-gradient(
  99. #27ae60 0% 80%,
  100. #f39c12 80% 95%,
  101. #e74c3c 95% 100%
  102. );
  103. }
  104. .chart-center {
  105. position: absolute;
  106. width: 100px;
  107. height: 100px;
  108. background: white;
  109. border-radius: 50%;
  110. top: 50%;
  111. left: 50%;
  112. transform: translate(-50%, -50%);
  113. }
  114. .chart-legend div {
  115. display: flex;
  116. align-items: center;
  117. gap: 10px;
  118. margin-bottom: 15px;
  119. font-size: 16px;
  120. }
  121. .dot {
  122. width: 12px;
  123. height: 12px;
  124. border-radius: 50%;
  125. display: inline-block;
  126. }
  127. .dot.normal { background: #27ae60; }
  128. .dot.warning { background: #f39c12; }
  129. .dot.danger { background: #e74c3c; }
  130. /* 警报样式 */
  131. .alert-list {
  132. margin-top: 15px;
  133. }
  134. .alert-item {
  135. display: flex;
  136. align-items: center;
  137. gap: 15px;
  138. padding: 12px 16px;
  139. border-radius: 6px;
  140. margin-bottom: 10px;
  141. background: #f9f9f9;
  142. border-left: 4px solid;
  143. }
  144. .alert-item.critical {
  145. border-left-color: #e74c3c;
  146. background: #fdecea;
  147. }
  148. .alert-item.warning {
  149. border-left-color: #f39c12;
  150. background: #fef5e7;
  151. }
  152. .alert-item.info {
  153. border-left-color: #3498db;
  154. background: #ebf5fb;
  155. }
  156. .alert-item i {
  157. font-size: 20px;
  158. }
  159. .alert-item.critical i { color: #e74c3c; }
  160. .alert-item.warning i { color: #f39c12; }
  161. .alert-item.info i { color: #3498db; }
  162. .alert-content {
  163. flex: 1;
  164. }
  165. .alert-content strong {
  166. display: block;
  167. font-weight: 600;
  168. margin-bottom: 3px;
  169. }
  170. .alert-content span {
  171. font-size: 13px;
  172. color: #95a5a6;
  173. }
  174. /* 趋势图样式 */
  175. .trend-graph {
  176. display: flex;
  177. align-items: flex-end;
  178. gap: 10px;
  179. height: 200px;
  180. padding: 20px;
  181. background: #f8fafc;
  182. border-radius: 6px;
  183. margin-top: 15px;
  184. }
  185. .graph-bar {
  186. flex: 1;
  187. background: #3498db;
  188. height: calc(var(--height) * 2px);
  189. border-radius: 4px 4px 0 0;
  190. position: relative;
  191. }
  192. /* 仪表板行布局 */
  193. .dashboard-row {
  194. display: flex;
  195. gap: 20px;
  196. margin-bottom: 20px;
  197. }
  198. .chart-card, .alert-card {
  199. flex: 1;
  200. background: white;
  201. border-radius: 8px;
  202. padding: 20px;
  203. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  204. }
  205. .trend-card {
  206. background: white;
  207. border-radius: 8px;
  208. padding: 20px;
  209. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  210. }