Browse Source

[完善]完善配置文件下发

develop
邵佳豪 3 years ago
parent
commit
385903ff02
  1. 24
      src/app/system-management/host-config/host-config.component.ts

24
src/app/system-management/host-config/host-config.component.ts

@ -212,6 +212,10 @@ export class HostConfigComponent implements OnInit {
}
});
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => {
this.ngOnInit()
});
//this.router.navigate(['/system/host/camera/imageLabel'], { queryParams: { id: item.id } })
} else {
this.isSourceYaml = false
@ -347,10 +351,14 @@ display-font-size=12
logging_interval : 600
`
let xieyouqu = []
let order
this.listOfData.forEach((item: any, index) => {
if (item.type == 2) { xieyouqu.push(item) }
if (item.type == 2) {
xieyouqu.push(item)
order = item.order
}
if (item.type == 0) {
if (item.type == 0 && item.dimensionedPointsObj && item.dimensionedPointsObj.polygon.length != 0) {
let str = ''
item.dimensionedPointsObj ? item.dimensionedPointsObj.polygon.forEach(element => {
str += element.x + ','
@ -371,7 +379,7 @@ inverse-roi=0
class-id=-1
`
}
if ((item.type == 2 || item.type == 3) && item.dimensionedPointsObj) {
if ((item.type == 2 || item.type == 3) && item.dimensionedPointsObj && item.dimensionedPointsObj.arrow.length != 0) {
let arrowArr = item.dimensionedPointsObj.arrow
let str = arrowArr[0].startX + ',' + arrowArr[0].startY + ',' + arrowArr[0].endX + ',' + arrowArr[0].endY + ',' + arrowArr[1].startX + ',' + arrowArr[1].startY + ',' + arrowArr[1].endX + ',' + arrowArr[1].endY
console.log('十字箭头', str)
@ -394,9 +402,9 @@ mode=strict
}
})
let xieyouguan = ''
let jingdian = ''
xieyouqu.length != 0 ? xieyouqu[0].dimensionedPointsObj.rectangle.forEach(element => {
let xieyouguan = '';
let jingdian = '';
(xieyouqu.length != 0 && xieyouqu[0].dimensionedPointsObj && xieyouqu[0].dimensionedPointsObj.rectangle.length != 0) ? xieyouqu[0].dimensionedPointsObj.rectangle.forEach(element => {
if (element.oilUnloadingArea) {
xieyouguan = element.x + ',' + element.y + ',' + element.width + ',' + element.height
} else {
@ -494,9 +502,9 @@ connet:
enable: true
apply_on: 2
roi:
- 'oil_tube-3':
- 'oil_tube-${order}':
- [${xieyouguan}]
- 'grounder-3':
- 'grounder-${order}':
- [${jingdian}]
interval: 1
batch_size: 2

Loading…
Cancel
Save