From 9db6ba0a5f2a214323fec95e9558e6b0909fe9d6 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Fri, 21 Feb 2025 13:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E6=9F=9C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DeviceControlDialog.vue | 64 ++++++++++++++++--- .../components/DeviceParams.vue | 2 +- 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue index 97154b00..f8d6adb6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue @@ -129,10 +129,22 @@ let text = e ==true? "打开" : "关闭"; this.$modal.confirm('确认要"' + text + '"门锁').then(() => { return request({ - url: `/business/device/functions/${this.dialogData.iotDeviceId}/SL`, + url: `/business/device/batchFunctions`, method: "post", data: { - switch:e?1:0 + devices: [{ + iotDeviceId: this.dialogData.iotDeviceId, + id: this.dialogData.id, + deviceType: 17 + }], + functions: [ + { + functionId: "SL", + params: { + switch:e?1:0 + } + } + ], }, }) .then((result)=>{ @@ -169,9 +181,21 @@ // return this.lightningReset =e // } return request({ - url: `/business/device/functions/${this.dialogData.iotDeviceId}/TL`, + url: `/business/device/batchFunctions`, method: "post", - data: {}, + data: { + devices: [{ + iotDeviceId: this.dialogData.iotDeviceId, + id: this.dialogData.id, + deviceType: 17 + }], + functions: [ + { + functionId: "TL", + params: {} + } + ], + }, }) .then((result)=>{ if (result.code != 200) { @@ -202,9 +226,21 @@ return this.recloserReset =e } return request({ - url: `/business/device/functions/${this.dialogData.iotDeviceId}/SR`, + url: `/business/device/batchFunctions`, method: "post", - data: {}, + data: { + devices: [{ + iotDeviceId: this.dialogData.iotDeviceId, + id: this.dialogData.id, + deviceType: 17 + }], + functions: [ + { + functionId: "SR", + params: {} + } + ], + }, }) .then((result)=>{ if (result.code != 200) { @@ -235,9 +271,21 @@ return this.reclosing =e } return request({ - url: `/business/device/functions/${this.dialogData.iotDeviceId}/RS`, + url: `/business/device/batchFunctions`, method: "post", - data: {}, + data: { + devices: [{ + iotDeviceId: this.dialogData.iotDeviceId, + id: this.dialogData.id, + deviceType: 17 + }], + functions: [ + { + functionId: "RS", + params: {} + } + ], + }, }) .then((result)=>{ if (result.code != 200) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue index 43d917ae..a42f60bd 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceParams.vue @@ -102,7 +102,7 @@ if (result.code != 200) return Message.error("操作失败"); result.data.forEach(item => { if (item.propertyName) { - if (item.propertyName === "温湿度状态-湿度" || item.propertyName === "温湿度状态-温度" + if (item.propertyName === "温湿度状态-湿度" || item.propertyName === "温湿度状态-温度"|| item.propertyName === "频闪灯开关" ||item.propertyName === "环境温度"||item.propertyName === "环境光度"||item.propertyName === "环境湿度"||item.propertyName === "系统状态-环境(温湿度等)") { // 如果是环境相关的数据,添加到environment集合 envDevs.push({