|
|
@@ -61,6 +61,9 @@ h3.sec{color:#e94560;font-size:15px;margin:4px 0 12px}
|
|
|
.vcell .tag{position:absolute;top:8px;left:8px;background:rgba(14,20,38,.85);border:1px solid #0f3460;color:#ddd;font-size:12px;padding:2px 10px;z-index:3}
|
|
|
.vcell.offline::after{content:"信号离线";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#e74c3c;font-size:16px;background:rgba(0,0,0,.55);z-index:2}
|
|
|
.model-chip{position:absolute;top:10px;right:10px;z-index:6;background:rgba(14,20,38,.85);border:1px solid #0f3460;color:#aaa;font-size:12px;padding:4px 12px}
|
|
|
+#monitorFsBtn{position:absolute;top:10px;right:150px;z-index:6;background:rgba(14,20,38,.85);border:1px solid #0f3460;color:#eee;font-size:16px;line-height:1;padding:6px 12px;cursor:pointer;user-select:none}
|
|
|
+#monitorFsBtn:hover{background:#182242;border-color:#e94560;color:#e94560}
|
|
|
+#monitorFsBtn.on{background:#e94560;color:#fff;border-color:#e94560}
|
|
|
.info-bar{position:absolute;bottom:10px;left:10px;background:rgba(14,20,38,.9);border:1px solid #0f3460;padding:6px 14px;font-size:12px;z-index:6;color:#aaa}
|
|
|
.info-bar .val{color:#3498db}
|
|
|
.empty-tip{height:100%;display:flex;align-items:center;justify-content:center;color:#666;font-size:15px}
|
|
|
@@ -177,6 +180,7 @@ border-left:3px solid #e94560;padding:8px 10px;margin-bottom:8px;cursor:pointer}
|
|
|
<section id="page-monitor" class="page active">
|
|
|
<div id="monitorSlot" style="position:absolute;inset:0"></div>
|
|
|
<div class="model-chip" id="modelChip">RKNN | NPU</div>
|
|
|
+ <div id="monitorFsBtn" title="全屏">⛶</div>
|
|
|
</section>
|
|
|
|
|
|
<section id="page-fence" class="page">
|
|
|
@@ -728,7 +732,26 @@ function updateView() {
|
|
|
viewOY = (canvas.height - imgH * viewS) / 2;
|
|
|
draw();
|
|
|
}
|
|
|
-window.addEventListener('resize', resizeCanvas);
|
|
|
+ window.addEventListener('resize', resizeCanvas);
|
|
|
+
|
|
|
+/* ================= 全屏监控 ================= */
|
|
|
+function toggleMonitorFullscreen() {
|
|
|
+ const btn = document.getElementById('monitorFsBtn');
|
|
|
+ const el = document.getElementById('page-monitor');
|
|
|
+ if (!document.fullscreenElement) {
|
|
|
+ const r = el.requestFullscreen || el.webkitRequestFullscreen;
|
|
|
+ if (r) { r.call(el); btn.classList.add('on'); }
|
|
|
+ } else {
|
|
|
+ const r = document.exitFullscreen || document.webkitExitFullscreen;
|
|
|
+ if (r) { r.call(document); btn.classList.remove('on'); }
|
|
|
+ }
|
|
|
+}
|
|
|
+document.addEventListener('fullscreenchange', () => {
|
|
|
+ const btn = document.getElementById('monitorFsBtn');
|
|
|
+ if (btn) btn.classList.toggle('on', !!document.fullscreenElement);
|
|
|
+});
|
|
|
+document.getElementById('monitorFsBtn').addEventListener('click', toggleMonitorFullscreen);
|
|
|
+
|
|
|
|
|
|
function startDraw() {
|
|
|
if (!chById(curChannel)) { alert('暂无通道'); return; }
|
|
|
@@ -947,6 +970,9 @@ function poseActionColor(a) {
|
|
|
if (a === '跌倒') return '#e94560';
|
|
|
if (a === '举手呼救') return '#f39c12';
|
|
|
if (a === '异常蹲坐') return '#3498db';
|
|
|
+ if (a === '半躺') return '#9b59b6';
|
|
|
+ if (a === '抽烟') return '#e67e22';
|
|
|
+ if (a === '打哈欠') return '#16a085';
|
|
|
return '#8892a8';
|
|
|
}
|
|
|
async function loadAllAlarms() {
|
|
|
@@ -1082,7 +1108,10 @@ async function saveConfig() {
|
|
|
const POSE_ACTIONS = [
|
|
|
['跌倒', '跌倒'],
|
|
|
['举手呼救', '举手呼救'],
|
|
|
- ['异常蹲坐', '异常蹲坐']
|
|
|
+ ['异常蹲坐', '异常蹲坐'],
|
|
|
+ ['半躺', '半躺'],
|
|
|
+ ['抽烟', '抽烟'],
|
|
|
+ ['打哈欠', '打哈欠']
|
|
|
];
|
|
|
function renderPoseActions() {
|
|
|
const el = document.getElementById('poseActionList');
|
|
|
@@ -1102,11 +1131,14 @@ async function loadPoseConfig() {
|
|
|
if (document.getElementById('cfgPoseEnabled')) document.getElementById('cfgPoseEnabled').checked = d.pose_cfg_enabled !== false;
|
|
|
if (document.getElementById('cfgFallThresh')) document.getElementById('cfgFallThresh').value = pd.fall_thresh;
|
|
|
if (document.getElementById('cfgFallFrames')) document.getElementById('cfgFallFrames').value = pd.fall_frames;
|
|
|
- // 可报警姿态: 固定渲染4类, 由后端开关决定勾选
|
|
|
+ // 可报警姿态: 由后端开关决定勾选
|
|
|
renderPoseActions();
|
|
|
const enabled = [];
|
|
|
if (pd.pose_hand_raise !== false) enabled.push('举手呼救');
|
|
|
if (pd.pose_crouch !== false) enabled.push('异常蹲坐');
|
|
|
+ if (pd.pose_recline !== false) enabled.push('半躺');
|
|
|
+ if (pd.pose_smoking !== false) enabled.push('抽烟');
|
|
|
+ if (pd.pose_yawn !== false) enabled.push('打哈欠');
|
|
|
// 跌倒固定启用
|
|
|
enabled.push('跌倒');
|
|
|
document.querySelectorAll('.pose-act-ck').forEach(c =>
|
|
|
@@ -1121,7 +1153,10 @@ async function savePoseConfig() {
|
|
|
fall_thresh: parseFloat(document.getElementById('cfgFallThresh').value),
|
|
|
fall_frames: parseInt(document.getElementById('cfgFallFrames').value),
|
|
|
pose_hand_raise: !!checks['举手呼救'],
|
|
|
- pose_crouch: !!checks['异常蹲坐']
|
|
|
+ pose_crouch: !!checks['异常蹲坐'],
|
|
|
+ pose_recline: !!checks['半躺'],
|
|
|
+ pose_smoking: !!checks['抽烟'],
|
|
|
+ pose_yawn: !!checks['打哈欠']
|
|
|
};
|
|
|
try {
|
|
|
const r = await fetch('/api/pose/config', {method:'POST',
|