diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ToolController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ToolController.java index 8199bb80..e961cecf 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ToolController.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/ToolController.java @@ -318,7 +318,7 @@ public class ToolController extends BaseController { return; } String[] clientInfo = model.getClientid().split("&"); - String deviceNum = clientInfo[0]; + String deviceNum = clientInfo[1]; Device device = deviceService.selectShortDeviceBySerialNumber(deviceNum); // 设备状态(1-未激活,2-禁用,3-在线,4-离线) if (model.getAction().equals("client_disconnected")) { @@ -326,7 +326,7 @@ public class ToolController extends BaseController { deviceService.updateDeviceStatusAndLocation(device, ""); // 发布设备状态 emqxService.publishStatus(device.getProductId(), device.getSerialNumber(), 4, device.getIsShadow()); - // 清空保留消息,上线后发布新的属性功能保留消息 + // 清空保留消息,上线后发布新的属性功能保留消息 TODO 发布的时候取消保留消息 emqxService.publishProperty(device.getProductId(), device.getSerialNumber(), null); emqxService.publishFunction(device.getProductId(), device.getSerialNumber(), null); } else if (model.getAction().equals("client_connected")) { diff --git a/vue/src/views/iot/device/device-statistic.vue b/vue/src/views/iot/device/device-statistic.vue index 7d673529..c079c046 100644 --- a/vue/src/views/iot/device/device-statistic.vue +++ b/vue/src/views/iot/device/device-statistic.vue @@ -3,9 +3,6 @@ - - - @@ -67,9 +64,7 @@ export default { queryParams: { deviceId: 0, identity: "", - params: { - maxSize:'998' - }, + params: {}, }, }; }, @@ -104,7 +99,6 @@ export default { this.queryParams.params['beginTime'] = this.daterangeTime[0]; this.queryParams.params['endTime'] = this.daterangeTime[1]; } - console.log(this.queryParams); listMonitor(this.queryParams).then(response => { let data = response.rows; // 对象转数组