feat 直播流点位

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-05-26 09:54:16 +08:00
parent 988cf99a03
commit 0b2606bdf4
5 changed files with 53 additions and 21 deletions

View File

@@ -483,10 +483,10 @@ const onMonitorDrawClick = (e: MouseEvent) => {
// 添加新的报警区域到数组
const newArea: AlarmAreaData = {
deviceId: form.value.id,
x1: Number(point1RightPctOfWidth.toFixed(4)),
y1: Number(point1TopPctOfHeight.toFixed(4)),
x2: Number(point2RightPctOfWidth.toFixed(4)),
y2: Number(point2TopPctOfHeight.toFixed(4))
x1: Math.round(point1RightPctOfWidth),
y1: Math.round(point1TopPctOfHeight),
x2: Math.round(point2RightPctOfWidth),
y2: Math.round(point2TopPctOfHeight)
};
payload.value.push(newArea);
console.log('[监控区域] 两点千分比坐标', newArea);