报警功能添加

main
jinna 4 months ago
parent a689a91356
commit ab9326dd1e
  1. BIN
      public/img/tuobu/door_error.png
  2. BIN
      public/img/tuobu/door_success.png
  3. 43
      src/App.vue
  4. 6
      src/api/opsVisualization/alarmProcess.js
  5. 9
      src/api/opsVisualization/serviceDataOAM.js
  6. 9
      src/api/opsVisualization/systemMonitoring.js
  7. 11
      src/api/opsVisualization/tuobu.js
  8. 21
      src/components/monitoring/door.vue
  9. 2
      src/page/opsVisualization/systemMonitoring/index.vue
  10. 51
      src/page/opsVisualization/tuobu.vue
  11. 4
      src/views/equipment/doorRecord.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -4,20 +4,57 @@
<keep-alive>
<router-view />
</keep-alive>
<el-dialog
title="提示"
:visible.sync="isShowDoor"
width="30%"
:append-to-body="true"
:close-on-click-modal="false">
<span>门禁软件存在问题请尽快处理</span>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowDoor = false"> </el-button>
<el-button type="primary" @click="isShowDoor = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getMonitorList,getDoorStatus } from "@/api/opsVisualization/tuobu";
export default {
name: "app",
data() {
return {};
return {
isShowDoor:false,
timer:null
};
},
watch: {},
created() {
// this.getDoorStatus()
// this.startTimer()
},
beforeDestroy() {
this.clearTimer();
},
methods: {
getDoorStatus(){
getDoorStatus().then(res =>{
this.isShowDoor = !res.data.data
})
},
startTimer() {
this.timer = setInterval(() =>{
this.getDoorStatus()
},10 * 1000 ) //30
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
}
},
},
methods: {},
computed: {}
};
</script>

