123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- /* 组件容器样式 */
- :host {
- display: block;
- width: 100%;
- padding: 15px;
- }
- .dashboard {
- max-width: 1400px;
- margin: 0 auto;
- padding: 20px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
- }
- /* 头部样式 */
- .dashboard-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24px;
- padding-bottom: 16px;
- border-bottom: 1px solid #eee;
- }
- .dashboard-header h2 {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 24px;
- color: #2c3e50;
- }
- .time-display {
- background: #2c3e50;
- color: white;
- padding: 8px 16px;
- border-radius: 20px;
- font-size: 14px;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- /* 指标网格样式 */
- .metric-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
- gap: 20px;
- margin-bottom: 20px;
- }
- .metric-card {
- background: white;
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
- padding: 20px;
- display: flex;
- align-items: center;
- gap: 15px;
- }
- .metric-icon {
- width: 60px;
- height: 60px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24px;
- color: white;
- }
- .metric-icon.blue { background: #3498db; }
- .metric-icon.green { background: #27ae60; }
- .metric-icon.orange { background: #f39c12; }
- .metric-icon.purple { background: #9b59b6; }
- .metric-data h3 {
- font-size: 16px;
- font-weight: 600;
- margin-bottom: 5px;
- color: #2c3e50;
- }
- .metric-value {
- font-size: 24px;
- font-weight: 700;
- color: #2c3e50;
- }
- .metric-label {
- font-size: 14px;
- color: #95a5a6;
- }
- /* 饼图样式 */
- .pie-chart {
- display: flex;
- align-items: center;
- gap: 30px;
- padding: 20px 0;
- }
- .chart-container {
- width: 180px;
- height: 180px;
- position: relative;
- border-radius: 50%;
- background: conic-gradient(
- #27ae60 0% 80%,
- #f39c12 80% 95%,
- #e74c3c 95% 100%
- );
- }
- .chart-center {
- position: absolute;
- width: 100px;
- height: 100px;
- background: white;
- border-radius: 50%;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .chart-legend div {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-bottom: 15px;
- font-size: 16px;
- }
- .dot {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- display: inline-block;
- }
- .dot.normal { background: #27ae60; }
- .dot.warning { background: #f39c12; }
- .dot.danger { background: #e74c3c; }
- /* 警报样式 */
- .alert-list {
- margin-top: 15px;
- }
- .alert-item {
- display: flex;
- align-items: center;
- gap: 15px;
- padding: 12px 16px;
- border-radius: 6px;
- margin-bottom: 10px;
- background: #f9f9f9;
- border-left: 4px solid;
- }
- .alert-item.critical {
- border-left-color: #e74c3c;
- background: #fdecea;
- }
- .alert-item.warning {
- border-left-color: #f39c12;
- background: #fef5e7;
- }
- .alert-item.info {
- border-left-color: #3498db;
- background: #ebf5fb;
- }
- .alert-item i {
- font-size: 20px;
- }
- .alert-item.critical i { color: #e74c3c; }
- .alert-item.warning i { color: #f39c12; }
- .alert-item.info i { color: #3498db; }
- .alert-content {
- flex: 1;
- }
- .alert-content strong {
- display: block;
- font-weight: 600;
- margin-bottom: 3px;
- }
- .alert-content span {
- font-size: 13px;
- color: #95a5a6;
- }
- /* 趋势图样式 */
- .trend-graph {
- display: flex;
- align-items: flex-end;
- gap: 10px;
- height: 200px;
- padding: 20px;
- background: #f8fafc;
- border-radius: 6px;
- margin-top: 15px;
- }
- .graph-bar {
- flex: 1;
- background: #3498db;
- height: calc(var(--height) * 2px);
- border-radius: 4px 4px 0 0;
- position: relative;
- }
- /* 仪表板行布局 */
- .dashboard-row {
- display: flex;
- gap: 20px;
- margin-bottom: 20px;
- }
- .chart-card, .alert-card {
- flex: 1;
- background: white;
- border-radius: 8px;
- padding: 20px;
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
- }
- .trend-card {
- background: white;
- border-radius: 8px;
- padding: 20px;
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
- }
|