Browse Source

1.生活热水-首页修改热泵总数

2.能源分析-能耗报表去掉楼栋人数、人均用量值
3.用能查询水电表读数添加计算量
4.对接数据分析页面数据
meizhou
selia-zx 6 days ago
parent
commit
46fe8ea70c
  1. 18
      src/api/hotWater/dataAnalysis.js
  2. 495
      src/views/hotWater/dataAnalysis/components/analyzeMonth.vue
  3. 451
      src/views/hotWater/dataAnalysis/components/analyzeYear.vue
  4. 241
      src/views/hotWater/dataAnalysis/index.vue
  5. 10
      src/views/hotWater/energyAnalysis/components/energyReport.vue
  6. 4
      src/views/hotWater/energyAnalysis/components/temReport.vue
  7. 4
      src/views/hotWater/energyAnalysis/components/waterReport.vue
  8. 90
      src/views/hotWater/energyQuery/components/electReading.vue
  9. 94
      src/views/hotWater/energyQuery/components/waterReading.vue
  10. 4
      src/views/hotWater/overview/index.vue

18
src/api/hotWater/dataAnalysis.js

@ -0,0 +1,18 @@
import request from "@/utils/request";
// 数据分析-月
export function queryMonthDatas(query) {
return request({
url: "/hot_energy/analysis/queryMonth",
method: "get",
params: query,
});
}
// 数据分析-年
export function queryYearDatas(query) {
return request({
url: "/hot_energy/analysis/queryYear",
method: "get",
params: query,
});
}

495
src/views/hotWater/dataAnalysis/components/analyzeMonth.vue

