|
|
|
@ -1504,7 +1504,7 @@ ${newstr}class-id=0
|
|
|
|
|
//安信配置文件
|
|
|
|
|
configToAx() { |
|
|
|
|
let data = this.configJsonToAx(); |
|
|
|
|
console.log(data) |
|
|
|
|
console.log(data); |
|
|
|
|
// return;
|
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
nzTitle: '下发安信config.json配置', |
|
|
|
@ -1559,40 +1559,42 @@ ${newstr}class-id=0
|
|
|
|
|
user: '', |
|
|
|
|
password: '', |
|
|
|
|
}, |
|
|
|
|
caps:[], |
|
|
|
|
caps: [], |
|
|
|
|
}; |
|
|
|
|
console.log(this.listOfData); |
|
|
|
|
this.listOfData.forEach((item: any) => { |
|
|
|
|
let type = null; |
|
|
|
|
item.type === 0 |
|
|
|
|
? (type = 2) |
|
|
|
|
: item.type === 1 |
|
|
|
|
? (type = 1) |
|
|
|
|
: item.type === 2 |
|
|
|
|
? (type = 0) |
|
|
|
|
: item.type === 3 |
|
|
|
|
? (type = 4) |
|
|
|
|
: null; |
|
|
|
|
if (item.isEnabled) { |
|
|
|
|
let type = null; |
|
|
|
|
item.type === 0 |
|
|
|
|
? (type = 2) |
|
|
|
|
: item.type === 1 |
|
|
|
|
? (type = 1) |
|
|
|
|
: item.type === 2 |
|
|
|
|
? (type = 0) |
|
|
|
|
: item.type === 3 |
|
|
|
|
? (type = 4) |
|
|
|
|
: null; |
|
|
|
|
|
|
|
|
|
let areas = []; |
|
|
|
|
if (item.dimensionedPointsAnxinObj) { |
|
|
|
|
if (item.dimensionedPointsAnxinObj.yamlData.length !== 0) { |
|
|
|
|
areas = item.dimensionedPointsAnxinObj.yamlData; |
|
|
|
|
let areas = []; |
|
|
|
|
if (item.dimensionedPointsAnxinObj) { |
|
|
|
|
if (item.dimensionedPointsAnxinObj.yamlData.length !== 0) { |
|
|
|
|
areas = item.dimensionedPointsAnxinObj.yamlData; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let obj:any = { |
|
|
|
|
id: item.id, |
|
|
|
|
type: type, |
|
|
|
|
url: item.uri, |
|
|
|
|
name: item.name, |
|
|
|
|
}; |
|
|
|
|
if(areas.length !== 0){ |
|
|
|
|
obj.areas = areas |
|
|
|
|
let obj: any = { |
|
|
|
|
id: item.id, |
|
|
|
|
type: type, |
|
|
|
|
url: item.uri, |
|
|
|
|
name: item.name, |
|
|
|
|
}; |
|
|
|
|
if (areas.length !== 0) { |
|
|
|
|
obj.areas = areas; |
|
|
|
|
} |
|
|
|
|
data.caps.push(obj); |
|
|
|
|
} |
|
|
|
|
data.caps.push(obj); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return data |
|
|
|
|
return data; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|