From 1d84456c0f4fc12d8cc0ffeff2d0319b150a4f88 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Fri, 6 Mar 2026 14:18:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E5=86=99H5=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C=E5=AE=9E=E7=8E=B0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=84=9F=E7=9F=A5=E7=9A=84=E4=BA=A4=E4=BA=92=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 待处理: 显示3个按钮(前往处理/已处理/误报忽略) - 处理中: 显示2个按钮(已处理/误报忽略) - 已处理/已忽略/自动关闭: 隐藏按钮,显示结果条 - 添加确认弹窗防止误操作 - 优化移动端显示(word-break, 圆角等) Co-Authored-By: Claude Opus 4.6 --- app/static/alarm_detail.html | 265 ++++++++++++++++++++++------------- 1 file changed, 165 insertions(+), 100 deletions(-) diff --git a/app/static/alarm_detail.html b/app/static/alarm_detail.html index 8b75c32..4ed4c62 100644 --- a/app/static/alarm_detail.html +++ b/app/static/alarm_detail.html @@ -16,7 +16,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica /* 告警信息 */ .info-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 12px; } -.info-card .level-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: #fff; margin-bottom: 8px; } +.level-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: #fff; margin-bottom: 8px; } .level-1 { background: #1890ff; } .level-2 { background: #faad14; } .level-3 { background: #fa541c; } @@ -25,162 +25,227 @@ body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica .info-row { display: flex; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0; } .info-row:last-child { border-bottom: none; } .info-row .label { color: #999; width: 70px; flex-shrink: 0; } -.info-row .value { color: #333; flex: 1; } +.info-row .value { color: #333; flex: 1; word-break: break-all; } /* VLM 描述 */ .vlm-desc { background: #f0f7ff; border-left: 3px solid #1890ff; padding: 10px 12px; border-radius: 0 6px 6px 0; margin-bottom: 12px; font-size: 13px; color: #555; } .vlm-desc .tag { font-size: 11px; color: #1890ff; margin-bottom: 4px; } -/* 状态 */ -.status-bar { background: #fff; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; text-align: center; } -.status-bar .status { font-size: 14px; font-weight: 500; } -.status-new { color: #fa541c; } -.status-handling { color: #faad14; } -.status-done { color: #52c41a; } -.status-false { color: #999; } +/* 状态条 */ +.status-bar { background: #fff; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; } +.status-inner { display: flex; align-items: center; justify-content: center; gap: 8px; } +.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } +.dot-pending { background: #fa541c; } +.dot-handling { background: #faad14; } +.dot-done { background: #52c41a; } +.dot-false { background: #999; } +.status-text { font-size: 14px; font-weight: 500; } +.status-sub { font-size: 12px; color: #999; text-align: center; margin-top: 4px; } + +/* 结果条(终态显示) */ +.result-bar { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 12px; text-align: center; } +.result-bar .result-icon { font-size: 32px; margin-bottom: 6px; } +.result-bar .result-text { font-size: 15px; font-weight: 500; margin-bottom: 4px; } +.result-bar .result-sub { font-size: 12px; color: #999; } +.result-done { border-left: 4px solid #52c41a; } +.result-false { border-left: 4px solid #999; } +.result-auto { border-left: 4px solid #1890ff; } /* 按钮组 */ .actions { display: flex; gap: 10px; padding: 0 0 20px; } -.actions .btn { flex: 1; padding: 12px 0; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity 0.2s; } -.actions .btn:active { opacity: 0.7; } +.btn { flex: 1; padding: 12px 0; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity 0.2s; } +.btn:active { opacity: 0.7; } .btn-go { background: #1890ff; color: #fff; } .btn-done { background: #52c41a; color: #fff; } -.btn-false { background: #f0f0f0; color: #666; } -.btn:disabled { opacity: 0.5; cursor: not-allowed; } +.btn-false { background: #f5f5f5; color: #666; border: 1px solid #d9d9d9; } +.btn:disabled { opacity: 0.4; cursor: not-allowed; } + +/* 弹窗 */ +.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 50; display: none; align-items: center; justify-content: center; } +.modal-mask.show { display: flex; } +.modal-box { background: #fff; border-radius: 12px; width: 280px; padding: 24px 20px 16px; text-align: center; } +.modal-box .modal-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; } +.modal-box .modal-desc { font-size: 13px; color: #666; margin-bottom: 16px; } +.modal-btns { display: flex; gap: 10px; } +.modal-btns .btn { font-size: 14px; padding: 10px 0; } +.btn-cancel { background: #f5f5f5; color: #666; } +.btn-confirm-modal { background: #1890ff; color: #fff; } -/* 已操作提示 */ -.done-msg { text-align: center; padding: 16px; background: #f6ffed; border-radius: 8px; margin-bottom: 12px; color: #52c41a; font-size: 14px; } .toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.75); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 14px; display: none; z-index: 100; } +.loading { text-align: center; padding: 80px 0; color: #999; font-size: 14px; }
-
-
-
-
-
+
加载中...
+
+