diff --git a/src/assets/flowimg/bu-move.gif b/src/assets/flowimg/bu-move.gif new file mode 100644 index 0000000..4f57382 Binary files /dev/null and b/src/assets/flowimg/bu-move.gif differ diff --git a/src/assets/flowimg/bu-nomove.png b/src/assets/flowimg/bu-nomove.png new file mode 100644 index 0000000..89baedc Binary files /dev/null and b/src/assets/flowimg/bu-nomove.png differ diff --git a/src/assets/flowimg/circulate-move.gif b/src/assets/flowimg/circulate-move.gif index 773c6e1..24276f6 100644 Binary files a/src/assets/flowimg/circulate-move.gif and b/src/assets/flowimg/circulate-move.gif differ diff --git a/src/assets/flowimg/pump.png b/src/assets/flowimg/pump.png new file mode 100644 index 0000000..dff68a2 Binary files /dev/null and b/src/assets/flowimg/pump.png differ diff --git a/src/assets/flowimg/replenish-move.gif b/src/assets/flowimg/replenish-move.gif index daa0fba..e08ed7a 100644 Binary files a/src/assets/flowimg/replenish-move.gif and b/src/assets/flowimg/replenish-move.gif differ diff --git a/src/assets/flowimg/replenish-nomove.png b/src/assets/flowimg/replenish-nomove.png index f1d3e46..04dfe04 100644 Binary files a/src/assets/flowimg/replenish-nomove.png and b/src/assets/flowimg/replenish-nomove.png differ diff --git a/src/assets/flowimg/replenish-nomove3.png b/src/assets/flowimg/replenish-nomove3.png new file mode 100644 index 0000000..f1d3e46 Binary files /dev/null and b/src/assets/flowimg/replenish-nomove3.png differ diff --git a/src/assets/flowimg/supply-move.gif b/src/assets/flowimg/supply-move.gif index 052f64d..92fae8e 100644 Binary files a/src/assets/flowimg/supply-move.gif and b/src/assets/flowimg/supply-move.gif differ diff --git a/src/assets/flowimg/supply-nomove - 副本.png b/src/assets/flowimg/supply-nomove - 副本.png new file mode 100644 index 0000000..909e9cd Binary files /dev/null and b/src/assets/flowimg/supply-nomove - 副本.png differ diff --git a/src/assets/flowimg/supply-nomove.png b/src/assets/flowimg/supply-nomove.png index fb6e981..54f0426 100644 Binary files a/src/assets/flowimg/supply-nomove.png and b/src/assets/flowimg/supply-nomove.png differ diff --git a/src/assets/flowimg/supply-nomove2.png b/src/assets/flowimg/supply-nomove2.png new file mode 100644 index 0000000..fb6e981 Binary files /dev/null and b/src/assets/flowimg/supply-nomove2.png differ diff --git a/src/assets/images/host-img3.png b/src/assets/images/host-img3.png index 76784e1..394f685 100644 Binary files a/src/assets/images/host-img3.png and b/src/assets/images/host-img3.png differ diff --git a/src/assets/images/host-img5.png b/src/assets/images/host-img5.png new file mode 100644 index 0000000..76784e1 Binary files /dev/null and b/src/assets/images/host-img5.png differ diff --git a/src/assets/images/pump.png b/src/assets/images/pump.png new file mode 100644 index 0000000..26bf387 Binary files /dev/null and b/src/assets/images/pump.png differ diff --git a/src/assets/images/supply-nomove.png b/src/assets/images/supply-nomove.png new file mode 100644 index 0000000..1e6872f Binary files /dev/null and b/src/assets/images/supply-nomove.png differ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index ab199b3..7da9626 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -357,7 +357,7 @@ aside { } // 弹框内容超出高度滚动 .dialog-content { - max-height: 500px; /* 设置最大高度,可根据实际情况调整 */ + max-height: 600px; /* 设置最大高度,可根据实际情况调整 */ overflow-y: auto; /* 当内容超出最大高度时,显示垂直滚动条 */ } .intput-text { @@ -449,7 +449,7 @@ table th { .el-dialog .el-row .el-select { width: 100% !important; } -.el-dialog .el-row .el-date-editor{ +.el-dialog .el-row .el-date-editor { width: 100% !important; } @@ -502,7 +502,7 @@ table th { /* 设置滚动条背景颜色 */ } .analysis-table::-webkit-scrollbar-thumb { - background-color: rgb(21, 50, 104); + background-color: rgb(21, 50, 104); /* 设置滑块颜色 */ } .analysis-table::-webkit-scrollbar-thumb:hover { @@ -513,3 +513,265 @@ table th { background-color: #002249; /* 设置滑道颜色 */ } + +.detail-data-li { + width: 80%; + margin-right: 0.1rem; + position: relative; + color: #c0dffc; + font-family: Arial, sans-serif; + letter-spacing: 0.02rem; + font-size: 0.18rem; + position: relative; + margin-bottom: 0.08rem; + border-left: 0.01rem solid #217df5; + border-right: 0.01rem solid #217df5; + background-image: radial-gradient( + circle at left top, + #217df5 0.01rem, + transparent 0.01rem + ), + radial-gradient(circle at right top, #217df5 0.01rem, transparent 0.01rem), + radial-gradient(circle at left bottom, #217df5 0.01rem, transparent 0.01rem), + radial-gradient( + circle at right bottom, + #217df5 0.01rem, + transparent 0.01rem + ); + background-repeat: no-repeat; + background-position: left top, right top, left bottom, right bottom; +} +.detail-data-li::before, +.detail-data-li::after { + content: ""; + position: absolute; + left: 0; + right: 0; + height: 0.01rem; + background-image: linear-gradient( + to right, + #217df5 0%, + rgba(41, 128, 185, 0) 50%, + #217df5 100% + ) !important; +} +.year-data { + margin-top: 0.1rem; +} +.rightDot { + position: relative; + width: 100%; + height: 100%; + z-index: 999; +} +.leftDot { + position: relative; + width: 100%; + height: 100%; + padding: 0.04rem 0.1rem; + display: flex; + flex-direction: row; + justify-content: space-between; + .dotData { + font-weight: bold; + margin: 0 0.06rem; + color: #3b80ff; + display: flex; + align-items: center; + } + .dotUnit { + width: 0.55rem; + text-align: left; + display: flex; + align-items: center; + } +} + +.rightDot::before { + content: ""; + position: absolute; + top: -0.03rem; + right: -0.03rem; + width: 0.06rem; + height: 0.06rem; + background-color: #217df5; + box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9); + background-image: radial-gradient( + circle at 30% 30%, + rgba(255, 255, 255, 0.8) 0%, + rgba(255, 255, 255, 0) 70% + ); + border-radius: 50%; +} + +.rightDot::after { + content: ""; + position: absolute; + bottom: -0.03rem; + right: -0.03rem; + width: 0.06rem; + height: 0.06rem; + background-color: #217df5; + box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9); + background-image: radial-gradient( + circle at 30% 30%, + rgba(255, 255, 255, 0.8) 0%, + rgba(255, 255, 255, 0) 70% + ); + border-radius: 50%; +} +.leftDot::before { + content: ""; + position: absolute; + top: -0.03rem; + left: -0.03rem; + width: 0.06rem; + height: 0.06rem; + background-color: #217df5; + border-radius: 50%; + box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9); + background-image: radial-gradient( + circle at 30% 30%, + rgba(255, 255, 255, 0.8) 0%, + rgba(255, 255, 255, 0) 70% + ); +} + +.leftDot::after { + content: ""; + position: absolute; + bottom: -0.03rem; + left: -0.03rem; + width: 0.06rem; + height: 0.06rem; + background-color: #217df5; + box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9); + background-image: radial-gradient( + circle at 30% 30%, + rgba(255, 255, 255, 0.8) 0%, + rgba(255, 255, 255, 0) 70% + ); + border-radius: 50%; +} + +/* 设备控制列表样式 */ +.device-container { + display: flex; + flex-direction: column; + width: 100%; + background-color: #142c4e; + padding: 10px 10px 30px 10px; + border-radius: 10px; + margin-bottom: 20px; +} + +.device-li { + flex: 1; + width: 100%; + display: flex; + flex-direction: row; + align-items: center; + padding: 12px 0; + color: #abcdfc; + border-bottom: 1px dashed #0349ac; + .device-name { + flex: 1; + white-space: nowrap; + font-size: 14px; + .el-switch { + width: 120px !important; + } + .run { + display: flex; + flex-direction: row; + align-items: center; + display: block; + } + .run::before { + content: ""; + display: inline-block; + width: 10px; + height: 10px; + background-color: rgb(16, 231, 16); + border-radius: 50%; + margin-right: 5px; + } + .no-run { + display: flex; + flex-direction: row; + align-items: center; + display: block; + } + .no-run::before { + content: ""; + display: inline-block; + width: 10px; + height: 10px; + background-color: rgb(180, 180, 180); + border-radius: 50%; + margin-right: 5px; + } + .el-input { + width: 100px; + } + .strong-electric { + background-color: rgba(59, 130, 246, 0.2); + color: #60a5fa; + padding: 5px 20px; + border-radius: 10px; + } + .auto-electric { + background-color: rgba(231, 144, 45, 0.2); + color: #e47f21; + padding: 5px 20px; + border-radius: 10px; + } + .good-status { + color: #4ade80; + } + .bad-status { + color: #f05348; + } + } + .device-name2 { + width: 140px; + } +} +.device-li:nth-child(1) { + color: #9ca3af; +} +// 媒体查询,适配大于2000px分辨率的大屏样式 +@media (min-width: 2000px) { + .device-li { + padding: 0.12rem 0 !important; + border-bottom: 0.01rem dashed #0349ac !important; + .device-name { + font-size: 0.14rem !important; + .el-switch { + width: 1.2rem !important; + } + .run::before { + width: 0.1rem !important; + height: 0.1rem !important; + margin-right: 0.05rem !important; + } + + .no-run::before { + width: 0.1rem !important; + height: 0.1rem !important; + margin-right: 0.05rem !important; + } + .el-input { + width: 1rem !important; + } + .strong-electric { + padding: 0.05rem 0.2rem; + border-radius: 0.1rem !important; + } + .auto-electric { + padding: 0.05rem 0.2rem; + border-radius: 0.1rem !important; + } + } + } +} diff --git a/src/views/aircAndWindc/awSysMonitor/index.vue b/src/views/aircAndWindc/awSysMonitor/index.vue index 1195dd1..0eca0d0 100644 --- a/src/views/aircAndWindc/awSysMonitor/index.vue +++ b/src/views/aircAndWindc/awSysMonitor/index.vue @@ -1,5 +1,5 @@ @@ -758,6 +1092,59 @@ export default { width: 13rem; height: 5.38rem; position: relative; + .menu-title { + color: #e1f4ff; + font-size: 0.18rem; + --bRadius: 0.05rem; + text-align: center; + position: absolute; + top: 0; + right: 0.5rem; + width: 1.25rem; + cursor: pointer; + z-index: 999; + div { + position: relative; + text-align: center; + border-radius: var(--bRadius); + transition: all 0.3s; + padding: 0.01rem 0.02rem; + background-color: rgba(85, 139, 211, 0.2); + cursor: pointer; + &::before, + &::after { + content: ""; + position: absolute; + top: -10px; + left: -10px; + right: -10px; + bottom: -10px; + border: 2px solid #46b2f1; + transition: all 0.5s; + border-radius: var(--bRadius); + animation: clippath 3s infinite linear; + cursor: pointer; + } + &::after { + animation: clippath 3s infinite -1.5s linear; + } + @keyframes clippath { + 0%, + 100% { + clip-path: inset(0 0 98% 0); + } + 25% { + clip-path: inset(0 98% 0 0); + } + 50% { + clip-path: inset(98% 0 0 0); + } + 75% { + clip-path: inset(0 0 0 98%); + } + } + } + } .wind-img { width: 13.1rem; height: 5.5rem; @@ -1155,6 +1542,97 @@ export default { } } } +.device-container { + display: flex; + flex-direction: column; + width: 100%; + min-height: 530px; + background-color: #142c4e; + padding: 10px 10px 30px 10px; + border-radius: 10px; + font-size: 14px; + .device-li { + width: 100%; + display: flex; + flex-direction: row; + align-items: center; + padding: 12px 0; + color: #abcdfc; + border-bottom: 1px dashed #0349ac; + .device-name { + flex: 1; + white-space: nowrap; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + flex-wrap: nowrap; + padding: 0 5px; + .slip { + margin: 0 5px; + color: #1282d8; + font-weight: bold; + } + } + } + .device-li:nth-child(1) { + color: #9ca3af; + } +} +.highlight { + background-color: #003863 !important; /* 定义高亮的背景颜色 */ + color: #ffffff !important; + font-weight: bold; +} +.device-container .highlight .device-name .slip { + color: #ffffff !important; + font-weight: bold; +} +/* 为高亮行添加图片箭头 */ +.device-li.highlight::before { + content: ""; + background-image: url("../../../assets/images/step.png"); + background-size: contain; + background-repeat: no-repeat; + width: 30px; + height: 30px; + position: absolute; + left: 2px; /* 图片位置,根据实际情况调整 */ + top: 20%; + transform: translateY(-50%); + z-index: 999; + animation: moveRight 1s ease-in-out infinite alternate; +} +@keyframes moveRight { + 0% { + transform: translateX(0); /* 初始位置,不移动 */ + } + 100% { + transform: translateX(0.04rem); /* 向右移动 1rem 的距离 */ + } +} + +/* 确保 device-li 有相对定位 */ +.device-li { + position: relative; +} +// 媒体查询,适配大于2000px分辨率的大屏样式 +@media (min-width: 2000px) { + .device-container { + min-height: 7rem !important; + padding: 0.1rem 0.1rem 0.3rem 0.1rem !important; + border-radius: 0.1rem !important; + font-size: 0.14rem !important; + .device-li { + padding: 0.12rem 0 !important; + .device-name { + .slip { + margin: 0 0.05rem !important; + } + } + } + } +} @media (min-width: 1360px) and (max-width: 1680px) { .windC { transform: scale(0.9); diff --git a/src/views/bigScreen/components/allEnergy.vue b/src/views/bigScreen/components/allEnergy.vue index 2fd4fc2..d2f5e12 100644 --- a/src/views/bigScreen/components/allEnergy.vue +++ b/src/views/bigScreen/components/allEnergy.vue @@ -124,10 +124,10 @@ export default { { name: "数据详情:", data: [ - { value: this.energyMes.totalEle, name: "耗电量标准煤" }, - { value: this.energyMes.totalEle, name: "用水量标准煤" }, - { value: this.energyMes.totalEle, name: "产冷量标准煤" }, - { value: this.energyMes.totalEle, name: "蒸汽量标准煤" }, + { value: this.energyMes.eleStandardCoal, name: "耗电量" }, + { value: this.energyMes.waterStandardCoal, name: "用水量" }, + { value: this.energyMes.coldStandardCoal, name: "产冷量" }, + { value: this.energyMes.gasStandardCoal, name: "蒸汽量" }, ], itemStyle: { color: function (params) { @@ -140,10 +140,10 @@ export default { }, { data: [ - { value: this.energyMes.totalEle, name: "耗电量标准煤" }, - { value: this.energyMes.totalEle, name: "用水量标准煤" }, - { value: this.energyMes.totalEle, name: "产冷量标准煤" }, - { value: this.energyMes.totalEle, name: "蒸汽量标准煤" }, + { value: this.energyMes.eleStandardCoal, name: "耗电量" }, + { value: this.energyMes.waterStandardCoal, name: "用水量" }, + { value: this.energyMes.coldStandardCoal, name: "产冷量" }, + { value: this.energyMes.gasStandardCoal, name: "蒸汽量" }, ], }, ], @@ -227,10 +227,10 @@ export default { { name: "数据详情:", data: [ - { value: 0, name: "耗电量标准煤" }, - { value: 0, name: "用水量标准煤" }, - { value: 0, name: "产冷量标准煤" }, - { value: 0, name: "蒸汽量标准煤" }, + { value: 0, name: "耗电量" }, + { value: 0, name: "用水量" }, + { value: 0, name: "产冷量" }, + { value: 0, name: "蒸汽量" }, ], itemStyle: { color: function (params) { @@ -243,10 +243,10 @@ export default { }, { data: [ - { value: 0, name: "耗电量标准煤" }, - { value: 0, name: "用水量标准煤" }, - { value: 0, name: "产冷量标准煤" }, - { value: 0, name: "蒸汽量标准煤" }, + { value: 0, name: "耗电量" }, + { value: 0, name: "用水量" }, + { value: 0, name: "产冷量" }, + { value: 0, name: "蒸汽量" }, ], }, ], @@ -278,7 +278,7 @@ export default { this.option = { //环形图中间文字 title: { - subtext: "总标准煤", + subtext: "标准煤", textStyle: { color: "#ffffff", }, diff --git a/src/views/bigScreen/components/coldSysEnergy.vue b/src/views/bigScreen/components/coldSysEnergy.vue index 6dbdd70..ea9b5df 100644 --- a/src/views/bigScreen/components/coldSysEnergy.vue +++ b/src/views/bigScreen/components/coldSysEnergy.vue @@ -2,8 +2,8 @@
-
用电量:{{energyMes.totalEle}}kw/h
-
产冷量:{{energyMes.totalCold}}kwh
+
用电量:{{ energyMes.totalEle }}kw/h
+
产冷量:{{ energyMes.totalCold }}kwh
@@ -460,8 +460,18 @@ export default { console.log("两个系统参数返回", res); if (res.code == 200) { this.energyMes = res.rows[0]; - this.useForm.maxData = 10; - this.useForm.useData = res.rows[0].eer; + this.useForm.maxData = 10; //最大值 + const { totalEle, totalCold } = res.rows[0]; + if (totalEle === 0 || totalCold === 0) { + this.useForm.useData = 0; + } else { + const result = totalCold / totalEle; + if (Number.isInteger(result)) { + this.useForm.useData = result; + } else { + this.useForm.useData = parseFloat(result.toFixed(2)); + } + } let that = this; // 使用配置函数 const axisLineColor = this.getAxisLineColor( diff --git a/src/views/bigScreen/components/waterSysEnergy.vue b/src/views/bigScreen/components/waterSysEnergy.vue index 7f067ae..face20c 100644 --- a/src/views/bigScreen/components/waterSysEnergy.vue +++ b/src/views/bigScreen/components/waterSysEnergy.vue @@ -1,599 +1,609 @@ - - - - - \ No newline at end of file +} + diff --git a/src/views/centerairC/sysControl/index copy 2.vue b/src/views/centerairC/sysControl/index copy 2.vue deleted file mode 100644 index 9d8d252..0000000 --- a/src/views/centerairC/sysControl/index copy 2.vue +++ /dev/null @@ -1,431 +0,0 @@ - - - - - diff --git a/src/views/centerairC/sysControl/index copy.vue b/src/views/centerairC/sysControl/index copy.vue deleted file mode 100644 index 7bbeb12..0000000 --- a/src/views/centerairC/sysControl/index copy.vue +++ /dev/null @@ -1,643 +0,0 @@ - - - - - diff --git a/src/views/centerairC/sysMonitor/components/hostChart.vue b/src/views/centerairC/sysMonitor/components/hostChart.vue index 3c61982..05640c3 100644 --- a/src/views/centerairC/sysMonitor/components/hostChart.vue +++ b/src/views/centerairC/sysMonitor/components/hostChart.vue @@ -64,35 +64,83 @@ export default { const names = []; // 用于存储 chartData 的数组 const chartData = []; - item.dataList.forEach((val, index) => { + // 查找包含“负载”的数据 + let loadDataIndex = -1; + for (let i = 0; i < item.dataList.length; i++) { + if ( + item.dataList[i].name && + item.dataList[i].name.includes("负载") + ) { + loadDataIndex = i; + this.chartData5 = item.dataList[i].value; + name5 = item.dataList[i].name; + break; + } + } + // 剔除包含“负载”的数据 + if (loadDataIndex !== -1) { + item.dataList.splice(loadDataIndex, 1); + } + // 处理剩下的数据 + item.dataList.slice(0, 4).forEach((val, index) => { if (val.name) { - // 只处理前 5 个元素 - if (index < 5) { - chartData[index] = val.value; - names[index] = val.name; - console.log("多少个name",chartData[index] ) - } + chartData[index] = val.value; + names[index] = val.name; } }); // 将 chartData 数组的值赋值给 this.chartDataX - this.chartData1 = chartData[0]; - this.chartData2 = chartData[1]; - this.chartData3 = chartData[2]; - this.chartData4 = chartData[3]; - this.chartData5 = chartData[4]; + this.chartData1 = chartData[0] || ""; + this.chartData2 = chartData[1] || ""; + this.chartData3 = chartData[2] || ""; + this.chartData4 = chartData[3] || ""; // 将 names 数组的值赋值给外部作用域的变量 name1 = names[0] || ""; name2 = names[1] || ""; name3 = names[2] || ""; name4 = names[3] || ""; - name5 = names[4] || ""; } }); + console.log("this.chartData1", this.chartData1); + console.log("this.chartData2", this.chartData2); + console.log("this.chartData3", this.chartData3); + console.log("this.chartData4", this.chartData4); + console.log("this.chartData5", this.chartData5); this.$nextTick(() => { + // 计算双y轴最大最小值, + var Min1 = 0, + Min2 = 0, + Max1 = Math.ceil( + Math.max( + ...this.chartData1, + ...this.chartData2, + ...this.chartData3, + ...this.chartData4 + ) + ), + Max2 = Math.ceil(Math.max(...this.chartData5)); + console.log("Min1", Min1); + console.log("Min2", Min2); + console.log("Max1", Max1); + console.log("Max2", Max2); const adapterOption = { xAxis: { data: this.bottomData, }, + yAxis: [ + //两个y轴 + { + min: Min1, + max: Max1, + splitNumber: 10, + interval: (Max1 - Min1) / 10, + }, + { + min: Min2, + max: Max2, + splitNumber: 10, + interval: (Max2 - Min2) / 10, + }, + ], series: [ { yAxisIndex: 0, @@ -115,7 +163,7 @@ export default { data: this.chartData4, }, { - yAxisIndex: 0, + yAxisIndex: 1, name: name5, data: this.chartData5, }, @@ -131,6 +179,21 @@ export default { xAxis: { data: [], }, + yAxis: [ + //两个y轴 + { + min: 0, + max: 0, + splitNumber: 10, + interval: 0, + }, + { + min: 0, + max: 0, + splitNumber: 10, + interval: 0, + }, + ], series: [ { yAxisIndex: 0, @@ -186,6 +249,17 @@ export default { }, //初始化chartInstance对象 initChart() { + var Min1 = 0, + Min2 = 0, + Max1 = Math.ceil( + Math.max( + ...this.chartData1, + ...this.chartData2, + ...this.chartData3, + ...this.chartData4 + ) + 4 + ), + Max2 = Math.ceil(Math.max(...this.chartData5) + 4); const chartRef = this.$refs.chart_ref; if (chartRef) { // 初始化图表的代码 @@ -193,6 +267,42 @@ export default { this.option = { tooltip: { trigger: "axis", + // 自定义 tooltip 内容 + formatter: function (params) { + var res = params[0].name + "
"; + for (var i = 0, l = params.length; i < l; i++) { + var seriesName = params[i].seriesName; + var value = params[i].value; + console.log("打印颜色", params[i].color) + var marker = + ''; + // 根据不同的seriesName 返回不同的单位 + if (seriesName.includes("负载")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "%" + + "
"; + } else { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "℃" + + "
"; + } + } + return res; + }, }, legend: { show: true, @@ -235,46 +345,86 @@ export default { }, //x轴分割线 data: this.bottomData, }, - yAxis: { - min: 0, - // max:20, - // // // min:'dataMin', - // // // max:'dataMax', - // name: "kwh", // 第一个 y 轴的单位描述 - // 设置 name 的样式 - nameTextStyle: { - color: "rgba(255, 255, 255, 1)", - fontSize: 12, - }, - miniInterval: 5, - type: "value", - // 修饰刻度标签的颜色即y坐标数据 - axisLabel: { - color: "rgba(255, 255, 255, 1)", - }, - // 显示y坐标轴 - axisLine: { - show: true, - lineStyle: { - color: "#365576", // 设置 y 轴线的颜色 + yAxis: [ + { + min: Min1, + max: Max1, + splitNumber: 10, + interval: (Max1 - Min1) / 10, + // 设置 name 的样式 + nameTextStyle: { + color: "rgba(255, 255, 255, 1)", + fontSize: 12, + }, + miniInterval: 5, + type: "value", + // 修饰刻度标签的颜色即y坐标数据 + axisLabel: { + color: "rgba(255, 255, 255, 1)", + }, + // 显示y坐标轴 + axisLine: { + show: true, + lineStyle: { + color: "#365576", // 设置 y 轴线的颜色 + }, + }, + //y轴分割线段数 + // splitNumber: 10, + // 修改y轴分割线的颜色 + splitLine: { + lineStyle: { + color: "#1a3d62", // 设置分割线的颜色 + type: "dashed", // 设置分割线为虚线 + }, }, }, - //y轴分割线段数 - // splitNumber: 10, - // 修改y轴分割线的颜色 - splitLine: { - lineStyle: { - color: "#1a3d62", // 设置分割线的颜色 - type: "dashed", // 设置分割线为虚线 + { + min: Min2, + max: Max2, + splitNumber: 10, + interval: (Max2 - Min2) / 10, + // 设置 name 的样式 + nameTextStyle: { + color: "rgba(255, 255, 255, 1)", + fontSize: 12, + }, + miniInterval: 5, + type: "value", + name: "负载", // y 轴的单位描述 + // 修饰刻度标签的颜色即y坐标数据 + axisLabel: { + color: "#ffffff", + }, + // 修饰刻度标签的颜色即y坐标数据 + axisLabel: { + color: "rgba(255, 255, 255, 1)", + }, + // 显示y坐标轴 + axisLine: { + show: true, + lineStyle: { + color: "#365576", // 设置 y 轴线的颜色 + }, + }, + //y轴分割线段数 + // splitNumber: 10, + // 修改y轴分割线的颜色 + splitLine: { + lineStyle: { + color: "#1a3d62", // 设置分割线的颜色 + type: "dashed", // 设置分割线为虚线 + }, }, }, - }, + ], series: [ { type: "line", // 拐点大小 symbolSize: 8, data: this.chartData1, + yAxisIndex: 0, //折线颜色 itemStyle: { color: "#00CED1", //折线点的颜色 @@ -285,33 +435,13 @@ export default { smooth: false, // 不显示折线点 showSymbol: false, - // // 区域填充样式,添加渐变背景 - // areaStyle: { - // color: { - // type: "linear", - // x: 0, - // y: 0, - // x2: 0, - // y2: 1, - // colorStops: [ - // { - // offset: 0, - // color: "rgba(26, 105, 241, 0.5)", // 渐变起始颜色 - // }, - // { - // offset: 1, - // color: "rgba(26, 105, 241, 0)", // 渐变结束颜色 - // }, - // ], - // global: false, // 缺省为 false - // }, - // }, }, { type: "line", // 拐点大小 symbolSize: 8, data: this.chartData2, + yAxisIndex: 0, //折线颜色 itemStyle: { color: "#3ba272", //折线的颜色 @@ -319,125 +449,48 @@ export default { smooth: false, // 不显示折线点 showSymbol: false, - // areaStyle: { - // color: { - // type: "linear", - // x: 0, - // y: 0, - // x2: 0, - // y2: 1, - // colorStops: [ - // { - // offset: 0, - // color: "rgba(0, 206, 209, 0.5)", // 渐变起始颜色 - // }, - // { - // offset: 1, - // color: "rgba(0, 206, 209, 0)", // 渐变结束颜色 - // }, - // ], - // global: false, // 缺省为 false - // }, - // }, }, { type: "line", // 拐点大小 symbolSize: 8, data: this.chartData3, + yAxisIndex: 0, //折线颜色 itemStyle: { - color: "#fac858", //折线的颜色 + color: "#1a69f1", //折线的颜色 }, smooth: false, // 不显示折线点 showSymbol: false, - // areaStyle: { - // color: { - // type: "linear", - // x: 0, - // y: 0, - // x2: 0, - // y2: 1, - // colorStops: [ - // { - // offset: 0, - // color: "rgba(0, 206, 209, 0.5)", // 渐变起始颜色 - // }, - // { - // offset: 1, - // color: "rgba(0, 206, 209, 0)", // 渐变结束颜色 - // }, - // ], - // global: false, // 缺省为 false - // }, - // }, }, { type: "line", // 拐点大小 symbolSize: 8, data: this.chartData4, + yAxisIndex: 0, //折线颜色 itemStyle: { - color: "#1a69f1", //折线的颜色 + color: "#ee6666", //折线的颜色 }, smooth: false, // 不显示折线点 showSymbol: false, - // areaStyle: { - // color: { - // type: "linear", - // x: 0, - // y: 0, - // x2: 0, - // y2: 1, - // colorStops: [ - // { - // offset: 0, - // color: "rgba(0, 206, 209, 0.5)", // 渐变起始颜色 - // }, - // { - // offset: 1, - // color: "rgba(0, 206, 209, 0)", // 渐变结束颜色 - // }, - // ], - // global: false, // 缺省为 false - // }, - // }, }, { type: "line", // 拐点大小 symbolSize: 8, data: this.chartData5, + yAxisIndex: 1, //折线颜色 itemStyle: { - color: "#ee6666", //折线的颜色 + color: "#fac858", //折线的颜色 }, smooth: false, // 不显示折线点 showSymbol: false, - // areaStyle: { - // color: { - // type: "linear", - // x: 0, - // y: 0, - // x2: 0, - // y2: 1, - // colorStops: [ - // { - // offset: 0, - // color: "rgba(0, 206, 209, 0.5)", // 渐变起始颜色 - // }, - // { - // offset: 1, - // color: "rgba(0, 206, 209, 0)", // 渐变结束颜色 - // }, - // ], - // global: false, // 缺省为 false - // }, - // }, }, ], }; @@ -455,5 +508,4 @@ export default { width: 100%; height: 4rem; } - - + \ No newline at end of file diff --git a/src/views/centerairC/sysMonitor/hostDetails.vue b/src/views/centerairC/sysMonitor/hostDetails.vue index 04ad1b0..bf92232 100644 --- a/src/views/centerairC/sysMonitor/hostDetails.vue +++ b/src/views/centerairC/sysMonitor/hostDetails.vue @@ -122,6 +122,40 @@
+
+ 冷冻供水温度: + + +
+
+ 需求设定值: + + % +
手自动切换: {{ automaticObj.showValue }} @@ -163,12 +197,6 @@
-
@@ -191,12 +219,6 @@
- @@ -216,6 +238,7 @@ import titleImg from "./components/titleImg.vue"; import lineSquare from "./components/lineSquare.vue"; import { format } from "@/utils/datetime"; import { getDay } from "@/utils/datetime"; +import { operationConrol } from "@/api/hotWater/waterControl"; export default { name: "sysControl", components: { LoadData, hostChart, titleImg, lineSquare }, @@ -229,6 +252,10 @@ export default { condenserPre: "", //冷凝器压力 evaporatorPre: "", //蒸发器压力 rightHostData: [], //右 + frozenupply: "", //冷冻供水温度 + frozenupplyId: "", + requireSet: "", //需求设定值 + requireSetId: "", automaticObj: {}, //手自动状态 localObj: {}, //本地远程状态 badObj: {}, //故障状态 @@ -370,35 +397,69 @@ export default { this.rightHostData = []; // 筛选去掉特定 paramType 的数据 this.rightHostData = this.hostData.filter((item) => { - return !["2", "21", "20", "6", "5", "22", "26"].includes( + const specificParamTypes = [6, 5, 22, 26]; + // const specificParamTypes = []; + // 检查是否属于需要排除的特定 paramType + const isSpecificParamType = specificParamTypes.includes( Number(item.paramType) ); + // const isCombinedCondition0 = + // Number(item.paramType) === 2 && + // item.otherName.includes("手动启停"); + // 返回 false 表示要排除该元素 + return !isSpecificParamType; + }); + // 根据 ordernum 进行排序 + this.rightHostData.sort((a, b) => { + return Number(a.ordernum) - Number(b.ordernum); }); - // // 根据 ordernum 进行排序 - // this.rightHostData.sort((a, b) => { - // return Number(a.ordernum) - Number(b.ordernum); - // }); this.hostData.forEach((item) => { //左边主机参数 根据不同的 paramType 处理 showValue - if (item.paramType === "6") { + if ( + item.paramType === "6" && + item.otherName.includes("手自动切换") + ) { // 运行状态 item.showValue = Number(item.curValue) === 0 ? "自动" : "手动"; this.automaticObj = item; - } else if (item.paramType === "5") { + } else if ( + item.paramType === "5" && + item.otherName.includes("故障") + ) { // 故障状态 item.showValue = Number(item.curValue) === 0 ? "未故障" : "故障"; this.badObj = item; - } else if (item.paramType === "22") { + } else if ( + item.paramType === "22" && + item.otherName === "本地_远程" + ) { // 本地远程 item.showValue = Number(item.curValue) === 0 ? "本地" : "远程"; this.localObj = item; - } else if (item.paramType === "26") { + } else if ( + item.paramType === "26" && + item.otherName.includes("运行累计时间") + ) { // 累计运行时间 item.showValue = item.curValue; this.timeObj = item; + } else if ( + item.paramType === "12" && + item.otherName.includes("冷冻供水温度") + ) { + // 冷冻供水温度 + this.frozenupply = item.curValue; + this.frozenupplyId = item.id; + } else if ( + item.paramType === "0" && + item.otherName.includes("需求设定值") + ) { + // 需求设定值 + this.requireSet = item.curValue; + this.requireSetId = id; } }); } @@ -507,6 +568,79 @@ export default { this.exitFullscreen(); this.$router.push("/alarm/alarmRecord"); }, + // 处理输入事件,过滤非数字字符 + handleInput(children) { + console.log("校验"); + // 实时校验并过滤非数字和非小数点字符 + children.curValue = String(children.curValue).replace(/[^\d.]/g, ""); + // 确保只有一个小数点 + const parts = children.curValue.split("."); + if (parts.length > 2) { + // 如果有多个小数点,只保留第一个小数点及之前的部分和第一个小数点之后的部分 + children.curValue = parts[0] + "." + parts[1]; + } + // 确保小数点后最多两位 + if (parts.length === 2) { + children.curValue = parts[0] + "." + parts[1].slice(0, 2); + } + }, + // 失去焦点 + handleBlur() { + // this.currentFocusIndex = ""; + }, + handleEnter(title, unit, value, id, event) { + console.log("请求后端", value); + // 失去焦点 + event.target.blur(); + this.$confirm( + `确定要修改"${title}"的数据为:${value} ${unit}吗?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + this.hadleOperationConrol(id, value); + }) + .catch(() => { + // 用户取消操作,需要更新原来的频率 + // this.getOperationList(); + }); + }, + hadleOperationConrol(id, param) { + let data = { + id: id, + param: param, + }; + console.log("操作参数", data); + operationConrol([data]) + .then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("指令下发成功!"); + // 开启 loading 效果 + this.loading = true; + // 更新所有设备状态; + setTimeout(() => { + this.getPolicyList().finally(() => { + // 关闭 loading 效果 + this.loading = false; + }); + }, 5000); + } else { + // this.$modal.msgError("操作失败"); + console.log("应该更新状态的"); + // 更新所有设备状态; + this.getPolicyList(); + } + }) + .catch((error) => { + console.log("请求发生错误,更新设备状态", error); + // 更新所有设备状态; + this.getPolicyList(); + }); + }, }, }; @@ -757,9 +891,9 @@ export default { .fanBlade { z-index: 10; position: absolute; - top: 2.55rem; - left: 4.65rem; - width: 0.5rem; + top: 2.75rem; + left: 4.4rem; + width: 0.6rem; height: 0.5rem; transform-style: preserve-3d; transform: translateX(-50%) rotateX(15deg) rotateZ(20deg) @@ -823,10 +957,13 @@ export default { display: flex; flex-direction: row; flex-wrap: nowrap; - align-items: flex-start; + align-items: center; span { white-space: nowrap; } + .el-input { + margin: 0 0.05rem; + } } } .detail-data { diff --git a/src/views/centerairC/sysMonitor/monitorCenter.vue b/src/views/centerairC/sysMonitor/monitorCenter.vue index 6c194dc..c29702e 100644 --- a/src/views/centerairC/sysMonitor/monitorCenter.vue +++ b/src/views/centerairC/sysMonitor/monitorCenter.vue @@ -114,6 +114,27 @@ + +
+
+
+
+ 主机加载时间: + {{ hostAddTime }} + min +
+
+
+
+
+
+ 主机减载时间: + {{ hostReduceTime }} + min +
+
+
+
ON
@@ -140,19 +161,23 @@ /> -
+
{{ hostList[0].deviceName }}
-
- {{ hostLoad0 }}% +
+ {{ hostLoad1 }}%
1#冷却水流: - 接通 + 接通 断开
1#冷冻水流: - 接通 + 接通 断开
@@ -191,19 +216,23 @@ class="host-line1" > -
+
{{ hostList[1].deviceName }}
-
- {{ hostLoad1 }}% +
+ {{ hostLoad2 }}%
2#冷却水流: - 接通 + 接通 断开
2#冷冻水流: - 接通 + 接通 断开
@@ -242,21 +271,25 @@ class="host-line2" > -
+
{{ hostList[2].deviceName }}
-
- {{ hostLoad2 }}% +
+ {{ hostLoad3 }}%
3#冷却水流: - 接通 + 接通 断开
3#冷冻水流: - 接通 + 接通 断开
@@ -300,100 +333,116 @@ > -
1#
-
2#
-
3#
+
1#
+
2#
+
3#
- {{ coolingPumpHz0 }}Hz + {{ coolingPumpHz1 }}Hz
- {{ coolingPumpHz1 }}Hz + {{ coolingPumpHz2 }}Hz
- {{ coolingPumpHz2 }}Hz + {{ coolingPumpHz3 }}Hz
-
1#
-
2#
-
3#
+
+ 1# +
+
+ 2# +
+
+ 3# +
- {{ freezingPumpHz0 }}Hz + {{ freezingPumpHz1 }}Hz
- {{ freezingPumpHz1 }}Hz + {{ freezingPumpHz2 }}Hz
- {{ freezingPumpHz2 }}Hz + {{ freezingPumpHz3 }}Hz
-
3#-1
-
2#-2
-
2#-1
-
1#-2
-
1#-1
+
+ 3#-1 +
+
+ 2#-2 +
+
+ 2#-1 +
+
+ 1#-2 +
+
+ 1#-1 +
@@ -563,6 +621,102 @@ > + + +
+
+
手自动切换
+
手动控制
+
+ 频率手自动切换 +
+
+ 频率反馈 +
+
+ 频率调节 +
+
+
+
+ + +
+
+ + +
+ +
+ + +
+
+ {{ item.frequency }}Hz +
+ +
+ +
+
+
+
@@ -578,6 +732,7 @@ import { } from "@/api/centerairC/sysMonitor"; import LineChildren from "./components/lineChildren.vue"; import { alarmRecordList } from "@/api/alarm/alarmRecord"; +import { policyListData } from "@/api/centerairC/strategy"; import { getDay } from "@/utils/datetime"; export default { components: { LineChildren }, @@ -599,17 +754,17 @@ export default { oneKeyButtonId: "", // 主机负载 - hostLoad0: "", hostLoad1: "", hostLoad2: "", + hostLoad3: "", // 冷却泵频率反馈 - coolingPumpHz0: "", coolingPumpHz1: "", coolingPumpHz2: "", + coolingPumpHz3: "", // 冷冻泵频率反馈 - freezingPumpHz0: "", freezingPumpHz1: "", freezingPumpHz2: "", + freezingPumpHz3: "", // 冷却塔风机频率 coolingTowerHz31: "", coolingTowerHz22: "", @@ -643,6 +798,13 @@ export default { nowTimer: null, isShowWarning: false, //是否有报警 dayData: "", //监测天数 + + // 控制弹框 + controlTitle: "", + openControlDialog: false, + controlArr: [], + hostAddTime: "", //主机加载时间 + hostReduceTime: "", //主机减载时间 }; }, computed: { @@ -678,6 +840,7 @@ export default { this.getMonitorList(); this.getAlarnStatus(); this.getDayData(); + this.getPolicyList(); // 设置定时器,每 10 秒执行一次 this.timer = setInterval(() => { @@ -898,6 +1061,43 @@ export default { }) .catch(() => {}); }, + // 主机加减载时间min + getPolicyList() { + return new Promise((resolve, reject) => { + let data = { + systemType: "0", + funPolicyType: "1", + }; + policyListData(data) + .then((res) => { + console.log("策略返回res", res); + if (res.code == 200) { + let dataList = res.rows; + // 筛选出主机->加减载时间 + dataList.forEach((val) => { + if (val.name === "主机策略") { + val.values.forEach((child) => { + if (child.pointName === "主机加载时间") { + this.hostAddTime = child.curValue; + } + if (child.pointName === "主机减载时间") { + this.hostReduceTime = child.curValue; + } + }); + } + }); + } else { + this.policyList = []; + } + // 成功时解析 Promise + resolve(res); + }) + .catch((error) => { + // 失败时拒绝 Promise + reject(error); + }); + }); + }, // 系统监测数据 getMonitorList() { monitorList({ systemType: 0 }).then((res) => { @@ -1011,19 +1211,39 @@ export default { }, // 主机启停状态 hostListControlClass(index) { - // 检查 hostList 长度是否足够 - if (this.hostList.length <= index) { + // 从 this.hostList 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.hostList.length; i++) { + const device = this.hostList[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // 检查 properties 数组是否存在 hostList[index]数组的properties数组 - const properties = this.hostList[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; if (!properties || properties.length === 0) { return false; } // 遍历 properties 数组,如果当前对象paramType === 2并且item.collectValue !== "0.00"则便是启停控制中的开启 for (let i = 0; i < properties.length; i++) { const item = properties[i]; - if (item.paramType === "2" && Number(item.collectValue) !== 0) { + if ( + item.paramType === "2" && + Number(item.collectValue) !== 0 && + item.collectName.includes("启停") + ) { return true; } } @@ -1032,12 +1252,29 @@ export default { }, // 主机运行状态 hostListRunClass(index) { - // 检查 hostList 长度是否足够 - if (this.hostList.length <= index) { + // 从 this.hostList 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.hostList.length; i++) { + const device = this.hostList[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; // 检查 properties 数组是否存在 hostList[index]数组的properties数组 - const properties = this.hostList[index].properties; if (!properties || properties.length === 0) { return false; } @@ -1053,12 +1290,29 @@ export default { }, // 主机冷却水流信号 hostCoolingWaterFlowClass(index) { - // 检查 hostList 长度是否足够 - if (this.hostList.length <= index) { + // 从 this.hostList 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.hostList.length; i++) { + const device = this.hostList[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; // 检查 properties 数组是否存在 hostList[index]数组的properties数组 - const properties = this.hostList[index].properties; if (!properties || properties.length === 0) { return false; } @@ -1074,12 +1328,29 @@ export default { }, // 主机冷冻水流信号 hostFreezeWaterFlowClass(index) { - // 检查 hostList 长度是否足够 - if (this.hostList.length <= index) { + // 从 this.hostList 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.hostList.length; i++) { + const device = this.hostList[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // 检查 properties 数组是否存在 hostList[index]数组的properties数组 - const properties = this.hostList[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1095,12 +1366,29 @@ export default { }, // 冷却泵运行状态 coolingPumpRunClass(index) { - // 检查 coolingPump 长度是否足够 - if (this.coolingPump.length <= index) { + // 从 this.coolingPump 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.coolingPump.length; i++) { + const device = this.coolingPump[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // 检查 properties 数组是否存在 coolingPump[index]数组的properties数组 - const properties = this.coolingPump[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1116,12 +1404,29 @@ export default { }, // 冷却泵频率 coolingPumpHz(index) { - // 检查 coolingPump 长度是否足够 - if (this.coolingPump.length <= index) { + // 从 this.coolingPump 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.coolingPump.length; i++) { + const device = this.coolingPump[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // 检查 properties 数组是否存在 coolingPump[index]数组的properties数组 - const properties = this.coolingPump[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1142,13 +1447,29 @@ export default { }, // 冷冻泵运行状态 freezingPumpRunClass(index) { - // 检查 freezingPump 长度是否足够 - if (this.freezingPump.length <= index) { + // 从 this.freezingPump 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.freezingPump.length; i++) { + const device = this.freezingPump[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // console.log("打印this.freezingPump数组", this.freezingPump); - // 检查 properties 数组是否存在 freezingPump[index]数组的properties数组 - const properties = this.freezingPump[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1164,12 +1485,29 @@ export default { }, //冷冻泵频率 freezingPumpHz(index) { - // 检查 freezingPump 长度是否足够 - if (this.freezingPump.length <= index) { + // 从 this.freezingPump 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.freezingPump.length; i++) { + const device = this.freezingPump[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // 检查 properties 数组是否存在 freezingPump[index]数组的properties数组 - const properties = this.freezingPump[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1301,17 +1639,32 @@ export default { }, // 冷却塔出水蝶阀启停状态 towerValveControlClass(index) { - // 检查 coolingTowerOutlet 长度是否足够 - if (this.coolingTowerOutlet.length <= index) { + // 从 this.coolingTowerOutlet 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.coolingTowerOutlet.length; i++) { + const device = this.coolingTowerOutlet[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // console.log("打印this.coolingTowerOutlet数组", this.coolingTowerOutlet); - // 检查 properties 数组是否存在 coolingTowerOutlet[index]数组的properties数组 - const properties = this.coolingTowerOutlet[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } - let valveOpenFeedbackFound = false; let valveCloseFeedbackFound = false; // 遍历 properties 数组 @@ -1342,13 +1695,29 @@ export default { }, // 冷冻蝶阀启停状态 frozenValveControlClass(index) { - // 检查 frozenValve 长度是否足够 - if (this.frozenValve.length <= index) { + // 从 this.frozenValve 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.frozenValve.length; i++) { + const device = this.frozenValve[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // console.log("打印this.frozenValve数组", this.frozenValve); - // 检查 properties 数组是否存在 frozenValve[index]数组的properties数组 - const properties = this.frozenValve[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } @@ -1382,17 +1751,32 @@ export default { }, // 冷却蝶阀启停状态 coolingValueControlClass(index) { - // 检查 coolingValue 长度是否足够 - if (this.coolingValue.length <= index) { + // 从 this.coolingValue 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < this.coolingValue.length; i++) { + const device = this.coolingValue[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { return false; } - // console.log("打印this.coolingValue数组", this.coolingValue); - // 检查 properties 数组是否存在 coolingValue[index]数组的properties数组 - const properties = this.coolingValue[index].properties; + // 获取匹配设备的 properties 数组 + const properties = targetDevice.properties; + // 检查 properties 数组是否存在 if (!properties || properties.length === 0) { return false; } - let valveOpenFeedbackFound = false; let valveCloseFeedbackFound = false; @@ -1422,7 +1806,7 @@ export default { return valveOpenFeedbackFound && valveCloseFeedbackFound; }, // 冷冻总管数据 供回水温度、压力等 - freezingManifoldData(index, val) { + freezingManifoldData(index, item) { console.log("this.freezingManifold", this.freezingManifold); // 检查 freezingManifold 长度是否足够 if (this.freezingManifold.length <= index) { @@ -1468,6 +1852,379 @@ export default { // this.exitFullscreen(); this.$router.push("/alarm/alarmRecord"); }, + // 风机控制 index代表冷却塔几,val代表风机几 + goControlFanList(itemArr, index, val) { + console.log("itemArr", itemArr, index, val); + // 处理properties值, + this.controlArr = []; + this.controlTitle = ""; + itemArr.forEach((item) => { + // 构建期望的设备名称格式 + const expectedDeviceName = `${index}号冷却塔`; + const expectedCollectName = `${index}号冷却塔风机${val}`; + // 检查 item 的 deviceName 是否符合期望格式 + console.log("item.deviceName", item.deviceName); + if (item.deviceName.includes(expectedDeviceName)) { + // 初始化一个空对象来存储非蝶阀处理后的结果 + let deviceItem = {}; + let properties = []; + // 如果符合条件,则将 item.properties 赋值给 properties + properties = item.properties; + console.log("匹配的当前的设备数据", properties); + properties.forEach((child) => { + if (child.collectName.includes(expectedCollectName)) { + this.controlTitle = expectedCollectName; + deviceItem.name = expectedCollectName; + // 手动控制 + if ( + child.paramType === "2" && + !child.collectName.includes("阀") && + child.collectName.includes("启停") + ) { + deviceItem.controlText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.controlId = child.id; + } + // 阀门的-手动控制 + else if ( + child.paramType === "2" && + child.collectName.includes("阀") + ) { + deviceItem.controlText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.controlId = child.id; + } + // 手自动切换 0自动1手动 + else if ( + child.paramType === "6" && + !child.collectName.includes("阀") + ) { + deviceItem.automaticText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.automaticId = child.id; + } + // 阀门的-手自动切换 + else if ( + child.paramType === "6" && + child.collectName.includes("阀") + ) { + deviceItem.automaticText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.automaticId = child.id; + } + // 频率-手自动切换 + else if ( + child.paramType === "40" && + !child.collectName.includes("阀") + ) { + deviceItem.frequencyAutotext = + Number(child.collectValue) == 0 ? false : true; + deviceItem.frequencyAutotextId = child.id; + } + // 频率调节 + else if ( + child.paramType === "3" && + !child.collectName.includes("阀") + ) { + deviceItem.frequencySet = + Number(child.collectValue) == 0 ? "0" : child.collectValue; + deviceItem.frequencyId = child.id; + } + // 频率反馈 + else if ( + child.paramType === "4" && + child.collectName.includes("频率反馈") + ) { + deviceItem.frequency = child.collectValue; + } + } + }); + // 将处理后的对象添加到 deviceList 中 + if (Object.keys(deviceItem).length > 1) { + this.controlArr.push(deviceItem); + } + console.log("处理后的this.controlArr", this.controlArr); + this.openControlDialog = true; + } + }); + }, + // 控制 + goControlList(item, index, name) { + console.log("item1111111111111111111", item, index, name); + // 处理properties值, + this.controlArr = []; + this.controlTitle = ""; + // 初始化一个空对象来存储非蝶阀处理后的结果 + let deviceItem = {}; + let properties; + if (index !== undefined && index !== null && index !== "") { + // 从 item 中查找 deviceName 包含与 index 相同数字的对象 + let targetDevice = null; + for (let i = 0; i < item.length; i++) { + const device = item[i]; + const indexStr = index.toString(); + const deviceName = device.deviceName.toString(); + for (let j = 0; j < indexStr.length; j++) { + if (deviceName.includes(indexStr[j])) { + this.controlTitle = deviceName; + deviceItem.name = deviceName; + console.log("this.controlTitle", this.controlTitle); + targetDevice = device; + break; + } + } + if (targetDevice) { + break; + } + } + // 如果未找到匹配的设备,返回 false + if (!targetDevice) { + return false; + } + // 获取匹配设备的 properties 数组 + properties = targetDevice.properties; + console.log("匹配的当前的设备数据", properties); + } else { + // 如果 index 未传值,直接将 item 当作 properties + properties = item; + this.controlTitle = name; + deviceItem.name = name; + console.log("index 未传值,直接处理 item 作为 properties", properties); + } + console.log("匹配的当前的设备数据", properties); + properties.forEach((child) => { + if (child.collectName) { + // 手动控制 + if ( + child.paramType === "2" && + !child.collectName.includes("阀") && + child.collectName.includes("启停") + ) { + deviceItem.controlText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.controlId = child.id; + } + // 阀门的-手动控制 + else if ( + child.paramType === "2" && + child.collectName.includes("阀") + ) { + deviceItem.controlText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.controlId = child.id; + } + // 手自动切换 0自动1手动 + else if ( + child.paramType === "6" && + !child.collectName.includes("阀") + ) { + deviceItem.automaticText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.automaticId = child.id; + } + // 阀门的-手自动切换 + else if ( + child.paramType === "6" && + child.collectName.includes("阀") + ) { + deviceItem.automaticText = + Number(child.collectValue) == 0 ? false : true; + deviceItem.automaticId = child.id; + } + // 频率-手自动切换 + else if ( + child.paramType === "40" && + !child.collectName.includes("阀") + ) { + deviceItem.frequencyAutotext = + Number(child.collectValue) == 0 ? false : true; + deviceItem.frequencyAutotextId = child.id; + } + // 频率调节 + else if ( + child.paramType === "3" && + !child.collectName.includes("阀") + ) { + deviceItem.frequencySet = + Number(child.collectValue) == 0 ? "0" : child.collectValue; + deviceItem.frequencyId = child.id; + } + // 频率反馈 + else if ( + child.paramType === "4" && + child.collectName.includes("频率反馈") + ) { + deviceItem.frequency = child.collectValue; + } + } + }); + // 将处理后的对象添加到 deviceList 中 + if (Object.keys(deviceItem).length > 1) { + this.controlArr.push(deviceItem); + } + console.log("处理后的this.controlArr", this.controlArr); + this.openControlDialog = true; + }, + hasFrequencySet(item, name) { + return ( + item && + item.hasOwnProperty(name) && + item[name] !== null && + item[name] !== "" + ); + }, + // 处理输入事件,过滤非数字字符 + handleInput(item) { + console.log("校验"); + // 实时校验并过滤非数字字符 + item.frequencySet = String(item.frequencySet).replace(/[^\d]/g, ""); + }, + // 失去焦点 + handleBlur() { + // this.currentFocusIndex = ""; + }, + handleEnter(item, event) { + console.log("请求后端", item); + // 失去焦点 + event.target.blur(); + this.$confirm( + `确定要修改"${item.name}"的频率为:${item.frequencySet} Hz吗?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + this.operationConrol(item.frequencyId, item.frequencySet); + }) + .catch(() => { + // 用户取消操作,需要更新原来的频率 + // this.$emit("upList"); + }); + }, + //手动控制 + handleControlText(item) { + this.$confirm( + `确定要切换设备"${item.name}"的状态为:${ + item.controlText ? "开启" : "停止 吗?" + }`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + // 这里调用请求函数 + console.log("请求后台", item.controlText); + let param = null; + if (item.controlText) { + param = 1; + } else { + param = 0; + } + this.operationConrol(item.controlId, param); + }) + .catch(() => { + // 用户取消操作,恢复开关状态 + item.controlText = !item.controlText; + console.log("不请求后台"); + }); + }, + // 手自动切换 + handleAutomaticText(item) { + this.$confirm( + `确定要切换设备"${item.name}"的状态为:${ + item.automaticText ? "手动" : "自动 吗?" + }`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + // 这里调用请求函数 + console.log("请求后台", item.automaticText); + let param = null; + if (item.automaticText) { + param = 1; + } else { + param = 0; + } + this.operationConrol(item.automaticId, param); + }) + .catch(() => { + // 用户取消操作,恢复开关状态 + item.automaticText = !item.automaticText; + console.log("不请求后台"); + }); + }, + // 频率-手自动切换 + handleFrequencyAutomaticText(item) { + this.$confirm( + `确定要切换"${item.name}"的频率手自动状态为:${ + item.frequencyAutotext ? "手动" : "自动 吗?" + }`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + // 这里调用请求函数 + console.log("请求后台", item.frequencyAutotext); + let param = null; + if (item.frequencyAutotext) { + param = 1; + } else { + param = 0; + } + this.operationConrol(item.frequencyAutotextId, param); + }) + .catch(() => { + // 用户取消操作,恢复开关状态 + item.frequencyAutotext = !item.frequencyAutotext; + console.log("不请求后台"); + }); + }, + // 操作 + hadleOperationConrol(id, param) { + let data = { + id: id, + param: param, + }; + console.log("操作参数", data); + operationConrol([data]) + .then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("指令下发成功!"); + // 开启 loading 效果 + this.loading = true; + // 更新所有设备状态; + setTimeout(() => { + this.getMonitorList(); + this.loading = false; + }, 5000); + } else { + // this.$modal.msgError("操作失败"); + console.log("应该更新状态的"); + // 更新所有设备状态; + this.getMonitorList(); + } + }) + .catch((error) => { + console.log("请求发生错误,更新设备状态", error); + // 更新所有设备状态; + this.getMonitorList(); + }); + }, }, }; @@ -1774,6 +2531,7 @@ export default { z-index: 10; } .hostName1 { + cursor: pointer; border-bottom: 1px solid rgba(0, 255, 255, 1); z-index: 10; font-size: 0.22rem; @@ -1787,6 +2545,7 @@ export default { text-shadow: 0.02rem 0.02rem 0.04rem rgba(0, 0, 0, 0.9); /* 添加文字阴影增强立体感 */ } .hostName2 { + cursor: pointer; border-bottom: 1px solid rgba(0, 255, 255, 1); z-index: 10; font-size: 0.22rem; @@ -1800,6 +2559,7 @@ export default { text-shadow: 0.02rem 0.02rem 0.04rem rgba(0, 0, 0, 0.9); } .hostName3 { + cursor: pointer; border-bottom: 1px solid rgba(0, 255, 255, 1); z-index: 10; font-size: 0.22rem; @@ -2001,6 +2761,7 @@ export default { border-radius: 50%; } .coolingPump1 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2010,6 +2771,7 @@ export default { left: 7.57rem; } .coolingPump2 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2019,6 +2781,7 @@ export default { left: 8.5rem; } .coolingPump3 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2082,6 +2845,7 @@ export default { font-weight: bold; } .freezingPump1 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2091,6 +2855,7 @@ export default { left: 7.11rem; } .freezingPump2 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2100,6 +2865,7 @@ export default { left: 8.43rem; } .freezingPump3 { + cursor: pointer; z-index: 10; font-size: 0.15rem; font-weight: bold; @@ -2163,6 +2929,7 @@ export default { font-weight: bold; } .coolingTower3 { + cursor: pointer; z-index: 10; font-size: 0.18rem; color: #46f1e3; @@ -2173,6 +2940,7 @@ export default { transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } .coolingTower22 { + cursor: pointer; z-index: 10; font-size: 0.18rem; color: #46f1e3; @@ -2183,6 +2951,7 @@ export default { transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } .coolingTower21 { + cursor: pointer; z-index: 10; font-size: 0.18rem; color: #46f1e3; @@ -2193,6 +2962,7 @@ export default { transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } .coolingTower12 { + cursor: pointer; z-index: 10; font-size: 0.18rem; color: #46f1e3; @@ -2203,6 +2973,7 @@ export default { transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } .coolingTower11 { + cursor: pointer; z-index: 10; font-size: 0.18rem; color: #46f1e3; @@ -2275,6 +3046,7 @@ export default { } } .frozenValve1 { + cursor: pointer; z-index: 10; position: absolute; top: 6.75rem; @@ -2285,6 +3057,7 @@ export default { border-radius: 50%; } .frozenValve2 { + cursor: pointer; z-index: 10; position: absolute; top: 5.93rem; @@ -2295,6 +3068,7 @@ export default { border-radius: 50%; } .frozenValve3 { + cursor: pointer; z-index: 10; position: absolute; top: 5rem; @@ -2305,6 +3079,7 @@ export default { border-radius: 50%; } .coolingValue1 { + cursor: pointer; z-index: 10; position: absolute; top: 5.93rem; @@ -2315,6 +3090,7 @@ export default { border-radius: 50%; } .coolingValue2 { + cursor: pointer; z-index: 10; position: absolute; top: 5.17rem; @@ -2325,6 +3101,7 @@ export default { border-radius: 50%; } .coolingValue3 { + cursor: pointer; z-index: 10; position: absolute; top: 4.45rem; @@ -2643,6 +3420,12 @@ export default { } } } +.detail-data-bottom { + width: 3.5rem; + position: absolute; + top: 0.5rem; + right: 2.5rem; +} // @media (min-width: 1240px) and (max-width: 1440px) { // } @media (max-width: 1440px) { diff --git a/src/views/hotWater/waterControl/index.vue b/src/views/hotWater/waterControl/index.vue index 270f705..756e8a1 100644 --- a/src/views/hotWater/waterControl/index.vue +++ b/src/views/hotWater/waterControl/index.vue @@ -69,15 +69,19 @@
开关状态:
- - + + +
@@ -129,7 +133,9 @@ />
-
PID手自动:
+
+ 频率手自动: +
-
启 停 控 制:
+
+ 启停 控制: +
-
故障信息:
+
故障信息:
-
运行状态:
+
运行状态:
S
-
换机周期:
+
换机时间:
-
min
+
+
+
+
一次50分钟
+
+
+
+ +
+
+ +
+
+
回水温度:
+
{{ item.temp }}℃
+
+
+
回水温度设置:
+ +
+
+
+
回水温度设定差值:
+ +
+
+
+
回水温度设定延时时间:
+ +
min
+
@@ -310,8 +393,8 @@ >
%
-
-
补水延时时间:
+
+
液位设定延时时间:
-
S
+
min
-
+
液位误差值:
-
+
-
启动:
+
一键启动:
-
+
@@ -429,7 +512,7 @@
{{ item.pressure }}bar
-
供水温度误差设定:
+
温度偏差值:
-
+
@@ -504,6 +587,24 @@ export default { }, tabsList: [], expandedKeys: [], + hotPumpOptions: [ + { + label: "关机", + value: 0, + }, + { + label: "制冷", + value: 2, + }, + { + label: "制热", + value: 3, + }, + { + label: "热水", + value: 4, + }, + ], currentId: "", //当前选中高亮的id currentName: "", //当前选中的名称 currentLevel: "", //当前节点的层级 @@ -666,11 +767,12 @@ export default { let deviceItem = { ...item, waterLevel: Number(item.waterLevel), - runningStatus: Number(item.switchStatus) == 0 ? "运行" : "停止", //运行状态 + runningStatus: Number(item.runningStatus) == 0 ? "停止" : "运行", //运行状态 + hotPumpStatus: item.switchStatus, //热泵开关状态 switchStatus: Number(item.switchStatus) == 0 ? false : true, //启停控制 alarmStatus: Number(item.alarmStatus) == 0 ? "无故障" : "故障", //故障状态 handAutomaticSwitch: - Number(item.handAutomaticSwitch) == 0 ? false : true, //手自动状态 + Number(item.handAutomaticSwitch) == 1 ? false : true, //手自动状态 openSwitch: Number(item.openSwitch) == 0 ? false : true, //一键启动 closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //一键停止 }; @@ -726,7 +828,8 @@ export default { ...item, waterLevel: Number(item.waterLevel), runningStatus: - Number(item.switchStatus) == 0 ? "运行" : "停止", //运行状态 + Number(item.runningStatus) == 0 ? "运行" : "停止", //运行状态 + hotPumpStatus: item.switchStatus, //热泵开关状态 switchStatus: Number(item.switchStatus) == 0 ? false : true, //启停控制 alarmStatus: @@ -830,10 +933,26 @@ export default { }, // 设置热泵开关状态 handleHotPump(item) { + // 记录原始状态 + const originalStatus = item.hotPumpStatus; + // 根据 value 值获取对应的 label + let statusLabel = ""; + switch (item.hotPumpStatus) { + case 0: + statusLabel = "关机"; + break; + case 2: + statusLabel = "制冷"; + break; + case 3: + statusLabel = "制热"; + break; + case 4: + statusLabel = "热水"; + break; + } this.$confirm( - `确定要切换设备"${item.name}"的状态为:${ - item.switchStatus ? "开启" : "关闭 吗?" - }`, + `确定要切换设备"${item.name}"的状态为:${statusLabel} 吗?"`, "提示", { confirmButtonText: "确定", @@ -842,19 +961,11 @@ export default { } ) .then(() => { - // 这里调用请求函数,示例中只是简单打印信息 - console.log("请求后台", item.switchStatus); - let param = null; - if (item.switchStatus) { - param = 1; - } else { - param = 0; - } - this.hadleOperationConrol(item.switchStatusId, param); + this.hadleOperationConrol(item.switchStatusId, item.hotPumpStatus); }) .catch(() => { - // 用户取消操作,恢复开关状态 - item.switchStatus = !item.switchStatus; + // 用户取消操作,恢复状态 + item.hotPumpStatus = originalStatus; }); }, // 设置供水泵手自动状态 @@ -1155,6 +1266,10 @@ export default { width: 1.2rem; height: 0.8rem; } + .monitor-img3 { + width: 1.2rem; + height: 0.8rem; + } } .control-bottom { width: 100%; @@ -1214,6 +1329,12 @@ export default { width: 100px; } } + .words-li6 { + width: 70%; + .ash2 { + width: 100px; + } + } } .sigClass { width: 40%; @@ -1272,24 +1393,11 @@ export default { } } } -@media (min-width: 1400px) and (max-width: 1620px) { - .monitor-li { - width: calc(49% - 40px) !important; - margin: 0 20px !important; - .monitor-img1 { - width: 120px !important; - height: 120px !important; - } - .monitor-img2 { - width: 120px !important; - height: 80px !important; - } - .monitor-flex-left { - padding: 0 0.3rem !important; - } +@media (min-width: 1350px) and (max-width: 1460px) { + .monitor-img3 { } } -@media (min-width: 1240px) and (max-width: 1400px) { +@media (min-width: 1350px) and (max-width: 1850px) { .monitor-li { width: calc(49% - 10px) !important; margin: 0 5px !important; @@ -1302,8 +1410,12 @@ export default { width: 100px !important; height: 60px !important; } + .monitor-img3 { + width: 1.2rem !important; + height: 0.9rem !important; + } } -@media (max-width: 1240px) { +@media (max-width: 1350px) { .monitor-li { width: 100% !important; margin: 0 !important; @@ -1316,6 +1428,10 @@ export default { width: 100px !important; height: 80px !important; } + .monitor-img3 { + width: 100px !important; + height: 80px !important; + } .monitor-flex-left { padding: 0 30px !important; } diff --git a/src/views/hotWater/waterMonitor/index.vue b/src/views/hotWater/waterMonitor/index.vue index b15ec7d..045da6e 100644 --- a/src/views/hotWater/waterMonitor/index.vue +++ b/src/views/hotWater/waterMonitor/index.vue @@ -55,17 +55,18 @@ --> -
冷水泵
+
供水泵1
回水管
无线网关
回水阀
-
浴室
-
热水供水泵
+
房间
+
供水泵2
循环加热泵
- +
补水阀
+ @@ -78,7 +79,7 @@ @@ -91,7 +92,7 @@ @@ -101,54 +102,49 @@ src="../../../assets/flowimg/circulate-nomove.png" alt="" /> - + + - - + @@ -161,13 +157,13 @@ @@ -273,16 +269,34 @@ {{ row.waterLevel }} - + + + + + + + - + + + + @@ -320,15 +334,14 @@ export default { baseTable: [], //公共信息列表数据 tableData: [], //系统状态表格数据 - // 冷水泵状态 0表示关闭 1表示开启 - coolpumstate: "", - // 热水供水泵状态 0表示关闭 1表示开启 - waterpumstate: "", + // 供水阀状态 0表示关闭 1表示开启 + useWaterState: "", + upWaterState1: "", //供水泵1状态 + upWaterState2: "", //供水泵2状态 + backWaterState: "", //回水阀状态 // 热泵状态 两个系数 - hotpumstate: "关机模式", + hotPumState: "", isBad: "无故障", - // 浴室使用状态 0表示未使用, 1表示使用 - bathstate: 0, // 网关在线状态 0表示离线 1表示在线 webstate: 1, // 水位变化数值 @@ -488,8 +501,13 @@ export default { this.temdata = row.waterTemp; this.pumname = row.pumpName; // 热泵状态 是否故障 - this.hotpumstate = row.runState; + this.hotPumState = row.runState; this.isBad = row.isFault; + this.useWaterState = row.useWaterState; + this.upWaterState1 = row.upWaterState1; + this.upWaterState2 = row.upWaterState2; + this.backWaterState = row.backWaterState; + console.log("补水阀状态11111111111111111111", this.useWaterState); }, /* 加入小手状态 */ tableRowStyle({ row, column, rowIndex, columnIndex }) { @@ -516,7 +534,7 @@ export default { baseltem.unit = "℃"; } if (item.name.includes("压力")) { - baseltem.unit = "Mpa"; + baseltem.unit = "bar"; } if (item.value.includes("采集失败")) { baseltem.value = "0"; @@ -725,8 +743,8 @@ export default { .text1 { position: absolute; - top: 0.28rem; - left: 0.24rem; + top: 2.9rem; + left: 0.6rem; z-index: 1; } @@ -748,7 +766,7 @@ export default { .text4 { position: absolute; - top: 2.3rem; + top: 2.6rem; right: 0.5rem; z-index: 1; } @@ -763,7 +781,7 @@ export default { .text6 { position: absolute; top: 4.27rem; - left: 0.24rem; + left: 0.6rem; z-index: 1; } @@ -773,12 +791,18 @@ export default { left: 5.6rem; z-index: 1; } + .text8 { + position: absolute; + top: 0.5rem; + left: 1.4rem; + z-index: 1; + } .replenish { position: absolute; top: 0.7rem; - left: 0.9rem; - width: 1.7rem; + left: 0rem; + width:2.55rem; height: 0.34rem; z-index: 1; } @@ -804,7 +828,8 @@ export default { width: 1rem; height: 0.78rem; position: absolute; - top: 0.54rem; + top: 2rem; + left: 0.5rem; z-index: 2; } @@ -813,7 +838,23 @@ export default { height: 0.78rem; position: absolute; top: 3.37rem; - left: 0.4rem; + left: 0.5rem; + } + .buwaterpum { + width: 8.5rem; + height: 2.9rem; + position: absolute; + top: -0.1rem; + right: -0.02rem; + z-index: 2; + } + .buwaterpum2 { + width: 8.5rem; + height: 4.4rem; + position: absolute; + top: -0.9rem; + right: -0.02rem; + z-index: 2; } .cirpum { @@ -894,7 +935,7 @@ export default { background-color: #dff1fa; margin-left: 2%; position: absolute; - top: 1.78rem; + top: 1.47rem; left: 2.6rem; border: solid 0.01rem #11aaea; z-index: 3; diff --git a/src/views/temSys/temHistory/components/historyCharts.vue b/src/views/temSys/temHistory/components/historyCharts.vue index 94f83ac..f2a949e 100644 --- a/src/views/temSys/temHistory/components/historyCharts.vue +++ b/src/views/temSys/temHistory/components/historyCharts.vue @@ -1,6 +1,10 @@ @@ -12,6 +16,9 @@ export default { type: Array, default: () => [], }, + isShowOne: { + type: Boolean, + }, }, data() { return { @@ -293,6 +300,10 @@ export default { diff --git a/src/views/temSys/temHistory/components/historyTables.vue b/src/views/temSys/temHistory/components/historyTables.vue index 23758ce..07914a0 100644 --- a/src/views/temSys/temHistory/components/historyTables.vue +++ b/src/views/temSys/temHistory/components/historyTables.vue @@ -1,18 +1,14 @@ @@ -24,6 +20,9 @@ export default { type: Array, default: () => [], }, + isShowOne: { + type: Boolean, + }, }, data() { return { @@ -50,4 +49,9 @@ export default { }; - + diff --git a/src/views/temSys/temHistory/index.vue b/src/views/temSys/temHistory/index.vue index 557fc7d..9cf8f1a 100644 --- a/src/views/temSys/temHistory/index.vue +++ b/src/views/temSys/temHistory/index.vue @@ -26,6 +26,7 @@ v-model="timeDate" :default-time="['00:00:00', '23:59:59']" type="datetimerange" + value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" placeholder="选择日期" start-placeholder="开始日期" @@ -48,7 +49,10 @@
@@ -74,15 +78,20 @@ - +