Browse Source

还原中央空调系统相关代码

bl_ai
25604 2 weeks ago
parent
commit
eef3af6e60
  1. 6
      .env.development
  2. 2
      .env.production
  3. 2
      package.json
  4. 192
      src/store/modules/permission.js
  5. 218
      src/views/centerairC/enSourceAnalysis/components/machineChart.vue
  6. 672
      src/views/centerairC/enSourceAnalysis/components/machineRoom.vue
  7. 26
      src/views/centerairC/enSourceAnalysis/index.vue
  8. 2
      src/views/centerairC/energyAnalysis/index.vue
  9. 4
      src/views/centerairC/sysMonitor/monitorCenter.vue
  10. 2
      src/views/heatRecoverySys/deviceMonitor/monitorCenter.vue
  11. 2
      src/views/login.vue
  12. 2
      vue.config.js

6
.env.development

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 铭汉空压热回收系统 VUE_APP_TITLE = 铭汉能耗监测控制系统
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
@ -7,11 +7,11 @@ ENV = 'development'
# 开发环境 # 开发环境
# VUE_APP_BASE_API = '/dev-api' # 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_APP_BASE_API = 'http://106.55.173.225:8092' # VUE_APP_BASE_API = 'http://106.55.173.225:8092'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

2
.env.production

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 铭汉空压热回收系统 VUE_APP_TITLE = 铭汉能耗监测控制系统
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'

2
package.json

@ -1,7 +1,7 @@
{ {
"name": "mh", "name": "mh",
"version": "3.8.8", "version": "3.8.8",
"description": "铭汉空压热回收系统", "description": "铭汉能耗监测控制系统",
"author": "铭汉", "author": "铭汉",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

192
src/store/modules/permission.js

@ -41,13 +41,11 @@ const permission = {
const asyncRoutes = filterDynamicRoutes(dynamicRoutes); const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true }); rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
router.addRoutes(asyncRoutes);
// 空压热回收 // 空压热回收
const result2 = sidebarRoutes.find( const resultERS = sidebarRoutes.find(
(item) => item.name === "HeatRecoverySys" (item) => item.name === "HeatRecoverySys"
); );
if (result2) { if (resultERS) {
// 定义要添加的多个路由对象数组 // 定义要添加的多个路由对象数组
const additionalRoutes2 = [ const additionalRoutes2 = [
{ {
@ -70,6 +68,192 @@ const permission = {
// console.log("不满足条件"); // console.log("不满足条件");
} }
// 有中央空调
// 如果动态的路由有中央空调-系统监控-系统监测页面,那就添加一个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"
);
if (result2) {
// 定义要添加的多个路由对象数组
const additionalRoutes2 = [
{
path: "/asSysMonitorDetails",
name: "asSysMonitorDetails",
hidden: true,
component: () =>
import(
"@/views/aircAndWindc/awSysMonitor/asSysMonitorDetails"
),
meta: { title: "系统监控", icon: "screen" },
},
// 可以继续添加更多路由对象
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes2.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// 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_ROUTES", rewriteRoutes);
commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes)); commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
commit("SET_DEFAULT_ROUTES", sidebarRoutes); commit("SET_DEFAULT_ROUTES", sidebarRoutes);

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

@ -0,0 +1,218 @@
<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

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

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

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

4
src/views/centerairC/sysMonitor/monitorCenter.vue

@ -58,7 +58,7 @@
<span class="deepColor">{{ weatherObj.humidity }}</span> <span class="deepColor">{{ weatherObj.humidity }}</span>
<span>%</span> <span>%</span>
</div> </div>
<!-- <div class="weather-li"> <div class="weather-li">
<span>室外含湿</span> <span>室外含湿</span>
<span class="deepColor">{{ weatherObj.humidityRatio }}</span> <span class="deepColor">{{ weatherObj.humidityRatio }}</span>
<span>g/kg</span> <span>g/kg</span>
@ -77,7 +77,7 @@
<span>室外湿球</span> <span>室外湿球</span>
<span class="deepColor">{{ weatherObj.wetBulbTemp }}</span> <span class="deepColor">{{ weatherObj.wetBulbTemp }}</span>
<span></span> <span></span>
</div> --> </div>
</div> </div>
<!-- 系统性能数据 --> <!-- 系统性能数据 -->
<div class="performance"> <div class="performance">

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

@ -17,7 +17,7 @@
src="../../../assets/images/title-right.png" src="../../../assets/images/title-right.png"
alt="" alt=""
/> />
<div class="sys-title" @click="goSys">铭汉空压热回收系统</div> <div class="sys-title" @click="goSys">铭汉能耗监测控制系统</div>
<!-- logo --> <!-- logo -->
<img src="../../../assets/images/logo-3.png" class="sys-logo" alt="" /> <img src="../../../assets/images/logo-3.png" class="sys-logo" alt="" />
<div class="nowTime">{{ formattedDate }}</div> <div class="nowTime">{{ formattedDate }}</div>

2
src/views/login.vue

@ -10,7 +10,7 @@
class="login_img_down" class="login_img_down"
alt="" alt=""
/> />
<div class="sys-title">铭汉空压热回收系统</div> <div class="sys-title">铭汉能耗监测控制系统</div>
<el-form <el-form
ref="loginForm" ref="loginForm"
:model="loginForm" :model="loginForm"

2
vue.config.js

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require("compression-webpack-plugin");
const name = process.env.VUE_APP_TITLE || "铭汉空压热回收系统"; // 网页标题 const name = process.env.VUE_APP_TITLE || "铭汉能耗监测控制系统"; // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口 const port = process.env.port || process.env.npm_config_port || 80; // 端口

Loading…
Cancel
Save