add(recordBusbarTemp): 母排测温记录增加巡检模式功能

- 在 RecordBusbarTemp 模型中添加 routModel 字段,用于记录巡检模式
- 在前端页面中增加巡检模式的选择和显示
- 修改数据库映射文件,支持 routModel 字段的存储和查询
IOT
zch 1 year ago
parent e0e1e64d42
commit 23101c9ec3

@ -81,6 +81,10 @@ public class RecordBusbarTemp extends BaseEntity
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date recordTime; private Date recordTime;
/** 巡检模式1-自动2-快速3-定点 */
@Excel(name = "巡检模式1-自动2-快速3-定点")
private Long routModel;
public void setObjId(Long objId) public void setObjId(Long objId)
{ {
this.objId = objId; this.objId = objId;
@ -217,6 +221,14 @@ public class RecordBusbarTemp extends BaseEntity
return recordTime; return recordTime;
} }
public Long getRoutModel() {
return routModel;
}
public void setRoutModel(Long routModel) {
this.routModel = routModel;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -236,6 +248,7 @@ public class RecordBusbarTemp extends BaseEntity
.append("updatedBy", getUpdatedBy()) .append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime()) .append("updatedTime", getUpdatedTime())
.append("recordTime", getRecordTime()) .append("recordTime", getRecordTime())
.append("routModel", getRoutModel())
.toString(); .toString();
} }
} }

@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updatedBy" column="updated_by" /> <result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" /> <result property="updatedTime" column="updated_time" />
<result property="recordTime" column="record_time" /> <result property="recordTime" column="record_time" />
<result property="routModel" column="rout_model" />
</resultMap> </resultMap>
<sql id="selectRecordBusbarTempVo"> <sql id="selectRecordBusbarTempVo">
@ -38,7 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
created_time, created_time,
updated_by, updated_by,
updated_time, updated_time,
record_time record_time,
rout_model
from record_busbar_temp from record_busbar_temp
</sql> </sql>
@ -61,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> <if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="params.beginUpdatedTime != null and params.beginUpdatedTime != '' and params.endUpdatedTime != null and params.endUpdatedTime != ''"> and updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime}</if> <if test="params.beginUpdatedTime != null and params.beginUpdatedTime != '' and params.endUpdatedTime != null and params.endUpdatedTime != ''"> and updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if> <if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
<if test="routModel != null "> and rout_model = #{routModel}</if>
</where> </where>
</select> </select>
@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">updated_by,</if> <if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if> <if test="updatedTime != null">updated_time,</if>
<if test="recordTime != null">record_time,</if> <if test="recordTime != null">record_time,</if>
<if test="routModel != null">rout_model,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="busbarCode != null">#{busbarCode},</if> <if test="busbarCode != null">#{busbarCode},</if>
@ -104,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
<if test="recordTime != null">#{recordTime},</if> <if test="recordTime != null">#{recordTime},</if>
<if test="routModel != null">#{routModel},</if>
</trim> </trim>
</insert> </insert>
@ -125,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">updated_by = #{updatedBy},</if> <if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if> <if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="recordTime != null">record_time = #{recordTime},</if> <if test="recordTime != null">record_time = #{recordTime},</if>
<if test="routModel != null">rout_model = #{routModel},</if>
</trim> </trim>
where objId = #{objId} where objId = #{objId}
</update> </update>

@ -98,6 +98,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="巡检模式" prop="routModel">
<el-select v-model="queryParams.routModel" placeholder="请选择巡检模式" clearable>
<el-option
v-for="dict in dict.type.rout_model"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="图像路径" prop="filePath"> <!-- <el-form-item label="图像路径" prop="filePath">
<el-input <el-input
v-model="queryParams.filePath" v-model="queryParams.filePath"
@ -263,6 +273,11 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column>--> </el-table-column>-->
<el-table-column label="巡检模式" align="center" prop="routModel">
<template slot-scope="scope">
<dict-tag :options="dict.type.rout_model" :value="scope.row.routModel"/>
</template>
</el-table-column>
<el-table-column label="记录时间" align="center" prop="recordTime" width="180"> <el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -350,6 +365,17 @@
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="巡检模式" prop="routModel">
<el-radio-group v-model="form.routModel">
<el-radio
v-for="dict in dict.type.rout_model"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item> </el-form-item>
@ -423,7 +449,7 @@ import {getBaseCabinetInfoTree} from "@/api/base/baseCabinetInfo";
export default { export default {
name: "RecordBusbarTemp", name: "RecordBusbarTemp",
dicts: ['record_busbar_temp_is_alarm', 'record_busbar_temp_is_flag'], dicts: ['record_busbar_temp_is_alarm', 'record_busbar_temp_is_flag','rout_model'],
data() { data() {
return { return {
@ -485,7 +511,8 @@ export default {
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,
updatedTime: null, updatedTime: null,
recordTime: null recordTime: null,
routModel: null
}, },
// //
form: {}, form: {},
@ -561,6 +588,7 @@ export default {
thermalPhoto : null, thermalPhoto : null,
thermalResponse : null, thermalResponse : null,
visibleResponse : null, visibleResponse : null,
routModel: null,
}; };
this.resetForm("form"); this.resetForm("form");
this.photoOpen = false; this.photoOpen = false;
@ -693,33 +721,6 @@ export default {
} }
}; };
</script> </script>
<!--
上面的图像是 2688x1520下面的图像是 1920x1080
<style scoped>
/* 定义一个图像容器类,用于设置图像的布局和样式 */
.image-container {
width: 100%; /* 设置容器宽度为100%,以适应父元素 */
max-width: 1080px; /* 设置容器的最大宽度,防止图像在大屏幕上显示过大 */
margin: 0 auto; /* 居中显示容器 */
position: relative; /* 设置相对定位,以便于在容器内进行绝对定位 */
aspect-ratio: 16 / 9; /* 16:9 的比例,适合 1920x1080 的图像 */
margin-bottom: 10px; /* 减少容器之间的间距 */
}
/* 设置图像容器内的图像样式 */
.image-container img {
width: 100%; /* 设置图像宽度为100%,充满容器 */
height: 100%; /* 设置图像高度为100%,充满容器 */
object-fit: contain; /* 使用 contain 以确保图像完整显示 */
}
/* 对话框内容区域的样式 */
.dialog-content {
max-height: 80vh; /* 设置最大高度为视口高度的 80% */
overflow-y: auto; /* 添加垂直滚动条 */
}
</style>
-->
<style scoped> <style scoped>
.dialog-content { .dialog-content {

Loading…
Cancel
Save