Browse Source

1.按要求需修改系统

2.对接首页内容
bl_ers
selia-zx 18 hours ago
parent
commit
e118216dd3
  1. 7
      src/api/index.js
  2. 8
      src/views/centerairC/enSourceAnalysis/index.vue
  3. 4
      src/views/centerairC/energyAnalysis/components/qnqAnalysis.vue
  4. 4
      src/views/centerairC/energyAnalysis/components/ynyAnalysis.vue
  5. 4
      src/views/centerairC/energyAnalysis/components/ynyQnqAnalysis.vue
  6. 14
      src/views/centerairC/energyAnalysis/index.vue
  7. 6
      src/views/centerairC/energyTrends/index.vue
  8. 20
      src/views/centerairC/overview/index.vue
  9. 95
      src/views/components/chartsData.vue
  10. 2
      src/views/components/sysEnergy.vue
  11. 162
      src/views/index.vue

7
src/api/index.js

@ -96,3 +96,10 @@ export function homeStatical() {
method: "get",
});
}
// 获取温湿度
export function getLocalWeatherData() {
return request({
url: "/home/getWeatherData",
method: "get",
});
}

8
src/views/centerairC/enSourceAnalysis/index.vue

@ -10,11 +10,11 @@
@switch-fourth="switchToPatrolTem"
></machineRoom>
</el-tab-pane>
<el-tab-pane label="设备能耗" name="second">
<equipment v-if="activeName === 'second'"></equipment>
<el-tab-pane label="设备能耗" name="second">
<device-energy v-if="activeName === 'second'"></device-energy>
</el-tab-pane>
<el-tab-pane label="设备能耗" name="three">
<device-energy v-if="activeName === 'three'"></device-energy>
<el-tab-pane label="设备能耗" name="three">
<equipment v-if="activeName === 'three'"></equipment>
</el-tab-pane>
</el-tabs>
</div>

4
src/views/centerairC/energyAnalysis/components/qnqAnalysis.vue

