refactor(ems): 优化温度数据查询和展示

- 修改 TWTempertureDataMapper.xml 中的查询语句,增加时间范围限制
- 更新 board 页面的 AlarmInfo 数据处理方式
- 调整 baseAlarmInfo 页面的字段显示
- 移除不必要的权限配置
IOT
zch 1 month ago
parent 02a2eceb37
commit cadcf4f5b4

@ -245,10 +245,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectLastTWTempertureData" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
<!-- <select id="selectLastTWTempertureData" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
select *
from T_W_TempertureData
ORDER BY objid DESC
LIMIT 1000
</select>-->
<select id="selectLastTWTempertureData" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
select objid,
monitorId,
collectTime,
tempreture,
humidity,
illuminance,
noise,
concentration,
recodeTime,
alarmType,
pm1,
pm2,
pm10,
standby
from T_W_TempertureData
WHERE
recodeTime >= date_sub(CURDATE(), INTERVAL 7 DAY)
ORDER BY objid DESC
LIMIT 1000
</select>
</mapper>

@ -128,16 +128,12 @@ public class SecurityConfig
.antMatchers("/ems/base/baseMonitorInfo/monitorInfo").permitAll()
.antMatchers("/ems/base/baseMonitorInfo/**").permitAll()
.antMatchers("/ems/record/recordIOTInstant/selectLastTWTempertureData").permitAll()
.antMatchers("/ems/base/baseMonitorInfo/list").permitAll()
.antMatchers("/ems/base/baseMonitorInfo/monitorInfo/**").permitAll()
.antMatchers("/record/recordBusbarAlarm/recordBusbarAlarmList").permitAll()
// 允许匿名访问 看板 下所有页面
.antMatchers("/board/**").permitAll()
.antMatchers("/board/index2").permitAll()
.antMatchers("/board/index1").permitAll()
.antMatchers("/board/index").permitAll()
.antMatchers("/board/index3").permitAll()
// 允许匿名访问 字典类型
.antMatchers("/system/dict/data/type/**").permitAll()

@ -175,7 +175,7 @@
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createdBy" />
<!-- <el-table-column label="创建人" align="center" prop="createdBy" />
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
@ -186,7 +186,7 @@
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -258,7 +258,7 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<!-- <el-form-item label="创建人" prop="createdBy">
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
@ -279,7 +279,7 @@
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

@ -323,7 +323,7 @@ export default {
left: 89.7
},
],
AlarmInfo: {},
AlarmInfo: [],
DeviceInfo: {},
TemParam: {}
}
@ -624,7 +624,7 @@ export default {
socket.onmessage = function (event) {
let data = JSON.parse(event.data)
if (data.AlarmInfo) {
_this.AlarmInfo = data.AlarmInfo
_this.AlarmInfo = [data.AlarmInfo]
}
if (data.DeviceInfo) {
_this.DeviceInfo = data.DeviceInfo

@ -107,7 +107,7 @@ import {
} from "@/api/board/index2";
export default {
dicts:['alarm_type'],
/* dicts:['alarm_type'],*/
data() {
return {
scrollTableOption: {
@ -171,7 +171,7 @@ export default {
},
methods: {
setAlarmType(e){
console.log(this.dict.type.alarm_type)
/* console.log(this.dict.type.alarm_type)*/
},
getData(){

Loading…
Cancel
Save