Browse Source

1.对接首页

2.对接设备监控
gh_ers
selia-zx 4 weeks ago
parent
commit
042a25075f
  1. 4
      .env.development
  2. 18
      src/api/heatRecoverySys/deviceMonitor.js
  3. 0
      src/api/heatRecoverySys/thermalAnalysis.js
  4. 8
      src/api/index.js
  5. 1
      src/assets/icons/svg/heatRecoverySys.svg
  6. BIN
      src/assets/images/flowchart.png
  7. BIN
      src/assets/images/hot-icon1.png
  8. BIN
      src/assets/images/hot-icon2.png
  9. BIN
      src/assets/images/hot-icon3.png
  10. BIN
      src/assets/images/hot-icon4.png
  11. BIN
      src/assets/images/monitor-border.png
  12. BIN
      src/assets/images/monitor-hot.png
  13. 170
      src/store/modules/permission.js
  14. 218
      src/views/centerairC/enSourceAnalysis/components/machineChart.vue
  15. 672
      src/views/centerairC/enSourceAnalysis/components/machineRoom.vue
  16. 26
      src/views/centerairC/enSourceAnalysis/index.vue
  17. 2
      src/views/centerairC/energyAnalysis/index.vue
  18. 143
      src/views/components/hotWater.vue
  19. 600
      src/views/components/viewColdSys.vue
  20. 20
      src/views/heatRecoverySys/deviceMonitor/index.vue
  21. 1030
      src/views/heatRecoverySys/deviceMonitor/monitorCenter.vue
  22. 3
      src/views/heatRecoverySys/thermalAnalysis/index.vue
  23. 660
      src/views/index.vue

4
.env.development

@ -7,9 +7,9 @@ ENV = 'development'
# 开发环境
# VUE_APP_BASE_API = '/dev-api'
# 后台
# VUE_APP_BASE_API = 'http://192.168.1.222:8080'
VUE_APP_BASE_API = 'http://192.168.1.222:8080'
# 梅州云端
VUE_APP_BASE_API = 'http://106.55.173.225:8091'
# VUE_APP_BASE_API = 'http://106.55.173.225:8091'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

18
src/api/heatRecoverySys/deviceMonitor.js

@ -0,0 +1,18 @@
import request from "@/utils/request";
// 工艺流程图数据列表
export function monitorList(query) {
return request({
url: "/device/ers/monitor/list",
method: "get",
params: query,
});
}
// 累积热量框数据
export function monitorTotalDatas(query) {
return request({
url: "/device/ers/monitor/totalDatas",
method: "get",
params: query,
});
}

0
src/api/heatRecoverySys/thermalAnalysis.js

8
src/api/index.js

@ -45,3 +45,11 @@ export function viewMainParams() {
method: "get",
});
}
// 获取热回收系统相关数据
export function ersDatas(query) {
return request({
url: "/pro/overview/ersDatas",
method: "get",
params: query,
});
}

1
src/assets/icons/svg/heatRecoverySys.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1769656588898" class="icon" viewBox="0 0 1034 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5427" xmlns:xlink="http://www.w3.org/1999/xlink" width="201.953125" height="200"><path d="M390.656 0c37.888 0 69.12 30.208 69.12 67.584V112.64h115.2v-45.056c0-37.376 30.72-67.584 69.12-67.584h206.848c37.888 0 69.12 30.208 69.12 67.584V112.64h28.672c47.616 0 86.016 37.888 86.016 84.48v732.16c0 46.592-38.4 84.48-86.016 84.48H86.016C38.4 1013.76 0 975.872 0 929.28v-732.16C0 150.528 38.4 112.64 86.016 112.64h28.672v-45.056c0-37.376 30.72-67.584 69.12-67.584h206.848z m48.128 744.448c-7.168-2.56-15.36 1.024-17.92 8.192v0.512c-14.848 40.96-11.264 62.464 5.632 89.6l4.096 6.656c3.072 4.608 5.12 10.24 6.144 15.36 3.072 18.944-9.728 35.84-27.648 47.104-6.656 3.584-9.216 12.288-5.12 18.944 3.584 6.656 12.288 9.216 18.944 5.12 0.512 0 0.512-0.512 1.024-0.512 26.624-16.384 45.568-41.984 40.448-74.752-1.536-10.24-5.12-17.92-12.288-29.696l-4.096-6.656c-10.752-18.432-11.776-31.744-1.024-61.952 3.072-7.168-0.512-15.36-8.192-17.92 0.512 0 0 0 0 0z m82.944 0c-7.168-2.56-15.36 1.024-17.92 8.192v0.512c-14.848 40.96-11.264 62.464 5.632 89.6l4.096 6.656c3.072 4.608 5.12 10.24 6.144 15.36 3.072 18.944-9.728 35.84-27.648 47.104-6.656 3.584-9.216 12.288-5.12 18.944 3.584 6.656 12.288 9.216 18.944 5.12 0.512 0 0.512-0.512 1.024-0.512 26.624-16.384 45.568-41.984 40.448-74.752-1.536-10.24-5.12-17.92-12.288-29.696l-4.096-6.656c-10.752-18.432-11.776-31.744-1.024-61.952 3.072-7.168-0.512-15.36-8.192-17.92 0.512 0 0.512 0 0 0z m64 8.192c-15.36 40.96-11.776 62.464 6.144 89.6l4.096 6.656c3.072 4.608 5.632 10.24 6.656 15.36 3.072 18.944-10.24 35.84-28.672 47.104-6.656 3.584-8.704 11.776-5.12 18.432 0 0 0 0.512 0.512 0.512 4.096 6.656 13.312 8.192 19.968 4.096 27.136-16.384 47.104-41.984 41.472-74.752-1.536-10.24-5.12-17.92-12.8-29.696l-4.096-6.656c-11.264-18.432-12.288-31.744-1.024-61.952 2.56-7.168-0.512-14.848-7.68-17.92h-0.512c-7.68-2.048-15.872 2.048-18.944 9.216zM445.952 194.048H135.68c-3.584 0-5.632 4.096-6.144 12.8v439.808h323.072v-435.2c0-9.728-1.536-15.872-4.608-16.896l-2.048-0.512z m452.608 0h-310.784c-3.584 0-5.632 4.096-6.144 12.8v439.808h323.072v-435.2c0-9.728-1.536-15.872-4.608-16.896l-1.536-0.512z m-48.128-126.464h-206.848V112.64h206.848v-45.056z m-459.776 0H183.808V112.64h206.848v-45.056z" p-id="5428"></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/images/flowchart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

BIN
src/assets/images/hot-icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
src/assets/images/hot-icon2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
src/assets/images/hot-icon3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/assets/images/hot-icon4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/assets/images/monitor-border.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
src/assets/images/monitor-hot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

170
src/store/modules/permission.js