@ -415,7 +415,7 @@ export default {
console.log("Max2", Max2);
// tooltip-
if (this.timeIndex2 == 0) {
this.unitValue = "(kwr)";
this.unitValue = "(kwh)";
} else if (this.timeIndex2 == 1) {
this.unitValue = "(kwh)";
} else {
@ -554,7 +554,7 @@ export default {
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"kwr" +
"kwh" +
"</span><br>";
} else if (seriesName === "上期") {
res +=

4
src/views/centerairC/energyAnalysis/components/ynyAnalysis.vue

@ -412,7 +412,7 @@ export default {
console.log("Max2", Max2);
// tooltip-
if (this.timeIndex2 == 0) {
this.unitValue = "(kwr)";
this.unitValue = "(kwh)";
} else if (this.timeIndex2 == 1) {
this.unitValue = "(kwh)";
} else {
@ -559,7 +559,7 @@ export default {
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"kwr" +
"kwh" +
"</span><br>";
} else if (seriesName === "上期") {
res +=

4
src/views/centerairC/energyAnalysis/components/ynyQnqAnalysis.vue

@ -415,7 +415,7 @@ export default {
// console.log("Max2", Max2);
// tooltip-
if (this.timeIndex2 == 0) {
this.unitValue = "(kwr)";
this.unitValue = "(kwh)";
} else if (this.timeIndex2 == 1) {
this.unitValue = "(kwh)";
} else {
@ -566,7 +566,7 @@ export default {
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"kwr" +
"kwh" +
"</span><br>";
} else if (
(seriesName === "本期" || seriesName === "同期") &&

14
src/views/centerairC/energyAnalysis/index.vue

@ -3,17 +3,14 @@
<div class="details-content">
<div class="details-header">
<el-tabs v-model="activeName" @tab-click="handleClick" lazy>
<el-tab-pane label="能耗分析" name="first">
<energy-analysis v-if="activeName === 'first'"></energy-analysis>
</el-tab-pane>
<el-tab-pane label="环比分析" name="third">
<qnq-analysis v-if="activeName === 'third'"></qnq-analysis>
<el-tab-pane label="环比分析" name="first">
<qnq-analysis v-if="activeName === 'first'"></qnq-analysis>
</el-tab-pane>
<el-tab-pane label="同比分析" name="second">
<yny-analysis v-if="activeName === 'second'"></yny-analysis>
</el-tab-pane>
<el-tab-pane label="同比环比分析" name="four">
<yny-qnq-analysis v-if="activeName === 'four'"></yny-qnq-analysis>
<el-tab-pane label="同比环比分析" name="third">
<yny-qnq-analysis v-if="activeName === 'third'"></yny-qnq-analysis>
</el-tab-pane>
</el-tabs>
</div>
@ -22,12 +19,11 @@
</template>
<script>
import energyAnalysis from "./components/energyAnalysis.vue";
import qnqAnalysis from "./components/qnqAnalysis.vue";
import ynyAnalysis from "./components/ynyAnalysis.vue";
import ynyQnqAnalysis from "./components/ynyQnqAnalysis.vue";
export default {
components: { energyAnalysis, qnqAnalysis, ynyAnalysis, ynyQnqAnalysis },
components: { qnqAnalysis, ynyAnalysis, ynyQnqAnalysis },
data() {
return {
activeName: "first", //

6
src/views/centerairC/energyAnalysis/components/energyAnalysis.vue → src/views/centerairC/energyTrends/index.vue

@ -124,7 +124,7 @@
</thead>
<tbody>
<tr>
<td v-if="coldData">制冷量(kwr)</td>
<td v-if="coldData">制冷量(kwh)</td>
<td v-for="(item, index) in coldData" :key="index">
{{ item }}
</td>
@ -455,7 +455,7 @@ export default {
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"kwr" +
"kwh" +
"</span><br>";
} else if (seriesName === "瞬时功率") {
res +=
@ -726,7 +726,7 @@ export default {
unit = "";
break;
case "瞬时冷量":
unit = "kwr";
unit = "kwh";
break;
case "瞬时功率":
unit = "kw";

20
src/views/centerairC/overview/index.vue

@ -109,7 +109,7 @@
<div class="table-content" style="width: 100%">
<el-table :data="tableData" style="width: 100%" stripe>
<el-table-column prop="date" label="时间"> </el-table-column>
<el-table-column prop="coldData" label="制冷量(kwr)">
<el-table-column prop="coldData" label="制冷量(kwh)">
</el-table-column>
<el-table-column prop="electData" label="用电量(kwh)">
</el-table-column>
@ -155,7 +155,7 @@
</tr>
<tr>
<th align="center">时间</th>
<th align="center">制冷量(kwr)</th>
<th align="center">制冷量(kwh)</th>
<th align="center">用电量(kwh)</th>
<th align="center">EER</th>
</tr>
@ -223,6 +223,10 @@ export default {
showZoom: true,
//
tableData: [],
/** 制冷量合计(后端返回) */
totalColdData: "",
/** 用电量合计(后端返回) */
totalElectData: "",
pageParm: {
page: 1, //
pageSize: 10, //
@ -427,6 +431,16 @@ export default {
electData: res.data[1].meter[index].toString(), //
copData: res.data[2].cop[index].toString(), //
}));
/** 获取后端返回的制冷量和用电量合计值 */
this.totalColdData = res.data[3].totalCold ? res.data[3].totalCold.toString() : "0";
this.totalElectData = res.data[3].totalElect ? res.data[3].totalElect.toString() : "0";
/** 在表格最后添加合计行 */
this.tableData.push({
date: "合计",
coldData: this.totalColdData,
electData: this.totalElectData,
copData: "",
});
this.pageParm.total = res.data[5].total;
} else {
this.tableData = [];
@ -581,7 +595,7 @@ export default {
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"kwr" +
"kwh" +
"</span><br>";
} else if (seriesName === "用电量") {
res +=

95
src/views/components/chartsData.vue

@ -34,13 +34,14 @@
<script>
import { homeCharts } from "@/api/index";
import * as echarts from "echarts";
export default {
data() {
return {
timeData2: [
{ title: "系统EER" },
{ title: "瞬时冷量(kwr)" },
{ title: "瞬时电量(kwh)" },
{ title: "瞬时冷量(kw)" },
{ title: "瞬时电量(kw)" },
// { title: "(kwh)" },
{ title: "冷冻水供回水温度(℃)" },
// { title: "()" },
@ -282,7 +283,7 @@ export default {
},
//chartInstance2 线
initChart2() {
this.chartInstance2 = this.$echarts.init(this.$refs.analyse_ref);
this.chartInstance2 = echarts.init(this.$refs.analyse_ref);
this.option2 = {
tooltip: {
trigger: "axis",
@ -317,7 +318,7 @@ export default {
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
"kwr" +
"kw" +
"</span><br>";
} else if (seriesName.indexOf("用电量") !== -1) {
res +=
@ -326,7 +327,7 @@ export default {
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
"kwh" +
"kw" +
"</span><br>";
} else if (
seriesName.indexOf("温度") !== -1 ||
@ -347,7 +348,7 @@ export default {
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
"kwh" +
"kw" +
"</span><br>";
} else {
res +=
@ -371,47 +372,69 @@ export default {
},
grid: {
top: "9%",
top: "10%",
left: "3%",
right: "2%",
bottom: "25%",
bottom: "30%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// data: ["2021", "2022", "2023"],
// x
axisLabel: {
// interval: 0, //x
color: "rgba(255,255,255,1)",
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
},
axisTick: {
show: false,
show: false, // 线
},
// x
axisLine: {
show: false,
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
},
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)",
color: "rgba(255, 255, 255, 1)",
},
// y
// y
axisLine: {
show: true,
lineStyle: {
// X
color: "#7b918c",
color: "#365576", // y 线
},
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#7b918c",
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
@ -427,6 +450,7 @@ export default {
end: 100,
xAxisIndex: [0],
handleSize: "120%", // 120%
bottom: "20%", //
},
],
series: [
@ -497,6 +521,21 @@ export default {
fontSize: titleFontSize * 1.5,
},
},
// X
dataZoom: [
{
type: "slider", //inside
show: this.showZoom,
height: 10, // 20
// fillerColor: 'rgba(255, 0, 0, 0.5)', //
// backgroundColor: 'rgba(0, 0, 0, 0.1)', // 0.1
start: 0,
end: 100,
xAxisIndex: [0],
handleSize: "120%", // 120%
bottom: "20%", //
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance2.setOption(adapterOption);
@ -510,7 +549,7 @@ export default {
homeCharts().then((res) => {
console.log("图表数据查询返回", res);
if (res.code == 200) {
this.allDataObj = res.rows;
this.allDataObj = res.rows[0];
console.log("全部的数据", this.allDataObj);
//
this.handleEnter(this.timeIndex2);
@ -544,20 +583,21 @@ export default {
.home-chart {
display: flex;
flex-direction: row;
overflow: hidden;
// overflow: hidden;
cursor: pointer;
width: 100%;
position: relative;
.legend-li {
font-size: 0.16rem;
color: #a5b6cb;
text-align: center;
font-size: 0.2rem;
color: #95adc8;
padding: 0.08rem 0.2rem;
white-space: nowrap;
margin-right: 0.3rem;
border: 1px solid #0076c1;
border-radius: 0.06rem;
background-color: #366797;
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4);
border-radius: 0.14rem;
margin-right: 0.1rem;
padding: 0.02rem 0.1rem;
text-shadow: none !important;
}
.home-chart-right {
@ -565,6 +605,7 @@ export default {
right: 0;
display: flex;
flex-direction: row;
z-index: 99999;
.imgDiv {
width: 0.35rem;
@ -591,6 +632,6 @@ export default {
.charts-div {
margin-top: 0.3rem;
width: 100%;
height: 3.6rem;
height: 2.8rem;
}
</style>

2
src/views/components/sysEnergy.vue

@ -1,7 +1,7 @@
<template>
<div>
<div class="panel-title">
<span class="panel-title-text">实时EER系数</span>
<span class="panel-title-text">瞬时EER系数评估</span>
</div>
<div class="sys_content">
<div class="sys_charts" ref="sys_charts"></div>

162
src/views/index.vue

@ -63,7 +63,7 @@
</div>
<div class="special-div" style="width: 100%; margin-top: 20px">
<div class="special-top">
<div class="special-title">中央空调能总览</div>
<div class="special-title">中央空调能总览</div>
</div>
<!-- 冷源系统 -->
<div class="home">
@ -81,8 +81,8 @@
alt=""
/>
<div class="img-word">
<div>瞬时电量(kwh)</div>
<div class="word-color1">{{ this.totalEle }}22222</div>
<div>瞬时电量(kw)</div>
<div class="word-color1">{{ this.totalEle }}</div>
</div>
</div>
<div class="data-content">
@ -92,8 +92,8 @@
alt=""
/>
<div class="img-word">
<div>瞬时冷量(kwr)</div>
<div class="word-color2">{{ this.totalCap }}3333333</div>
<div>瞬时冷量(kw)</div>
<div class="word-color2">{{ this.totalCap }}</div>
</div>
</div>
</div>
@ -108,7 +108,7 @@
/>
<div class="img-word">
<div>运行天数</div>
<div class="word-color3">{{ this.runTime }}322</div>
<div class="word-color3">{{ this.runTime }}</div>
</div>
</div>
<div class="data-content">
@ -119,7 +119,7 @@
/>
<div class="img-word">
<div>湿球温度</div>
<div class="word-color4">{{ this.wetBulbTem }}32</div>
<div class="word-color4">{{ this.wetBulbTem }}</div>
</div>
</div>
<div class="data-content">
@ -130,7 +130,7 @@
/>
<div class="img-word">
<div>室外湿度</div>
<div class="word-color5">{{ this.humidity }}22%</div>
<div class="word-color5">{{ this.humidity }}%</div>
</div>
</div>
<div class="data-content">
@ -141,7 +141,7 @@
/>
<div class="img-word">
<div>室外温度</div>
<div class="word-color6">{{ this.temperature }}33</div>
<div class="word-color6">{{ this.temperature }}</div>
</div>
</div>
</div>
@ -157,8 +157,8 @@
src="../assets/images/home-icon7.png"
alt=""
/>
<div>日EER</div>
<div class="eep-data">{{ this.homeStatical.dayEER }}20</div>
<div>日EER(kwh/kwh)</div>
<div class="eep-data">{{ this.homeStatical.dayEER }}</div>
</div>
<div class="eep-li">
<img
@ -166,9 +166,9 @@
src="../assets/images/home-icon7.png"
alt=""
/>
<div>月EER</div>
<div>月EER(kwh/kwh)</div>
<div class="eep-data">
{{ this.homeStatical.monthEER }}24
{{ this.homeStatical.monthEER }}
</div>
</div>
<div class="eep-li">
@ -177,9 +177,9 @@
src="../assets/images/home-icon7.png"
alt=""
/>
<div>年EER</div>
<div>年EER(kwh/kwh)</div>
<div class="eep-data">
{{ this.homeStatical.yearEER }}12
{{ this.homeStatical.yearEER }}
</div>
</div>
<div class="eep-li">
@ -188,9 +188,9 @@
src="../assets/images/home-icon7.png"
alt=""
/>
<div>累计EER</div>
<div>累计EER(kwh/kwh)</div>
<div class="eep-data">
{{ this.homeStatical.totalEER }}12
{{ this.homeStatical.totalEER }}
</div>
</div>
</div>
@ -199,33 +199,33 @@
<div class="clod-left">
<div class="cold-li">
<div class="cold-data">
{{ this.homeStatical.dayColdCap }}32
{{ this.homeStatical.dayColdCap }}
</div>
<div class="cold-number">日供冷量(kwr)</div>
<div class="cold-number">日供冷量(kwh)</div>
</div>
<div class="cold-li">
<div class="cold-data">
{{ this.homeStatical.monthColdCap }}232
{{ this.homeStatical.monthColdCap }}
</div>
<div class="cold-number">当月供冷量(kwr)</div>
<div class="cold-number">当月供冷量(kwh)</div>
</div>
<div class="cold-li">
<div class="cold-data">{{ yearColdCapValue }}3211</div>
<div class="cold-data">{{ yearColdCapValue }}</div>
<div class="cold-number">
{{
this.homeStatical.yearColdCap > 100000
? "年供冷量(Mwr)"
: "年供冷量(kwr)"
? "年供冷量(Mwh)"
: "年供冷量(kwh)"
}}
</div>
</div>
<div class="cold-li">
<div class="cold-data">{{ totalColdCapValue }}324443</div>
<div class="cold-data">{{ totalColdCapValue }}</div>
<div class="cold-number">
{{
this.homeStatical.totalColdCap > 100000
? "累计供冷量(Mwr)"
: "累计供冷量(kwr)"
? "累计供冷量(Mwh)"
: "累计供冷量(kwh)"
}}
</div>
</div>
@ -295,11 +295,12 @@ import {
introduction,
changeLogo,
ersDatas,
homeRunTime,
getCurrentRate,
getCoe,
homeStatical,
getLocalWeatherData,
} from "@/api/index";
import { runTime } from "@/api/centerairC/sysMonitor";
import SysEnergy from "./components/sysEnergy.vue";
import ChartsData from "./components/chartsData.vue";
import viewEnergy from "./components/viewEnergy.vue";
@ -307,7 +308,7 @@ export default {
components: {
SysEnergy,
ChartsData,
viewEnergy
viewEnergy,
},
data() {
return {
@ -365,7 +366,6 @@ export default {
},
mounted() {
this.getProject();
this.getErsData();
this.getRunTime();
this.getCurrentRate();
@ -493,99 +493,13 @@ export default {
}
});
},
//
getErsData() {
let data = {
systemType: "7",
};
ersDatas(data).then((res) => {
if (res.code == 200) {
console.log("首页返回数据----------", res.rows[0]);
this.heatData = res.rows[0].heatData;
this.systemData = res.rows[0].systemData;
this.valveData = res.rows[0].valveData;
this.outWaterTemperature = res.rows[0].outWaterTemperature;
this.applicationData = res.rows[0].applicationData;
this.heatRecoveryData = res.rows[0].heatRecoveryData;
//
this.addCentrifugePressureDiff();
console.log("deviceName-1", this.systemData);
}
});
},
// systemData
addCentrifugePressureDiff() {
//
const inletPressure = this.systemData.find(
(item) => item.deviceTypeName === "离心机进水压力"
);
const outletPressure = this.systemData.find(
(item) => item.deviceTypeName === "离心机出水压力"
);
//
if (inletPressure && outletPressure) {
// -
const pressureDiff =
parseFloat(outletPressure.curValue) -
parseFloat(inletPressure.curValue);
// 11
const status =
inletPressure.status === 1 || outletPressure.status === 1 ? 1 : 0;
//
const pressureDiffObj = {
paramType: "14", //
curTime: null,
orderNum: this.systemData.length + 1, // +1
deviceTypeName: "离心机压差",
otherName: "压差计算值",
deviceName: "离心机压差",
curValue: parseFloat(pressureDiff.toFixed(2)), //
status: status,
};
// systemData
this.systemData.push(pressureDiffObj);
console.log("添加离心机压差对象:", pressureDiffObj);
} else {
console.warn("找不到进水压力或出水压力数据");
}
},
//
getTempDisplay(deviceName, data) {
// console.log("this.systemData",this.systemData)
// console.log("deviceName",deviceName)
const item = data.find((item) => item.deviceTypeName === deviceName);
// console.log("item", item);
if (!item) return "--℃";
if (item.status === 1) {
return '<span style="color: red">异常</span>';
}
return `${item.curValue}`;
},
// -
getDeviceData(deviceTypeName) {
return (
this.systemData.find(
(item) => item.deviceTypeName === deviceTypeName
) || {}
);
},
goEnergy() {
// this.$router.push("/comprehensiveEnergy/systemEnergy");
},
//
getRunTime() {
homeRunTime().then((res) => {
runTime().then((res) => {
console.log("运行天数返回", res);
if (res.code == 200) {
this.runTime = res.rows;
this.runTime = res.data.runTime;
}
});
},
@ -594,8 +508,8 @@ export default {
getCurrentRate().then((res) => {
console.log("实时总功率总冷量返回", res);
if (res.code == 200) {
this.totalEle = res.rows.totalEle;
this.totalCap = res.rows.totalCap;
this.totalEle = res.rows[0].totalEle;
this.totalCap = res.rows[0].totalCap;
}
});
},
@ -604,7 +518,7 @@ export default {
homeStatical().then((res) => {
console.log("处理前日月年供冷量、日月年EER返回", res);
if (res.code == 200) {
this.homeStatical = this.formatObjectProperties(res.rows);
this.homeStatical = this.formatObjectProperties(res.rows[0]);
console.log("处理后日月年供冷量、日月年EER返回", this.homeStatical);
}
});
@ -627,8 +541,8 @@ export default {
console.log("返回本地的温湿度 <== ", res);
debugger;
if (res.code == 200) {
this.humidity = res.rows.humidity;
this.temperature = res.rows.temperature;
this.humidity = res.rows[0].humidity;
this.temperature = res.rows[0].temperature;
this.minHumidity = (parseFloat(this.humidity) / 100).toFixed(3);
// 湿
class z_ambient {
@ -1225,7 +1139,7 @@ export default {
color: #4595f1;
position: absolute;
top: 0.13rem;
left: 3.44rem;
left: 3.34rem;
font-weight: bold;
}
}

Loading…
Cancel
Save