- 优化数据分析页面,添加可定制的图表功能 - 支持多种图表类型:折线图、柱状图、饼图、环形图、雷达图、极坐标图 - 添加图表定制功能:时间范围选择、数据维度选择 - 实现Excel工单导入功能,支持详情.xlsx文件 - 添加工单编辑功能,包括前端UI和后端API - 修复WebSocket连接错误,处理invalid Connection header问题 - 简化预警管理参数,改为卡片式选择 - 实现Agent主动调用,无需人工干预 - 改进知识库导入,结合累计工单内容与大模型输出
607 lines
10 KiB
CSS
607 lines
10 KiB
CSS
/* TSP助手预警管理系统样式 */
|
|
|
|
body {
|
|
background-color: #f8f9fa;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-weight: bold;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
/* 健康状态圆圈 */
|
|
.health-score {
|
|
text-align: center;
|
|
}
|
|
|
|
.score-circle {
|
|
width: 100px;
|
|
height: 100px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 10px;
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
color: white;
|
|
position: relative;
|
|
}
|
|
|
|
.score-circle.excellent {
|
|
background: linear-gradient(135deg, #28a745, #20c997);
|
|
}
|
|
|
|
.score-circle.good {
|
|
background: linear-gradient(135deg, #17a2b8, #6f42c1);
|
|
}
|
|
|
|
.score-circle.fair {
|
|
background: linear-gradient(135deg, #ffc107, #fd7e14);
|
|
}
|
|
|
|
.score-circle.poor {
|
|
background: linear-gradient(135deg, #dc3545, #e83e8c);
|
|
}
|
|
|
|
.score-circle.critical {
|
|
background: linear-gradient(135deg, #6c757d, #343a40);
|
|
}
|
|
|
|
.health-status {
|
|
font-size: 0.9rem;
|
|
color: #6c757d;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
/* 预警卡片 */
|
|
.alert-card {
|
|
border-left: 4px solid;
|
|
margin-bottom: 1rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.alert-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.alert-card.critical {
|
|
border-left-color: #dc3545;
|
|
}
|
|
|
|
.alert-card.error {
|
|
border-left-color: #fd7e14;
|
|
}
|
|
|
|
.alert-card.warning {
|
|
border-left-color: #ffc107;
|
|
}
|
|
|
|
.alert-card.info {
|
|
border-left-color: #17a2b8;
|
|
}
|
|
|
|
.alert-level {
|
|
font-size: 0.8rem;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.alert-level.critical {
|
|
background-color: #dc3545;
|
|
color: white;
|
|
}
|
|
|
|
.alert-level.error {
|
|
background-color: #fd7e14;
|
|
color: white;
|
|
}
|
|
|
|
.alert-level.warning {
|
|
background-color: #ffc107;
|
|
color: #212529;
|
|
}
|
|
|
|
.alert-level.info {
|
|
background-color: #17a2b8;
|
|
color: white;
|
|
}
|
|
|
|
/* 规则表格 */
|
|
.table th {
|
|
background-color: #f8f9fa;
|
|
border-top: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.rule-status {
|
|
font-size: 0.8rem;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
}
|
|
|
|
.rule-status.enabled {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.rule-status.disabled {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
/* 统计卡片动画 */
|
|
.card {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
/* 按钮样式 */
|
|
.btn {
|
|
border-radius: 0.375rem;
|
|
font-weight: 500;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* 加载动画 */
|
|
.loading {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 3px solid #f3f3f3;
|
|
border-top: 3px solid #007bff;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.container-fluid {
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.score-circle {
|
|
width: 80px;
|
|
height: 80px;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.card-body {
|
|
padding: 1rem;
|
|
}
|
|
}
|
|
|
|
/* 自定义滚动条 */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: #c1c1c1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #a8a8a8;
|
|
}
|
|
|
|
/* 状态指示器 */
|
|
.status-indicator {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.status-indicator.running {
|
|
background-color: #28a745;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.status-indicator.stopped {
|
|
background-color: #dc3545;
|
|
}
|
|
|
|
.status-indicator.unknown {
|
|
background-color: #6c757d;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
|
|
}
|
|
70% {
|
|
box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
|
|
}
|
|
100% {
|
|
box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
|
|
}
|
|
}
|
|
|
|
/* 模态框样式 */
|
|
.modal-content {
|
|
border-radius: 0.5rem;
|
|
border: none;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.modal-header {
|
|
border-bottom: 1px solid #e9ecef;
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.modal-footer {
|
|
border-top: 1px solid #e9ecef;
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
/* 表格样式 */
|
|
.table-hover tbody tr:hover {
|
|
background-color: rgba(0,123,255,0.1);
|
|
}
|
|
|
|
/* 空状态样式 */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 3rem 1rem;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.empty-state i {
|
|
font-size: 3rem;
|
|
margin-bottom: 1rem;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* 工具提示样式 */
|
|
.tooltip {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.tooltip-inner {
|
|
background-color: #212529;
|
|
border-radius: 0.375rem;
|
|
}
|
|
|
|
/* 进度条样式 */
|
|
.progress {
|
|
height: 8px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.progress-bar {
|
|
border-radius: 4px;
|
|
}
|
|
|
|
/* 徽章样式 */
|
|
.badge {
|
|
font-size: 0.75rem;
|
|
padding: 0.375rem 0.5rem;
|
|
}
|
|
|
|
/* 卡片标题样式 */
|
|
.card-header h5 {
|
|
margin: 0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.card-header h5 i {
|
|
color: #007bff;
|
|
}
|
|
|
|
/* 统计数字样式 */
|
|
.stat-number {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
line-height: 1;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.875rem;
|
|
opacity: 0.8;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
/* 预警数据展示优化 */
|
|
.alert-data {
|
|
background-color: #f8f9fa;
|
|
border: 1px solid #e9ecef;
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 12px;
|
|
max-height: 100px;
|
|
overflow-y: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.alert-message {
|
|
font-weight: 500;
|
|
margin-bottom: 8px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.alert-meta {
|
|
font-size: 12px;
|
|
color: #6c757d;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* 过滤和排序控件 */
|
|
.alert-controls {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.alert-controls .form-select {
|
|
min-width: 120px;
|
|
}
|
|
|
|
/* 预警卡片内容优化 */
|
|
.alert-card .card-body {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.alert-card .d-flex {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.alert-card .flex-grow-1 {
|
|
min-width: 0;
|
|
}
|
|
|
|
/* 规则表格操作按钮 */
|
|
.table .btn-sm {
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.75rem;
|
|
margin-right: 0.25rem;
|
|
}
|
|
|
|
/* 响应式设计优化 */
|
|
@media (max-width: 768px) {
|
|
.alert-controls {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.alert-controls .form-select {
|
|
min-width: auto;
|
|
}
|
|
|
|
.alert-card .d-flex {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.alert-card .ms-3 {
|
|
margin-left: 0 !important;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.alert-data {
|
|
font-size: 10px;
|
|
max-height: 80px;
|
|
}
|
|
}
|
|
|
|
/* 预警级别颜色优化 */
|
|
.alert-card.critical {
|
|
background-color: #f8d7da;
|
|
border-color: #dc3545;
|
|
}
|
|
|
|
.alert-card.error {
|
|
background-color: #fff3cd;
|
|
border-color: #fd7e14;
|
|
}
|
|
|
|
.alert-card.warning {
|
|
background-color: #fff3cd;
|
|
border-color: #ffc107;
|
|
}
|
|
|
|
.alert-card.info {
|
|
background-color: #d1ecf1;
|
|
border-color: #17a2b8;
|
|
}
|
|
|
|
/* 预设规则卡片样式 */
|
|
.preset-card {
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
border: 2px solid transparent;
|
|
height: 100%;
|
|
}
|
|
|
|
.preset-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
|
|
border-color: #007bff;
|
|
}
|
|
|
|
.preset-card.selected {
|
|
border-color: #28a745;
|
|
background-color: #f8fff9;
|
|
}
|
|
|
|
.preset-card .card-body {
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.preset-card h6 {
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.preset-card p {
|
|
margin-bottom: 1rem;
|
|
color: #6c757d;
|
|
font-size: 0.875rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.preset-params {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.preset-params .badge {
|
|
font-size: 0.7rem;
|
|
padding: 0.25rem 0.5rem;
|
|
}
|
|
|
|
/* 预设模板模态框样式 */
|
|
#presetModal .modal-dialog {
|
|
max-width: 1200px;
|
|
}
|
|
|
|
#presetModal .modal-body {
|
|
max-height: 70vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* 预设规则分类标题 */
|
|
#presetModal h6 {
|
|
font-weight: 600;
|
|
margin-bottom: 1rem;
|
|
padding-bottom: 0.5rem;
|
|
border-bottom: 2px solid;
|
|
}
|
|
|
|
#presetModal h6.text-primary {
|
|
border-bottom-color: #007bff;
|
|
}
|
|
|
|
#presetModal h6.text-success {
|
|
border-bottom-color: #28a745;
|
|
}
|
|
|
|
#presetModal h6.text-info {
|
|
border-bottom-color: #17a2b8;
|
|
}
|
|
|
|
#presetModal h6.text-warning {
|
|
border-bottom-color: #ffc107;
|
|
}
|
|
|
|
/* 预设卡片图标样式 */
|
|
.preset-card i {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.preset-card:hover i {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
/* 预设卡片选中状态 */
|
|
.preset-card.selected i {
|
|
color: #28a745 !important;
|
|
}
|
|
|
|
.preset-card.selected h6 {
|
|
color: #28a745;
|
|
}
|
|
|
|
/* 响应式预设卡片 */
|
|
@media (max-width: 768px) {
|
|
.preset-card .card-body {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.preset-card h6 {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.preset-card p {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.preset-params .badge {
|
|
font-size: 0.65rem;
|
|
padding: 0.2rem 0.4rem;
|
|
}
|
|
}
|
|
|
|
/* 预设规则快速选择 */
|
|
.preset-quick-select {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.preset-quick-select .btn {
|
|
font-size: 0.8rem;
|
|
padding: 0.25rem 0.75rem;
|
|
}
|
|
|
|
/* 预设规则预览 */
|
|
.preset-preview {
|
|
background-color: #f8f9fa;
|
|
border: 1px solid #e9ecef;
|
|
border-radius: 0.375rem;
|
|
padding: 1rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.preset-preview h6 {
|
|
color: #495057;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.preset-preview .preview-params {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.preset-preview .preview-param {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 0.25rem 0;
|
|
border-bottom: 1px solid #e9ecef;
|
|
}
|
|
|
|
.preset-preview .preview-param:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.preset-preview .preview-param strong {
|
|
color: #495057;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.preset-preview .preview-param span {
|
|
color: #6c757d;
|
|
font-size: 0.8rem;
|
|
}
|