Browse Source

[完善]完善配置文件生成

非煤矿业企业安全风险监测预警系统
邵佳豪 2 years ago
parent
commit
a34a440533
  1. 4
      proxy.config.json
  2. 16
      src/app/system-management/host-config/host-config.component.ts

4
proxy.config.json

@ -1,11 +1,11 @@
{ {
"/api": { "/api": {
"target": "http://121.36.37.70:8080/", "target": "http://10.156.134.54:8080/",
"secure": false, "secure": false,
"changeOrigin": true "changeOrigin": true
}, },
"/signalr": { "/signalr": {
"target": "http://121.36.37.70:8080/", "target": "http://10.156.134.54:8080/",
"secure": false, "secure": false,
"ws": true, "ws": true,
"logLevel": "debug" "logLevel": "debug"

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

@ -319,6 +319,7 @@ sources:`;
arrowArr[0].endY; arrowArr[0].endY;
let customArea = []; let customArea = [];
if ( if (
item.dimensionedPointsObj &&
item.dimensionedPointsObj.polygonOfmonitor && item.dimensionedPointsObj.polygonOfmonitor &&
item.dimensionedPointsObj.polygonOfmonitor.length !== 0 item.dimensionedPointsObj.polygonOfmonitor.length !== 0
) { ) {
@ -362,6 +363,7 @@ sources:`;
arrowArr[0].endY; arrowArr[0].endY;
let customArea = []; let customArea = [];
if ( if (
item.dimensionedPointsObj &&
item.dimensionedPointsObj.polygonOfmonitor && item.dimensionedPointsObj.polygonOfmonitor &&
item.dimensionedPointsObj.polygonOfmonitor.length !== 0 item.dimensionedPointsObj.polygonOfmonitor.length !== 0
) { ) {
@ -423,6 +425,7 @@ sources:`;
let str3 = '[' + str + ',' + str2 + ']'; let str3 = '[' + str + ',' + str2 + ']';
let customArea = []; let customArea = [];
if ( if (
item.dimensionedPointsObj &&
item.dimensionedPointsObj.polygonOfmonitor && item.dimensionedPointsObj.polygonOfmonitor &&
item.dimensionedPointsObj.polygonOfmonitor.length !== 0 item.dimensionedPointsObj.polygonOfmonitor.length !== 0
) { ) {
@ -441,14 +444,19 @@ sources:`;
custom-area: [${customArea}] custom-area: [${customArea}]
`; `;
} else { } else {
console.log(888, item);
let customArea = []; let customArea = [];
if (item.type == 0) { if (item.type == 0) {
item.dimensionedPointsObj.polygon.forEach((element) => { item.dimensionedPointsObj
customArea.push(element.x); ? item.dimensionedPointsObj.polygon.forEach((element) => {
customArea.push(element.y); customArea.push(element.x);
}); customArea.push(element.y);
})
: null;
} else { } else {
console.log(item.dimensionedPointsObj);
if ( if (
item.dimensionedPointsObj &&
item.dimensionedPointsObj.polygonOfmonitor && item.dimensionedPointsObj.polygonOfmonitor &&
item.dimensionedPointsObj.polygonOfmonitor.length !== 0 item.dimensionedPointsObj.polygonOfmonitor.length !== 0
) { ) {

Loading…
Cancel
Save