diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java index 9487daa7..8a3b2995 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/WarningController.java @@ -80,6 +80,16 @@ public class WarningController extends BasicController { if (!StringUtils.isEmpty(deviceid)) { queryWrapper.like("deviceid", deviceid); } + //设备类型 + String devicetype = search.getString("devicetype"); + if (!StringUtils.isEmpty(devicetype)) { + queryWrapper.eq("devicetype", devicetype); + } + //告警级别 + String level = search.getString("level"); + if (!StringUtils.isEmpty(level)) { + queryWrapper.eq("level", level); + } //时间范围 String q_start = search.getString("q_start"); if (!StringUtils.isEmpty(q_start)) { diff --git a/sec-beidou/src/main/resources/templates/page/warning.html b/sec-beidou/src/main/resources/templates/page/warning.html index 15777cbb..8c7c4c91 100644 --- a/sec-beidou/src/main/resources/templates/page/warning.html +++ b/sec-beidou/src/main/resources/templates/page/warning.html @@ -9,13 +9,13 @@
- +
- @@ -26,13 +26,22 @@
-
+
+ +
+ +
+
+ +
+
@@ -66,12 +75,12 @@ icon: 'layui-icon-tips' }], cols: [[ - {field: 'createtime', title: '上报时间', templet: "
{{layui.util.toDateString(d.createtime, 'yyyy-MM-dd HH:mm:ss')}}
"}, + {field: 'createtime', title: '上报时间', width: '15%', templet: "
{{layui.util.toDateString(d.createtime, 'yyyy-MM-dd HH:mm:ss')}}
"}, {field: 'deviceid', title: '设备号'}, {field: 'devicetype', title: '设备类型'}, {field: 'level', title: '告警级别'}, {field: 'code', title: '告警类型'}, - {field: 'info', title: '告警内容', minWidth: 150} + {field: 'info', title: '告警内容', width: '35%'} ]], limits: [10, 15, 20, 25, 50, 100], limit: 15, @@ -82,9 +91,6 @@ // 监听搜索操作 form.on('submit(data-search-btn)', function (data) { var result = JSON.stringify(data.field); - layer.alert(result, { - title: '最终的搜索信息' - }); //执行搜索重载 table.reload('currentTableId', {