@ -1,6 +1,6 @@
<!-- 报表查询-用能查询-年数据 --> <!-- 报表查询-用能查询-年数据 -->
<template> <template>
<div> <div class="analy-table">
<div class="findwatercharts" ref="findwater_ref"></div> <div class="findwatercharts" ref="findwater_ref"></div>
<!-- 表格 --> <!-- 表格 -->
<el-table <el-table
@ -88,6 +88,7 @@
<script> <script>
import { getDay, getMonth, getYear } from "@/utils/datetime"; import { getDay, getMonth, getYear } from "@/utils/datetime";
import { queryMonthDatas } from "@/api/hotWater/dataAnalysis";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
props: { props: {
@ -97,9 +98,12 @@ export default {
chTime: { chTime: {
type: String, type: String,
}, },
jtData: { chBuild: {
type: String, type: String,
}, },
currentIndex: {
type: Number,
},
}, },
data() { data() {
return { return {
@ -124,30 +128,21 @@ export default {
}; };
}, },
watch: { watch: {
chType: { currentIndex: {
immediate: true, immediate: true,
deep: true, deep: true,
handler(newVal, val) { handler(newVal, val) {
// console.log("", newVal); // console.log("", newVal);
this.$nextTick(function () { this.$nextTick(function () {
console.log("子组件接受的type类型", this.chType);
console.log("子组件这时候有building吗", this.chBuild);
this.getMothData(); this.getMothData();
}); });
}, },
}, },
// vuexid
jtData: {
handler(newVal, oldVal) {
// console.log("vuexid", newVal, oldVal);
this.$nextTick(function () {
this.getMothData();
});
},
deep: true,
immediate: true,
},
}, },
mounted() { mounted() {
this.getMothData(); // this.getMothData();
this.initChart1(); this.initChart1();
window.addEventListener("resize", this.screenAdapter); window.addEventListener("resize", this.screenAdapter);
this.screenAdapter(); this.screenAdapter();
@ -160,7 +155,7 @@ export default {
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
// 1 // 1
if (columnIndex === 0) { if (columnIndex === 0) {
return "background-color: #31354e !important;"; return "background-color:rgb(11 ,100, 201) !important;";
} }
}, },
// //
@ -172,180 +167,228 @@ export default {
if (this.chTime) { if (this.chTime) {
this.endTime = this.chTime; this.endTime = this.chTime;
} else { } else {
this.endTime = getMonth(0) this.endTime = getMonth(0);
} }
let params = { let params = {
curDate: this.endTime, curDate: this.endTime,
buildingId: this.endId, buildingId: this.chBuild,
type: this.chType, type: this.chType,
}; };
console.log("月参数", params); console.log("月参数", params);
// this.$api.statementfind.energyMonth(params).then((res) => { queryMonthDatas(params).then((res) => {
// // console.log("", res); // console.log("", res);
// if (res.code == 200) { if (res.code == 200 && res.rows.length > 0) {
// var line1 = []; var line1 = [];
// var line2 = []; var line2 = [];
// var line3 = []; var line3 = [];
// var line4 = []; var line4 = [];
// this.tableData = res.data; this.tableData = res.rows;
// // Object.values // Object.values
// line1 = Object.values(this.tableData[0]).slice(3, 35); line1 = Object.values(this.tableData[0]).slice(3, 35);
// line2 = Object.values(this.tableData[1]).slice(3, 35); line2 = Object.values(this.tableData[1]).slice(3, 35);
// line3 = Object.values(this.tableData[2]).slice(3, 35); line3 = Object.values(this.tableData[2]).slice(3, 35);
// line4 = Object.values(this.tableData[3]).slice(3, 35); line4 = Object.values(this.tableData[3]).slice(3, 35);
// // 线 filter // 线 filter
// this.data1 = line1.filter(function (s) { this.data1 = line1.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// this.data2 = line2.filter(function (s) { this.data2 = line2.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// // //
// var line5 = line3.filter(function (s) { var line5 = line3.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// this.data3 = []; this.data3 = [];
// this.data4 = []; this.data4 = [];
// // % // %
// line5.forEach((item) => { line5.forEach((item) => {
// this.data3.push(item.split("%").join("")); this.data3.push(item.split("%").join(""));
// }); });
// var line6 = line4.filter(function (s) { var line6 = line4.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// line6.forEach((item) => { line6.forEach((item) => {
// this.data4.push(item.split("%").join("")); this.data4.push(item.split("%").join(""));
// }); });
// // 线x // 线x
// // tableData[0] [1] [2] [3], // tableData[0] [1] [2] [3],
// // //
// let newObj = {}; let newObj = {};
// for (let key in this.tableData[0]) { for (let key in this.tableData[0]) {
// if (this.tableData[0][key]) { if (this.tableData[0][key]) {
// newObj[key] = this.tableData[0][key]; newObj[key] = this.tableData[0][key];
// } }
// } }
// // console.log("", newObj); // console.log("", newObj);
// // key // key
// // Object.setPrototypeOf(this.newObj); // Object.setPrototypeOf(this.newObj);
// let data7 = Object.keys(newObj); let data7 = Object.keys(newObj);
// // console.log("x", data7); // console.log("x", data7);
// // //
// let allArr = [ let allArr = [
// "day01", "day01",
// "day02", "day02",
// "day03", "day03",
// "day04", "day04",
// "day05", "day05",
// "day06", "day06",
// "day07", "day07",
// "day08", "day08",
// "day09", "day09",
// "day10", "day10",
// "day11", "day11",
// "day12", "day12",
// "day13", "day13",
// "day14", "day14",
// "day15", "day15",
// "day16", "day16",
// "day17", "day17",
// "day18", "day18",
// "day19", "day19",
// "day20", "day20",
// "day21", "day21",
// "day22", "day22",
// "day23", "day23",
// "day24", "day24",
// "day25", "day25",
// "day26", "day26",
// "day27", "day27",
// "day28", "day28",
// "day29", "day29",
// "day30", "day30",
// "day31", "day31",
// ]; ];
// // //
// function compare(data7, allArr) { function compare(data7, allArr) {
// return data7.filter((v) => { return data7.filter((v) => {
// return allArr.includes(v); return allArr.includes(v);
// }); });
// } }
// // console.log("x", compare(data7, allArr)); // console.log("x", compare(data7, allArr));
// // data7 xx // data7 xx
// this.data8 = []; this.data8 = [];
// compare(data7, allArr).forEach((item) => { compare(data7, allArr).forEach((item) => {
// if (item) { if (item) {
// this.data8.push(item.split("day").join("") + ""); this.data8.push(item.split("day").join("") + "日");
// } }
// }); });
// // console.log("x", this.data8); // console.log("x", this.data8);
// // //
// this.data6 = []; this.data6 = [];
// this.data5 = this.tableData.forEach((item) => { this.data5 = this.tableData.forEach((item) => {
// return this.data6.push(item.itemType); return this.data6.push(item.itemType);
// }); });
// // console.log("data1", this.data1); // console.log("data1", this.data1);
// // console.log("data2", this.data2); // console.log("data2", this.data2);
// // console.log("data3", this.data3); // console.log("data3", this.data3);
// // console.log("data4", this.data4); // console.log("data4", this.data4);
// // console.log("", this.data6); // console.log("", this.data6);
// // //
// var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)), var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)),
// Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4), Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4),
// Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4), Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4),
// Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4); Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4);
// // console.log("Min1", Min1); // console.log("Min1", Min1);
// // console.log("Min2", Min2); // console.log("Min2", Min2);
// // console.log("Max1", Max1); // console.log("Max1", Max1);
// // console.log("Max2", Max2); // console.log("Max2", Max2);
// this.chartInstance1 = echarts.init(this.$refs.findwater_ref); this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
// const adapterOption = { const adapterOption = {
// legend: { legend: {
// data: this.data6, data: this.data6,
// }, },
// xAxis: { xAxis: {
// data: this.data8, data: this.data8,
// }, },
// yAxis: [ yAxis: [
// //y //y
// { {
// min: Min1, min: Min1,
// max: Max1, max: Max1,
// splitNumber: 10, splitNumber: 10,
// interval: (Max1 - Min1) / 10, interval: (Max1 - Min1) / 10,
// }, },
// { {
// min: Min2, min: Min2,
// max: Max2, max: Max2,
// splitNumber: 10, splitNumber: 10,
// interval: (Max2 - Min2) / 10, interval: (Max2 - Min2) / 10,
// }, },
// ], ],
// series: [ series: [
// { {
// name: this.data6[0], name: this.data6[0],
// data: this.data1, data: this.data1,
// }, },
// { {
// name: this.data6[1], name: this.data6[1],
// data: this.data2, data: this.data2,
// }, },
// { {
// name: this.data6[2], name: this.data6[2],
// data: this.data3, data: this.data3,
// }, },
// { {
// name: this.data6[3], name: this.data6[3],
// data: this.data4, data: this.data4,
// }, },
// ], ],
// }; };
// //.chartInstanceoptiondataoption //.chartInstanceoptiondataoption
// this.chartInstance1.setOption(adapterOption); this.chartInstance1.setOption(adapterOption);
// //resize //resize
// this.chartInstance1.resize(); this.chartInstance1.resize();
// } } else {
// }); this.tableData = [];
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: [],
},
xAxis: {
data: [],
},
yAxis: [
//y
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
],
series: [
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
}
});
}, },
// //
outTable() { outTable() {
@ -426,27 +469,27 @@ export default {
if (this.chTime) { if (this.chTime) {
this.endTime = this.chTime; this.endTime = this.chTime;
} else { } else {
this.endTime = getMonth(0) this.endTime = getMonth(0);
} }
let params = { let params = {
curDate: this.endTime, curDate: this.endTime,
buildingId: this.endId, buildingId: this.chBuild,
type: this.chType, type: this.chType,
}; };
console.log("月参数", params); console.log("月参数", params);
// this.$api.statementfind.energyMonth(params).then((res) => { queryMonthDatas(params).then((res) => {
// if (res.code == 200) { if (res.code == 200 && res.rows.length > 0) {
// // console.log(res); // console.log(res);
// const data = this.formatJson(filterVal, res.data); const data = this.formatJson(filterVal, res.rows);
// const autoWidth = true; const autoWidth = true;
// excel.export_json_to_excel({ excel.export_json_to_excel({
// header: tHeader, // header: tHeader, //
// data, // data, //
// filename: "", // filename: "月数据报表", //
// autoWidth: true, // autoWidth: true, //
// }); });
// } }
// }); });
}); });
}, },
//, //,
@ -507,22 +550,26 @@ export default {
boundaryGap: true, boundaryGap: true,
// x // x
axisLabel: { axisLabel: {
// interval: 0, // interval: 0, //x
// rotate: 30, //x30 // rotate: 30, //x30
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
}, },
axisTick: { axisTick: {
show: false, // 线 show: false, // 线
}, },
// x // x
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576",
color: "#707070",
}, },
}, },
//splitLine: { show: true } //x线 splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
}, },
yAxis: [ yAxis: [
//y //y
@ -530,50 +577,53 @@ export default {
type: "value", type: "value",
// y // y
axisLabel: { axisLabel: {
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
}, },
// y // y
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576", // y 线
color: "#707070",
}, },
fontSize: 14, //
}, },
//y线 //y线
splitNumber: 10, // splitNumber: 10,
// y线 // y线
splitLine: { splitLine: {
lineStyle: { lineStyle: {
// color: "#252843", color: "#1a3d62", // 线
color: "#707070", type: "dashed", // 线线
}, },
}, },
//y线
splitNumber: 10,
}, },
{ {
type: "value", type: "value",
// y // y
axisLabel: { axisLabel: {
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
formatter: "{value} %",
}, },
// y // y
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576", // y 线
color: "#707070",
}, },
fontSize: 14, //
}, },
//y线 //y线
splitNumber: 5, // splitNumber: 10,
// y线 // y线
splitLine: { splitLine: {
lineStyle: { lineStyle: {
// color: "#252843", color: "#1a3d62", // 线
color: "#707070", type: "dashed", // 线线
}, },
}, },
//y线
splitNumber: 10,
}, },
], ],
@ -688,4 +738,9 @@ export default {
height: 4.5rem; height: 4.5rem;
/* background-color: pink; */ /* background-color: pink; */
} }
.analy-table >>> .el-table th.el-table__cell.is-leaf,
.analy-table >>> .el-table td.el-table__cell {
border-bottom: 1px solid #093769 !important;
border-right: 1px solid #093769 !important;
}
</style> </style>

