Browse Source

[完善]完善参数

develop
邵佳豪 2 years ago
parent
commit
a6d610c096
  1. 46
      src/app/system-management/host-config/host-config.component.ts

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

@ -427,7 +427,7 @@ mode=strict
})
//新增东南西北参数
copyListOfData.forEach(element => {
if (element.type == 2) {//卸油区
if (element.type == 2 || element.type == 3) {//卸油区
let obj = element.dimensionedPointsObj
let str1 = ''
if (obj && obj.arrowOfSouth && obj.arrowOfSouth.length == 2) {
@ -437,35 +437,37 @@ mode=strict
if (obj && obj.arrowOfWest && obj.arrowOfWest.length == 2) {
str2 = `${obj.arrowOfWest[1].startX};${obj.arrowOfWest[1].startY};${obj.arrowOfWest[1].endX};${obj.arrowOfWest[1].endY}`
}
if (str1 && str2) {
config1 += `
[direction-detection-stream-${element.order}]
enable=1
#Label;direction;
direction-South=${str1}
direction-West=${str2}
class-id=0
`
let str3 = ''
if (obj && obj.arrowOfEast && obj.arrowOfEast.length == 2) {
str3 = `${obj.arrowOfEast[1].startX};${obj.arrowOfEast[1].startY};${obj.arrowOfEast[1].endX};${obj.arrowOfEast[1].endY}`
}
}
if (element.type == 3) {//收银区
let obj = element.dimensionedPointsObj
let str1 = ''
if (obj && obj.arrowOfSouth && obj.arrowOfSouth.length == 2) {
str1 = `${obj.arrowOfSouth[1].startX};${obj.arrowOfSouth[1].startY};${obj.arrowOfSouth[1].endX};${obj.arrowOfSouth[1].endY}`
let str4 = ''
if (obj && obj.arrowOfNorth && obj.arrowOfNorth.length == 2) {
str4 = `${obj.arrowOfNorth[1].startX};${obj.arrowOfNorth[1].startY};${obj.arrowOfNorth[1].endX};${obj.arrowOfNorth[1].endY}`
}
if (str1) {
if (str1 || str2 || str3 || str4) {
let arr = [
{ name: 'South', value: str1 },
{ name: 'West', value: str2 },
{ name: 'East', value: str3 },
{ name: 'North', value: str4 }
]
let newstr = ''
arr.forEach(item => {
if (item.value) {
newstr += `direction-${item.name}=${item.value}
`
}
});
config1 += `
[direction-detection-stream-${element.order}]
enable=1
#Label;direction;
direction-South=${str1}
class-id=0
`
${newstr}class-id=0
`
}
}
});
let xieyouguan = '';
let jingdian = '';

Loading…
Cancel
Save