更新设备

This commit is contained in:
2022-07-05 14:31:48 +08:00
parent 34f4f08218
commit eb5d4feec6
3 changed files with 21 additions and 8 deletions

View File

@@ -43,6 +43,7 @@ public class RootLogServiceImpl implements RootLogService {
if (StrUtil.isEmpty(log_type)) { if (StrUtil.isEmpty(log_type)) {
log_type = "default"; log_type = "default";
} }
if (StrUtil.isNotEmpty(log_level)){ if (StrUtil.isNotEmpty(log_level)){
query.addCriteria(Criteria.where("level").is(log_level)); query.addCriteria(Criteria.where("level").is(log_level));
} }
@@ -72,6 +73,8 @@ public class RootLogServiceImpl implements RootLogService {
String device_code = (String) whereJson.get("device_code"); String device_code = (String) whereJson.get("device_code");
String begin_time = (String) whereJson.get("begin_time"); String begin_time = (String) whereJson.get("begin_time");
String end_time = (String) whereJson.get("end_time"); String end_time = (String) whereJson.get("end_time");
String error_info = (String) whereJson.get("error_info");
Query query = new Query(); Query query = new Query();
query.with(Sort.by(Sort.Order.desc("create_time"))); query.with(Sort.by(Sort.Order.desc("create_time")));
@@ -81,6 +84,9 @@ public class RootLogServiceImpl implements RootLogService {
JSONObject json = array.getJSONObject(0); JSONObject json = array.getJSONObject(0);
device_code = json.getString("device_code"); device_code = json.getString("device_code");
} }
if (StrUtil.isNotEmpty(error_info)){
query.addCriteria(Criteria.where("message").regex(error_info));
}
if (StrUtil.isNotEmpty(begin_time) && StrUtil.isNotEmpty(end_time)) { if (StrUtil.isNotEmpty(begin_time) && StrUtil.isNotEmpty(end_time)) {
query.addCriteria(Criteria.where("create_time") query.addCriteria(Criteria.where("create_time")
.gte(begin_time) .gte(begin_time)

View File

@@ -3,9 +3,9 @@
title="监控详情" title="监控详情"
append-to-body append-to-body
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
fullscreen
@open="open" @open="open"
@close="close" @close="close"
fullscreen
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="18" style="border: 1px solid white"> <el-col :span="18" style="border: 1px solid white">
@@ -183,7 +183,6 @@ export default {
const obj = JSON.parse(JSON.stringify(item)) const obj = JSON.parse(JSON.stringify(item))
if (obj.device_code === that.device_code) { if (obj.device_code === that.device_code) {
that.form = obj.data that.form = obj.data
console.log(that.form)
} }
} }
} }

View File

@@ -37,6 +37,14 @@
end-placeholder="结束日期" end-placeholder="结束日期"
align="right" align="right"
/> />
<el-input
v-model="query.error_info"
clearable
size="small"
placeholder="请输入异常信息"
style="width: 220px;"
class="filter-item"
/>
<rrOperation /> <rrOperation />
</div> </div>
<crudOperation :permission="permission" /> <crudOperation :permission="permission" />
@@ -71,7 +79,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import { get } from '@/api/system/dictDetail' import { get } from '@/api/system/dictDetail'
import Search from '@/views/monitor/lucene/search' import Search from '@/views/monitor/lucene/search'
import deviceCrud from "@/api/acs/device/device"; import deviceCrud from '@/api/acs/device/device'
const defaultForm = { const defaultForm = {
_id: null, _id: null,