Browse Source

收费站UPS状态监测和推送

develop
wangsixiang 2 days ago
parent
commit
7469767a0a
  1. 6
      ruoyi-ui/src/common/menuData.js
  2. 10
      ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue
  3. 234
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/alarm/index.vue
  4. 1
      ruoyi-ui/src/views/websocket.vue

6
ruoyi-ui/src/common/menuData.js

@ -236,6 +236,12 @@ export default [
path: "/maintain/smart/smoke",
component: "maintenanceOperations/smart/smoke/index.vue",
},
{
title: "收费站UPS状态监测",
name: "alarm",
path: "/maintain/smart/alarm",
component: "maintenanceOperations/smart/alarm/index.vue",
},
],
},
{

10
ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue

@ -79,6 +79,16 @@ export default {
title:'扫码报警',
duration: 0
}
}
else if(checkPermi(["admin"]) && para.subEvent == "deviceAlarm"){
obj = {
content: para.content.content,
time:para.content.time,
type: "deviceAlarm",
level: "danger",
title:'设备报警',
duration: 0
}
} else if(checkRole(["admin"]) && para.subEvent === "opticalFiberAlarm"){
obj = {
content: para.content.message,

234
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/alarm/index.vue

@ -0,0 +1,234 @@
<template>
<div class="board_record">
<!-- 搜索栏 -->
<div class="filter">
<div>
<ButtonGradient @click="openList" class="refresh-btn">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
刷新
</ButtonGradient>
<ButtonGradient @click="monitor" class="refresh-btn">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
监测
</ButtonGradient>
</div>
</div>
<!-- 内容 -->
<div class="body">
<Table :data="tableData" height="75vh">
<el-table-column
label="序号"
type="index"
:index="indexMethod"
width="100"
align="center"
header-align="center"
/>
<ElTableColumn
label="设备名称"
show-overflow-tooltip
prop="deviceName"
/>
<ElTableColumn label="设备名称" prop="deviceName" />
<ElTableColumn label="UPS状态" prop="content" />
<ElTableColumn label="ip地址" width="300" prop="ip" />
<ElTableColumn label="上报时间" prop="createTime" />
<ElTableColumn label="更新时间" prop="updateTime" />
</Table>
</div>
<!-- 分页 -->
<div class="footer">
<Pagination
@current-change="initData"
@size-change="onSizeChange"
width="'100%'"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next"
:total="total"
>
</Pagination>
</div>
</div>
</template>
<script>
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Pagination from '@screen/components/Pagination.vue';
import Table from '@screen/components/Table.vue';
import request from '@/utils/request'
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import InputSearch from "@screen/components/InputSearch/index.vue";
import { Message } from "element-ui";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import {deviceTypeOptions} from '@screen/utils/enum.js';
import DialogWarning from '@screen/components/HeaderMenu/dialogWarn/DialogWarning.vue'
export default {
name: 'boardRecord',
components: {
ButtonGradient,
Pagination,
Table,
Button,
Form,
DialogWarning,
BoardRecordPreview,
InputSearch
},
data() {
return {
isDiagnosing: false,
WarningType:{
1: '交通流预警',
2: '气象预警'
},
tableData: [],
total: 20,
searchData: {
pageSize: 20,
pageNum: 1
},
dialogWarningVisible: false,
deviceTypeCount:"",
}
},
created() {
this.initData();
},
mounted(){
},
methods: {
onRefreshForm(){
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
},
initData() {
request({
url: `/business/device/dcSnmpUpsAlarmList`,
method: "get",
params: this.searchData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(e=>{
e.directionName = e.direction == 1 ? '菏泽方向' :
(e.direction == 3 ? '济南方向' : '双向');
})
this.tableData = result.rows;
this.total = result.total;
});
},
onSizeChange(pageSize) {
this.tableData = [];
this.searchData.pageSize = pageSize;
this.searchData.pageNum = 1;
this.initData();
},
openList(){
request({
url: `/business/device/dcSnmpUpsAlarmList`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.tableData = result.rows;
this.total = result.total;
Message.success("操作成功");
});
},
monitor(){
request({
url: `/business/device/snmpUpsAlarm`,
method: "post",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
if (result.code == 200) {
Message.success("操作成功");
}
});
}
}
}
</script>
<style lang='scss' scoped>
.board_record {
padding: 0 14px 14px;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
> div {
display: flex;
gap: 6px;
}
}
.body {
flex: 1;
height: 0;
min-height: 0;
}
.footer {
margin-top: 15px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
.board_shower {
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal {
line-height: 0;
height: 16px;
.el-carousel__indicator--horizontal {
padding: 7px 4px;
}
}
::v-deep .el-table__cell div.cell {
padding: 0 10px !important;
}
}
.upload-file {
width: 100%;
margin: 20px 0px;
background-color: #104c66 !important;
border: 1px solid #359cbc !important;
border-radius: 5px;
text-align: center;
padding: 5px 0px;
font-size: 14px;
cursor: pointer;
}
</style>

1
ruoyi-ui/src/views/websocket.vue

@ -112,6 +112,7 @@ export default {
case "3":
case "externalPlatformOffline":
case "opticalFiberAlarm":
case "deviceAlarm":
case "trafficFlowDataEarlyWarning":
this.$emit("newEvent", params);
break;

Loading…
Cancel
Save