mirror of
https://github.com/kerwincui/FastBee.git
synced 2025-10-17 21:50:45 +08:00
监测统计进行日期范围查询
This commit is contained in:
@@ -318,7 +318,7 @@ public class ToolController extends BaseController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String[] clientInfo = model.getClientid().split("&");
|
String[] clientInfo = model.getClientid().split("&");
|
||||||
String deviceNum = clientInfo[0];
|
String deviceNum = clientInfo[1];
|
||||||
Device device = deviceService.selectShortDeviceBySerialNumber(deviceNum);
|
Device device = deviceService.selectShortDeviceBySerialNumber(deviceNum);
|
||||||
// 设备状态(1-未激活,2-禁用,3-在线,4-离线)
|
// 设备状态(1-未激活,2-禁用,3-在线,4-离线)
|
||||||
if (model.getAction().equals("client_disconnected")) {
|
if (model.getAction().equals("client_disconnected")) {
|
||||||
@@ -326,7 +326,7 @@ public class ToolController extends BaseController {
|
|||||||
deviceService.updateDeviceStatusAndLocation(device, "");
|
deviceService.updateDeviceStatusAndLocation(device, "");
|
||||||
// 发布设备状态
|
// 发布设备状态
|
||||||
emqxService.publishStatus(device.getProductId(), device.getSerialNumber(), 4, device.getIsShadow());
|
emqxService.publishStatus(device.getProductId(), device.getSerialNumber(), 4, device.getIsShadow());
|
||||||
// 清空保留消息,上线后发布新的属性功能保留消息
|
// 清空保留消息,上线后发布新的属性功能保留消息 TODO 发布的时候取消保留消息
|
||||||
emqxService.publishProperty(device.getProductId(), device.getSerialNumber(), null);
|
emqxService.publishProperty(device.getProductId(), device.getSerialNumber(), null);
|
||||||
emqxService.publishFunction(device.getProductId(), device.getSerialNumber(), null);
|
emqxService.publishFunction(device.getProductId(), device.getSerialNumber(), null);
|
||||||
} else if (model.getAction().equals("client_connected")) {
|
} else if (model.getAction().equals("client_connected")) {
|
||||||
|
@@ -3,9 +3,6 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="75px" style="">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="75px" style="">
|
||||||
<el-form-item label="最大数量" prop="deviceName">
|
|
||||||
<el-input v-model="queryParams.params.maxSize" placeholder="请输入设备名称" clearable size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="时间范围">
|
<el-form-item label="时间范围">
|
||||||
<el-date-picker v-model="daterangeTime" size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
<el-date-picker v-model="daterangeTime" size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -67,9 +64,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
deviceId: 0,
|
deviceId: 0,
|
||||||
identity: "",
|
identity: "",
|
||||||
params: {
|
params: {},
|
||||||
maxSize:'998'
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -104,7 +99,6 @@ export default {
|
|||||||
this.queryParams.params['beginTime'] = this.daterangeTime[0];
|
this.queryParams.params['beginTime'] = this.daterangeTime[0];
|
||||||
this.queryParams.params['endTime'] = this.daterangeTime[1];
|
this.queryParams.params['endTime'] = this.daterangeTime[1];
|
||||||
}
|
}
|
||||||
console.log(this.queryParams);
|
|
||||||
listMonitor(this.queryParams).then(response => {
|
listMonitor(this.queryParams).then(response => {
|
||||||
let data = response.rows;
|
let data = response.rows;
|
||||||
// 对象转数组
|
// 对象转数组
|
||||||
|
Reference in New Issue
Block a user