@ -3,7 +3,8 @@ import request from '@/router/axios';
//设备类型通讯链路及排除方案
export const getWarnPoint = (params) => {
return request({
url: '/kgApi/monitor-business/getWarnPoint',
url: '/kgApi/monitor-business/getWarnPoint', //单独部署监控管理时使用此url
// url: '/monitor-business/getWarnPoint',
method: 'get',
params
})
@ -11,7 +12,8 @@ export const getWarnPoint = (params) => {
//排查方案信息列表
export const getResolveTips = (params) => {
return request({
url: '/kgApi/monitor-business/getResolveTips',
url: '/kgApi/monitor-business/getResolveTips', //单独部署监控管理时使用此url
// url: '/monitor-business/getResolveTips',
method: 'get',
params
})

@ -2,7 +2,8 @@ import request from '@/router/axios';
//报警设备列表
export const getEquipList = (params) => {
return request({
url: '/kgApi/monitor-business/getEquipList',
// url: '/kgApi/monitor-business/getEquipList',
url: '/monitor-business/getEquipList',
method: 'get',
params
})
@ -10,7 +11,8 @@ export const getEquipList = (params) => {
//当前报警信息
export const getWarnMsg = (params) => {
return request({
url: '/kgApi/monitor-business/getWarnMsg',
url: '/kgApi/monitor-business/getWarnMsg',
// url: '/monitor-business/getWarnMsg',
method: 'get',
params
})
@ -18,7 +20,8 @@ export const getWarnMsg = (params) => {
//报警记录
export const getWarnHisList = (params) => {
return request({
url: '/kgApi/monitor-business/getWarnHisList',
url: '/kgApi/monitor-business/getWarnHisList',
// url: '/monitor-business/getWarnHisList',
method: 'get',
params
})

@ -2,19 +2,22 @@ import request from '@/router/axios';
export const getServiceList = () => {
return request({
url: '/kgApi/monitor-system/getServiceList',
url: '/kgApi/monitor-system/getServiceList',
// url: '/monitor-system/getServiceList',
method: 'get',
})
}
export const getMiddleList = () => {
return request({
url: '/kgApi/monitor-system/getMiddleList',
url: '/kgApi/monitor-system/getMiddleList',
// url: '/monitor-system/getMiddleList',
method: 'get',
})
}
export const getServerParamsList = () => {
return request({
url: '/kgApi/monitor-system/getServerParamsList',
url: '/kgApi/monitor-system/getServerParamsList',
// url: '/monitor-system/getServerParamsList',
method: 'get',
})
}

@ -2,7 +2,16 @@ import request from '@/router/axios';
export const getMonitorList = () => {
return request({
url: '/kgApi/monitor-system/getMonitorList',
url: '/kgApi/monitor-system/getMonitorList',
// url: '/monitor-system/getMonitorList',
method: 'get',
})
}
export const getDoorStatus = () =>{
return request({
url:'/kgApi/monitor-system/checkSysSoftware',
// url:'/monitor-system/checkSysSoftware',
method:'get'
})
}

@ -350,7 +350,7 @@
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange1" :current-page.sync="current1" :page-size="10"
<el-pagination background @current-change="handleCurrentChange1" :current-page.sync="current1" :page-size="size"
layout="total, prev, pager, next" :total="total1">
</el-pagination>
</div>
@ -687,6 +687,9 @@ export default {
window["handleDetail"] = () => {
this.handleDetail()
};
window["handleTurn"] = () => {
this.handleTurn()
};
},
mounted() {
let dom = document.getElementById('door_box');
@ -925,6 +928,7 @@ export default {
if (this.doorName) {
this.isSearch = true;
bfHelper.clearTags();
this.doorName1 = this.doorName
getDoorJcjl(
this.bimModel,
null,
@ -963,7 +967,7 @@ export default {
this.current1,
this.size,
this.userName,
this.doorName,
this.doorName1,
null
).then((res) => {
this.searchLists = res.data.data.records;
@ -979,11 +983,13 @@ export default {
//
bjClick(item) {
this.dialogItem = item
console.log('dialogItem=======================================',this.dialogItem)
//
bfHelper.clearDrawableContainer();
let id = bfHelper.disposeId(item.area, item.build, item.modelId);
let box = bfHelper.getBoxMessage(id, true);
if (box == "undefined") {
console.log('box------------------------',box)
if (box == "undefined" || box == undefined) {
this.$message.error('对不起,暂无该设备模型,请稍后点击');
return;
}
@ -1146,6 +1152,7 @@ export default {
</div>
<button style="padding: 5px 0;font-size: 12px;" onclick="handleDetail()">操作明细</button>
<button style="padding: 5px 0;font-size: 12px;" onclick="handleTurn()">出入记录</button>
</div>
</div>
</div>
@ -1153,10 +1160,15 @@ export default {
return content;
},
handleDetail() {
console.log('进入此方法')
// this.$router.push(`/equipment/operationDetails?code=${this.dialogItem.code}&type=&area=${this.bimModel}`)
const routerUrl = this.$router.resolve({ path: '/equipment/operationDetails', query: { code: this.dialogItem.code,type:'电子门禁',area: this.bimModel} });
window.open(routerUrl.href, "_blank");
},
handleTurn(){
const routerUrl = this.$router.resolve({ path: '/equipment/doorRecord', query: { name: this.dialogItem.name,type:'电子门禁',area: this.bimModel} });
window.open(routerUrl.href, "_blank");
},
doorCustom(item) {
setTimeout(() => {
document.getElementById("pass-user").addEventListener("scroll", (e) => {
@ -1253,11 +1265,12 @@ export default {
this.current1,
this.size,
null,
this.doorName,
this.doorName1,
null
).then((res) => {
this.searchLists = res.data.data.records;
this.total1 = res.data.data.total; //
this.$forceUpdate()
});
},
//

@ -69,7 +69,7 @@
"
alt=""
/>
{{ item.type == "redis" ? "Redis服务监控" : "数据库监控" }}
{{ item.type == "redis" ? "Redis服务监控" : item.type == "mysql" ? "数据库监控" : item.type == "software" ? '门禁软件监控' : '监控'}}
</div>
<div
class="color_block"

@ -82,17 +82,35 @@
<jiedian class="jiedian jiedian_2" :status="dataList.some(item => item.type == 'mysql' && item.status == 1)" :img="'jiedian_blue'" :text="'数据库监控'" :left="'10'" :top="'40'"></jiedian>
</div>
<el-button class="goto_button" @click="goto">告警详情</el-button>
<div class="door_box">
<img class="door_img" v-show="!isDoor" src="../../../public/img/tuobu/door_error.png" alt="">
<img class="door_img" v-show="isDoor" src="../../../public/img/tuobu/door_success.png" alt="">
<div>门禁</div>
</div>
<el-dialog
title="提示"
:visible.sync="isShowDoor"
width="30%"
:append-to-body="true"
:close-on-click-modal="false">
<span>门禁软件存在问题请尽快处理</span>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowDoor = false"> </el-button>
<el-button type="primary" @click="isShowDoor = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import serverUnit from "./serverUnit.vue"
import jiedian from "./jiedian.vue"
import { getMonitorList } from "@/api/opsVisualization/tuobu";
import { getMonitorList,getDoorStatus } from "@/api/opsVisualization/tuobu";
export default {
data() {
return {
dataList: [],
isDoor:true,
shebeiList: {
dianti: true,
xiaofang: true,
@ -106,6 +124,8 @@ export default {
zhaoming: true,
},
timer: null,
timer1:null,
isShowDoor:false
}
},
components: {
@ -119,12 +139,19 @@ export default {
},
mounted() {
this.getMonitorList()
this.getDoorStatus()
this.startTimer();
},
beforeDestroy() {
this.clearTimer();
},
methods: {
getDoorStatus(){
getDoorStatus().then(res =>{
this.isDoor = res.data.data
// this.isShowDoor = !this.isDoor
})
},
async getMonitorList(){
await getMonitorList().then(res => {
// console.log(res)
@ -157,11 +184,17 @@ export default {
this.timer = setInterval(() => {
this.getMonitorList();
}, 5 * 60 * 1000); // 5
this.timer1 = setInterval(() =>{
this.getDoorStatus()
},60 * 1000 * 30) //30
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
}
if(this.timer1){
clearInterval(this.timer1)
}
},
goto() {
this.$router.push({
@ -186,6 +219,22 @@ export default {
top: 20px;
right: 20px;
}
.door_box{
width:64px;
position: absolute;
right: 80px;
top: 180px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.door_img{
width: 64px;
height: 64px;
margin-bottom: 10px;
}
}
.server_1{
position: absolute;
left: 400px;

@ -282,6 +282,10 @@ export default {
};
},
},
created(){
this.area = this.$route.query.area ? this.$route.query.area : 1
this.equipName = this.$route.query.name ? this.$route.query.name : ''
},
mounted() {
this.routeName = this.$route.name
},

Loading…
Cancel
Save