若依微服务1.8.1

1、设备报警规则增删改查和导出
2、设备模型编辑bug修复
3、电子围栏返回格式修改
dev
xins 11 months ago
parent 178d5b4de2
commit 24975487c6

File diff suppressed because it is too large Load Diff

@ -501,14 +501,24 @@ export default {
this.scenes = response.data;
});
this.eventsData = [];
this.servicesData = [];
this.attributesData = [];
const deviceModeId = this.$route.params && this.$route.params.deviceModeId;
if (deviceModeId) {
//
getDeviceMode(deviceModeId).then(res => {
this.info = res.data.deviceMode;
this.attributesData = (res.data.deviceModeFunctionMap)['1'];
this.servicesData = (res.data.deviceModeFunctionMap)['2'];
this.eventsData = (res.data.deviceModeFunctionMap)['3'];
const servicesData = (res.data.deviceModeFunctionMap)['2'];
const eventsData = (res.data.deviceModeFunctionMap)['3'];
if(servicesData != null && servicesData!==''){
this.servicesData =servicesData;
}
if(servicesData != null && eventsData!==''){
this.eventsData =eventsData;
}
this.deviceModeId = deviceModeId;
if (res.data.deviceMode.deviceModePic != null) {
let previewFile = {};
@ -530,7 +540,7 @@ export default {
};
this.gps_flag = "0"
this.disabled = false;
this.eventsData = [];
}
},
computed: {},

@ -271,15 +271,21 @@ export default {
getElectronicFence(electronicFenceId).then(response => {
this.form = response.data;
let circleAreaList = JSON.parse(response.data.circleAreaListStr)
let polygonAreaList = JSON.parse(response.data.polygonAreaListStr)
let polygonAreaListArr = JSON.parse(response.data.polygonAreaListStr)
let polygonData1 = {}
let polygonData = []
polygonAreaList.forEach(e => {
if (polygonData1[e.index]) {
polygonData1[e.index].push([e.longitude, e.latitude])
} else {
polygonData1[e.index] = [[e.longitude, e.latitude]]
}
polygonAreaListArr.forEach(e1 => {
let polygonAreaListJson = JSON.parse(e1);
let polyJsonArr = JSON.parse(polygonAreaListJson["polyJsonArr"]);
let fenceAreaId = polygonAreaListJson["fenceAreaId"];
polyJsonArr.forEach(e => {
if (polygonData1[e.index]) {
polygonData1[e.index].push([e.longitude, e.latitude])
} else {
polygonData1[e.index] = [[e.longitude, e.latitude]]
}
})
})
Object.keys(polygonData1).forEach(e => {
polygonData[e] = polygonData1[e]
@ -289,8 +295,9 @@ export default {
})
circleAreaList.forEach(e => {
let center = JSON.parse(e.center)
let radius = e.radius
let fenceAreaId = e.fenceAreaId;
let center = JSON.parse(e.center);
let radius = e.radius;
this.setCircle({center, radius})
})
});

Loading…
Cancel
Save