报警功能添加

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> <keep-alive>
<router-view /> <router-view />
</keep-alive> </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> </div>
</template> </template>
<script> <script>
import { getMonitorList,getDoorStatus } from "@/api/opsVisualization/tuobu";
export default { export default {
name: "app", name: "app",
data() { data() {
return {}; return {
isShowDoor:false,
timer:null
};
}, },
watch: {}, watch: {},
created() { 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: {} computed: {}
}; };
</script> </script>

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

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

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

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

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

@ -69,7 +69,7 @@
" "
alt="" alt=""
/> />
{{ item.type == "redis" ? "Redis服务监控" : "数据库监控" }} {{ item.type == "redis" ? "Redis服务监控" : item.type == "mysql" ? "数据库监控" : item.type == "software" ? '门禁软件监控' : '监控'}}
</div> </div>
<div <div
class="color_block" 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> <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> </div>
<el-button class="goto_button" @click="goto">告警详情</el-button> <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> </div>
</template> </template>
<script> <script>
import serverUnit from "./serverUnit.vue" import serverUnit from "./serverUnit.vue"
import jiedian from "./jiedian.vue" import jiedian from "./jiedian.vue"
import { getMonitorList } from "@/api/opsVisualization/tuobu"; import { getMonitorList,getDoorStatus } from "@/api/opsVisualization/tuobu";
export default { export default {
data() { data() {
return { return {
dataList: [], dataList: [],
isDoor:true,
shebeiList: { shebeiList: {
dianti: true, dianti: true,
xiaofang: true, xiaofang: true,
@ -106,6 +124,8 @@ export default {
zhaoming: true, zhaoming: true,
}, },
timer: null, timer: null,
timer1:null,
isShowDoor:false
} }
}, },
components: { components: {
@ -119,12 +139,19 @@ export default {
}, },
mounted() { mounted() {
this.getMonitorList() this.getMonitorList()
this.getDoorStatus()
this.startTimer(); this.startTimer();
}, },
beforeDestroy() { beforeDestroy() {
this.clearTimer(); this.clearTimer();
}, },
methods: { methods: {
getDoorStatus(){
getDoorStatus().then(res =>{
this.isDoor = res.data.data
// this.isShowDoor = !this.isDoor
})
},
async getMonitorList(){ async getMonitorList(){
await getMonitorList().then(res => { await getMonitorList().then(res => {
// console.log(res) // console.log(res)
@ -157,11 +184,17 @@ export default {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.getMonitorList(); this.getMonitorList();
}, 5 * 60 * 1000); // 5 }, 5 * 60 * 1000); // 5
this.timer1 = setInterval(() =>{
this.getDoorStatus()
},60 * 1000 * 30) //30
}, },
clearTimer() { clearTimer() {
if (this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
} }
if(this.timer1){
clearInterval(this.timer1)
}
}, },
goto() { goto() {
this.$router.push({ this.$router.push({
@ -186,6 +219,22 @@ export default {
top: 20px; top: 20px;
right: 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{ .server_1{
position: absolute; position: absolute;
left: 400px; 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() { mounted() {
this.routeName = this.$route.name this.routeName = this.$route.name
}, },

Loading…
Cancel
Save