diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index efd1ad72..1ed8c50e 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -1,7 +1,7 @@ diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue index 3cc445ed..47b07327 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue @@ -6,7 +6,7 @@ {{ data.text }} - {{ data.state?'开':'关' }} + {{ data.state?'开':'关' }} @@ -51,34 +51,16 @@ export default { // https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc= // 获取设备参数 request({ - url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`, + url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1`, method: "get", params: {} }).then(result => { if (result.code != 200) return; - const [deviceInfo] = result.data; - + const deviceInfo = result.data; const typeMap = { ac: '220v', dc: '12v', } - - // { - // ac_out_electricity_1 :"0.07A" - // ac_out_electricity_2 :"4.69A" - // ac_out_voltage_1 :"217.26V" - // ac_out_voltage_2 :"217.30V" - // dc_out_electricity_1 :"0.00A" - // dc_out_electricity_2 :"0.00A" - // dc_out_voltage_1 :"11.44V" - // dc_out_voltage_2 :"11.45V" - // door_status :"1" - // fan_status :"0" - // humidity :"20.3" - // power_status :"1" - // temperature :"18.4" - // } - for (const key in deviceInfo.formatValue) { // electricity 电流 // voltage 电压 diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue index 520976d3..9f175714 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue @@ -5,6 +5,7 @@
+ @@ -16,8 +17,8 @@
{ this.dialogData.brand = data.brand; @@ -119,6 +130,15 @@ export default { if (roadInfo) this.data.roadName = roadInfo.roadName; }, + methods:{ + async getDeviceInfo() { + return request({ + url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/3`, + method: "get", + params: {} + }); + } + } };