若依微服务1.8.1

1、设备报警规则增删改查和导出
2、设备模型编辑bug修复
3、电子围栏返回格式修改
dev
xins 1 year 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.scenes = response.data;
}); });
this.eventsData = [];
this.servicesData = [];
this.attributesData = [];
const deviceModeId = this.$route.params && this.$route.params.deviceModeId; const deviceModeId = this.$route.params && this.$route.params.deviceModeId;
if (deviceModeId) { if (deviceModeId) {
// //
getDeviceMode(deviceModeId).then(res => { getDeviceMode(deviceModeId).then(res => {
this.info = res.data.deviceMode; this.info = res.data.deviceMode;
this.attributesData = (res.data.deviceModeFunctionMap)['1']; this.attributesData = (res.data.deviceModeFunctionMap)['1'];
this.servicesData = (res.data.deviceModeFunctionMap)['2']; const servicesData = (res.data.deviceModeFunctionMap)['2'];
this.eventsData = (res.data.deviceModeFunctionMap)['3']; const eventsData = (res.data.deviceModeFunctionMap)['3'];
if(servicesData != null && servicesData!==''){
this.servicesData =servicesData;
}
if(servicesData != null && eventsData!==''){
this.eventsData =eventsData;
}
this.deviceModeId = deviceModeId; this.deviceModeId = deviceModeId;
if (res.data.deviceMode.deviceModePic != null) { if (res.data.deviceMode.deviceModePic != null) {
let previewFile = {}; let previewFile = {};
@ -530,7 +540,7 @@ export default {
}; };
this.gps_flag = "0" this.gps_flag = "0"
this.disabled = false; this.disabled = false;
this.eventsData = [];
} }
}, },
computed: {}, computed: {},

@ -271,16 +271,22 @@ export default {
getElectronicFence(electronicFenceId).then(response => { getElectronicFence(electronicFenceId).then(response => {
this.form = response.data; this.form = response.data;
let circleAreaList = JSON.parse(response.data.circleAreaListStr) let circleAreaList = JSON.parse(response.data.circleAreaListStr)
let polygonAreaList = JSON.parse(response.data.polygonAreaListStr) let polygonAreaListArr = JSON.parse(response.data.polygonAreaListStr)
let polygonData1 = {} let polygonData1 = {}
let polygonData = [] let polygonData = []
polygonAreaList.forEach(e => { 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]) { if (polygonData1[e.index]) {
polygonData1[e.index].push([e.longitude, e.latitude]) polygonData1[e.index].push([e.longitude, e.latitude])
} else { } else {
polygonData1[e.index] = [[e.longitude, e.latitude]] polygonData1[e.index] = [[e.longitude, e.latitude]]
} }
}) })
})
Object.keys(polygonData1).forEach(e => { Object.keys(polygonData1).forEach(e => {
polygonData[e] = polygonData1[e] polygonData[e] = polygonData1[e]
}) })
@ -289,8 +295,9 @@ export default {
}) })
circleAreaList.forEach(e => { circleAreaList.forEach(e => {
let center = JSON.parse(e.center) let fenceAreaId = e.fenceAreaId;
let radius = e.radius let center = JSON.parse(e.center);
let radius = e.radius;
this.setCircle({center, radius}) this.setCircle({center, radius})
}) })
}); });

Loading…
Cancel
Save