diff --git a/ruoyi-ui/src/views/business/alarmRule/index.vue b/ruoyi-ui/src/views/business/alarmRule/index.vue index 0634080..5a02191 100644 --- a/ruoyi-ui/src/views/business/alarmRule/index.vue +++ b/ruoyi-ui/src/views/business/alarmRule/index.vue @@ -9,158 +9,74 @@ @keyup.enter.native="handleQuery" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - + + + + + + - - + + + + - - + + + + + - + + + - - - - - - - - - - - - - - + + + + + + + 搜索 重置 @@ -176,7 +92,8 @@ size="mini" @click="handleAdd" v-hasPermi="['business:alarmRule:add']" - >新增 + >新增 + 修改 + >修改 + 删除 + >删除 + 导出 + >导出 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -271,97 +184,289 @@ /> - - + + - - - - - - - + - - - - - - - - + + + + + + - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + " + {{ dict.label }} + + + + + - - - - - - - - - - - - - - - - - - - + + {{ dict.label }} + +   + + 添加联动设备 + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/business/deviceMode/editDeviceMode.vue b/ruoyi-ui/src/views/business/deviceMode/editDeviceMode.vue index d3d6669..12ce6f4 100644 --- a/ruoyi-ui/src/views/business/deviceMode/editDeviceMode.vue +++ b/ruoyi-ui/src/views/business/deviceMode/editDeviceMode.vue @@ -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: {}, diff --git a/ruoyi-ui/src/views/business/electronicFence/editElectronicFence.vue b/ruoyi-ui/src/views/business/electronicFence/editElectronicFence.vue index 98ebc8b..f3d4498 100644 --- a/ruoyi-ui/src/views/business/electronicFence/editElectronicFence.vue +++ b/ruoyi-ui/src/views/business/electronicFence/editElectronicFence.vue @@ -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}) }) });