|
|
|
@ -69,6 +69,10 @@ export class GetOutOfLineDetailsComponent implements OnInit {
|
|
|
|
|
]; |
|
|
|
|
userName; //登录账号的用户名
|
|
|
|
|
isShowAxOtherRegion; //控制哪些用户可以看到ax全部
|
|
|
|
|
|
|
|
|
|
isCarStop = false; |
|
|
|
|
|
|
|
|
|
pageIndex = 0; |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log("传进来的信息", this.data); |
|
|
|
|
// 安信框选
|
|
|
|
@ -78,6 +82,11 @@ export class GetOutOfLineDetailsComponent implements OnInit {
|
|
|
|
|
} else { |
|
|
|
|
this.isShowAxOtherRegion = false; |
|
|
|
|
} |
|
|
|
|
//进出口停车判断
|
|
|
|
|
if (this.data.violation.eventSystemName == "进出口停车") { |
|
|
|
|
this.isCarStop = true; |
|
|
|
|
} |
|
|
|
|
//是否是安信产生的预警进行判断
|
|
|
|
|
if ( |
|
|
|
|
this.data.violatedItemSnapshot && |
|
|
|
|
this.data.violation.eventSystemName.indexOf("证照") == -1 && |
|
|
|
@ -122,7 +131,15 @@ export class GetOutOfLineDetailsComponent implements OnInit {
|
|
|
|
|
this.details = this.data.content1; |
|
|
|
|
this.vedioUrl = this.data.violateVideo; |
|
|
|
|
this.content = this.data.handleRecord; |
|
|
|
|
this.imgUrl = this.data.violateImage; |
|
|
|
|
|
|
|
|
|
if (this.isCarStop && this.isAnxin) { |
|
|
|
|
if (!this.data.violateImage2) { |
|
|
|
|
this.data.violateImage2 = this.data.violateImage; |
|
|
|
|
} |
|
|
|
|
this.imgUrl = this.data.violateImage2; |
|
|
|
|
} else { |
|
|
|
|
this.imgUrl = this.data.violateImage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.imgUrl) { |
|
|
|
|
if (this.pubilcMethods.getFileType(this.imgUrl) == "img") { |
|
|
|
@ -174,7 +191,41 @@ export class GetOutOfLineDetailsComponent implements OnInit {
|
|
|
|
|
this.isMisinformation = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//进出口停车图片翻页
|
|
|
|
|
pageturning(type) { |
|
|
|
|
if (type == "last") { |
|
|
|
|
if (this.pageIndex === 0) { |
|
|
|
|
this.message.create("info", "已到第一张图片"); |
|
|
|
|
} else { |
|
|
|
|
this.pageIndex--; |
|
|
|
|
this.clearCanvas(this.data.violateImage2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (type == "next") { |
|
|
|
|
if (this.pageIndex === 1) { |
|
|
|
|
this.message.create("info", "图片已经到底了"); |
|
|
|
|
} else { |
|
|
|
|
this.pageIndex++; |
|
|
|
|
this.clearCanvas(this.data.violateImage); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//清空画布并且重新标绘
|
|
|
|
|
clearCanvas(url) { |
|
|
|
|
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight); |
|
|
|
|
var img = new Image(); |
|
|
|
|
img.src = url; |
|
|
|
|
img.onload = () => { |
|
|
|
|
this.canvasWidth = img.width; |
|
|
|
|
this.canvasHeight = img.height; |
|
|
|
|
window.setTimeout(() => { |
|
|
|
|
// 加载图片
|
|
|
|
|
this.ctx.drawImage(img, 0, 0, this.canvasWidth, this.canvasHeight); |
|
|
|
|
this.strokeRect(this.currentCoordinate); |
|
|
|
|
}, 0); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
canvasWidth = 0; |
|
|
|
|
canvasHeight = 0; |
|
|
|
|
ctx; |
|
|
|
|