451
src/views/hotWater/dataAnalysis/components/analyzeYear.vue

@ -1,6 +1,6 @@
<!-- 报表查询-用能查询-年数据 --> <!-- 报表查询-用能查询-年数据 -->
<template> <template>
<div> <div class="analy-table">
<div class="findwatercharts" ref="findwater_ref"></div> <div class="findwatercharts" ref="findwater_ref"></div>
<!-- 表格 --> <!-- 表格 -->
<el-table <el-table
@ -56,6 +56,7 @@
<script> <script>
import { getYear } from "@/utils/datetime"; import { getYear } from "@/utils/datetime";
import { queryYearDatas } from "@/api/hotWater/dataAnalysis";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
props: { props: {
@ -65,9 +66,12 @@ export default {
chTime: { chTime: {
type: String, type: String,
}, },
jtData: { chBuild: {
type: String, type: String,
}, },
currentIndex: {
type: Number,
},
}, },
data() { data() {
return { return {
@ -92,7 +96,7 @@ export default {
}; };
}, },
watch: { watch: {
chType: { currentIndex: {
immediate: true, immediate: true,
deep: true, deep: true,
handler(newVal, val) { handler(newVal, val) {
@ -102,20 +106,9 @@ export default {
}); });
}, },
}, },
// vuexid
jtData: {
handler(newVal, oldVal) {
// console.log("vuexid", newVal, oldVal);
this.$nextTick(function () {
this.getYearData();
});
},
deep: true,
immediate: true,
},
}, },
mounted() { mounted() {
this.getYearData(); // this.getYearData();
this.initChart1(); this.initChart1();
window.addEventListener("resize", this.screenAdapter); window.addEventListener("resize", this.screenAdapter);
this.screenAdapter(); this.screenAdapter();
@ -128,7 +121,7 @@ export default {
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
// 1 // 1
if (columnIndex === 0) { if (columnIndex === 0) {
return "background-color: #31354e !important;"; return "background-color:rgb(11 ,100, 201) !important;";
} }
}, },
// //
@ -144,157 +137,205 @@ export default {
} }
let params = { let params = {
curDate: this.endTime, curDate: this.endTime,
buildingId: this.endId, buildingId: this.chBuild,
type: this.chType, type: this.chType,
}; };
console.log("年表格参数", params); console.log("年表格参数", params);
// this.$api.statementfind.energyYear(params).then((res) => { queryYearDatas(params).then((res) => {
// // console.log("", res); // console.log("", res);
// if (res.code == 200) { if (res.code == 200 && res.rows.length > 0) {
// var line1 = []; var line1 = [];
// var line2 = []; var line2 = [];
// var line3 = []; var line3 = [];
// var line4 = []; var line4 = [];
// this.tableData = res.data; this.tableData = res.rows;
// // Object.values // Object.values
// line1 = Object.values(this.tableData[0]).slice(3, 15); line1 = Object.values(this.tableData[0]).slice(3, 15);
// line2 = Object.values(this.tableData[1]).slice(3, 15); line2 = Object.values(this.tableData[1]).slice(3, 15);
// line3 = Object.values(this.tableData[2]).slice(3, 15); line3 = Object.values(this.tableData[2]).slice(3, 15);
// line4 = Object.values(this.tableData[3]).slice(3, 15); line4 = Object.values(this.tableData[3]).slice(3, 15);
// // 线 filter // 线 filter
// this.data1 = line1.filter(function (s) { this.data1 = line1.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// this.data2 = line2.filter(function (s) { this.data2 = line2.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// // //
// var line5 = line3.filter(function (s) { var line5 = line3.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// this.data3 = []; this.data3 = [];
// this.data4 = []; this.data4 = [];
// // % // %
// line5.forEach((item) => { line5.forEach((item) => {
// this.data3.push(item.split("%").join("")); this.data3.push(item.split("%").join(""));
// }); });
// var line6 = line4.filter(function (s) { var line6 = line4.filter(function (s) {
// return s && s.trim(); return s && s.trim();
// }); });
// line6.forEach((item) => { line6.forEach((item) => {
// this.data4.push(item.split("%").join("")); this.data4.push(item.split("%").join(""));
// }); });
// // 线x // 线x
// // tableData[0] [1] [2] [3], // tableData[0] [1] [2] [3],
// // //
// let newObj = {}; let newObj = {};
// for (let key in this.tableData[0]) { for (let key in this.tableData[0]) {
// if (this.tableData[0][key]) { if (this.tableData[0][key]) {
// newObj[key] = this.tableData[0][key]; newObj[key] = this.tableData[0][key];
// } }
// } }
// // console.log("", newObj); // console.log("", newObj);
// // key // key
// // Object.setPrototypeOf(this.newObj); // Object.setPrototypeOf(this.newObj);
// let data7 = Object.keys(newObj); let data7 = Object.keys(newObj);
// // console.log("x", data7); // console.log("x", data7);
// // //
// let allArr = [ let allArr = [
// "month01", "month01",
// "month02", "month02",
// "month03", "month03",
// "month04", "month04",
// "month05", "month05",
// "month06", "month06",
// "month07", "month07",
// "month08", "month08",
// "month09", "month09",
// "month10", "month10",
// "month11", "month11",
// "month12", "month12",
// ]; ];
// // //
// function compare(data7, allArr) { function compare(data7, allArr) {
// return data7.filter((v) => { return data7.filter((v) => {
// return allArr.includes(v); return allArr.includes(v);
// }); });
// } }
// // console.log("x", compare(data7, allArr)); // console.log("x", compare(data7, allArr));
// // data7 xx // data7 xx
// this.data8 = []; this.data8 = [];
// compare(data7, allArr).forEach((item) => { compare(data7, allArr).forEach((item) => {
// if (item) { if (item) {
// this.data8.push(item.split("month").join("") + ""); this.data8.push(item.split("month").join("") + "月");
// } }
// }); });
// // console.log("x", this.data8); // console.log("x", this.data8);
// // //
// this.data6 = []; this.data6 = [];
// this.data5 = this.tableData.forEach((item) => { this.data5 = this.tableData.forEach((item) => {
// return this.data6.push(item.itemType); return this.data6.push(item.itemType);
// }); });
// // console.log("data1", this.data1); // console.log("data1", this.data1);
// // console.log("data2", this.data2); // console.log("data2", this.data2);
// // console.log("data3", this.data3); // console.log("data3", this.data3);
// // console.log("data4", this.data4); // console.log("data4", this.data4);
// // console.log("", this.data6); // console.log("", this.data6);
// // //
// var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)), var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)),
// Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4), Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4),
// Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4), Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4),
// Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4); Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4);
// // console.log("Min1", Min1); // console.log("Min1", Min1);
// // console.log("Min2", Min2); // console.log("Min2", Min2);
// // console.log("Max1", Max1); // console.log("Max1", Max1);
// // console.log("Max2", Max2); // console.log("Max2", Max2);
// this.chartInstance1 = echarts.init(this.$refs.findwater_ref); this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
// const adapterOption = { const adapterOption = {
// legend: { legend: {
// data: this.data6, data: this.data6,
// }, },
// xAxis: { xAxis: {
// data: this.data8, data: this.data8,
// }, },
// yAxis: [ yAxis: [
// //y //y
// { {
// min: Min1, min: Min1,
// max: Max1, max: Max1,
// splitNumber: 10, splitNumber: 10,
// interval: (Max1 - Min1) / 10, interval: (Max1 - Min1) / 10,
// }, },
// { {
// min: Min2, min: Min2,
// max: Max2, max: Max2,
// splitNumber: 10, splitNumber: 10,
// interval: (Max2 - Min2) / 10, interval: (Max2 - Min2) / 10,
// }, },
// ], ],
// series: [ series: [
// { {
// name: this.data6[0], name: this.data6[0],
// data: this.data1, data: this.data1,
// }, },
// { {
// name: this.data6[1], name: this.data6[1],
// data: this.data2, data: this.data2,
// }, },
// { {
// name: this.data6[2], name: this.data6[2],
// data: this.data3, data: this.data3,
// }, },
// { {
// name: this.data6[3], name: this.data6[3],
// data: this.data4, data: this.data4,
// }, },
// ], ],
// }; };
// //.chartInstanceoptiondataoption //.chartInstanceoptiondataoption
// this.chartInstance1.setOption(adapterOption); this.chartInstance1.setOption(adapterOption);
// //resize //resize
// this.chartInstance1.resize(); this.chartInstance1.resize();
// } } else {
// }); this.tableData = [];
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: [],
},
xAxis: {
data: [],
},
yAxis: [
//y
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
],
series: [
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
}
});
}, },
// //
outTable() { outTable() {
@ -341,23 +382,23 @@ export default {
} }
let params = { let params = {
curDate: this.endTime, curDate: this.endTime,
buildingId: this.endId, buildingId: this.chBuild,
type: this.chType, type: this.chType,
}; };
console.log("年表格参数", params); console.log("年表格参数", params);
// this.$api.statementfind.energyYear(params).then((res) => { queryYearDatas(params).then((res) => {
// if (res.code == 200) { if (res.code == 200 && res.rows.length > 0) {
// // console.log(res); // console.log(res);
// const data = this.formatJson(filterVal, res.data); const data = this.formatJson(filterVal, res.rows);
// const autoWidth = true; const autoWidth = true;
// excel.export_json_to_excel({ excel.export_json_to_excel({
// header: tHeader, // header: tHeader, //
// data, // data, //
// filename: "", // filename: "年数据报表", //
// autoWidth: true, // autoWidth: true, //
// }); });
// } }
// }); });
}); });
}, },
//, //,
@ -418,22 +459,26 @@ export default {
boundaryGap: true, boundaryGap: true,
// x // x
axisLabel: { axisLabel: {
// interval: 0, // interval: 0, //x
// rotate: 30, //x30 // rotate: 30, //x30
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
}, },
axisTick: { axisTick: {
show: false, // 线 show: false, // 线
}, },
// x // x
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576",
color: "#707070",
}, },
}, },
//splitLine: { show: true } //x线 splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
}, },
yAxis: [ yAxis: [
//y //y
@ -441,50 +486,53 @@ export default {
type: "value", type: "value",
// y // y
axisLabel: { axisLabel: {
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
}, },
// y // y
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576", // y 线
color: "#707070",
}, },
fontSize: 14, //
}, },
//y线 //y线
splitNumber: 10, // splitNumber: 10,
// y线 // y线
splitLine: { splitLine: {
lineStyle: { lineStyle: {
// color: "#252843", color: "#1a3d62", // 线
color: "#707070", type: "dashed", // 线线
}, },
}, },
//y线
splitNumber: 10,
}, },
{ {
type: "value", type: "value",
// y // y
axisLabel: { axisLabel: {
color: "rgba(255,255,255,.7)", color: "rgba(255, 255, 255, 1)",
formatter: "{value} %",
}, },
// y // y
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
// X color: "#365576", // y 线
color: "#707070",
}, },
fontSize: 14, //
}, },
//y线 //y线
splitNumber: 5, // splitNumber: 10,
// y线 // y线
splitLine: { splitLine: {
lineStyle: { lineStyle: {
// color: "#252843", color: "#1a3d62", // 线
color: "#707070", type: "dashed", // 线线
}, },
}, },
//y线
splitNumber: 10,
}, },
], ],
@ -635,4 +683,9 @@ export default {
height: 4.5rem; height: 4.5rem;
/* background-color: pink; */ /* background-color: pink; */
} }
.analy-table >>> .el-table th.el-table__cell.is-leaf,
.analy-table >>> .el-table td.el-table__cell {
border-bottom: 1px solid #093769 !important;
border-right: 1px solid #093769 !important;
}
</style> </style>

