|
|
|
@ -12,7 +12,8 @@ export class ImageLabel2Component implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor(private route: ActivatedRoute, private http: HttpClient, private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
imgItem: any; |
|
|
|
|
camerasData: any; //摄像头Data
|
|
|
|
|
imgItem: any; //图片 URL
|
|
|
|
|
canvasWidth: number = 0; |
|
|
|
|
canvasHeight: number = 0; |
|
|
|
|
copyCanvas: any; //拷贝 canvas底图
|
|
|
|
@ -42,20 +43,23 @@ export class ImageLabel2Component implements OnInit {
|
|
|
|
|
let that = this |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
that.route.queryParams.subscribe(parmas => { |
|
|
|
|
parmas.type != undefined? that.markType = Number(parmas.type) : null; |
|
|
|
|
const httpOptions = { |
|
|
|
|
responseType: 'blob' as 'json', |
|
|
|
|
params: {cameraId: parmas.id} |
|
|
|
|
}; |
|
|
|
|
that.http.get(`/api/Cameras/Images`,httpOptions).subscribe({ |
|
|
|
|
next: (data) => { |
|
|
|
|
resolve(data) |
|
|
|
|
}, |
|
|
|
|
error: (err) => { |
|
|
|
|
reject('error') |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
that.http.get(`/api/Cameras/${parmas.id}`).subscribe((info: any)=>{ |
|
|
|
|
that.camerasData = info |
|
|
|
|
that.markType = info.type |
|
|
|
|
const httpOptions = { |
|
|
|
|
responseType: 'blob' as 'json', |
|
|
|
|
params: {cameraId: parmas.id} |
|
|
|
|
}; |
|
|
|
|
that.http.get(`/api/Cameras/Images`,httpOptions).subscribe({ |
|
|
|
|
next: (data) => { |
|
|
|
|
resolve(data) |
|
|
|
|
}, |
|
|
|
|
error: (err) => { |
|
|
|
|
reject('error') |
|
|
|
|
}, |
|
|
|
|
}) //get
|
|
|
|
|
}) //get
|
|
|
|
|
}) //route
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|