@ -40,73 +40,23 @@ const permission = {
const rewriteRoutes = filterAsyncRouter(rdata, false, true);
const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
// 有中央空调
// 如果动态的路由有中央空调-系统监控-系统监测页面,那就添加一个hidden为true非Layout的大屏页面
const result = checkRouteArray(
sidebarRoutes,
"centerairC",
"monitorControl",
"sysMonitor"
);
router.addRoutes(asyncRoutes);
if (result) {
// console.log(
// "满足条件,添加中央空调-系统监控-系统监测相关的大屏页面路由"
// );
// 定义要添加的多个路由对象数组
const additionalRoutes = [
{
path: "/monitorCenter",
name: "monitorCenter",
hidden: true,
component: () =>
import("@/views/centerairC/sysMonitor/monitorCenter"),
meta: { title: "系统监测", icon: "screen" },
},
{
path: "/hostDetails",
name: "hostDetails",
hidden: true,
component: () =>
import("@/views/centerairC/sysMonitor/hostDetails"),
meta: { title: "主机性能", icon: "new2" },
},
{
path: "/performance",
name: "performance",
hidden: true,
component: () =>
import("@/views/centerairC/sysMonitor/performance"),
meta: { title: "冷机性能性能", icon: "new2" },
},
// 可以继续添加更多路由对象
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// console.log("不满足条件");
}
// 风柜
// 空压热回收
const result2 = sidebarRoutes.find(
(item) => item.name === "AircAndWindc"
(item) => item.name === "HeatRecoverySys"
);
if (result2) {
// 定义要添加的多个路由对象数组
const additionalRoutes2 = [
{
path: "/asSysMonitorDetails",
name: "asSysMonitorDetails",
path: "/monitorCenter",
name: "monitorCenter",
hidden: true,
component: () =>
import(
"@/views/aircAndWindc/awSysMonitor/asSysMonitorDetails"
),
meta: { title: "系统监控", icon: "screen" },
import("@/views/heatRecoverySys/deviceMonitor/monitorCenter"),
meta: { title: "系统监测", icon: "screen" },
},
// 可以继续添加更多路由对象
];
@ -120,112 +70,6 @@ const permission = {
// console.log("不满足条件");
}
// 锅炉
const result3 = sidebarRoutes.find(
(item) => item.name === "BoilerSys"
);
if (result3) {
// 定义要添加的多个路由对象数组
const additionalRoutes3 = [
{
path: "/boilerMonitorDetails",
name: "boilerMonitorDetails",
hidden: true,
component: () =>
import(
"@/views/boilerSys/boilerMonitor/boilerMonitorDetails"
),
meta: { title: "锅炉监控", icon: "screen" },
},
{
path: "/hotWaterBoilerDetails",
name: "hotWaterBoilerDetails",
hidden: true,
component: () =>
import(
"@/views/boilerSys/hotWaterBoiler/hotWaterBoilerDetails"
),
meta: { title: "热水锅炉监控", icon: "screen" },
},
{
path: "/heatingPumpDetails",
name: "heatingPumpDetails",
hidden: true,
component: () =>
import("@/views/boilerSys/heatingPump/heatingPumpDetails"),
meta: { title: "采暖泵监控", icon: "screen" },
},
{
path: "/steamHeatingDetails",
name: "steamHeatingDetails",
hidden: true,
component: () =>
import("@/views/boilerSys/steamHeating/steamHeatingDetails"),
meta: { title: "蒸汽采暖运行监控", icon: "screen" },
},
// 可以继续添加更多路由对象
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes3.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// console.log("不满足条件");
}
// 热水
const result4 = sidebarRoutes.find(
(item) => item.name === "HotWater"
);
if (result4) {
// 定义要添加的多个路由对象数组
const additionalRoutes4 = [
{
path: "/waterMonitorDetails",
name: "waterMonitorDetails",
hidden: true,
component: () =>
import("@/views/hotWater/waterMonitor/waterMonitorDetails"),
meta: { title: "热水监控", icon: "screen" },
},
// 可以继续添加更多路由对象
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes4.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// console.log("不满足条件");
}
// 温度监测
const result5 = sidebarRoutes.find((item) => item.name === "TemSys");
if (result5) {
// 定义要添加的多个路由对象数组
const additionalRoutes5 = [
{
path: "/temMonitorDeatils",
name: "temMonitorDeatils",
hidden: true,
component: () =>
import("@/views/temSys/temMonitor/temMonitorDeatils"),
meta: { title: "温度监测", icon: "screen" },
},
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes5.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// console.log("不满足条件");
}
commit("SET_ROUTES", rewriteRoutes);
commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
commit("SET_DEFAULT_ROUTES", sidebarRoutes);

218
src/views/centerairC/enSourceAnalysis/components/machineChart.vue

@ -1,218 +0,0 @@
<template>
<div class="prop-content">
<div class="elect" ref="elect"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {
chartsData: {
type: Array, //
required: true, // true
},
// chartInstance1: "",
// option1: {},
deviceStatus: [], //
},
data() {
return {
chartInstance1: null,
option1: {},
// legendData: ["", "", "", ""],
};
},
watch: {
chartsData: {
handler(newDataA, oldDataA) {
if (newDataA) {
// this.chartInstance1.dispose(); //
this.screenAdapter(); //
// console.log("")
}
},
deep: true, //
},
},
mounted() {
this.initChart1();
this.screenAdapter();
window.addEventListener("resize", this.screenAdapter);
},
destroyed() {
//mounted
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
initChart1() {
this.chartInstance1 = echarts.init(this.$refs.elect);
this.option1 = {
// backgroundColor: '#031a40',
//
tooltip: {
trigger: "item", //
backgroundColor: "rgba(50,50,50,0.7)", //
// borderColor: '#0ac1c7',//
textStyle: {
color: "#fff",
fontSize: "15",
},
// formatter: '{a0}<br />{b0}{c0} kwh'//1.
formatter: "{b0}:{c0} kwh", //1.
// formatter:function(params){ //2.,return dom
// console.log('params',params)
// return params[0].name
// }
},
//
// backgroundColor: '#081736',
series: [
{
name: "详情",
type: "pie",
minAngle: 2, //0 ~ 360
radius: ["30%", "50%"],
center: ["50%", "50%"],
emphasis: {
scale: true, //
},
color: [
"#0ac1c7",
"#deb140",
"#49dff0",
"#034079",
"#6f81da",
"#00ffb4",
,
"#FFE900",
"#F5B157",
"#1DA7FF",
"#2967EA",
],
},
],
};
//
this.chartInstance1.setOption(this.option1);
},
//
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = (this.$refs.elect.offsetWidth / 100) * 2.4;
// console.log("chartsData", this.chartsData)
// value
for (let i = 0; i < this.chartsData.length; i++) {
this.chartsData[i].value = parseFloat(this.chartsData[i].value);
}
var scale = 1;
var echartData = this.chartsData;
var rich = {
yellow: {
color: "#ffc72b",
fontSize: titleFontSize * 1.5,
padding: [5, 4],
align: "center",
},
total: {
color: "#ffc72b",
fontSize: titleFontSize * 1.4,
align: "center",
},
white: {
color: "#fff",
align: "center",
fontSize: titleFontSize * 1.4,
padding: [5, 0],
},
blue: {
color: "#49dff0",
fontSize: titleFontSize * 1.09,
align: "center",
},
hr: {
borderColor: "#eee",
width: "100%",
borderWidth: titleFontSize * 0.1,
height: 0,
},
};
//optionoption
const option1 = {
tooltip: {
textStyle: {
fontSize: titleFontSize * 1.3,
},
},
series: [
{
label: {
formatter: function (params, ticket, callback) {
var total = 0;
var percent = 0;
echartData.forEach(function (value, index, array) {
total += value.value;
});
if (total !== 0) {
percent = ((params.value / total) * 100).toFixed(2);
}
return (
"{white|" +
params.name +
"}\n" +
"{hr|}\n" +
"{yellow|" +
params.value +
"}" +
"{blue| (" +
(total !== 0 ? percent : 0) +
"%)}"
);
},
rich: rich,
},
data: echartData,
labelLine: {
//线
length: titleFontSize * 2,
length2: 0,
lineStyle: {
color: "#fff",
},
},
itemStyle: {
// color: "#052f37"
borderRadius: 5,
borderColor: "#052f37",
borderWidth: 2,
},
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(option1);
//resize
this.chartInstance1.resize();
},
},
};
</script>
<style lang="scss" scoped>
.prop-content {
color: rgb(243, 223, 106);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
.elect {
width: 100%;
height: 3.3rem;
}
}
</style>

672
src/views/centerairC/enSourceAnalysis/components/machineRoom.vue

@ -1,672 +0,0 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<div class="time-label">时间类型:</div>
<el-radio-group
v-model="dateType"
style="margin-right: 0.24rem"
@change="updateDateType"
>
<el-radio label="hour">小时</el-radio>
<el-radio label="day"></el-radio>
<el-radio label="month"></el-radio>
<el-radio label="year"></el-radio>
</el-radio-group>
<el-date-picker
v-model="timeDate"
:default-time="['00:00:00', '23:59:59']"
type="datetimerange"
range-separator="至"
v-if="dateType == 'hour'"
placeholder="选择日期"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<el-date-picker
v-model="dayDate"
type="daterange"
v-if="dateType == 'day'"
:key="this.dateType"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateChange"
>
</el-date-picker>
<el-date-picker
v-model="monthDate"
type="monthrange"
v-if="dateType == 'month'"
:key="this.dateType"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="yyyy-MM"
@change="dateChange"
>
</el-date-picker>
<div class="years-div" v-if="dateType == 'year'" :key="this.dateType">
<el-date-picker
v-model="startYear"
type="year"
placeholder="选择开始年份"
value-format="yyyy"
>
</el-date-picker>
<div class="years-word"></div>
<el-date-picker
v-model="endYear"
type="year"
placeholder="选择结束年份"
value-format="yyyy"
>
</el-date-picker>
</div>
<!-- <el-select
style="margin-left: 0.1rem"
v-model="systemType"
placeholder="请选择系统类型"
clearable
>
<el-option
v-for="dict in systemTypes"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select> -->
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="exportData">导出</el-button>
</div>
</div>
</div>
<div class="machine">
<div class="machine-left">
<div class="machine-li">
<div class="tit">冷水机组</div>
<div class="machine-center-li">
<div class="machine-context">
<div class="chart">
<machine-chart :chartsData="chiller"></machine-chart>
</div>
</div>
</div>
</div>
<div class="machine-li">
<div class="tit">冷冻水泵</div>
<div class="machine-center-li">
<div class="machine-context">
<div class="chart">
<machine-chart :chartsData="chillerPump"></machine-chart>
</div>
</div>
</div>
</div>
</div>
<div class="machine-center">
<div class="total">
<div class="data1">
<span>冷水机组</span>
<div class="p-class">
<countTo
class="p-class2"
:startVal="startVal"
:endVal="allDataArr[0].value"
:duration="duration"
:separator="separator"
:decimals="2"
ref="CountToPower"
></countTo
>kwh
</div>
</div>
<div class="data2">
<span>冷冻水泵</span>
<div class="p-class">
<countTo
class="p-class2"
:startVal="startVal"
:endVal="allDataArr[1].value"
:duration="duration"
:separator="separator"
:decimals="2"
ref="CountToPower"
></countTo
>kwh
</div>
</div>
<div class="data3">
<span>冷却水泵</span>
<div class="p-class">
<countTo
class="p-class2"
:startVal="startVal"
:endVal="allDataArr[2].value"
:duration="duration"
:separator="separator"
:decimals="2"
ref="CountToPower"
></countTo
>kwh
</div>
</div>
<div class="data4">
<span>冷却塔</span>
<div class="p-class">
<countTo
class="p-class2"
:startVal="startVal"
:endVal="allDataArr[3].value"
:duration="duration"
:separator="separator"
:decimals="2"
ref="CountToPower"
></countTo
>kwh
</div>
</div>
<canvas class="rain"></canvas>
<canvas class="dashed"></canvas>
<div class="sphere">
<div class="sphere-bg"></div>
<div class="sum">
<div class="sum-title">总耗电量</div>
<div class="p-all">
<countTo
:startVal="startVal"
:endVal="allElect"
:duration="duration"
:separator="separator"
:decimals="2"
ref="CountToPower"
></countTo
>kwh
</div>
</div>
</div>
<div class="cicle3"></div>
<div class="cicle4"></div>
<div class="cicle5"></div>
<div class="cicle6"></div>
<div class="cicle7"></div>
<div class="cicle8">
<span>{{ electProp[0] }}%</span>
<p>冷水机组</p>
</div>
<div class="cicle9">
<span>{{ electProp[1] }}%</span>
<p>冷冻水泵</p>
</div>
<div class="cicle10">
<span>{{ electProp[2] }}%</span>
<p>冷却水泵</p>
</div>
<div class="cicle11">
<span>{{ electProp[3] }}%</span>
<p>冷却塔</p>
</div>
</div>
</div>
<div class="machine-right">
<div class="machine-li">
<div class="tit">冷却水泵</div>
<div class="machine-center-li">
<div class="machine-context">
<div class="chart">
<machine-chart :chartsData="coolPump"></machine-chart>
</div>
</div>
</div>
</div>
<div class="machine-li">
<div class="tit">冷却塔</div>
<div class="machine-center-li">
<div class="machine-context">
<div class="chart">
<machine-chart :chartsData="coolTower"></machine-chart>
</div>
</div>
</div>
</div>
</div>
</div>
<el-dialog title="" :visible.sync="dialogVisible" width="750px">
<prop-chart></prop-chart>
</el-dialog>
</div>
</template>
<script>
import { format2 } from "@/utils/datetime";
import machineChart from "./machineChart.vue";
// import propChart from './propChart.vue';
import countTo from "vue-count-to";
import { energyAnalyze, analyzeExport } from "@/api/centerairC/energyManage";
import { listData } from "@/api/system/dict/data";
export default {
components: { machineChart, countTo },
data() {
return {
listLoading: false,
dateType: "hour", //
timeDate: [], //
dayDate: [], //
monthDate: [], //
startYear: "", //
endYear: "", //
startTime: "", //
endTime: "", //
allDataArr: [
{ value: 0 }, //
{ value: 0 },
{ value: 0 },
{ value: 0 },
],
chillerPump: [], //
chiller: [], //
coolPump: [], //
coolTower: [], //
allElect: 0, //
electProp: [], //
dialogVisible: false,
startVal: 0, //
duration: 1000, //
separator: "", //
systemType: "", //
systemTypes: [],
};
},
created() {
//
},
mounted() {
this.initializeTimeDate();
// this.getDictList();
this.getTableData();
},
methods: {
/** 查询系统类型-字典数据列表 */
getDictList() {
let data = {
pageNum: 1,
pageSize: 100,
dictType: "sys_type",
};
listData(data).then((response) => {
this.systemTypes = response.rows;
this.systemType = this.systemTypes[0].dictValue;
this.getTableData();
});
},
//
initializeTimeDate() {
const start = new Date(new Date().setHours(0, 0, 0, 0));
const end = new Date(new Date().setHours(23, 59, 59, 59));
this.timeDate = [format2(start), format2(end)]; //
},
//
updateDateType() {
// this.dateType = this.radio;
console.log(this.dateType);
(this.timeDate = []), //
(this.dayDate = []), //
(this.monthDate = []), //
(this.startYear = ""), //
(this.endYear = ""); //
},
//
dateChange() {
// console.log("", this.timeform.time1);
if (!this.dayDate) {
this.$nextTick(() => {
this.dayDate = [];
});
}
if (!this.monthDate) {
this.$nextTick(() => {
this.monthDate = [];
});
}
},
//
findData() {
console.log("this.dateType", this.dateType);
console.log("this.timeDate", this.timeDate);
switch (this.dateType) {
case "hour":
if (!this.timeDate) {
this.showMessage("请选择时间!", "warning");
} else {
this.getTableData();
}
break;
case "day":
if (this.dayDate.length === 0) {
this.showMessage("请选择时间!", "warning");
} else {
const newLength =
new Date(this.dayDate[1]).getTime() -
new Date(this.dayDate[0]).getTime();
const dayDiff = Math.floor(newLength / (1000 * 60 * 60 * 24));
if (dayDiff > 31) {
this.showMessage(
"最多只能选择30天区间,请重新选择再查询!",
"warning"
);
} else {
this.getTableData();
}
}
break;
case "month":
if (this.monthDate.length === 0) {
this.showMessage("请选择时间!", "warning");
} else {
const [start, end] = this.monthDate;
const startDate = new Date(start);
const endDate = new Date(end);
const startYear = startDate.getFullYear();
const startMonth = startDate.getMonth();
const endYear = endDate.getFullYear();
const endMonth = endDate.getMonth();
const monthDiff =
(endYear - startYear) * 12 + (endMonth - startMonth);
if (monthDiff > 12) {
this.showMessage(
"最多只能选择12个月区间,请重新选择再查询!",
"warning"
);
} else {
this.getTableData();
}
}
break;
case "year":
if (!this.startYear || !this.endYear) {
this.showMessage("请选择全年份区间!", "warning");
} else if (this.startYear > this.endYear) {
this.showMessage("结束年份要大于开始年份!", "warning");
} else {
this.getTableData();
}
break;
default:
break;
}
},
//
showMessage(message, type) {
this.$message({
message: message,
type: type,
});
},
//
getTableData() {
if (this.dateType == "hour") {
this.startTime = format2(this.timeDate[0]);
this.endTime = format2(this.timeDate[1]);
} else if (this.dateType == "day") {
this.startTime = this.dayDate.length > 0 ? this.dayDate[0] : "";
this.endTime = this.dayDate.length > 0 ? this.dayDate[1] : "";
} else if (this.dateType == "month") {
this.startTime = this.monthDate.length > 0 ? this.monthDate[0] : "";
this.endTime = this.monthDate.length > 0 ? this.monthDate[1] : "";
} else if (this.dateType == "year") {
(this.startTime = this.startYear), (this.endTime = this.endYear);
}
let data = {
timeType: this.dateType,
startTime: this.startTime,
endTime: this.endTime,
systemType: "0",
};
console.log("查询数据参数", data);
this.listLoading = true;
energyAnalyze(data).then((res) => {
console.log("能源返回", res);
if (res.code == 200 && res.data.all) {
this.allDataArr = res.data.all;
this.allDataArr = this.allDataArr.map((item) => {
item.value = parseFloat(item.value);
return item;
});
this.chillerPump = res.data.chillerPump;
this.chiller = res.data.chiller;
this.coolPump = res.data.coolPump;
this.coolTower = res.data.coolTower;
console.log("this.allDataArr", this.allDataArr);
//
this.allElect = this.allDataArr.reduce(
(sum, item) => sum + item.value,
0
);
console.log("this.allElect ", this.allElect);
this.electProp = [];
//
this.allDataArr.forEach((item) => {
console.log("两数相除", item.value, this.allElect);
let percentage;
if (this.allElect === 0) {
percentage = 0; // null
} else {
percentage = (parseFloat(item.value) / this.allElect) * 100;
percentage = percentage.toFixed(2);
}
this.electProp.push(percentage);
});
console.log("百分比数组", this.electProp);
} else {
this.chiller = [];
this.chillerPump = [];
this.coolPump = [];
this.coolTower = [];
}
});
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
exportData() {
let data = {
timeType: this.dateType,
startTime: this.startTime,
endTime: this.endTime,
systemType: "0",
};
console.log("导出数据参数", data);
analyzeExport(data).then((res) => {
console.log("导出返回", res);
if (res) {
//
// blob URL
const url = window.URL.createObjectURL(new Blob([res]));
// <a>hrefdownload
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", "机房能耗报表.xls"); //
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// blob URL
window.URL.revokeObjectURL(url);
this.$message({
type: "success",
message: "导出成功!",
});
} else {
this.$message.error("导出失败!");
}
});
// .catch((err) => {
// this.$message.error('!');
// })
},
onReversal() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.machine {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: nowrap;
width: 100%;
.machine-center {
width: 50%;
}
.machine-left,
.machine-right {
display: flex;
flex-direction: column;
width: 25%;
// background: #00be97;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-right: 1px;
.machine-li {
width: 100%;
margin-bottom: 0.3rem;
border: 1px solid rgba(9, 83, 133, 0.5);
box-shadow: inset 0 0 30px rgba(9, 83, 133, 0.4);
position: relative;
border-radius: 0.07rem;
.tit {
padding: 0.1rem 0.1rem 0.1rem 0.25rem;
border-bottom: 1px solid rgba(9, 83, 133, 0.5);
font-size: 0.18rem;
font-weight: 500;
position: relative;
// background: rgba(64, 72, 71, 0.5);
border-radius: 0.07rem 0.07rem 0 0;
box-shadow: 0 0 5px rgba(9, 83, 133, 0.5);
display: flex;
flex-direction: row;
align-items: center;
}
.tit::before {
position: absolute;
content: "";
width: 6px;
height: 6px;
background: rgba(20, 231, 231, 0.9);
box-shadow: 0 0 5px rgba(0, 93, 130, 0.9);
border-radius: 50%;
left: 0.1rem;
top: 0.18rem;
}
.machine-center-li {
width: 100%;
.machine-context {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
.chart {
width: 100%;
height: 330px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
}
}
}
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
.machine {
.machine-left,
.machine-right {
.machine-li {
.tit::before {
width: 0.06rem !important;
height: 0.06rem !important;
}
.machine-center-li {
.machine-context {
.chart {
height: 3.3rem !important;
}
}
}
}
}
}
}
</style>

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

@ -3,17 +3,10 @@
<div class="details-content">
<div class="details-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="机房能耗" name="first">
<machineRoom
v-if="activeName === 'first'"
@switch-tab="switchToEquitesMess"
@switch-fourth="switchToPatrolTem"
></machineRoom>
</el-tab-pane>
<el-tab-pane label="设备能耗" name="second">
<el-tab-pane label="设备热量" name="second">
<equipment v-if="activeName === 'second'"></equipment>
</el-tab-pane>
<el-tab-pane label="设备组能耗" name="three">
<el-tab-pane label="设备组热量" name="three">
<device-energy v-if="activeName === 'three'"></device-energy>
</el-tab-pane>
</el-tabs>
@ -23,30 +16,19 @@
</template>
<script>
import machineRoom from "./components/machineRoom.vue";
import equipment from "./components/equipment.vue";
import DeviceEnergy from "./components/deviceEnergy.vue";
export default {
components: { machineRoom, equipment, DeviceEnergy },
components: { equipment, DeviceEnergy },
data() {
return {
activeName: "first", //
activeName: "second", //
};
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
//switch-tab
// activeName'second'tabtab
switchToEquitesMess() {
this.activeName = "second";
},
switchToPatrolTem() {
// this.activeName = 'fourth';
},
//
},
};
</script>

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

@ -3,7 +3,7 @@
<div class="details-content">
<div class="details-header">
<el-tabs v-model="activeName" @tab-click="handleClick" lazy>
<el-tab-pane label="能耗分析" name="first">
<el-tab-pane label="热量分析" name="first">
<energy-analysis v-if="activeName === 'first'"></energy-analysis>
</el-tab-pane>
<el-tab-pane label="环比分析" name="third">

143
src/views/components/hotWater.vue

@ -1,23 +1,42 @@
<template>
<div class="card-div">
<div
class="card-li room-temp"
v-for="(item, index) in temData"
:key="index"
>
<!-- 二通阀 -->
<div class="card-li">
<div class="card-header">
<h2 class="card-title">{{ item.name }}</h2>
<div class="icon">
<i class="fas fa-home"></i>
<h2 class="card-title">二通阀开度:</h2>
</div>
<div class="thermometer">
<div class="temprogress" :style="{ width: twoValveValue + '%' }"></div>
</div>
<div class="temperature">
<span
v-if="twoValveItem && twoValveItem.status === 0"
class="error-text"
>异常</span
>
<span v-else>{{ twoValveValue }}%</span>
</div>
</div>
<!-- 三通阀 -->
<div class="card-li">
<div class="card-header">
<h2 class="card-title">三通阀开度:</h2>
</div>
<div class="thermometer">
<div
class="temprogress"
:style="{ height: item.value * 2 + '%' }"
:style="{ width: threeValveValue + '%' }"
></div>
</div>
<div class="temperature">{{ item.value }}</div>
<div class="temperature">
<span
v-if="threeValveItem && threeValveItem.status === 0"
class="error-text"
>异常</span
>
<span v-else>{{ threeValveValue }}%</span>
</div>
</div>
</div>
</template>
@ -37,27 +56,35 @@ export default {
temData: [],
};
},
watch: {
subData: {
immediate: true, //
handler(newVal) {
console.log("检测到传过来的温度数据", this.subData);
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
let data = newVal;
this.temData1 = "";
this.temData2 = "";
this.temData = newVal;
data.forEach((item) => {
if (item.name.includes("回水")) {
this.temData1 = parseInt(item.value);
}
if (item.name.includes("供水")) {
this.temData2 = parseInt(item.value);
}
});
}
computed: {
//
twoValveItem() {
return this.subData.find(
(item) => item.deviceTypeName === "二通阀阀门开度"
);
},
//
threeValveItem() {
return this.subData.find(
(item) => item.deviceTypeName === "三通阀阀门开度"
);
},
//
twoValveValue() {
if (!this.twoValveItem || this.twoValveItem.status === 0) return 0;
// 0-100
const value = parseFloat(this.twoValveItem.curValue) || 0;
return Math.min(Math.max(value, 0), 100);
},
//
threeValveValue() {
if (!this.threeValveItem || this.threeValveItem.status === 0) return 0;
// 0-100
const value = parseFloat(this.threeValveItem.curValue) || 0;
return Math.min(Math.max(value, 0), 100);
},
},
};
@ -66,17 +93,14 @@ export default {
<style lang="scss" scoped>
.card-div {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
margin: 0.1rem 0;
padding: 20px;
.card-li {
width: 50%;
width: 100%;
display: flex;
flex-direction: column;
flex-direction: row;
align-items: center;
justify-content: center;
margin: 10px;
.card-header {
display: flex;
justify-content: space-between;
@ -90,54 +114,31 @@ export default {
.temperature {
font-size: 20px;
font-weight: 700;
color: #2ecc71;
position: relative;
display: inline-block;
}
.thermometer {
height: 100px;
width: 25px;
width: calc(100% - 250px);
min-width: 200px;
height: 15px;
background: #3d5581;
border-radius: 20px;
margin: 0 auto 0.1rem;
margin: 0 0.1rem;
overflow: hidden;
box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.1);
position: relative;
}
.temprogress {
position: absolute;
bottom: 0;
width: 100%;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
background: linear-gradient(to top, #3498db, #2ecc71) !important;
}
left: 0;
height: 100%;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
background: linear-gradient(to right, #3498db, #2ecc71) !important;
}
.card-li:nth-child(1),
.card-li:nth-child(2) {
padding-bottom: 15px;
}
}
@media (min-width: 2000px) {
.card-div {
.card-li {
.card-header {
.card-title {
font-size: 0.15rem !important;
}
}
.temperature {
font-size: 0.2rem !important;
}
.thermometer {
height: 1.8rem !important;
width: 0.4rem !important;
border-radius: 0.2rem !important;
}
.temprogress {
border-top-left-radius: 0.2rem !important;
border-top-right-radius: 0.2rem !important;
}
}
}
}
</style>

600
src/views/components/viewColdSys.vue

@ -1,41 +1,25 @@
<template>
<div class="energy_content">
<div class="sys_charts" ref="sys_charts"></div>
<div class="eer">实时EER</div>
<div class="eer">{{ title }}</div>
<div class="bad" v-if="subData.status === 0">异常</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import { viewMainParams } from "@/api/index";
export default {
props: {
subData: {
type: Array,
type: Object,
required: true,
},
title: "",
},
data() {
return {
chartInstance: null,
option: {},
isShowModule: false,
energyCostText: "eer数据",
dateType: "",
dateUse: "",
timeType: "", //
startTime: "",
endTime: "",
backData: {
usedValue: "0",
maxValue: 100, //
momValueRate: "0%",
yoyValueRate: "0%",
usedMoney: "0",
maxMoney: 100,
momMoneyRate: "0%",
yoyMoneyRate: "0%",
},
useForm: {
useData: 5,
maxData: 10, //
@ -50,7 +34,7 @@ export default {
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
this.$nextTick(() => {
this.echartsData();
this.initChart();
});
}
},
@ -101,33 +85,28 @@ export default {
},
//chartInstance2 线
initChart() {
// 使
const axisLineColor = this.getAxisLineColor(
this.useForm.useData,
this.useForm.maxData
);
this.chartInstance = echarts.init(this.$refs.sys_charts);
// var dataArr = 80;
var dataArr = this.subData.curValue; //
var maxData = 10; //
this.option = {
backgroundColor: "transparent",
// backgroundColor: "#0E1327",
tooltip: {
formatter: "{a} <br/>{b} : {c}",
formatter: "{a} <br/>{b} : {c}%",
},
series: [
{
name: "内部动态阴影",
name: "外部线",
type: "gauge",
center: ["50%", "100%"],
startAngle: 180,
endAngle: -0,
radius: "155%",
z: 1,
splitNumber: 10,
radius: "100%", //
startAngle: 225,
endAngle: -45,
axisLine: {
lineStyle: {
color: axisLineColor,
//
// width: 80,
color: [
[1, "#31F3FF"], //
],
width: 1,
},
},
axisLabel: {
@ -139,49 +118,52 @@ export default {
splitLine: {
show: false,
},
itemStyle: {
show: false,
},
textStyle: {
formatter: function (value) {
if (value !== 0) {
return parseInt(value);
} else {
return 0;
}
},
offsetCenter: [0, 5],
detail: {
padding: [0, 0, 0, 0],
// fontSize: titleFontSize * 1.2,
color: "#EDFFFD",
},
show: false,
},
title: {
//
show: false,
},
pointer: {
},
{
name: "外部刻度",
type: "gauge",
radius: "100%",
min: 0, //
max: maxData, //
splitNumber: 10, //
startAngle: 225,
endAngle: -45,
axisLine: {
show: false,
lineStyle: {
color: [[1, "rgba(0,0,0,0)"]],
},
}, //线
axisLabel: {
show: true,
color: "#31F3FF",
fontSize: 9, //
distance: -15, //
}, //
axisTick: {
show: false,
}, //
splitLine: {
show: false,
},
},
{
//
name: "蓝色背景",
name: "内部宽线条",
type: "gauge",
center: ["50%", "100%"],
//
startAngle: 200,
//
endAngle: -20,
radius: "155%",
z: 0, //
splitNumber: 10,
radius: "77%",
startAngle: 225,
endAngle: -45,
axisLine: {
lineStyle: {
color: [
[1, "#01366d"], //
],
color: [[1, "#122B3C"]],
width: 20,
},
},
axisLabel: {
@ -193,43 +175,25 @@ export default {
splitLine: {
show: false,
},
itemStyle: {
show: false,
},
textStyle: {
detail: {
show: false,
},
title: {
show: false,
},
pointer: {
show: false,
},
},
{
name: "内部大边框",
name: "内部细线条",
type: "gauge",
z: 2,
min: 0,
max: this.useForm.maxData,
splitNumber: 10,
radius: "180%",
center: ["50%", "100%"],
startAngle: 180,
endAngle: -0,
radius: "43%",
startAngle: 225,
endAngle: -45,
axisLine: {
lineStyle: {
color: [[1, "#023B80"]],
width: 3,
//
shadowColor: "rgba(14,31,73)",
shadowBlur: 6,
shadowOffsetX: 0,
color: [[1, "#385264"]],
width: 1,
},
},
tooltip: {
show: false,
},
axisLabel: {
show: false,
},
@ -239,223 +203,154 @@ export default {
splitLine: {
show: false,
},
itemStyle: {
show: false,
},
detail: {
show: false,
},
title: {
//
show: false,
},
pointer: {
show: false,
},
},
{
name: "指针上的圆",
//
type: "pie",
tooltip: {
show: false,
},
emphasis: {
scale: false, //
},
legendHoverLink: false,
radius: ["0%", "70%"],
center: ["50%", "100%"],
startAngle: 120,
endAngle: -0,
labelLine: {
show: false,
},
name: "间隔条形",
type: "gauge",
radius: "98%",
z: 4,
splitNumber: 20, //
startAngle: 225,
endAngle: -45,
axisLine: {
lineStyle: {
color: [[1, "#F2BF59"]],
width: 3,
//
shadowColor: "rgba(14,31,73)",
shadowBlur: 60,
shadowOffsetX: 0,
opacity: 0,
},
},
label: {
axisLabel: {
show: false,
},
data: [
{
value: 120,
itemStyle: {
color: "#00223a",
},
axisTick: {
show: true,
length: 10,
splitNumber: 1,
lineStyle: {
color: "#122B3C",
width: 0.5,
},
],
z: 4,
},
{
name: "指针上的渐变圆",
//-
type: "pie",
tooltip: {
splitLine: {
show: false,
},
emphasis: {
scale: false, //
},
legendHoverLink: false,
radius: ["0%", "70%"],
center: ["50%", "100%"],
startAngle: 120,
endAngle: 0,
labelLine: {
detail: {
show: false,
},
axisLine: {
lineStyle: {
color: [[1, "#F2BF59"]],
width: 3,
//
shadowColor: "rgba(14,31,73)",
shadowBlur: 60,
shadowOffsetX: 0,
},
title: {
show: false,
},
z: 5,
},
{
//
name: this.energyCostText,
name: "数据",
type: "gauge",
radius: "175%",
center: ["50%", "100%"],
min: 0, //
max: this.useForm.maxData, //
splitNumber: 0, //
startAngle: 180,
endAngle: -0,
radius: "70.5%",
z: 3,
startAngle: 225,
max: maxData,
endAngle: -45,
axisLine: {
show: false,
}, //线
axisLabel: {
show: true,
color: "rgba(4,112,212,1)",
// distance: 16,
// fontSize: 12,
formatter: (value) => {
// 0
if (value === 0 || value == this.useForm.maxData) {
// 100
return value;
}
return "";
},
}, //-
axisTick: {
show: true,
// splitNumber: 5,
lineStyle: {
color: "rgba(4,112,212,1)", //
// width: 3,
color: [
[dataArr / maxData, "#31F3FF"], //
[1, "#16414D"], //-
],
width: 10,
},
// length: 6,
}, //
splitLine: {
show: true,
// length: 6,
lineStyle: {
color: "rgba(106, 104, 228, 0.5)", //
},
}, //线
itemStyle: {
tooltip: {
show: false,
},
detail: {
axisLabel: {
show: false,
},
title: {
//
axisTick: {
show: false,
},
data: [
{
name: this.dateUse,
value: this.useForm.useData,
splitLine: {
show: false,
},
],
itemStyle: {
color: "#EDF85B",
detail: {
show: true,
fontWeight: "bold",
fontSize: 18,
offsetCenter: [0, "60%"], //
color: "#31F3FF",
},
pointer: {
show: true,
length: "60%",
radius: "30%",
shape: "triangle", // 使
// width: 15, //
length: "75%", //
width: 2, //
itemStyle: {
color: "rgb(3, 105, 206,0.5)", //
// shadowColor: "rgb(104, 194, 247, 1)", //
shadowBlur: 20, //
color: "#31F3FF", //
borderWidth: 0,
shadowColor: "rgba(255, 107, 53, 0.5)", //
shadowBlur: 10, //
},
},
animationDuration: 4000,
z: 2,
data: [
{
name: "",
value: dataArr,
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
screenAdapter() {
const titleFontSize = this.$refs.sys_charts.offsetWidth / 18;
const adapterOption = {
series: [
// -
{
name: "内部动态阴影",
type: "gauge",
axisLine: {
lineStyle: {
width: titleFontSize * 1,
},
name: "内圆环",
type: "pie",
radius: "10%",
hoverAnimation: false,
tooltip: {
show: false,
},
cursor: "default",
labelLine: {
normal: {
show: false,
},
{
name: "蓝色背景",
type: "gauge",
axisLine: {
lineStyle: {
width: titleFontSize * 1,
},
itemStyle: {
color: "#08ACDF",
},
animation: false,
data: [1],
},
// -
{
//
name: this.energyCostText,
axisLabel: {
distance: titleFontSize,
fontSize: titleFontSize / 4,
name: "内圆环2",
type: "pie",
radius: "5%",
hoverAnimation: false,
cursor: "default",
tooltip: {
show: false,
},
axisTick: {
distance: -(titleFontSize / 70),
lineStyle: {
width: titleFontSize / 20,
labelLine: {
normal: {
show: false,
},
length: titleFontSize / 5,
}, //
splitLine: {
distance: -(titleFontSize / 70),
lineStyle: {
width: titleFontSize / 20,
},
length: titleFontSize / 3.6,
}, //线
pointer: {
width: titleFontSize / 2, //
itemStyle: {
color: "#31F3FF",
},
animation: false,
data: [1],
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
screenAdapter() {
const titleFontSize = this.$refs.sys_charts.offsetWidth / 18;
const adapterOption = {
series: [],
};
this.chartInstance.setOption(adapterOption);
this.chartInstance.resize();
},
@ -472,97 +367,97 @@ export default {
);
const titleFontSize = this.$refs.sys_charts.offsetWidth / 20;
const adapterOption = {
series: [
{
name: "内部动态阴影",
axisLine: {
lineStyle: {
color: axisLineColor,
//
// width: 80,
},
},
},
{
name: "内部大边框",
min: 0,
max: this.useForm.maxData,
},
{
name: "指针上的圆",
data: [
{
value: 5,
},
],
},
{
name: "指针上的渐变圆",
label: {
show: true,
position: "center", //
offset: [0, -titleFontSize * 0.6], // 10
formatter: function () {
// HTML 使 rich
return `{line|${that.useForm.useData}}`;
},
rich: {
line: {
color: "#fff", //
fontSize: titleFontSize, //
lineHeight: 5, //
},
},
},
data: [
{
value: 0,
itemStyle: {
//
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgb(4,112,212)", //
},
{
offset: 0.3,
color: "rgba(0, 46, 93)", //
},
],
global: false, // false
},
},
},
],
},
{
//
name: this.energyCostText,
max: this.useForm.maxData, //
axisLabel: {
formatter: (value) => {
// 0
if (value === 0 || value == this.useForm.maxData) {
// 100
return value;
}
return "";
},
},
data: [
{
name: this.dateUse,
value: this.useForm.useData,
},
],
},
],
// series: [
// {
// name: "",
// axisLine: {
// lineStyle: {
// color: axisLineColor,
// //
// // width: 80,
// },
// },
// },
// {
// name: "",
// min: 0,
// max: this.useForm.maxData,
// },
// {
// name: "",
// data: [
// {
// value: 5,
// },
// ],
// },
// {
// name: "",
// label: {
// show: true,
// position: "center", //
// offset: [0, -titleFontSize * 0.6], // 10
// formatter: function () {
// // HTML 使 rich
// return `{line|${that.useForm.useData}}`;
// },
// rich: {
// line: {
// color: "#fff", //
// fontSize: titleFontSize, //
// lineHeight: 5, //
// },
// },
// },
// data: [
// {
// value: 0,
// itemStyle: {
// //
// color: {
// type: "linear",
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: "rgb(4,112,212)", //
// },
// {
// offset: 0.3,
// color: "rgba(0, 46, 93)", //
// },
// ],
// global: false, // false
// },
// },
// },
// ],
// },
// {
// //
// name: this.energyCostText,
// max: this.useForm.maxData, //
// axisLabel: {
// formatter: (value) => {
// // 0
// if (value === 0 || value == this.useForm.maxData) {
// // 100
// return value;
// }
// return "";
// },
// },
// data: [
// {
// name: this.dateUse,
// value: this.useForm.useData,
// },
// ],
// },
// ],
};
this.chartInstance.setOption(adapterOption);
//resize
@ -588,9 +483,24 @@ export default {
}
.eer {
font-size: 18px;
margin-top: 25px;
}
}
.bad {
font-size: 18px;
margin-top: 5px;
color: red;
// animation: colorBlink 1s infinite;
}
@keyframes colorBlink {
0%,
100% {
color: #ff0000;
} /* 亮红 */
50% {
color: #cc0000;
} /* 暗红 */
}
// 2000px
@media (min-width: 2000px) {
.sys_charts {

20
src/views/heatRecoverySys/deviceMonitor/index.vue

@ -0,0 +1,20 @@
<template>
<div></div>
</template>
<script>
export default {
created() {
this.toPage();
},
methods: {
toPage() {
console.log("需要跳转的");
//
this.$router.push("/monitorCenter");
},
},
};
</script>
<style></style>

1030
src/views/heatRecoverySys/deviceMonitor/monitorCenter.vue

File diff suppressed because it is too large Load Diff

3
src/views/heatRecoverySys/thermalAnalysis/index.vue

@ -0,0 +1,3 @@
<template>
<div>222</div>
</template>

660
src/views/index.vue

@ -62,90 +62,161 @@
</div>
</div>
<div class="project-data">
<div class="special-div" style="width: 60%">
<div class="special-div" style="width: 49.4%">
<div class="special-top">
<div class="special-title">项目概况</div>
<div class="special-title">出水温度</div>
</div>
<div class="overview">
<div class="overview-li" @click="goEnergy">
<div>总耗电量(kwh)</div>
<div class="overview-details">{{ projectView.totalEle }}</div>
<div>离心机高温出水温度</div>
<div
class="overview-details"
v-html="getTempDisplay('离心机高温出水温度', outWaterTemperature)"
></div>
</div>
<div class="overview-li" @click="goEnergy">
<div>总热水补水()</div>
<div class="overview-details">
{{ projectView.totalWater }}
</div>
<div>中温换热出水温度</div>
<div
class="overview-details"
v-html="getTempDisplay('中温换热出水温度', outWaterTemperature)"
></div>
</div>
<div class="overview-li" @click="goEnergy">
<div>总蒸汽流量()</div>
<div class="overview-details">
{{ projectView.totalGas }}
</div>
<div>低温1换热出水温度</div>
<div
class="overview-details"
v-html="getTempDisplay('低温1换热出水温度', outWaterTemperature)"
></div>
</div>
<div class="overview-li" @click="goEnergy">
<div>总产冷量(kw)</div>
<div class="overview-details">
{{ projectView.totalCold }}
<div>低温2换热出水温度</div>
<div
class="overview-details"
v-html="getTempDisplay('低温2换热出水温度', outWaterTemperature)"
></div>
</div>
</div>
<div class="overview-li" @click="goEnergy">
<div>今年耗电量(kwh)</div>
<div class="overview-details">
{{ projectView.yearEle }}
</div>
<div class="special-div" style="width: 49.4%">
<div class="special-top">
<div class="special-title">热量数据</div>
</div>
<div class="overview">
<div class="overview-li" @click="goEnergy">
<div>今年热水补水()</div>
<div>生产积累热量</div>
<div class="overview-details">
{{ projectView.yearWater }}
{{ heatData.productionHeatSum }}GJ
</div>
</div>
<div class="overview-li" @click="goEnergy">
<div>今年蒸汽流量()</div>
<div>散热累计热量</div>
<div class="overview-details">
{{ projectView.yearGas }}
{{ heatData.dissipationHeatSum }}GJ
</div>
</div>
<div class="overview-li" @click="goEnergy">
<div>今年产冷量(kw)</div>
<div>总热量回收</div>
<div class="overview-details">
{{ projectView.yearCold }}
</div>
{{ heatData.totalHeatRecoverySum }}GJ
</div>
</div>
<div class="overview-li" @click="goEnergy">
<div>热利用率</div>
<div class="overview-details">{{ heatData.heatUtilization }}%</div>
</div>
<div class="special-div" style="width: 39%">
<div class="special-top">
<div class="special-title">冷源系统</div>
</div>
<view-energy></view-energy>
</div>
</div>
<div class="project-bie">
<div class="special-div" style="width: 49.4%">
<div class="special-top">
<div class="special-title">系统数据</div>
</div>
<div class="hot-tem">
<div class="tem-li">
<div class="tem-title">离心机入口温度</div>
<div
class="tem-detail"
v-html="getTempDisplay('离心机入口温度', systemData)"
></div>
</div>
<div class="tem-li">
<div class="tem-title">离心机出水温度</div>
<div
class="tem-detail"
v-html="getTempDisplay('离心机出水温度', systemData)"
></div>
</div>
<div class="tem-li">
<div class="tem-title">保障进水温度</div>
<div
class="tem-detail"
v-html="getTempDisplay('保障进水温度', systemData)"
></div>
</div>
</div>
<div class="pressure">
<view-cold-sys
:subData="getDeviceData('离心机进水压力')"
:title="'离心机进水压力'"
></view-cold-sys>
<view-cold-sys
:subData="getDeviceData('离心机出水压力')"
:title="'离心机出水压力'"
></view-cold-sys>
<view-cold-sys
:subData="getDeviceData('离心机压差')"
:title="'离心机压差'"
></view-cold-sys>
</div>
</div>
<div class="bir-right">
<div class="special-div">
<div class="special-top">
<div class="special-title">冷源能耗</div>
<div class="special-title">阀门开度</div>
</div>
<view-cold-sys :subData="coldSys"></view-cold-sys>
<hot-water :subData="valveData"></hot-water>
</div>
<div class="later-data">
<div class="special-div">
<div class="special-top">
<div class="special-title">热水系统</div>
<div class="special-title">回收数据</div>
</div>
<hot-water :subData="hotWaterSys"></hot-water>
<div class="hot-data">
<div class="hot-li">
<div class="hot-title">瞬时热量:</div>
<div class="hot-detail">{{heatRecoveryData.instantaneousHeatSum}}GJ/h</div>
</div>
<div class="hot-li">
<div class="hot-title">日累计热量:</div>
<div class="hot-detail">{{heatRecoveryData.dailyAccumulatedHeat}}GJ</div>
</div>
<div class="hot-li">
<div class="hot-title">累计热量:</div>
<div class="hot-detail">{{heatRecoveryData.accumulatedHeatSum}}GJ</div>
</div>
<div class="special-div">
<div class="special-top">
<div class="special-title">风柜系统</div>
</div>
<airc-and-windc-meter :subData="airAndWindSys"></airc-and-windc-meter>
</div>
<div class="special-div">
<div class="special-top">
<div class="special-title">温度系统</div>
<div class="special-title">应用测数据</div>
</div>
<div class="hot-data">
<div class="hot-li">
<div class="hot-title">瞬时热量:</div>
<div class="hot-detail">{{applicationData.instantaneousHeatSum}}GJ/h</div>
</div>
<div class="hot-li">
<div class="hot-title">日累计热量:</div>
<div class="hot-detail">{{applicationData.dailyAccumulatedHeat}}GJ</div>
</div>
<div class="hot-li">
<div class="hot-title">累计热量:</div>
<div class="hot-detail">{{applicationData.accumulatedHeatSum}}GJ</div>
</div>
</div>
</div>
</div>
<tem-meter :subData="temSys"></tem-meter>
</div>
</div>
<el-dialog
@ -182,27 +253,15 @@
</template>
<script>
import * as echarts from "echarts";
import { imgUrl } from "@/utils/global";
import {
introduction,
changeLogo,
viewProfile,
viewMainParams,
} from "@/api/index";
import viewEnergy from "./components/viewEnergy.vue";
import { introduction, changeLogo, ersDatas } from "@/api/index";
import ViewColdSys from "./components/viewColdSys.vue";
import HotWater from "./components/hotWater.vue";
import AircAndWindcMeter from "./components/aircAndWindcMeter.vue";
import TemMeter from "./components/temMeter.vue";
export default {
components: {
viewEnergy,
ViewColdSys,
HotWater,
AircAndWindcMeter,
TemMeter,
},
data() {
return {
@ -214,51 +273,22 @@ export default {
buildingArea: "",
operateStartTime: "",
},
projectView: {
totalEle: "",
totalWater: "",
totalGas: "",
totalCold: "",
yearEle: "",
yearWater: "",
yearGas: "",
yearCold: "",
},
heatData: {}, //
systemData: [], //
valveData: [], //
outWaterTemperature: [], //
applicationData: {}, //
heatRecoveryData: {}, //
coldSys: [],
hotWaterSys: [],
dialogVisible: false,
selectedFile: null,
viewImageUrl: "",
chartInstance: null,
data1: [],
data2: [],
xTable: [],
chartsData1: null,
chartsData2: null,
isShowHome: true,
//
coldSys: [],
hotWaterSys: [],
airAndWindSys: [],
temSys: [],
};
},
mounted() {
this.getProject();
this.getHomeData();
this.getSubData();
// //
// setTimeout(() => {
// this.requestFullscreen();
// }, 100); // 100
// this.initChart();
// window.addEventListener("resize", this.screenAdapter);
// this.screenAdapter();
// this.getChartsData();
},
destroyed() {
//mounted
// window.removeEventListener("resize", this.screenAdapter);
this.getErsData();
},
methods: {
//
@ -373,270 +403,91 @@ export default {
}
});
},
//
getHomeData() {
viewProfile().then((res) => {
//
getErsData() {
let data = {
systemType: "7",
};
ersDatas(data).then((res) => {
if (res.code == 200) {
this.projectView = res.rows[0];
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);
}
});
},
goEnergy(){
this.$router.push("/comprehensiveEnergy/systemEnergy")
},
//chartInstance
initChart() {
this.chartInstance = echarts.init(this.$refs.charts_ref);
this.option = {
tooltip: {
trigger: "axis",
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
legend: {
data: ["消费总金额(元)", "消费总次数(次)"],
icon: "cricle", //
// //
textStyle: {
color: "#ffff",
fontSize: 12, //
},
left: "center",
top: "10",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// data: [
// "1",
// "2",
// "3",
// "4",
// "5",
// "6",
// "7",
// "8",
// "9",
// "10",
// "11",
// "12",
// "13",
// "14",
// "15",
// "16",
// "17",
// "18",
// "19",
// "20",
// "21",
// "22",
// "23",
// "24",
// ],
data: this.xTable,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
// X
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
},
yAxis: {
miniInterval: 5,
type: "value",
// name: "",
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
// 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: [
{
name: "消费总金额(元)",
type: "line",
// data: [
// 20, 42, 12, 43, 22, 56, 22, 7, 88, 34, 62, 12, 23, 41, 23, 22, 87,
// 56, 54, 34, 33, 10, 32, 54, 39, 27,
// ],
data: this.data1,
itemStyle: {
color: " #08c8ff",
},
},
{
name: "消费总次数(次)",
type: "line",
// data: [
// 40, 42, 2, 45, 32, 16, 92, 7, 88, 34, 62, 12, 23, 41, 23, 22, 43,
// 56, 524, 32, 3, 11, 32, 54, 39, 27,
// ],
data: this.data2,
itemStyle: {
color: "#277dff",
},
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
// + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = (this.$refs.charts_ref.offsetWidth / 100) * 0.8;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
},
//
getChartsData() {
const now = new Date();
const startDate = new Date(
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() - 30)
// systemData
addCentrifugePressureDiff() {
//
const inletPressure = this.systemData.find(
(item) => item.deviceTypeName === "离心机进水压力"
);
const endDate = new Date(
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() - 1)
const outletPressure = this.systemData.find(
(item) => item.deviceTypeName === "离心机出水压力"
);
const startDateStr = startDate.toISOString().slice(0, 10);
const endDateStr = endDate.toISOString().slice(0, 10);
let params = {
page: 0,
limit: 10,
startDate: startDateStr,
endDate: endDateStr,
type: "projectDay",
buildingName: "",
};
// console.log("30", params)
findTableData(params).then((res) => {
// console.log("30", res)
if (res) {
(this.data1 = []),
(this.data2 = []),
(this.xTable = []),
res.data.forEach((item) => {
this.data1.push(item.AmountConsu);
this.data2.push(item.PersonTime);
this.xTable.push(item.DATE);
});
// console.log("xTable------------", this.xTable);
// console.log("data1--------------", this.data1);
// console.log("data2--------------", this.data2);
const adapterOption = {
xAxis: {
data: this.xTable,
},
series: [
{
data: this.data1,
},
{
data: this.data2,
},
],
//
if (inletPressure && outletPressure) {
// -
const pressureDiff =
parseFloat(outletPressure.curValue) -
parseFloat(inletPressure.curValue);
// 00
const status =
inletPressure.status === 0 || outletPressure.status === 0 ? 0 : 1;
//
const pressureDiffObj = {
paramType: "14", //
curTime: null,
orderNum: this.systemData.length + 1, // +1
deviceTypeName: "离心机压差",
otherName: "压差计算值",
deviceName: "离心机压差",
curValue: parseFloat(pressureDiff.toFixed(2)), //
status: status,
};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
// systemData
this.systemData.push(pressureDiffObj);
console.log("添加离心机压差对象:", pressureDiffObj);
} else {
const adapterOption = {
xAxis: {
data: [],
},
series: [
{
data: [],
},
{
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
console.warn("找不到进水压力或出水压力数据");
}
});
},
//
getSubData() {
viewMainParams().then((res) => {
console.log("系统参数返回", res);
console.log("冷源监控返回", res.rows[0]);
this.coldSys = [];
this.hotWaterSys = [];
this.airAndWindSys = [];
this.temSys = [];
if (res.code == 200 && res.rows) {
res.rows.forEach((val) => {
if (val.name.includes("冷源")) {
this.coldSys = val.values;
console.log("this.coldSys111111111111", this.coldSys);
}
if (val.name.includes("热水")) {
this.hotWaterSys = val.values;
}
if (val.name.includes("风柜")) {
this.airAndWindSys = val.values;
}
if (val.name.includes("温度")) {
this.temSys = val.values;
}
});
//
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 === 0) {
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");
},
},
};
@ -704,32 +555,40 @@ export default {
margin: 16px 0;
.overview {
width: 100%;
padding-top: 0.32rem;
padding: 30px 20px 5px 20px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
.overview-li {
cursor: pointer;
width: calc(25%);
height: 1.65rem;
width: 49%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-image: url(../assets/images/overview-img.png);
background-repeat: no-repeat;
background-size: 1.65rem 1.65rem;
justify-content: space-between;
background-position: center center;
margin-bottom: 0.3rem;
margin-bottom: 15px;
font-family: SourceHanSansCN-Regular;
font-size: 0.15rem;
font-size: 15px;
color: #ffffff;
/* 从 rgba(41, 128, 185, 0.8) 渐变到透明 */
background: linear-gradient(
to bottom,
rgba(31, 100, 146, 0.6) 0%,
rgba(33, 65, 87, 0.3) 50%,
rgba(40, 62, 77, 0) 100%
);
border-radius: 8px;
padding: 5px;
color: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
.overview-details {
font-family: DIN-Bold;
font-size: 0.2rem;
font-size: 20px;
color: #15e1fd;
margin-top: 0.05rem;
margin-top: 5px;
}
}
}
@ -744,28 +603,89 @@ export default {
flex-direction: row;
align-items: stretch;
justify-content: space-between;
.special-div {
width: 24.5%;
.pressure {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin-top: 25px;
}
}
@media (max-width: 1485px) {
.overview-li {
width: calc(33.33%) !important;
height: 2.5rem !important;
background-size: 2.5rem 2.5rem !important;
margin-bottom: 0.3rem;
font-size: 0.22rem !important;
.overview-details {
font-size: 0.27rem !important;
.hot-tem {
width: 100%;
padding: 0 20px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: stretch;
flex-wrap: wrap;
margin-top: 25px;
.tem-li {
background-color: rgba(93, 125, 143, 0.5);
width: 32%;
padding: 10px;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 20px;
.tem-title {
font-size: 15px;
font-weight: 600;
color: #ffffff;
}
.tem-detail {
margin-top: 8px;
font-size: 20px;
font-weight: 600;
color: #f89615;
text-align: center;
}
}
.project-bie {
flex-wrap: wrap !important;
}
.bir-right {
width: 49.4%;
display: flex;
flex-direction: column;
justify-content: space-between;
.special-div {
width: 49.5% !important;
margin-bottom: 0.25rem;
width: 100%;
margin-bottom: 20px;
}
.later-data {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
.special-div {
width: 49%;
margin-bottom: 0;
}
.hot-data {
width: 100%;
padding: 25px 25px 5px 25px;
.hot-li {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
.hot-title {
font-size: 15px;
font-weight: 600;
color: #ffffff;
}
.hot-detail {
font-size: 20px;
font-weight: 600;
color: #f5f127;
}
}
}
}
}
}
@media (max-width: 1485px) {
}
// 2000px
@media (min-width: 2000px) {

Loading…
Cancel
Save