241
src/views/hotWater/dataAnalysis/index.vue

@ -1,33 +1,5 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="left-tree">
<!-- el-tree 设置一个固定的高度和滚动条 -->
<div style="height: 7rem; overflow-y: auto">
<el-tree
ref="tree"
:data="treeData"
node-key="id"
:default-expand-all="false"
:default-expanded-keys="expandedKeys"
:auto-expand-parent="true"
icon-class="none"
@node-expand="handleNodeExpand"
@node-collapse="handleNodeCollapse"
:highlight-current="true"
@node-click="handleNodeClick"
>
<template #default="{ node }">
<span class="custom-tree-node">
<!-- 根据节点状态动态设置图标类名 -->
<div class="tree-left">
<i :class="getIconClass(node)" class="custom-tree-icon"></i>
<span class="tree-label">{{ node.label }}</span>
</div>
</span>
</template>
</el-tree>
</div>
</div>
<div class="right-monitor"> <div class="right-monitor">
<div class="buildingDiv"> <div class="buildingDiv">
<div class="buildingDiv-left"> <div class="buildingDiv-left">
@ -42,6 +14,20 @@
<!-- 条件 --> <!-- 条件 -->
<div class="condition"> <div class="condition">
<div class="condition-left"> <div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
@change="handleBuildingChange"
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-select <el-select
style="margin-right: 0.1rem" style="margin-right: 0.1rem"
v-model="analysisType" v-model="analysisType"
@ -94,24 +80,25 @@
<analyze-month <analyze-month
v-if="currentIndex === 0" v-if="currentIndex === 0"
ref="monthRef" ref="monthRef"
:currentIndex="currentIndex"
:chType="analysisType" :chType="analysisType"
:chTime="monthDate" :chTime="monthDate"
:chBuild="building"
></analyze-month> ></analyze-month>
<analyze-year <analyze-year
v-if="currentIndex === 1" v-if="currentIndex === 1"
:currentIndex="currentIndex"
ref="yearRef" ref="yearRef"
:chType="analysisType" :chType="analysisType"
:chTime="yearDate" :chTime="yearDate"
:chBuild="building"
></analyze-year> ></analyze-year>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { spaceTree } from "@/api/region"; import { hotBuildList } from "@/api/hotWater/energyAnalysis";
import { format } from "@/utils/datetime";
import { temList, temHistory } from "@/api/temSys/temMonitor";
import * as echarts from "echarts";
import analyzeMonth from "./components/analyzeMonth.vue"; import analyzeMonth from "./components/analyzeMonth.vue";
import analyzeYear from "./components/analyzeYear.vue"; import analyzeYear from "./components/analyzeYear.vue";
export default { export default {
@ -119,7 +106,9 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
treeData: [], currentName: "",
building: "", //
builds: [], //
analysisType: 1, analysisType: 1,
analysisTypes: [ analysisTypes: [
{ {
@ -134,177 +123,61 @@ export default {
label: "耗能", label: "耗能",
value: 3, value: 3,
}, },
{
label: "维保量",
value: 4,
},
{
label: "使用时间",
value: 5,
},
], ],
monthDate: "", monthDate: "",
yearDate: "", yearDate: "",
timeData2: [{ title: "月" }, { title: "年" }], timeData2: [{ title: "月" }, { title: "年" }],
currentIndex: 0, // currentIndex: null, //
defaultProps: {
children: "children",
label: "label",
},
deviceList: [],
expandedKeys: [],
currentId: "", //id
currentName: "", //
currentLevel: "", //
currentParentId: "", //id
tableData: [], //
chartInstance: null,
option: {},
chartData1: [],
chartData2: [],
bottomData: [],
}; };
}, },
mounted() { mounted() {
this.getSysBuild(); this.getBuildList();
}, },
methods: { methods: {
handleEnter(index) { handleEnter(index) {
this.currentIndex = index; this.currentIndex = index;
// this.renderingBroken(); // this.renderingBroken();
console.log("切换日月");
},
handleBuildingChange(selectedId) {
//
const selectedItem = this.builds.find((item) => item.id === selectedId);
if (selectedItem) {
this.currentName = selectedItem.building_name;
console.log("选中的楼栋 ID:", selectedId);
console.log("选中的楼栋名称:", this.currentName);
//
}
}, },
getSysBuild() { /** 查询楼栋 */
spaceTree().then((res) => { getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// //
console.log("楼栋返回值", res); console.log("楼栋返回值", res);
let newRes = { ...res }; // building_name ""
const filteredRows = res.rows.filter((row, index) => {
if (newRes.data && newRes.data[0] && newRes.data[0].children) { if (index === 0 && row.building_name === "所有") {
newRes.data[0].children = newRes.data[0].children.filter((item) => { return false;
// label ""
return item.label && item.label.includes("热水");
});
}
// 1 4
const targetLevel = 4;
// data[0] 1
if (newRes.data[0]) {
this.removeChildrenAfterLevel(newRes.data[0], 1, targetLevel);
}
console.log("筛选后的新结果", newRes);
this.treeData = newRes.data;
this.$nextTick(() => {
//
this.getExpandedKeys(this.treeData, 1);
if (this.treeData.length > 0) {
//
const lastLevelFirstChild = this.findLastLevelFirstChild(
this.treeData[0]
);
// this.$refs.tree.setCurrentKey(
// this.treeData[0].children[0].children[0].children[0].id
// );
// ,
this.$refs.tree.setCurrentKey(lastLevelFirstChild.id);
//
this.currentId = lastLevelFirstChild.id;
this.currentLevel = lastLevelFirstChild.level;
this.currentName = lastLevelFirstChild.label;
console.log("当前选中节点ID", this.currentId);
console.log("当前选中节点层级", this.currentLevel);
console.log("当前选中节点名称", this.currentName);
// this.getTemList();
} }
return true;
}); });
this.builds = filteredRows;
// console.log("", this.builds);
if (this.builds.length > 0) {
this.building = this.builds[0].id;
this.currentName = this.builds[0].building_name;
console.log("选中的第一个楼栋id-传给子组件", this.building);
this.handleEnter(0); //
}
} }
}); });
}, },
// children
removeChildrenAfterLevel(obj, currentLevel, targetLevel) {
if (currentLevel >= targetLevel) {
// children
obj.children = [];
return;
}
if (obj.children && obj.children.length > 0) {
// children
for (let i = 0; i < obj.children.length; i++) {
this.removeChildrenAfterLevel(
obj.children[i],
currentLevel + 1,
targetLevel
);
}
}
},
//
findLastLevelFirstChild(node, level = 1) {
if (!node.children || node.children.length === 0) {
return {
id: node.id,
level,
label: node.label,
};
}
return this.findLastLevelFirstChild(node.children[0], level + 1);
},
//
getExpandedKeys(nodes, level) {
nodes.forEach((node) => {
if (level <= this.currentId + 4) {
this.expandedKeys.push(node.id);
}
if (node.children) {
this.getExpandedKeys(node.children, level + 1);
}
});
},
//
getIconClass(node) {
// console.log("", node);
if (node.level === 4) {
// 4
if (node.expanded) {
return "el-icon-document"; // 4
}
return "el-icon-document"; // 4
}
if (node.expanded) {
return "el-icon-folder-opened"; // 4
}
return "el-icon-folder-add"; // 4
},
handleNodeExpand(node) {
//
},
handleNodeCollapse(node) {
//
},
//
handleNodeClick(node, data) {
console.log("点击的当前节点", node, data);
if (data.level !== 4) {
console.log("不是第4层000");
// ,
this.$refs.tree.setCurrentKey(this.currentId);
console.log("当前选中节点ID", this.currentId);
console.log("当前选中节点层级", this.currentLevel);
console.log("当前选中节点名称", this.currentName);
} else {
console.log("第5层111");
this.currentId = node.id;
this.currentLevel = data.level;
this.currentName = node.label;
// ,
this.$refs.tree.setCurrentKey(this.currentId);
console.log("当前选中节点ID", this.currentId);
console.log("当前选中节点层级", this.currentLevel);
console.log("当前选中节点名称", this.currentName);
// this.getTemList();
}
},
// //
findData() { findData() {
if (this.currentIndex == 0) { if (this.currentIndex == 0) {
@ -358,7 +231,7 @@ export default {
border: 1px solid #004b8c; border: 1px solid #004b8c;
} }
.right-monitor { .right-monitor {
width: calc(100% - 280px); width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;

10
src/views/hotWater/energyAnalysis/components/energyReport.vue

@ -176,8 +176,6 @@
<el-table-column label="用水量(吨)" align="center" prop="useHotWater" /> <el-table-column label="用水量(吨)" align="center" prop="useHotWater" />
<el-table-column label="用电量(度)" align="center" prop="electValue" /> <el-table-column label="用电量(度)" align="center" prop="electValue" />
<el-table-column label="单耗(度/吨)" align="center" prop="electWater" /> <el-table-column label="单耗(度/吨)" align="center" prop="electWater" />
<el-table-column label="楼栋人数" align="center" prop="checkInCount" />
<el-table-column label="人均用水(人/升)" align="center" prop="perWater" />
</el-table> </el-table>
<pagination <pagination
@ -627,16 +625,12 @@ export default {
"用水量(吨)", "用水量(吨)",
"用电量(度)", "用电量(度)",
"单耗(度/吨)", "单耗(度/吨)",
"楼栋人数",
"人均用水(人/升)",
]; // excel ]; // excel
var filterVal = [ var filterVal = [
"curDate", "curDate",
"useHotWater", "useHotWater",
"electValue", "electValue",
"electWater", "electWater",
"checkInCount",
"perWater",
]; ];
} else { } else {
var tHeader = [ var tHeader = [
@ -645,8 +639,6 @@ export default {
"用水量(吨)", "用水量(吨)",
"用电量(度)", "用电量(度)",
"单耗(度/吨)", "单耗(度/吨)",
"楼栋人数",
"人均用水(人/升)",
]; // excel ]; // excel
var filterVal = [ var filterVal = [
"curDate", "curDate",
@ -654,8 +646,6 @@ export default {
"useHotWater", "useHotWater",
"electValue", "electValue",
"electWater", "electWater",
"checkInCount",
"perWater",
]; ];
} }
const data = this.formatJson(filterVal, this.exportData); const data = this.formatJson(filterVal, this.exportData);

4
src/views/hotWater/energyAnalysis/components/temReport.vue

@ -165,12 +165,12 @@ export default {
this.listLoading = true; this.listLoading = true;
// //
hotWaterTemp(data).then((res) => { hotWaterTemp(data).then((res) => {
if (res.code == 200 && res.rows.length >0) { if (res.code == 200 && res.rows.length > 0) {
this.tableData = res.rows; this.tableData = res.rows;
// this.firstRow(); // this.firstRow();
this.handlerow(this.tableData[0]); this.handlerow(this.tableData[0]);
} else { } else {
this.rows = []; this.tableData = [];
} }
}); });
// Just to simulate the time of the request // Just to simulate the time of the request

4
src/views/hotWater/energyAnalysis/components/waterReport.vue

@ -164,12 +164,12 @@ export default {
this.listLoading = true; this.listLoading = true;
// //
hotWaterLevel(data).then((res) => { hotWaterLevel(data).then((res) => {
if (res.code == 200 && res.rows.length >0) { if (res.code == 200 && res.rows.length > 0) {
this.tableData = res.rows; this.tableData = res.rows;
// this.firstRow(); // this.firstRow();
this.handlerow(this.tableData[0]); this.handlerow(this.tableData[0]);
} else { } else {
this.rows = []; this.tableData = [];
} }
}); });
// Just to simulate the time of the request // Just to simulate the time of the request

90
src/views/hotWater/energyQuery/components/electReading.vue

@ -54,6 +54,7 @@
<el-table-column label="采集读数" align="center" prop="curValue" /> <el-table-column label="采集读数" align="center" prop="curValue" />
<el-table-column label="用量" align="center" prop="usedValue" /> <el-table-column label="用量" align="center" prop="usedValue" />
<el-table-column label="倍率" align="center" prop="ratio" /> <el-table-column label="倍率" align="center" prop="ratio" />
<el-table-column label="计算量" align="center" prop="calcValue" />
</el-table> </el-table>
<pagination <pagination
@ -170,7 +171,7 @@ export default {
startDate: this.dayDate[0], startDate: this.dayDate[0],
endDate: this.dayDate[1], endDate: this.dayDate[1],
buildingId: this.building, buildingId: this.building,
deviceType: "18", deviceType: "16",
}; };
console.log("查询数据参数", data); console.log("查询数据参数", data);
this.listLoading = true; this.listLoading = true;
@ -192,43 +193,74 @@ export default {
}, },
// //
exportData() { exportData() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = { let data = {
timeType: this.dateType, pageNum: this.queryParams.pageNum,
startTime: this.queryParams.startTime, pageSize: this.total,
endTime: this.endTime, startDate: this.dayDate[0],
building: this.building, endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "16",
}; };
console.log("导出数据参数", data); console.log("查询数据参数", data);
analyzeExport(data).then((res) => { queryDeviceDatas(data).then((res) => {
console.log("导出返回", res); console.log("返回", res);
if (res) { if (res.code == 200) {
// import("@/assets/excel/Export2Excel").then((excel) => {
// blob URL var tHeader = [
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); ]; // excel
// blob URL var filterVal = [
window.URL.revokeObjectURL(url); "buildingName",
this.$message({ "deviceNum",
type: "success", "deviceName",
message: "导出成功!", "curTime",
"curValue",
"usedValue",
"ratio",
"calcValue",
];
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "电表读数报表", //
autoWidth: true, //
});
this.$message({
type: "success",
message: "导出成功!",
});
}); });
} else { } else {
this.$message.error("导出失败!"); this.$message.error("导出失败!");
} }
}); });
// .catch((err) => { },
// this.$message.error('!'); //,
// }) formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
}, },
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 6) { if (columnIndex === 6 || columnIndex === 8) {
return "color: #75d148;!important;text-align:center"; return "color: #75d148;!important;text-align:center";
} }
// return "text-align:center"; // return "text-align:center";

