Browse Source

[完善]标绘完善

非煤矿业企业安全风险监测预警系统
邵佳豪 2 years ago
parent
commit
b27c8a657d
  1. 53
      src/app/system-management/image-label2/image-label2.component.ts

53
src/app/system-management/image-label2/image-label2.component.ts

@ -13,7 +13,7 @@ export class ImageLabel2Component implements OnInit {
private http: HttpClient,
private message: NzMessageService,
private modal: NzModalService
) {}
) { }
@Input() data: any; //传递id
camerasData: any; //摄像头Data
@ -27,7 +27,7 @@ export class ImageLabel2Component implements OnInit {
history.go(-1);
}
ngOnInit(): void {}
ngOnInit(): void { }
//获取 摄像头图片/标注点位
getImgMarkData() {
@ -68,8 +68,8 @@ export class ImageLabel2Component implements OnInit {
'向边缘设备发送请求成功,请过一段时间手动刷新页面!'
);
},
error: (error: HttpErrorResponse) => {},
complete: () => {},
error: (error: HttpErrorResponse) => { },
complete: () => { },
});
}
@ -378,6 +378,18 @@ export class ImageLabel2Component implements OnInit {
this.arrowPointsOfNorth,
];
this.drawLine(arr, context);
this.redrawPolygon(
this.pointsOfmonitor,
this.allpointsOfmonitor,
this.circlesOfmonitor,
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -404,6 +416,16 @@ export class ImageLabel2Component implements OnInit {
this.arrowPointsOfNorth,
];
this.drawLine(arr, context);
this.redrawPolygon(
this.pointsOfmonitor,
this.allpointsOfmonitor,
this.circlesOfmonitor,
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -430,6 +452,17 @@ export class ImageLabel2Component implements OnInit {
this.arrowPointsOfNorth,
];
this.drawLine(arr, context);
this.redrawPolygon(
this.pointsOfmonitor,
this.allpointsOfmonitor,
this.circlesOfmonitor,
context,
'black'
);
}
if (
this.isDrawArrow &&
@ -762,9 +795,9 @@ export class ImageLabel2Component implements OnInit {
((poly[i].y <= pt.y && pt.y < poly[j].y) ||
(poly[j].y <= pt.y && pt.y < poly[i].y)) &&
pt.x <
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
(c = !c);
return c;
}
@ -902,9 +935,9 @@ export class ImageLabel2Component implements OnInit {
((poly[i].y <= pt.y && pt.y < poly[j].y) ||
(poly[j].y <= pt.y && pt.y < poly[i].y)) &&
pt.x <
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
((poly[j].x - poly[i].x) * (pt.y - poly[i].y)) /
(poly[j].y - poly[i].y) +
poly[i].x &&
(c = !c);
return c;
}

Loading…
Cancel
Save