fix: 重写完整CSS,设置弹框可滚动,字体和间距放大

This commit is contained in:
2026-04-17 12:32:05 +08:00
parent 7f513cc632
commit 2f0f287c0f
+204 -215
View File
@@ -73,11 +73,11 @@ body {
/* 按钮 */ /* 按钮 */
button { button {
padding: 8px 16px; padding: 10px 20px;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 14px;
transition: all 0.2s; transition: all 0.2s;
} }
@@ -109,8 +109,8 @@ button {
} }
.btn-small { .btn-small {
padding: 5px 15px; padding: 6px 15px;
font-size: 12px; font-size: 13px;
background: #9e9e9e; background: #9e9e9e;
color: white; color: white;
} }
@@ -318,31 +318,6 @@ button {
background: #f9f5ff; background: #f9f5ff;
} }
.event-card.type-人物活动 {
border-left-color: #e91e63;
}
.event-card.type-运动检测 {
border-left-color: #ff9800;
}
.event-card.type-物体变化 {
border-left-color: #ff9800;
}
.event-card.type-环境变化 {
border-left-color: #4caf50;
}
.event-card.type-异常情况 {
border-left-color: #f44336;
}
.event-card.type-无事件 {
border-left-color: #9e9e9e;
opacity: 0.7;
}
.event-header { .event-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -395,6 +370,25 @@ button {
background: #e0e0e0; background: #e0e0e0;
} }
/* Toast 提示 */
.toast {
position: fixed;
top: 80px;
left: 50%;
transform: translateX(-50%);
background: #333;
color: white;
padding: 12px 24px;
border-radius: 8px;
z-index: 2000;
font-size: 14px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.toast.fade-out {
opacity: 0;
}
/* 模态框 */ /* 模态框 */
.modal { .modal {
display: none; display: none;
@@ -408,7 +402,7 @@ button {
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
overflow-y: auto; overflow-y: auto;
padding: 20px; padding: 30px;
} }
.modal.active { .modal.active {
@@ -417,20 +411,11 @@ button {
.modal-content { .modal-content {
background: white; background: white;
padding: 15px; padding: 20px;
border-radius: 10px; border-radius: 10px;
max-width: 800px; max-width: 700px;
position: relative; position: relative;
} margin: 20px auto;
.settings-modal-content {
max-width: 500px;
}
.settings-modal-content h2 {
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
} }
.modal-close { .modal-close {
@@ -512,104 +497,218 @@ button {
gap: 10px; gap: 10px;
} }
/* 设置模态框 */ /* 设置模态框 - 可滚动 */
.settings-section { .settings-modal-content {
margin-bottom: 8px; max-width: 550px;
padding-bottom: 6px; max-height: 85vh;
border-bottom: 1px solid #eee; overflow-y: auto;
} }
.settings-section:last-of-type { .settings-modal-content h2 {
border-bottom: none; margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
font-size: 18px;
}
.settings-section {
margin-bottom: 15px;
padding: 15px;
background: #f9f9f9;
border-radius: 8px;
} }
.settings-section h4 { .settings-section h4 {
margin-bottom: 6px; margin-bottom: 12px;
color: #667eea; color: #667eea;
font-size: 13px; font-size: 15px;
font-weight: bold;
} }
.setting-item { .setting-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 5px; gap: 12px;
margin-bottom: 4px; margin-bottom: 10px;
} }
.setting-item label { .setting-item label {
min-width: 100px; min-width: 140px;
color: #555; color: #333;
font-size: 12px; font-size: 14px;
font-weight: 500;
} }
.setting-item input[type="text"], .setting-item input[type="text"],
.setting-item input[type="number"], .setting-item input[type="number"],
.setting-item input[type="password"] { .setting-item input[type="password"] {
flex: 1; flex: 1;
padding: 4px 8px; padding: 8px 12px;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 5px;
font-size: 12px; font-size: 14px;
max-width: 120px; min-width: 180px;
} }
.setting-item input[type="checkbox"] { .setting-item input[type="checkbox"] {
width: 14px; width: 20px;
height: 14px; height: 20px;
} }
.setting-note { .setting-item select {
color: #888; padding: 8px 12px;
font-size: 11px; border: 1px solid #ddd;
margin-top: 3px; border-radius: 5px;
font-size: 14px;
min-width: 180px;
} }
.setting-desc { .setting-desc {
color: #888; color: #888;
font-size: 11px; font-size: 13px;
}
.setting-note {
color: #888;
font-size: 13px;
margin-top: 5px;
padding-left: 140px;
} }
.settings-actions { .settings-actions {
margin-top: 10px; margin-top: 20px;
padding-top: 8px; padding: 15px;
border-top: 1px solid #eee; background: white;
border-radius: 8px;
display: flex;
gap: 15px;
justify-content: center;
border-top: 2px solid #eee;
}
.settings-actions button {
padding: 12px 30px;
font-size: 15px;
}
/* 统计图表模态框 */
.stats-modal-content {
max-width: 600px;
max-height: 85vh;
overflow-y: auto;
}
.stats-controls {
display: flex; display: flex;
gap: 10px; gap: 10px;
justify-content: center; margin-bottom: 15px;
} }
/* Toast 提示 */ .stats-summary-box {
.toast { margin-bottom: 15px;
position: fixed; }
top: 80px;
left: 50%; .chart-container {
transform: translateX(-50%); margin-bottom: 20px;
background: #333; }
color: white;
padding: 12px 24px; .chart-container h4 {
border-radius: 8px; margin-bottom: 10px;
z-index: 2000; color: #667eea;
font-size: 14px; font-size: 14px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
animation: fadeIn 0.3s;
} }
.toast.fade-out { .timeline-chart {
animation: fadeOut 0.3s; display: flex;
opacity: 0; gap: 3px;
height: 150px;
align-items: flex-end;
background: #f5f5f5;
padding: 10px;
border-radius: 5px;
} }
@keyframes fadeIn { .timeline-bar {
from { opacity: 0; transform: translateX(-50%) translateY(-10px); } flex: 1;
to { opacity: 1; transform: translateX(-50%) translateY(0); } display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100%;
} }
@keyframes fadeOut { .bar-fill {
from { opacity: 1; } background: #667eea;
to { opacity: 0; } width: 80%;
min-height: 5px;
border-radius: 3px 3px 0 0;
} }
/* 人员库样式 */ .bar-label {
font-size: 10px;
color: #888;
margin-top: 3px;
}
.bar-value {
font-size: 11px;
color: #667eea;
font-weight: bold;
}
.history-chart {
display: flex;
gap: 5px;
height: 120px;
align-items: flex-end;
background: #f5f5f5;
padding: 10px;
border-radius: 5px;
}
.history-bar {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100%;
}
.bar-fill.images {
background: #4CAF50;
}
.event-type-bar {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.event-type-label {
min-width: 100px;
font-size: 13px;
color: #555;
}
.event-type-fill {
background: #667eea;
height: 24px;
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 10px;
min-width: 40px;
}
.event-type-count {
font-size: 13px;
color: white;
font-weight: bold;
}
/* 人员库模态框 */
.persons-stats { .persons-stats {
margin-bottom: 15px; margin-bottom: 15px;
} }
@@ -670,126 +769,6 @@ button {
gap: 8px; gap: 8px;
} }
/* 统计图表样式 */
.stats-modal-content {
max-width: 600px;
max-height: 85vh;
overflow-y: auto;
}
.stats-controls {
display: flex;
gap: 10px;
margin-bottom: 15px;
align-items: center;
}
.stats-summary-box {
margin-bottom: 15px;
}
.chart-container {
margin-bottom: 20px;
}
.chart-container h4 {
margin-bottom: 10px;
color: #667eea;
font-size: 13px;
}
.timeline-chart {
display: flex;
gap: 2px;
height: 150px;
align-items: flex-end;
background: #f5f5f5;
padding: 10px;
border-radius: 5px;
}
.timeline-bar {
flex: 1;
min-width: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100%;
}
.bar-fill {
background: #667eea;
width: 80%;
min-height: 5px;
border-radius: 3px 3px 0 0;
}
.bar-label {
font-size: 9px;
color: #888;
margin-top: 3px;
text-align: center;
}
.bar-value {
font-size: 10px;
color: #667eea;
font-weight: bold;
}
.history-chart {
display: flex;
gap: 5px;
height: 120px;
align-items: flex-end;
background: #f5f5f5;
padding: 10px;
border-radius: 5px;
}
.history-bar {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
height: 100%;
}
.bar-fill.images {
background: #4CAF50;
}
.event-type-bar {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.event-type-label {
min-width: 100px;
font-size: 12px;
color: #555;
}
.event-type-fill {
background: #667eea;
height: 20px;
border-radius: 3px;
display: flex;
align-items: center;
padding-left: 8px;
min-width: 30px;
}
.event-type-count {
font-size: 12px;
color: white;
font-weight: bold;
}
/* 响应式 */ /* 响应式 */
@media (max-width: 768px) { @media (max-width: 768px) {
.control-panel { .control-panel {
@@ -808,7 +787,17 @@ button {
flex-wrap: wrap; flex-wrap: wrap;
} }
.settings-modal-content { .settings-modal-content,
.stats-modal-content {
max-width: 95vw; max-width: 95vw;
padding: 15px;
}
.setting-item {
flex-wrap: wrap;
}
.setting-item label {
min-width: 100%;
} }
} }