94
src/views/hotWater/energyQuery/components/waterReading.vue

@ -54,6 +54,7 @@
<el-table-column label="采集读数" align="center" prop="curValue" /> <el-table-column label="采集读数" align="center" prop="curValue" />
<el-table-column label="用量" align="center" prop="usedValue" /> <el-table-column label="用量" align="center" prop="usedValue" />
<el-table-column label="倍率" align="center" prop="ratio" /> <el-table-column label="倍率" align="center" prop="ratio" />
<el-table-column label="计算量" align="center" prop="calcValue" />
</el-table> </el-table>
<pagination <pagination
@ -155,7 +156,9 @@ export default {
}, },
// //
indexAdd(index) { indexAdd(index) {
return index + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize; return (
index + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
);
}, },
// //
getList() { getList() {
@ -168,7 +171,7 @@ export default {
startDate: this.dayDate[0], startDate: this.dayDate[0],
endDate: this.dayDate[1], endDate: this.dayDate[1],
buildingId: this.building, buildingId: this.building,
deviceType: "16", deviceType: "18",
}; };
console.log("查询数据参数", data); console.log("查询数据参数", data);
this.listLoading = true; this.listLoading = true;
@ -190,43 +193,74 @@ export default {
}, },
// //
exportData() { exportData() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = { let data = {
timeType: this.dateType, pageNum: this.queryParams.pageNum,
startTime: this.queryParams.startTime, pageSize: this.total,
endTime: this.endTime, startDate: this.dayDate[0],
building: this.building, endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "18",
}; };
console.log("导出数据参数", data); console.log("查询数据参数", data);
analyzeExport(data).then((res) => { queryDeviceDatas(data).then((res) => {
console.log("导出返回", res); console.log("返回", res);
if (res) { if (res.code == 200) {
// import("@/assets/excel/Export2Excel").then((excel) => {
// blob URL var tHeader = [
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); ]; // excel
// blob URL var filterVal = [
window.URL.revokeObjectURL(url); "buildingName",
this.$message({ "deviceNum",
type: "success", "deviceName",
message: "导出成功!", "curTime",
"curValue",
"usedValue",
"ratio",
"calcValue",
];
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "水表读数报表", //
autoWidth: true, //
});
this.$message({
type: "success",
message: "导出成功!",
});
}); });
} else { } else {
this.$message.error("导出失败!"); this.$message.error("导出失败!");
} }
}); });
// .catch((err) => { },
// this.$message.error('!'); //,
// }) formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
}, },
tableRowStyle({ row, column, rowIndex, columnIndex }) { tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 6) { if (columnIndex === 6 || columnIndex === 8) {
return "color: #75d148;!important;text-align:center"; return "color: #75d148;!important;text-align:center";
} }
// return "text-align:center"; // return "text-align:center";

4
src/views/hotWater/overview/index.vue

@ -149,9 +149,9 @@ export default {
console.log("进行赋值", res.rows); console.log("进行赋值", res.rows);
this.chartData1 = res.rows[0].pumpOnline; this.chartData1 = res.rows[0].pumpOnline;
this.chartData2 = parseInt( this.chartData2 = parseInt(
res.rows[0].deviceNum - res.rows[0].pumpOnline res.rows[0].pumpNum - res.rows[0].pumpOnline
); );
this.allData = res.rows[0].deviceNum; this.allData = res.rows[0].pumpNum;
const titleFontSize = const titleFontSize =
(this.$refs.pumpChart_ref.offsetWidth / 100) * 2; (this.$refs.pumpChart_ref.offsetWidth / 100) * 2;
const colorList = ["#ffe21e", "#08c8ff"]; // const colorList = ["#ffe21e", "#08c8ff"]; //

Loading…
Cancel
Save