+
-
-
图片资源未找到
diff --git a/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss
index cc076c4..58407a9 100644
--- a/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss
+++ b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss
@@ -1,6 +1,6 @@
.box {
width: 100%;
- height: 715px;
+ min-height: 715px;
// overflow-y: auto;
color: #fff;
display: flex;
@@ -61,18 +61,23 @@
box-sizing: border-box;
padding: 0 12px;
}
-.typecheckbox{
+
+.typecheckbox {
box-sizing: border-box;
padding: 0 12px;
- label{
+ margin-bottom:6px;
+ label {
color: #fff;
}
}
+
.content {
flex: 1;
overflow: hidden;
-
+ display: flex;
+ align-items: center;
+ justify-content: center;
.imgbox {
width: 100%;
height: 100%;
@@ -80,18 +85,28 @@
align-items: center;
justify-content: center;
position: relative;
- #canvas{
+ margin-bottom: 12px;
+
+ #canvas {
position: absolute;
left: 50%;
top: 50%;
- transform: translate(-50%,-50%);
+ transform: translate(-50%, -50%);
}
+
img {
max-width: 100%;
max-height: 100%;
}
}
+ .imgboxAX {
+ img {
+ width: 100%;
+ height: auto;
+ }
+ }
+
.vediobox {
width: 100%;
height: 100%;
@@ -147,16 +162,19 @@
.disposeTime {}
}
-.btnbox{
+
+.btnbox {
width: 100%;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
- button{
+
+ button {
margin: 0 15px;
}
}
+
.ant-modal-close {
color: #fff;
}
diff --git a/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts
index d6f95a1..55780e3 100644
--- a/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts
+++ b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts
@@ -137,7 +137,7 @@ export class GetOutOfLineDetailsComponent implements OnInit {
this.ctx.fillText(
name,
startPoint[0],
- startPoint[1] < 20 ? endPoint[1] + 16 : startPoint[1]
+ startPoint[1] < 20 ? endPoint[1] + 16 : startPoint[1] - 5
);
});
}
@@ -157,6 +157,19 @@ export class GetOutOfLineDetailsComponent implements OnInit {
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
this.strokeRect(this.currentCoordinate);
}
+
+ downImg() {
+ const canvasDom: any = document.querySelector("#canvas");
+ const imageData = canvasDom.toDataURL("image/png"); //返回base64的URL
+ const elink = document.createElement("a");
+ elink.download = "图片";
+ elink.style.display = "none";
+ elink.href = imageData;
+ document.body.appendChild(elink);
+ elink.click();
+ URL.revokeObjectURL(elink.href); //释放URL对象
+ document.body.removeChild(elink);
+ }
selectedType: string = "img";
contentType(type) {
this.selectedType = type;