报警管理代码提交
This commit is contained in:
parent
511d8dd2c6
commit
6d7c2e9ce8
|
@ -28,6 +28,10 @@ public class ThAlarm extends BaseEntity {
|
|||
*/
|
||||
private String sn;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
private String deptName;
|
||||
|
||||
|
||||
/**
|
||||
*是否处理
|
||||
|
@ -50,9 +54,7 @@ public class ThAlarm extends BaseEntity {
|
|||
*/
|
||||
private String power;
|
||||
|
||||
private String factoryName;
|
||||
|
||||
private Long factoryId;
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
|
@ -133,21 +135,7 @@ public class ThAlarm extends BaseEntity {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dealTime;
|
||||
|
||||
public String getFactoryName() {
|
||||
return factoryName;
|
||||
}
|
||||
|
||||
public void setFactoryName(String factoryName) {
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public Long getFactoryId() {
|
||||
return factoryId;
|
||||
}
|
||||
|
||||
public void setFactoryId(Long factoryId) {
|
||||
this.factoryId = factoryId;
|
||||
}
|
||||
|
||||
public Long getReportId() {
|
||||
return reportId;
|
||||
|
@ -161,6 +149,22 @@ public class ThAlarm extends BaseEntity {
|
|||
return isDeal;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public void setIsDeal(String isDeal) {
|
||||
this.isDeal = isDeal;
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@
|
|||
<result property="isDeal" column="is_deal"/>
|
||||
<result property="dealTime" column="deal_time"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="factoryName" column="factory_name"/>
|
||||
<result property="factoryId" column="factory_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
</resultMap>
|
||||
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThAlarmEchart" id="ThAlarmEchartResult">
|
||||
<result property="level1" column="level1"/>
|
||||
|
@ -86,7 +86,7 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<if test="id != null and id != ''">and t.id=#{id}</if>
|
||||
<if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
|
||||
<if test="monitorNo != null and monitorNo != ''">and t.sn= #{monitorNo} </if>
|
||||
<if test="deptId != null and deptId != ''">and t.dep_id= #{fadeptIdctoryId} </if>
|
||||
<if test="deptId != null and deptId != ''">and t.dept_id= #{deptId} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -216,36 +216,35 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
th_device_report.latitude,
|
||||
th_device_report.longitude,
|
||||
cgq,
|
||||
report_content,
|
||||
report_content ->> '$[0].ds' AS ds,
|
||||
report_content ->> '$[0].dw' AS dw,
|
||||
report_content ->> '$[0].lc' AS lc,
|
||||
report_content ->> '$[0].zl' AS zl,
|
||||
report_content ->> '$[0].zt' AS zt,
|
||||
report_content ->> '$[0].dbz' AS dbz,
|
||||
report_content ->> '$[0].gbz' AS gbz,
|
||||
th_device_report.ds AS ds,
|
||||
th_device_report.dw AS dw,
|
||||
th_device_report.zl AS zl,
|
||||
th_device_report.zt AS zt,
|
||||
th_device_report.dbz AS dbz,
|
||||
th_device_report.gbz AS gbz,
|
||||
t.NAME,
|
||||
t.dept_id,
|
||||
dept.dept_name,
|
||||
d.id as dealId,
|
||||
d.deal_way,
|
||||
d.is_deal,
|
||||
d.deal_time,
|
||||
d.reason,
|
||||
d.deal_user,
|
||||
t.factory_id,
|
||||
f.factory_name
|
||||
d.deal_user
|
||||
FROM
|
||||
th_device_report
|
||||
LEFT JOIN th_device t ON th_device_report.sn = t.sn
|
||||
LEFT JOIN sys_factory f on t.factory_id=f.factory_id
|
||||
LEFT JOIN sys_dept dept on t.dept_id=dept.dept_id
|
||||
LEFT JOIN th_device_deal d ON th_device_report.id = d.report_id
|
||||
<where>
|
||||
(report_content ->> '$[0].zt' ='一级报警' ||report_content ->> '$[0].zt' ='二级报警' )
|
||||
( th_device_report.zt='一级报警' or th_device_report.zt='二级报警')
|
||||
|
||||
<if test="startTime != null">and report_time > #{startTime,jdbcType=TIMESTAMP}</if>
|
||||
<if test="endTime != null">and report_time < #{endTime,jdbcType=TIMESTAMP}</if>
|
||||
<if test="endTime != null">and th_device_report.sn= #{sn}</if>
|
||||
<if test="endTime != null">and t.name like concat('%', #{name}, '%')</if>
|
||||
<if test="dealUser != null">and d.dealUser like concat('%', #{dealUser}, '%')</if>
|
||||
<if test="factoryId != null">and t.factory_id=#{factoryId}</if>
|
||||
<if test="deptId != null">and t.dept_id=#{deptId}</if>
|
||||
<choose>
|
||||
<when test="isDeal=='1'.toString()">
|
||||
and d.is_deal='1'
|
||||
|
@ -332,34 +331,28 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
th_device_report.latitude,
|
||||
th_device_report.longitude,
|
||||
cgq,
|
||||
report_content,
|
||||
report_content ->> '$[0].ds' AS ds,
|
||||
report_content ->> '$[0].dw' AS dw,
|
||||
report_content ->> '$[0].lc' AS lc,
|
||||
report_content ->> '$[0].zl' AS zl,
|
||||
report_content ->> '$[0].zt' AS zt,
|
||||
report_content ->> '$[0].dbz' AS dbz,
|
||||
report_content ->> '$[0].gbz' AS gbz,
|
||||
th_device_report.ds AS ds,
|
||||
th_device_report.dw AS dw,
|
||||
th_device_report.zl AS zl,
|
||||
th_device_report.zt AS zt,
|
||||
th_device_report.dbz AS dbz,
|
||||
th_device_report.gbz AS gbz,
|
||||
t.NAME,
|
||||
d.id as dealId,
|
||||
d.deal_way,
|
||||
d.is_deal,
|
||||
d.deal_time,
|
||||
d.deal_user,
|
||||
t.factory_id,
|
||||
f.factory_name
|
||||
t.dept_id,
|
||||
dept.dept_name
|
||||
|
||||
FROM
|
||||
th_device_report
|
||||
LEFT JOIN th_device t ON th_device_report.sn = t.sn
|
||||
LEFT JOIN sys_factory f on t.factory_id=f.factory_id
|
||||
LEFT JOIN th_device_deal d ON th_device_report.id = d.report_id
|
||||
LEFT JOIN sys_dept dept on t.dept_id=dept.dept_id
|
||||
|
||||
<where>
|
||||
|
||||
<if test="startTime != null">and report_time >= #{startTime,jdbcType=TIMESTAMP}</if>
|
||||
<if test="endTime != null">and report_time <= #{endTime,jdbcType=TIMESTAMP}</if>
|
||||
<if test="sn != null">and th_device_report.sn= #{sn}</if>
|
||||
<if test="name != null">and t.name like concat('%', #{name}, '%')</if>
|
||||
<if test="factoryId != null">and t.factory_id=#{factoryId}</if>
|
||||
<if test="deptId != null">and t.dept_id=#{deptId}</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by th_device_report.report_time desc
|
||||
|
|
|
@ -37,7 +37,7 @@ import DictTag from '@/components/DictTag'
|
|||
import VueMeta from 'vue-meta'
|
||||
// 字典数据组件
|
||||
import DictData from '@/components/DictData'
|
||||
|
||||
import BaiduMap from 'vue-baidu-map'
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
|
@ -57,7 +57,10 @@ Vue.component('Editor', Editor)
|
|||
Vue.component('FileUpload', FileUpload)
|
||||
Vue.component('ImageUpload', ImageUpload)
|
||||
Vue.component('ImagePreview', ImagePreview)
|
||||
|
||||
Vue.use(BaiduMap, {
|
||||
// ak密钥
|
||||
ak: 'cGGHoaL28hAugwgCpH4AGrqBVh3FAzbf',
|
||||
})
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
Vue.use(VueMeta)
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="queryParams" ref="form">
|
||||
<el-form-item label="选择企业" prop="factoryId">
|
||||
<el-select v-model="queryParams.factoryId" clearable filterable placeholder="请选择">
|
||||
<el-option v-for="item in factorys" :key="item.value" :label="item.factoryName" :value="item.factoryId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="选择部门" prop="deptId">
|
||||
<dept-tree @deptChange="handleDeptChange" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input v-model="queryParams.name"></el-input>
|
||||
|
@ -108,14 +105,13 @@
|
|||
import { listAlarm } from "@/api/demostrate/monitor";
|
||||
import sendMsg from "@/views/demostrate/alarm/sendMsg";
|
||||
import dealAlarm from "@/views/demostrate/alarm/dealAlarm";
|
||||
import { getAllFactory } from "@/api/home";
|
||||
import DeptTree from "@/components/DeptTree/index.vue";
|
||||
export default {
|
||||
name: "alarm",
|
||||
components: { sendMsg,dealAlarm },
|
||||
components: { sendMsg,dealAlarm,DeptTree },
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
factorys:[],
|
||||
loading: false,
|
||||
deviceInfo: {},
|
||||
isOpenMsg: false,
|
||||
|
@ -145,6 +141,7 @@
|
|||
startTime: null,
|
||||
endTime: null,
|
||||
factoryId:null,
|
||||
deptId: null,
|
||||
},
|
||||
userName: '',
|
||||
|
||||
|
@ -152,19 +149,28 @@
|
|||
},
|
||||
created() {
|
||||
this.userName = store.getters.user.userName
|
||||
this.queryParams.factoryId = store.getters.user.factoryId
|
||||
},
|
||||
mounted() {
|
||||
this.getFactory()
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
/**获取企业下拉框 */
|
||||
getFactory() {
|
||||
getAllFactory({}).then(response => {
|
||||
this.factorys = response.data;
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
this.emitChange();
|
||||
this.getList()
|
||||
},
|
||||
/**获取企业下拉框 */
|
||||
handleDeptChange(value) {
|
||||
this.queryParams.deptId = value.deptId;
|
||||
this.emitChange();
|
||||
},
|
||||
emitChange() {
|
||||
this.$nextTick(() => {
|
||||
this.$emit("queryChange", {
|
||||
deptId: this.queryParams.deptId,
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
if (this.dateList && this.dateList.length > 0) {
|
||||
this.queryParams.startTime = this.dateList[0]
|
||||
|
@ -174,236 +180,11 @@
|
|||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
// listAlarm(this.queryParams).then(response => {
|
||||
// this.dataList = response.rows;
|
||||
// this.total = response.total;
|
||||
// this.loading = false;
|
||||
// });
|
||||
this.total = 343;
|
||||
this.loading = false;
|
||||
this.dataList=[ {
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-26 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-25 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
isDeal:'1',
|
||||
reason:'阀门泄漏',
|
||||
dealUser:'张三',
|
||||
dealWay:'拧紧螺栓',
|
||||
dealTime:'2024-05-26 09:49:12',
|
||||
|
||||
},
|
||||
{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-24 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB621085098QW",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-25 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 121.23,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "一级报警",
|
||||
"dbz": 50, "gbz": 120,
|
||||
isDeal:'1',
|
||||
reason:'阀门泄漏',
|
||||
dealUser:'李四',
|
||||
dealWay:'拧紧螺栓',
|
||||
dealTime:'2024-05-26 09:49:12',
|
||||
|
||||
},{
|
||||
"sn": "ZABB621085098QWS",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-24 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-23 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-22 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-21 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 9.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-20 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 0.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 20, "gbz": 50,
|
||||
|
||||
},{
|
||||
"sn": "ZABB6210850989ZA",
|
||||
"isDeal": null,
|
||||
"name": null,
|
||||
"reportTime": "2024-05-20 23:49:12",
|
||||
"power": "59",
|
||||
"factoryName": '**有限公司',
|
||||
"wd": "0",
|
||||
"yl": "101.3",
|
||||
"latitude": "3604.89440",
|
||||
"longitude": "12022.12783",
|
||||
"lng": null,
|
||||
"lat": null,
|
||||
"cgq": 1,
|
||||
"ds": 40.0,
|
||||
"dw": "PPM",
|
||||
"lc": 500,
|
||||
"zl": "VOC",
|
||||
"zt": "二级报警",
|
||||
"dbz": 12, "gbz": 58,
|
||||
|
||||
},
|
||||
]
|
||||
listAlarm(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
//发送通知
|
||||
|
|
|
@ -28,13 +28,12 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { BmlHeatmap } from 'vue-baidu-map'//引人
|
||||
|
||||
import bus from '@/utils/bus.js'
|
||||
import iconMarker from '@/assets/images/marker1.png' // 以import的方式导入图片文件
|
||||
import { getMonitorMap } from "@/api/demostrate/monitor";
|
||||
export default {
|
||||
components: {
|
||||
BmlHeatmap
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue