From 3e2f2d2c0c762a79807daa38407c4f553155230d Mon Sep 17 00:00:00 2001 From: selia-zx <1771203023@qq.com> Date: Mon, 6 Jul 2026 17:13:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=86=B7=E5=8D=B4=E5=A1=94?= =?UTF-8?q?=E6=B0=B4=E4=BD=8D=E5=80=BC=EF=BC=8C=E6=B0=B4=E4=BD=8D=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/monitor/centerairMonitor.vue | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/views/components/monitor/centerairMonitor.vue b/src/views/components/monitor/centerairMonitor.vue index c22fd4c..948badc 100644 --- a/src/views/components/monitor/centerairMonitor.vue +++ b/src/views/components/monitor/centerairMonitor.vue @@ -302,6 +302,15 @@ @click="goControlList(coolingTowerOutlet, 2)">
+ +
+ 冷却塔水位:{{ getCoolingTowerWaterLevel() }}米 +
@@ -432,6 +441,7 @@ export default { coolingValue: [], //冷却蝶阀 coolingTowerInlet: [], //冷却塔进水阀 coolingTowerOutlet: [], //冷却塔出水阀 + coolingTowerWaterLevel: [], //冷却塔水位 freezingManifold: [], //冷冻总管 allCapacity:[], //总冷量计 calorimeter: [], //机房热量计 @@ -711,6 +721,7 @@ export default { this.coolingValue = []; this.coolingTowerInlet = []; this.coolingTowerOutlet = []; + this.coolingTowerWaterLevel = []; this.freezingManifold = []; this.allCapacity = []; @@ -748,6 +759,10 @@ export default { this.coolingTowerOutlet = this.processDeviceList(row.values); console.log("冷却塔出水阀列表", this.coolingTowerOutlet); break; + case "12": + this.coolingTowerWaterLevel = row.values; + console.log("冷却塔水位列表", this.coolingTowerWaterLevel); + break; case "6": this.allCapacity = row.values; console.log("总冷量计列表", this.allCapacity); @@ -1252,6 +1267,33 @@ export default { // 否则代表运行状态中的不运行 return false; }, + /** 获取冷却塔水位值,返回数值或 false */ + getCoolingTowerWaterLevel() { + if (!this.coolingTowerWaterLevel || this.coolingTowerWaterLevel.length === 0) { + return false; + } + for (let i = 0; i < this.coolingTowerWaterLevel.length; i++) { + const item = this.coolingTowerWaterLevel[i]; + if (item.deviceName && item.deviceName.includes('冷却塔水位') && item.paramType === '11') { + return Number(item.collectValue); + } + } + return false; + }, + /** 冷却塔水位是否处于报警状态(大于0.65或小于0.55) */ + isWaterLevelAlarm() { + const level = this.getCoolingTowerWaterLevel(); + if (level === false) return false; + return level > 0.65 || level < 0.55; + }, + /** 获取冷却塔水位报警文案,鼠标悬停时显示 */ + getWaterLevelAlarmText() { + const level = this.getCoolingTowerWaterLevel(); + if (level === false) return ''; + if (level > 0.65) return `溢水报警(当前水位:${level}米,超出上限0.65米)`; + if (level < 0.55) return `缺水报警(当前水位:${level}米,低于下限0.55米)`; + return ''; + }, // 冷却塔出水蝶阀启停状态 towerValveControlClass(index) { // 从 this.coolingTowerOutlet 中查找 deviceName 包含与 index 相同数字的对象 @@ -2652,6 +2694,44 @@ export default { transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } + /** 冷却塔水位显示 */ + .coolingTowerWaterLevel { + z-index: 10; + font-size: 0.16rem; + color: #46f1e3; + position: absolute; + top: 1.8rem; + left: 3.2rem; + font-weight: bold; + white-space: nowrap; + } + /** 冷却塔水位报警样式 - 红色闪烁 */ + .coolingTowerWaterLevel.waterLevelAlarm { + color: #ff4444; + animation: waterLevelBlink 1s ease-in-out infinite; + cursor: pointer; + } + /** 冷却塔水位报警闪烁动画 */ + @keyframes waterLevelBlink { + 0%, + 100% { + opacity: 1; + text-shadow: 0 0 4px #ff4444, 0 0 8px #ff4444; + } + 25% { + opacity: 0.4; + text-shadow: 0 0 2px #ff4444; + } + 50% { + opacity: 1; + text-shadow: 0 0 6px #ff4444, 0 0 12px #ff4444, 0 0 18px #ff0000; + } + 75% { + opacity: 0.4; + text-shadow: 0 0 2px #ff4444; + } + } + /* 定义灯闪烁的动画 */ @keyframes blink { 0% {