From 3c2c680be0fe07dfe85939377dcb25a065d418b0 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 6 Jul 2022 13:50:50 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=98=BE=E7=A4=BA=E7=9F=A9?= =?UTF-8?q?=E5=BD=A2=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../image-label2/image-label2.component.html | 2 ++ .../image-label2/image-label2.component.ts | 8 ++++++++ .../navigation/navigation.component.html | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app/system-management/image-label2/image-label2.component.html b/src/app/system-management/image-label2/image-label2.component.html index a268697..e09e3b4 100644 --- a/src/app/system-management/image-label2/image-label2.component.html +++ b/src/app/system-management/image-label2/image-label2.component.html @@ -25,6 +25,8 @@ (nzOnConfirm)="clearCanvas()">清空 + +
diff --git a/src/app/system-management/image-label2/image-label2.component.ts b/src/app/system-management/image-label2/image-label2.component.ts index 74e6610..2200f6e 100644 --- a/src/app/system-management/image-label2/image-label2.component.ts +++ b/src/app/system-management/image-label2/image-label2.component.ts @@ -255,6 +255,7 @@ export class ImageLabel2Component implements OnInit { } //初始化 canvas画布 监听事件 + initCanvasEvent(canvas) { let context = canvas.getContext('2d'); canvas.onmousedown = (e) => { //鼠标按下事件 @@ -312,6 +313,8 @@ export class ImageLabel2Component implements OnInit { context.strokeStyle = this.oilUnloadingArea ? "green" : "red"; let element = this.getOblongInfo(this.downx, this.downy, moveX, moveY) context.strokeRect(element.x, element.y, element.width, element.height); + context.font = '22px Arial'; + context.fillText('高度:' + element.height, element.x + 3, element.y + 22); } } } @@ -429,6 +432,8 @@ export class ImageLabel2Component implements OnInit { context.strokeStyle = element.oilUnloadingArea ? "green" : "red"; context.lineWidth = 3; context.strokeRect(element.x, element.y, element.width, element.height); + context.font = '22px Arial'; + context.fillText('高度:' + element.height, element.x + 3, element.y + 22); }); } // console.log(789, pointsList) @@ -527,6 +532,7 @@ export class ImageLabel2Component implements OnInit { //canvas 绘制矩形 drawOblong(oblongList, context) { + console.log('xxxxxxxxxxxxxxxxxxxxxxxxxxi') context.clearRect(0, 0, this.canvasWidth, this.canvasHeight); this.copyCanvas ? context.putImageData(this.copyCanvas, 0, 0) : null; if (this.markType === 2) { //同时绘制 直线箭头 @@ -537,6 +543,8 @@ export class ImageLabel2Component implements OnInit { context.strokeStyle = element.oilUnloadingArea ? "green" : "red"; context.lineWidth = 3; context.strokeRect(element.x, element.y, element.width, element.height); + context.font = '22px Arial'; + context.fillText('高度:' + element.height, element.x + 3, element.y + 22); }); } diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html index ddcc228..6ec5438 100644 --- a/src/app/system-management/navigation/navigation.component.html +++ b/src/app/system-management/navigation/navigation.component.html @@ -16,11 +16,11 @@
  • 组织机构管理
  • 边缘盒子管理
  • + src="../../../assets/images/icon/host.png" alt="">边缘设备管理
  • 边缘盒子更新
  • + src="../../../assets/images/icon/push.png" alt="">边缘设备更新
  • 边缘盒子监控
  • + src="../../../assets/images/icon/push.png" alt="">边缘设备监控
  • 视频流监控