diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/AlertLog.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/AlertLog.java
index 4efd4c1c..09368061 100644
--- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/AlertLog.java
+++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/domain/AlertLog.java
@@ -46,7 +46,55 @@ public class AlertLog extends BaseEntity
@Excel(name = "设备名称")
private String deviceName;
- public void setAlertLogId(Long alertLogId)
+ /** 用户ID */
+ @Excel(name = "用户ID")
+ private Long userId;
+
+ /** 用户昵称 */
+ @Excel(name = "用户昵称")
+ private String userName;
+
+ /** 租户ID */
+ @Excel(name = "租户ID")
+ private Long tenantId;
+
+ /** 租户名称 */
+ @Excel(name = "租户名称")
+ private String tenantName;
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public Long getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(Long tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getTenantName() {
+ return tenantName;
+ }
+
+ public void setTenantName(String tenantName) {
+ this.tenantName = tenantName;
+ }
+
+ public void setAlertLogId(Long alertLogId)
{
this.alertLogId = alertLogId;
}
diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/AlertLogMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/AlertLogMapper.xml
index 0d1719af..738def9c 100644
--- a/springboot/wumei-iot/src/main/resources/mapper/iot/AlertLogMapper.xml
+++ b/springboot/wumei-iot/src/main/resources/mapper/iot/AlertLogMapper.xml
@@ -18,15 +18,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
- select alert_log__id, alert_name, alert_level, status, product_id, product_name, device_id, device_name, create_by, create_time, update_by, update_time, remark from iot_alert_log
+ select alert_log__id, alert_name, alert_level, status, product_id, product_name, device_id, device_name,user_id, user_name, tenant_id, tenant_name, create_by, create_time, update_by, update_time, remark from iot_alert_log
diff --git a/vue/src/views/iot/device/index.vue b/vue/src/views/iot/device/index.vue
index 2c60e868..f35dfc2f 100644
--- a/vue/src/views/iot/device/index.vue
+++ b/vue/src/views/iot/device/index.vue
@@ -33,8 +33,10 @@
-
-
+
+
+
+
{{item.deviceName}}
Version {{item.firmwareVersion}}
@@ -51,11 +53,13 @@
-
-
-
启用影子
-
禁用影子
-
+
+
+
+ 影子
+ 影子
+
+
@@ -261,13 +265,13 @@ export default {
let productId = this.$route.query.productId
if (productId != null) {
this.queryParams.productId = Number(productId);
- this.queryParams.groupId=null;
+ this.queryParams.groupId = null;
}
// 分组筛选
let groupId = this.$route.query.groupId
if (groupId != null) {
this.queryParams.groupId = Number(groupId);
- this.queryParams.productId=null;
+ this.queryParams.productId = null;
}
this.getList();
@@ -282,13 +286,13 @@ export default {
let productId = this.$route.query.productId
if (productId != null) {
this.queryParams.productId = Number(productId);
- this.queryParams.groupId=null;
+ this.queryParams.groupId = null;
}
// 分组筛选
let groupId = this.$route.query.groupId
if (groupId != null) {
this.queryParams.groupId = Number(groupId);
- this.queryParams.productId=null;
+ this.queryParams.productId = null;
}
this.getList();
}
@@ -631,6 +635,6 @@ export default {
diff --git a/vue/src/views/iot/group/device-list.vue b/vue/src/views/iot/group/device-list.vue
index a1062754..392cbe8e 100644
--- a/vue/src/views/iot/group/device-list.vue
+++ b/vue/src/views/iot/group/device-list.vue
@@ -16,7 +16,7 @@
-
+
分享
拥有
@@ -28,7 +28,7 @@
-
+
@@ -53,7 +53,7 @@ export default {
data() {
return {
// 设备分组
- deviceGroup:{},
+ deviceGroup: {},
// 遮罩层
loading: true,
// 选中数组
@@ -67,8 +67,8 @@ export default {
// 查询参数
queryParams: {
pageNum: 1,
- pageSize: 10,
- userId:null,
+ pageSize: 500,
+ userId: null,
deviceName: null,
productId: null,
productName: null,
@@ -89,7 +89,7 @@ export default {
handler(newVal, oldVal) {
this.deviceGroup = newVal;
// 获取分组下的设备
- this.queryParams.userId=this.deviceGroup.userId;
+ this.queryParams.userId = this.deviceGroup.userId;
this.queryParams.pageNum = 1;
this.getDeviceIdsByGroupId();
},
@@ -104,6 +104,8 @@ export default {
getDeviceIdsByGroupId() {
getDeviceIds(this.deviceGroup.groupId).then(response => {
this.ids = response.data;
+ // Id数组传递到父组件
+ this.$emit('idsToParentEvent', this.ids)
this.getList();
});
},
@@ -143,8 +145,6 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.deviceId)
- console.log("选择赋值");
- console.log(this.ids);
this.single = selection.length !== 1
this.multiple = !selection.length
// Id数组传递到父组件