ERP/frontend/assets/meituan-test.css

556 lines
8.2 KiB
CSS
Raw Normal View History

2026-01-05 07:19:13 +00:00
/* 页面布局 - 单页面适配 */
.meituan-test-page {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
height: calc(100vh - 80px);
display: flex;
flex-direction: column;
}
.meituan-test-content {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto 1fr;
gap: 20px;
flex: 1;
min-height: 0;
overflow: hidden;
}
/* 卡片布局 */
.server-status-card {
grid-column: 1;
grid-row: 1;
}
.control-panel-card {
grid-column: 2;
grid-row: 1;
}
.self-test-card {
grid-column: 1 / -1;
grid-row: 2;
max-height: 300px;
overflow: hidden;
}
.stations-card {
grid-column: 1 / -1;
grid-row: 3;
min-height: 0;
display: flex;
flex-direction: column;
}
.stations-card .card-body {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
/* 状态指示器 */
.status-indicator {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
}
.status-dot.online {
background-color: #52c41a;
box-shadow: 0 0 8px rgba(82, 196, 26, 0.5);
}
.status-dot.offline {
background-color: #ff4d4f;
}
.status-dot.connecting {
background-color: #faad14;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
/* 服务器状态卡片 - 紧凑版 */
.server-status-card.compact {
max-width: 400px;
}
.server-status-card.compact .card-body {
padding: 15px 20px;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 0;
}
.info-label {
font-size: 14px;
color: #666;
}
.info-value {
font-size: 14px;
color: #333;
font-weight: 500;
}
/* 信息网格 */
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.info-item {
display: flex;
flex-direction: column;
gap: 5px;
}
.info-item label {
font-size: 12px;
color: #666;
font-weight: 500;
}
.info-item span {
font-size: 14px;
color: #333;
}
/* 基站表格 */
.stations-table-container {
overflow-x: auto;
overflow-y: auto;
flex: 1;
min-height: 0;
max-height: 100%;
}
.stations-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.stations-table th,
.stations-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e8e8e8;
}
.stations-table th {
position: sticky;
top: 0;
background: var(--surface);
z-index: 10;
font-weight: 600;
color: #333;
}
.status-badge {
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.status-badge.online {
background-color: #f6ffed;
color: #52c41a;
border: 1px solid #b7eb8f;
}
.status-badge.offline {
background-color: #fff2f0;
color: #ff4d4f;
border: 1px solid #ffccc7;
}
/* 命令表单 */
.command-form {
margin-bottom: 20px;
}
.command-form .form-group {
margin-bottom: 15px;
}
.command-form label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #333;
}
.command-form .form-control {
width: 100%;
padding: 8px 12px;
border: 1px solid #d9d9d9;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.3s;
}
.command-form .form-control:focus {
outline: none;
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.form-actions {
display: flex;
gap: 10px;
}
/* 命令输出 */
.command-output {
margin-top: 20px;
}
.command-output h4 {
margin-bottom: 10px;
color: #333;
}
.output-container {
background-color: #f5f5f5;
border-radius: 6px;
padding: 15px;
max-height: 400px;
overflow-y: auto;
}
.output-container pre {
margin: 0;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 13px;
line-height: 1.5;
color: #333;
white-space: pre-wrap;
word-wrap: break-word;
}
/* 日志容器 */
.logs-container {
background-color: #f5f5f5;
border-radius: 6px;
padding: 15px;
max-height: 500px;
overflow-y: auto;
}
.logs-container pre {
margin: 0;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 13px;
line-height: 1.5;
color: #333;
white-space: pre-wrap;
word-wrap: break-word;
}
/* 卡片样式增强 */
.card {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
overflow: hidden;
display: flex;
flex-direction: column;
height: 100%;
}
.card-header {
padding: 16px 20px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.card-header h3 {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #333;
}
.card-actions {
display: flex;
gap: 10px;
align-items: center;
}
.card-body {
padding: 20px;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
/* 按钮样式 */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
}
.btn:hover {
opacity: 0.9;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.btn-secondary {
background-color: #f5f5f5;
color: #333;
border: 1px solid #d9d9d9;
}
.btn-info {
background-color: #17a2b8;
color: #fff;
}
.btn-sm {
padding: 4px 8px;
font-size: 12px;
}
.btn-icon {
font-size: 16px;
}
/* 卡片布局 */
.server-status-card {
grid-column: 1;
grid-row: 1;
}
.control-panel-card {
grid-column: 2;
grid-row: 1;
}
.self-test-card {
grid-column: 1 / -1;
grid-row: 2;
}
.stations-card {
grid-column: 1 / -1;
grid-row: 3;
}
/* 控制面板样式 */
.control-panel-card .card-body {
padding: 20px;
}
.control-row {
display: flex;
gap: 15px;
align-items: center;
}
.control-row .form-control {
flex: 1;
max-width: 300px;
}
.checkbox-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 14px;
color: var(--text);
}
.checkbox-label input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
/* 自检结果样式 */
.self-test-card {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.self-test-card .card-body {
padding: 15px 20px;
}
.test-results {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
padding: 10px 0;
}
.test-module {
background: white;
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.2s ease;
}
.test-module:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.module-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #f0f0f0;
}
.module-name {
font-size: 18px;
font-weight: bold;
color: #333;
}
.module-status {
font-size: 14px;
font-weight: 500;
padding: 4px 12px;
border-radius: 12px;
background: #f0f0f0;
color: #666;
}
.module-status.testing {
background: #fff3cd;
color: #856404;
animation: pulse 1.5s infinite;
}
.module-status.success {
background: #d4edda;
color: #155724;
}
.module-status.error {
background: #f8d7da;
color: #721c24;
}
.module-result {
font-size: 24px;
font-weight: bold;
text-align: center;
padding: 20px 0;
min-height: 60px;
display: flex;
align-items: center;
justify-content: center;
color: #333;
}
.module-result.success {
color: #28a745;
}
.module-result.error {
color: #dc3545;
}
.test-status {
font-size: 16px;
font-weight: 500;
color: #666;
}
/* 响应式布局 */
@media (max-width: 1200px) {
.meituan-test-content {
grid-template-columns: 1fr;
grid-template-rows: auto auto auto 1fr;
}
.server-status-card {
grid-column: 1;
grid-row: 1;
}
.control-panel-card {
grid-column: 1;
grid-row: 2;
}
.self-test-card {
grid-column: 1;
grid-row: 3;
}
.stations-card {
grid-column: 1;
grid-row: 4;
}
.test-results {
grid-template-columns: 1fr;
gap: 15px;
}
}
/* 响应式设计 */
@media (max-width: 768px) {
.meituan-test-page {
padding: 10px;
}
.info-grid {
grid-template-columns: 1fr;
}
.form-actions {
flex-direction: column;
}
.stations-table-container {
margin: 0 -10px;
}
}