From 2a339677fa87f9b8ae0f064ef4b8ae53529d5381 Mon Sep 17 00:00:00 2001 From: zhangqun <179111901@qq.com> Date: Wed, 17 May 2023 17:11:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E9=98=B2=E6=80=81=E5=8A=BF=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=85=A8=E8=AE=BE=E5=A4=87=EF=BC=8C=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=8A=A0=E6=81=A2=E5=A4=8D=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=EF=BC=8C=E6=8A=A5=E8=AD=A6=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=81=A2=E5=A4=8D=E6=96=B9=E5=BC=8F=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E4=BA=BA=E6=81=A2=E5=A4=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/garden/monitoring.js | 21 ++- src/api/source/total.js | 3 +- src/components/monitoring/conditioner.vue | 21 ++- src/components/monitoring/door.vue | 33 +++-- src/components/monitoring/electricity.vue | 24 ++-- src/components/monitoring/firefighting.vue | 32 +++-- src/components/monitoring/lift.vue | 21 ++- src/components/monitoring/light.vue | 32 +++-- src/components/monitoring/monitoring.vue | 27 ++-- src/components/monitoring/wall.vue | 32 +++-- src/components/monitoring/warm.vue | 32 +++-- src/components/monitoring/water.vue | 32 +++-- src/views/equipment/warnHistory.vue | 38 ++--- src/views/garden/generalizePattern.vue | 154 ++++++++++++--------- 14 files changed, 315 insertions(+), 187 deletions(-) diff --git a/src/api/garden/monitoring.js b/src/api/garden/monitoring.js index 4bb5f8f..55c6989 100644 --- a/src/api/garden/monitoring.js +++ b/src/api/garden/monitoring.js @@ -793,13 +793,19 @@ export const getdoorData = (area, modelId) => { }; //取消报警 - 20221011 +// export const getCancelWarn = (id) => { +// return request({ +// url: "/api/blade-desk/equipment/warn-his/hideHomepage-warn", +// method: "get", +// params: { +// id, +// }, +// }); +// }; export const getCancelWarn = (id) => { return request({ - url: "/api/blade-desk/equipment/warn-his/hideHomepage-warn", + url: "/api/blade-desk/equipment/warn-his/confirm-warn?id="+id, method: "get", - params: { - id, - }, }); }; //报警记录 - 电 @@ -881,4 +887,11 @@ export const getCameraWarnList = (param) => { method: "get", params: param, }); +}; +//报警记录 - 恢复 +export const recoveryWarn = (id) => { + return request({ + url: "/api/blade-desk/equipment/warn-his/recovery-warn?id="+id, + method: "get", + }); }; \ No newline at end of file diff --git a/src/api/source/total.js b/src/api/source/total.js index 5897e6d..eb32d23 100644 --- a/src/api/source/total.js +++ b/src/api/source/total.js @@ -286,12 +286,13 @@ export const getCar = () => { }); }; // 安防态势 -export const getSecurityStatus = (area) => { +export const getSecurityStatus = (area, type) => { return request({ url: "/api/blade-desk/analysis/overview/security-status", method: "get", params: { area, + type, }, }); }; diff --git a/src/components/monitoring/conditioner.vue b/src/components/monitoring/conditioner.vue index 0c2681b..4dcf4cc 100644 --- a/src/components/monitoring/conditioner.vue +++ b/src/components/monitoring/conditioner.vue @@ -52,12 +52,17 @@
-

确认告警

+ | +

+ + 告警恢复 +

