123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589 |
- /* factory-overview.css */
- :host {
- display: block;
- width: 100%;
- padding: 15px;
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- }
- .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;
- }
- .header-left {
- display: flex;
- align-items: center;
- gap: 30px;
- }
- .dashboard-header h2 {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 24px;
- color: #2c3e50;
- margin: 0;
- }
- .quick-nav {
- display: flex;
- gap: 10px;
- }
- .nav-btn {
- padding: 8px 16px;
- background: #f1f2f6;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- transition: all 0.3s ease;
- }
- .nav-btn.active, .nav-btn:hover {
- background: #2c3e50;
- color: white;
- }
- .header-right {
- display: flex;
- align-items: center;
- gap: 20px;
- }
- .user-info {
- display: flex;
- align-items: center;
- gap: 8px;
- font-size: 14px;
- color: #2c3e50;
- }
- .time-display {
- background: #2c3e50;
- color: white;
- padding: 8px 16px;
- border-radius: 20px;
- font-size: 14px;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .refresh-btn {
- background: #27ae60;
- color: white;
- border: none;
- padding: 8px 15px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- display: flex;
- align-items: center;
- gap: 8px;
- transition: background 0.3s ease;
- }
- .refresh-btn:hover {
- background: #219653;
- }
- /* 指标网格样式 */
- .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;
- position: relative;
- overflow: hidden;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .metric-card:hover {
- transform: translateY(-5px);
- box-shadow: 0 12px 20px rgba(0,0,0,0.15);
- }
- .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 {
- flex: 1;
- }
- .metric-data h3 {
- font-size: 16px;
- font-weight: 600;
- margin-bottom: 5px;
- color: #2c3e50;
- }
- .metric-value {
- font-size: 24px;
- font-weight: 700;
- color: #2c3e50;
- margin: 5px 0;
- }
- .metric-label {
- font-size: 14px;
- color: #95a5a6;
- margin: 0;
- }
- /* 进度条样式 */
- .metric-progress {
- height: 6px;
- background: #e0e0e0;
- border-radius: 3px;
- margin-top: 10px;
- overflow: hidden;
- }
- .progress-bar {
- height: 100%;
- border-radius: 3px;
- transition: width 0.5s ease;
- }
- .metric-card:nth-child(1) .progress-bar { background: #3498db; }
- .metric-card:nth-child(2) .progress-bar { background: #f39c12; }
- .metric-card:nth-child(3) .progress-bar { background: #27ae60; }
- .metric-card:nth-child(4) .progress-bar { background: #9b59b6; }
- /* 悬停效果 */
- .metric-hover {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- background: rgba(0,0,0,0.8);
- color: white;
- padding: 10px;
- text-align: center;
- opacity: 0;
- transform: translateY(100%);
- transition: all 0.3s ease;
- }
- .metric-card.hover .metric-hover {
- opacity: 1;
- transform: translateY(0);
- }
- /* 仪表板行布局 */
- .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);
- }
- /* 饼图样式 */
- .chart-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
- .chart-tabs {
- display: flex;
- gap: 8px;
- }
- .tab-btn {
- padding: 6px 12px;
- border: none;
- border-radius: 15px;
- background: #f1f1f1;
- font-size: 12px;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .tab-btn.active, .tab-btn:hover {
- background: #2c3e50;
- color: white;
- }
- .chart-container-wrapper {
- display: flex;
- gap: 30px;
- }
- .pie-chart {
- display: flex;
- align-items: center;
- gap: 30px;
- padding: 10px 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%);
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .chart-center-text {
- font-size: 20px;
- font-weight: bold;
- color: #2c3e50;
- }
- .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; }
- /* 图表详情 */
- .chart-details {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 15px;
- flex: 1;
- }
- .detail-item {
- background: #f8fafc;
- border-radius: 6px;
- padding: 12px;
- transition: transform 0.3s ease;
- }
- .detail-item:hover {
- transform: translateY(-3px);
- box-shadow: 0 2px 6px rgba(0,0,0,0.1);
- }
- .detail-label {
- font-size: 13px;
- color: #7f8c8d;
- margin-bottom: 5px;
- }
- .detail-value {
- font-size: 18px;
- font-weight: 700;
- color: #2c3e50;
- }
- /* 警报样式 */
- .alert-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- }
- .alert-filter select {
- padding: 6px 12px;
- border: 1px solid #ddd;
- border-radius: 4px;
- background: white;
- font-size: 14px;
- }
- .alert-list {
- margin-top: 15px;
- max-height: 300px;
- overflow-y: auto;
- }
- .alert-item {
- display: flex;
- align-items: center;
- gap: 15px;
- padding: 12px 16px;
- border-radius: 6px;
- margin-bottom: 10px;
- background: #f9f9f9;
- border-left: 4px solid;
- transition: all 0.3s ease;
- }
- .alert-item:hover {
- transform: translateX(5px);
- box-shadow: 0 3px 8px rgba(0,0,0,0.1);
- }
- .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;
- }
- .alert-status {
- padding: 4px 10px;
- border-radius: 12px;
- font-size: 12px;
- font-weight: bold;
- }
- .alert-item.critical .alert-status {
- background: #e74c3c;
- color: white;
- }
- .alert-item.warning .alert-status {
- background: #f39c12;
- color: white;
- }
- .alert-item.info .alert-status {
- background: #3498db;
- color: white;
- }
- .alert-footer {
- margin-top: 15px;
- text-align: center;
- }
- .view-all-btn {
- background: #3498db;
- color: white;
- border: none;
- padding: 8px 15px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- display: inline-flex;
- align-items: center;
- gap: 8px;
- transition: background 0.3s ease;
- }
- .view-all-btn:hover {
- background: #2980b9;
- }
- /* 趋势图样式 */
- .trend-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
- .time-range-selector {
- display: flex;
- gap: 8px;
- }
- .time-btn {
- padding: 6px 12px;
- border: 1px solid #ddd;
- border-radius: 15px;
- background: white;
- font-size: 12px;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .time-btn.active, .time-btn:hover {
- border-color: #3498db;
- background: #3498db;
- color: white;
- }
- .trend-graph {
- display: flex;
- flex-direction: column;
- height: 200px;
- padding: 20px;
- background: #f8fafc;
- border-radius: 6px;
- margin-top: 15px;
- position: relative;
- }
- .graph-labels {
- display: flex;
- justify-content: space-between;
- margin-top: auto;
- color: #7f8c8d;
- font-size: 12px;
- }
- .graph-bars {
- display: flex;
- align-items: flex-end;
- gap: 10px;
- height: 100%;
- width: 100%;
- }
- .graph-bar {
- flex: 1;
- background: #3498db;
- border-radius: 4px 4px 0 0;
- position: relative;
- transition: height 0.5s ease;
- }
- .graph-bar::after {
- content: attr(style);
- position: absolute;
- top: -25px;
- left: 50%;
- transform: translateX(-50%);
- background: rgba(0,0,0,0.7);
- color: white;
- padding: 3px 8px;
- border-radius: 4px;
- font-size: 12px;
- opacity: 0;
- transition: opacity 0.3s ease;
- }
- .graph-bar:hover::after {
- opacity: 1;
- }
- /* 响应式调整 */
- @media (max-width: 1200px) {
- .dashboard-row {
- flex-direction: column;
- }
- }
- @media (max-width: 768px) {
- .dashboard-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 15px;
- }
- .header-left, .header-right {
- width: 100%;
- }
- .quick-nav {
- overflow-x: auto;
- padding-bottom: 10px;
- }
- .chart-container-wrapper {
- flex-direction: column;
- }
- }
|