@@ -312,6 +317,7 @@ import { setLoraModel,//设置lora面板模式0:内机制热 1:内机地暖同时制热(默认) 2::地暖制热 3:制冷模式 9:通风模式| setLoraSpeed,//设置lora面板风速1:低速 2:中速 3:高速 4:自动 queryLoraAll,//读取lora面板### 读取空调面板的 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import clickCp from "./clickCp"; import backHome from "./backHome"; @@ -545,9 +551,16 @@ export default { methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getAirWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getAirWarnList(); + item.confirmStatus = 1; + }) + }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; }) }, //跳转历史告警列表 diff --git a/src/components/monitoring/door.vue b/src/components/monitoring/door.vue index 8909e2c..3113e24 100644 --- a/src/components/monitoring/door.vue +++ b/src/components/monitoring/door.vue @@ -113,14 +113,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -154,14 +153,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -374,6 +372,7 @@ import { getDoorSbList, getDoorWarnList, //报警列表 getCancelWarn, //确认告警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import backHome from "./backHome"; export default { @@ -656,11 +655,19 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getDoorWarnList2(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getDoorWarnList2(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + // this.getFiredWarnList(); + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { const routerUrl = this.$router.resolve({ diff --git a/src/components/monitoring/electricity.vue b/src/components/monitoring/electricity.vue index c22388f..70ef29d 100644 --- a/src/components/monitoring/electricity.vue +++ b/src/components/monitoring/electricity.vue @@ -57,14 +57,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -375,6 +374,7 @@ import { mapUpdate, mapViewerCamera, setCameraStatus, + recoveryWarn,//恢复告警 } from "../../util/bfHelper"; import * as commonValue from "../../util/commonValue"; import echarts from "./echarts1"; @@ -642,9 +642,17 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getElectricWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getElectricWarnList(); + item.confirmStatus = 1; + }) + }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + // this.getFiredWarnList(); + item.warnStatus = 2; }) }, //跳转历史告警列表 diff --git a/src/components/monitoring/firefighting.vue b/src/components/monitoring/firefighting.vue index 58e5176..1c2c2fd 100644 --- a/src/components/monitoring/firefighting.vue +++ b/src/components/monitoring/firefighting.vue @@ -80,14 +80,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -116,14 +115,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -252,6 +250,7 @@ import { getFightWarn, getFiredWarnList, //告警列表 getCancelWarn, //确认告警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import backHome from "./backHome"; export default { @@ -511,11 +510,18 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getFiredWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getFiredWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/components/monitoring/lift.vue b/src/components/monitoring/lift.vue index 61292c6..bd07003 100644 --- a/src/components/monitoring/lift.vue +++ b/src/components/monitoring/lift.vue @@ -48,10 +48,15 @@
-

+

确认告警

+ | +

+ + 告警恢复 +

@@ -153,6 +158,7 @@ import { getLifList, getLiftWarnList,//告警列表 getCancelWarn,//确认告警 + recoveryWarn,//恢复告警 } from '@/api/garden/monitoring'; import backHome from './backHome'; import { dateFormat } from "@/util/date"; @@ -335,11 +341,18 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getFiredWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getFiredWarnList(); + item.confirmStatus = 1; }) }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/components/monitoring/light.vue b/src/components/monitoring/light.vue index 94848cb..bddf7ee 100644 --- a/src/components/monitoring/light.vue +++ b/src/components/monitoring/light.vue @@ -74,14 +74,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -112,11 +111,16 @@ 查看详情

- | -

+ | +

确认告警

+ | +

+ + 告警恢复 +

@@ -240,6 +244,7 @@ import { lightCloseBuild, getLightWarnList, //告警列表 getCancelWarn, //关闭报警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import backHome from "./backHome"; export default { @@ -493,11 +498,18 @@ export default { } }, //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getLightWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getLightWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/components/monitoring/monitoring.vue b/src/components/monitoring/monitoring.vue index 512b529..2adf289 100644 --- a/src/components/monitoring/monitoring.vue +++ b/src/components/monitoring/monitoring.vue @@ -67,17 +67,16 @@ 查看详情

- | -

+ | +

确认告警

- | -

- - - 告警恢复 -

+ | +

+ + 告警恢复 +

@@ -218,6 +217,7 @@ import { getMonitoringList, //设备列表无分页 getCameraWarnList, //报警列表 getCancelWarn, //关闭报警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import clickCp from "./clickCp"; import backHome from "./backHome"; @@ -576,11 +576,18 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { this.getCameraWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/components/monitoring/wall.vue b/src/components/monitoring/wall.vue index 75d29ca..cb301ca 100644 --- a/src/components/monitoring/wall.vue +++ b/src/components/monitoring/wall.vue @@ -82,14 +82,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -123,14 +122,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -266,6 +264,7 @@ import { getWallGK, getFenceWarnList, //报警列表 getCancelWarn, //确认告警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; export default { props: { @@ -800,11 +799,18 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getFenceWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getFenceWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { const routerUrl = this.$router.resolve({ diff --git a/src/components/monitoring/warm.vue b/src/components/monitoring/warm.vue index b6ca66c..aae0943 100644 --- a/src/components/monitoring/warm.vue +++ b/src/components/monitoring/warm.vue @@ -189,14 +189,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -225,14 +224,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -362,6 +360,7 @@ import { getWarmMeterData, getHeatWarnList, //告警列表 getCancelWarn, //关闭报警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import backHome from "./backHome"; export default { @@ -588,11 +587,18 @@ export default { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getHeatWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getHeatWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/components/monitoring/water.vue b/src/components/monitoring/water.vue index c3445dd..addaffe 100644 --- a/src/components/monitoring/water.vue +++ b/src/components/monitoring/water.vue @@ -186,14 +186,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -220,14 +219,13 @@ 查看详情

- | -

+ | +

确认告警

- | -

- + | +

告警恢复

@@ -351,6 +349,7 @@ import { getWaterMeterData, getWaterWarnList, //报警列表 getCancelWarn, //关闭报警 + recoveryWarn,//恢复告警 } from "@/api/garden/monitoring"; import backHome from "./backHome"; export default { @@ -566,11 +565,18 @@ export default { beforeDestroy() { }, methods: { //确认告警 - 重新查询告警列表 - doCancelWarn(id) { - getCancelWarn(id).then((res) => { - this.getWaterWarnList(); + doCancelWarn(item) { + getCancelWarn(item.id).then((res) => { + // this.getWaterWarnList(); + item.confirmStatus = 1; }); }, + //恢复告警 + doRecoveryWarn(item) { + recoveryWarn(item.id).then((res) => { + item.warnStatus = 2; + }) + }, //跳转历史告警列表 goMoreWarnList() { // this.$router.push({ path: '/equipment/warnHistory' }); diff --git a/src/views/equipment/warnHistory.vue b/src/views/equipment/warnHistory.vue index 7ef3539..e43a7a8 100644 --- a/src/views/equipment/warnHistory.vue +++ b/src/views/equipment/warnHistory.vue @@ -65,11 +65,14 @@ var DIC = { alarmType: [{ - label: '安全报警', - value: '1' + label: '无报警', + value: 0 + },{ + label: '事件报警', + value: 1 }, { - label: '系统报警', - value: '2' + label: '设备报警', + value: 2 }], aereaType:[{ label:'业务区', @@ -78,12 +81,12 @@ label:'塔台', value:'2' }], - recoveryMethod:[{ + recoveryType:[{ label: '手动', - value: '1' + value: 1 }, { label: '自动', - value: '2' + value: 0 }] } export default { @@ -141,10 +144,12 @@ searchslot:true, search:true, type:"select", - hide:true, + dicData: DIC.aereaType, + // hide:true, row: false, display: false, - viewDisplay:false + viewDisplay:false, + align:'center', }, { label: "报警类型", @@ -187,19 +192,20 @@ }, { label: "恢复方式", - prop: "recoveryMethod", + prop: "recoveryType", + dicData: DIC.recoveryType, type:"select", - dicData: DIC.recoveryMethod, - align:'center', + align:'center', }, { - label: "操作人", - prop: "user", + label: "恢复人", + prop: "recoveryPerson", align:'center', }, { - label: "操作时间", - prop: "time", + label: "恢复时间", + prop: "recoveryDate", + type:'datetime', align:'center', }, ] diff --git a/src/views/garden/generalizePattern.vue b/src/views/garden/generalizePattern.vue index a10a47a..3022fea 100644 --- a/src/views/garden/generalizePattern.vue +++ b/src/views/garden/generalizePattern.vue @@ -185,24 +185,24 @@ /> 安防态势
-
+
-
-
{{ securityData.warnCurNumber }}
+
+
{{ securityData.warnCurNumber }}
当前告警数量
-
+
-
-
+
+
{{ securityData.warnHisNumber }}
历史告警数量
@@ -211,7 +211,7 @@
-
+
@@ -866,6 +866,7 @@ export default { yqPeopleTotal: 0, //园区人员总数 yqPeopleData: [], //园区人员分布统计 listData: [], //告警信息列表 + securityTab: 1,//安防态势 - 当前告警 securityData: {}, //安防态势 listData1: [], //园区报警信息 classOption: { @@ -1151,9 +1152,17 @@ export default { ], }); }, + //安防态势切换选中值 + changeSecurityTab(tab) { + console.log('changeSecurityTab================',tab) + if(this.securityTab != tab) { + this.securityTab = tab; + this.getSecurityStatus(); + } + }, //安防态势 getSecurityStatus() { - getSecurityStatus(this.bimModel).then((res) => { + getSecurityStatus(this.bimModel,this.securityTab==1?'0':'1').then((res) => { this.securityData = res.data.data; this.getSafeState(); }); @@ -1162,7 +1171,8 @@ export default { // 基于准备好的dom,初始化echarts实例 var myChart = this.$echarts.init(document.getElementById("statePie")); let warnData = [], - offlineData = []; + offlineData = [], + lengendData = []; this.securityData.securityWarnCount.map((item) => { let classData = this.classifyData.find( (item1) => item1.val == item.classCode @@ -1175,6 +1185,7 @@ export default { }, }; warnData.push(obj); + lengendData.push(classData ? classData.name : item.clasCode); }); this.securityData.offlineWarnCount.map((item) => { let classData = this.classifyData.find( @@ -1189,75 +1200,88 @@ export default { }; offlineData.push(obj); }); - // console.log("安防态势", warnData, offlineData); + console.log("安防态势", lengendData); // 绘制图表 myChart.setOption({ - color: ["#01feae", "#f2b448", "#07a6ff", "#ff8b2e"], + // color: ["#01feae", "#f2b448", "#07a6ff", "#ff8b2e"], tooltip: { trigger: "item", }, legend: { - top: "85%", - left: '-10', + top: "80%", + left: '20', + right: '20', padding: [5,0], - itemHeight: 0, + itemWidth: 15, + itemHeight: 10, + // itemHeight: 0, formatter: function (name) { - return name == "监控" - ? `{iconMark1|} ${name}` - : name == "消防" - ? `{iconMark2|} ${name}` - : name == "电子门禁" - ? `{iconMark3|} ${name}` - : `{iconMark4|} ${name}`; + return name == "电力" + ? `电` + : name; }, textStyle: { color: "rgba(255,255,255,0.5)", fontSize: 14, - rich: { - iconMark1: { - width: 10, - height: 10, - borderColor: "#01feae", - borderWidth: 3, - borderRadius: 6, - }, - iconMark2: { - width: 10, - height: 10, - borderColor: "#f2b448", - borderWidth: 3, - borderRadius: 6, - }, - iconMark3: { - width: 10, - height: 10, - borderColor: "#07a6ff", - borderWidth: 3, - borderRadius: 6, - }, - iconMark4: { - width: 10, - height: 10, - borderColor: "#ff8b2e", - borderWidth: 3, - borderRadius: 6, - }, - }, }, - data: [ - { - name: "监控", - }, - { - name: "消防", - }, - { - name: "电子门禁", - }, - { - name: "电子围界", - }, - ], + // formatter: function (name) { + // return name == "监控" + // ? `{iconMark1|} ${name}` + // : name == "消防" + // ? `{iconMark2|} ${name}` + // : name == "电子门禁" + // ? `{iconMark3|} ${name}` + // : `{iconMark4|} ${name}`; + // }, + // textStyle: { + // color: "rgba(255,255,255,0.5)", + // fontSize: 14, + // rich: { + // iconMark1: { + // width: 10, + // height: 10, + // borderColor: "#01feae", + // borderWidth: 3, + // borderRadius: 6, + // }, + // iconMark2: { + // width: 10, + // height: 10, + // borderColor: "#f2b448", + // borderWidth: 3, + // borderRadius: 6, + // }, + // iconMark3: { + // width: 10, + // height: 10, + // borderColor: "#07a6ff", + // borderWidth: 3, + // borderRadius: 6, + // }, + // iconMark4: { + // width: 10, + // height: 10, + // borderColor: "#ff8b2e", + // borderWidth: 3, + // borderRadius: 6, + // }, + // }, + // }, + // data: [ + // { + // name: "监控", + // }, + // { + // name: "消防", + // }, + // { + // name: "电子门禁", + // }, + // { + // name: "电子围界", + // }, + // ], + data: lengendData }, title: [ {