Browse Source

添加中央热水系统相关界面以及修复钱以后的问题

dev
3067418132@qq.com 6 days ago
parent
commit
2569b616da
  1. 4
      .env.development
  2. 27
      src/api/comprehensiveEnergy/hotPumpLog.js
  3. 19
      src/api/comprehensiveEnergy/meterRecord.js
  4. 9
      src/api/comprehensiveEnergy/systemEnergy.js
  5. 6
      src/api/device/gather.js
  6. 7
      src/api/region.js
  7. BIN
      src/assets/flowimg/circulate-move - 副本.gif
  8. BIN
      src/assets/flowimg/circulate-move.gif
  9. BIN
      src/assets/flowimg/circulate-nomove - 副本.png
  10. BIN
      src/assets/flowimg/circulate-nomove.png
  11. BIN
      src/assets/flowimg/coolWaterBox.png
  12. BIN
      src/assets/flowimg/supply-move.gif
  13. BIN
      src/assets/flowimg/supply-move3.gif
  14. BIN
      src/assets/flowimg/supply-move3.png
  15. BIN
      src/assets/flowimg/supply-nomove.png
  16. BIN
      src/assets/flowimg/waterBox.png
  17. 136
      src/store/modules/permission.js
  18. 174
      src/views/hotWater/dataAnalysis/components/analyzeMonth.vue
  19. 218
      src/views/hotWater/dataAnalysis/components/analyzeYear.vue
  20. 162
      src/views/hotWater/energyAnalysis/components/energyReport.vue
  21. 7
      src/views/hotWater/energyAnalysis/components/temReport.vue
  22. 7
      src/views/hotWater/energyAnalysis/components/waterReport.vue
  23. 10
      src/views/hotWater/energyQuery/components/energy.vue
  24. 1080
      src/views/hotWater/hotPumpLog/index.vue
  25. 462
      src/views/hotWater/waterControl/index.vue
  26. 1108
      src/views/hotWater/waterMonitor/index.vue
  27. 2398
      src/views/hotWater/waterMonitor/waterMonitorDetails copy.vue
  28. 2164
      src/views/hotWater/waterMonitor/waterMonitorDetails.vue
  29. 186
      src/views/region/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:8090'
# VUE_APP_BASE_API = 'http://106.55.173.225:8090'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

27
src/api/comprehensiveEnergy/hotPumpLog.js

@ -0,0 +1,27 @@
import request from "@/utils/request";
export const hotWaterList = (data) => {
return request({
url: "/reportHotWater/list",
method: "post",
data: data,
});
};
// 导出
export const hotWaterExport = (data) => {
return request({
url: "/reportHotWater/export",
method: "post",
data,
responseType: "blob",
});
};
// 修改
export const hotWaterEdit = (data) => {
return request({
url: "/reportHotWater/edit",
method: "put",
data: data,
});
};

19
src/api/comprehensiveEnergy/meterRecord.js

@ -0,0 +1,19 @@
import request from "@/utils/request";
export const meterReadingsList = (data) => {
return request({
url: "/reportMeterReadings/list",
method: "post",
data: data,
});
};
// 导出
export const meterReadingsExport = (data) => {
return request({
url: "/reportMeterReadings/export",
method: "post",
data,
responseType: "blob",
});
};

9
src/api/comprehensiveEnergy/systemEnergy.js

@ -0,0 +1,9 @@
import request from "@/utils/request";
export const compreReport = (data) => {
return request({
url: "/compre/report",
method: "post",
data,
});
};

6
src/api/device/gather.js

@ -8,6 +8,12 @@ export function cpmList(query) {
params: query,
});
}
export function cpmList2(cpmIds) {
return request({
url: "/device/cpm/list/" + cpmIds,
method: "get",
});
}
// 根据id查询设备采集参数信息
export function getCPM(cpmId) {

7
src/api/region.js

@ -7,6 +7,13 @@ export function spaceTree() {
method: "get",
});
}
export function floorTree() {
return request({
url: "/space/floorTree",
method: "get",
});
}
// 获取区域信息
export function getAreaList(query) {

BIN
src/assets/flowimg/circulate-move - 副本.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/flowimg/circulate-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/assets/flowimg/circulate-nomove - 副本.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/flowimg/circulate-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
src/assets/flowimg/coolWaterBox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

BIN
src/assets/flowimg/supply-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 468 KiB

BIN
src/assets/flowimg/supply-move3.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

BIN
src/assets/flowimg/supply-move3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
src/assets/flowimg/supply-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 186 KiB

BIN
src/assets/flowimg/waterBox.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 188 KiB

136
src/store/modules/permission.js

@ -40,6 +40,7 @@ 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,
@ -90,6 +91,141 @@ const permission = {
// 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_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
commit("SET_DEFAULT_ROUTES", sidebarRoutes);

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

@ -153,8 +153,10 @@ export default {
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
// console.log("row",row)
// console.log("column",column)
// 1
if (columnIndex === 0) {
if (columnIndex === 0 || column.label === '合计') {
return "background-color:rgb(11 ,100, 201) !important;";
}
},
@ -293,6 +295,15 @@ export default {
// console.log("Min2", Min2);
// console.log("Max1", Max1);
// console.log("Max2", Max2);
// y+
var yAxisUnit = "";
if (this.chType === 1) {
yAxisUnit = "吨";
} else if (this.chType === 2) {
yAxisUnit = "度";
} else if (this.chType === 3) {
yAxisUnit = "度/吨";
}
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
@ -308,12 +319,24 @@ export default {
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
name: yAxisUnit,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
name: "%",
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
],
series: [
@ -522,6 +545,62 @@ export default {
width: "1",
},
},
// tooltip
formatter: function (params) {
var res = params[0].name + "<br/>";
for (var i = 0, l = params.length; i < l; i++) {
var seriesName = params[i].seriesName;
var value = params[i].value;
// console.log("", params[i].color.colorStops[0].color)
var marker =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' +
params[i].color.colorStops[0].color +
'"></span>';
// seriesName
if (seriesName.includes("用水量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"吨" +
"</span><br>";
} else if (seriesName.includes("用电量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度" +
"</span><br>";
} else if (seriesName.includes("单耗")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度/吨" +
"</span><br>";
} else {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"%" +
"</span><br>";
}
}
return res;
},
},
legend: {
// icon
@ -531,7 +610,7 @@ export default {
color: "#ffff",
fontSize: 12, //
},
left: "56%",
left: "center",
top: "5%",
//
itemGap: 5,
@ -638,10 +717,27 @@ export default {
// },
//线
itemStyle: {
color: "#db9215",
lineStyle: {
color: "#db9215", //线
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(1, 102, 251, 1)", //
},
{
offset: 1,
color: "rgba(1, 102, 251, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
@ -654,10 +750,27 @@ export default {
barWidth: 10, //
//线
itemStyle: {
color: "#1ab395",
lineStyle: {
color: "#1ab395", //线
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 224, 225, 1)", //
},
{
offset: 1,
color: "rgba(0, 224, 225, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0],
},
},
{
@ -677,10 +790,27 @@ export default {
// data: this.data3,
//线
itemStyle: {
color: "#e23131",
lineStyle: {
color: "#e23131", //线
color: "#db9215",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#db9215", //
},
{
offset: 1,
color: "#db9215", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
@ -701,9 +831,27 @@ export default {
// data: this.data4,
//线
itemStyle: {
color: "#4a98ff",
color: "#EE5217", //线
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#EE5217", //
},
{
offset: 1,
color: "#EE5217", //
},
],
global: false, // false
},
lineStyle: {
color: "#4a98ff", //线
color: "#EE5217", //线
},
},
},

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

@ -120,7 +120,7 @@ export default {
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
// 1
if (columnIndex === 0) {
if (columnIndex === 0 || column.label === "合计") {
return "background-color:rgb(11 ,100, 201) !important;";
}
},
@ -240,6 +240,15 @@ export default {
// console.log("Min2", Min2);
// console.log("Max1", Max1);
// console.log("Max2", Max2);
// y+
var yAxisUnit = "";
if (this.chType === 1) {
yAxisUnit = "吨";
} else if (this.chType === 2) {
yAxisUnit = "度";
} else if (this.chType === 3) {
yAxisUnit = "度/吨";
}
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
@ -255,12 +264,24 @@ export default {
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
name: yAxisUnit,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
name: "%",
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
],
series: [
@ -431,6 +452,62 @@ export default {
width: "1",
},
},
// tooltip
formatter: function (params) {
var res = params[0].name + "<br/>";
for (var i = 0, l = params.length; i < l; i++) {
var seriesName = params[i].seriesName;
var value = params[i].value;
// console.log("", params[i].color.colorStops[0].color)
var marker =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' +
params[i].color.colorStops[0].color +
'"></span>';
// seriesName
if (seriesName.includes("用水量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"吨" +
"</span><br>";
} else if (seriesName.includes("用电量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度" +
"</span><br>";
} else if (seriesName.includes("单耗")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度/吨" +
"</span><br>";
} else {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"%" +
"</span><br>";
}
}
return res;
},
},
legend: {
// icon
@ -440,7 +517,7 @@ export default {
color: "#ffff",
fontSize: 12, //
},
left: "56%",
left: "center",
top: "5%",
//
itemGap: 5,
@ -542,67 +619,55 @@ export default {
barWidth: 10, //
//线
itemStyle: {
color: "#db9215",
lineStyle: {
color: "#db9215", //线
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(1, 102, 251, 1)", //
},
{
offset: 1,
color: "rgba(1, 102, 251, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
type: "bar",
// tooltip: {
// valueFormatter: function (value) {
// return value + "";
// },
// },
tooltip: {
trigger: "axis",
formatter: function (params) {
//
var relVal = params[0].name; //x
if (params[0].seriesName == "2022年用水量") {
relVal =
params[0].name +
"<br/>" +
params[0].seriesName +
" : " +
params[0].value +
" 吨";
} else if (params[0].seriesName == "用电量") {
relVal =
params[0].name +
"<br/>" +
params[0].seriesName +
" : " +
params[0].value +
" 度";
} else if (params[0].seriesName == "耗能") {
relVal =
params[0].name +
"<br/>" +
params[0].seriesName +
" : " +
params[0].value +
" 度/吨";
} else {
relVal =
params[0].name +
"<br/>" +
params[0].seriesName +
" : " +
params[0].value +
" 次";
}
return relVal;
},
},
barWidth: 10, //
//线
itemStyle: {
color: "#1ab395",
lineStyle: {
color: "#1ab395", //线
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 224, 225, 1)", //
},
{
offset: 1,
color: "rgba(0, 224, 225, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0],
},
},
{
@ -622,10 +687,27 @@ export default {
// data: this.data3,
//线
itemStyle: {
color: "#e23131",
lineStyle: {
color: "#e23131", //线
color: "#db9215",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#db9215", //
},
{
offset: 1,
color: "#db9215", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
@ -646,9 +728,27 @@ export default {
// data: this.data4,
//线
itemStyle: {
color: "#4a98ff",
color: "#EE5217", //线
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#EE5217", //
},
{
offset: 1,
color: "#EE5217", //
},
],
global: false, // false
},
lineStyle: {
color: "#4a98ff", //线
color: "#EE5217", //线
},
},
},

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

@ -11,13 +11,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useWaterRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useWaterRadio }}</span>
<div class="upText" v-if="isPositive(useWaterRadio)">
<i class="el-icon-top"></i>
<span>{{ useWaterRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useWaterRadio }}</span>
<span>{{ useWaterRadio }}</span>
</div>
</div>
<img
@ -36,13 +36,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useElectRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useElectRadio }}</span>
<div class="upText" v-if="isPositive(useElectRadio)">
<i class="el-icon-top"></i>
<span>{{ useElectRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useElectRadio }}</span>
<span>{{ useElectRadio }}</span>
</div>
</div>
<img
@ -61,13 +61,13 @@
<div v-if="dateType === 'day'">与昨日相比</div>
<div v-if="dateType === 'month'">与上月相比</div>
<div v-if="dateType === 'year'">与上年相比</div>
<div class="upText" v-if="useUnitRadio > 0">
<i class="el-icon-bottom"></i>
<span>+{{ useUnitRadio }}</span>
<div class="upText" v-if="isPositive(useUnitRadio)">
<i class="el-icon-top"></i>
<span>{{ useUnitRadio }}</span>
</div>
<div class="downText" v-else>
<i class="el-icon-bottom"></i>
<span>-{{ useUnitRadio }}</span>
<span>{{ useUnitRadio }}</span>
</div>
</div>
<img
@ -250,6 +250,20 @@ export default {
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
isPositive(value) {
// value
if (typeof value === "string") {
//
const numberPart = value.replace("%", "");
//
const num = parseFloat(numberPart);
return num > 0;
} else {
//
// console.error(":", value);
return false;
}
},
handleEnter(index) {
this.currentIndex = index;
this.renderingBroken();
@ -462,42 +476,12 @@ export default {
},
//线
getChartData() {
console.log("图表参数", this.queryParams);
let timeType = null;
if (this.dateType == "day") {
timeType = 1;
this.queryParams.startTime =
this.dayDate.length > 0 ? this.dayDate[0] : "";
this.queryParams.endTime =
this.dayDate.length > 0 ? this.dayDate[1] : "";
} else if (this.dateType == "month") {
timeType = 2;
this.queryParams.startTime =
this.monthDate.length > 0 ? this.monthDate[0] : "";
this.queryParams.endTime =
this.monthDate.length > 0 ? this.monthDate[1] : "";
} else if (this.dateType == "year") {
timeType = 3;
this.queryParams.startTime = this.startYear;
this.queryParams.endTime = this.endYear;
}
let data = {
type: timeType,
page: this.queryParams.pageNum,
limit: this.total,
startDate: this.queryParams.startTime,
endDate: this.queryParams.endTime,
buildingId: this.building,
};
hotEnergyQuery(data).then((res) => {
console.log("图表返回的数据", res);
this.brokenData1 = [];
this.brokenData2 = [];
this.brokenData3 = [];
this.brokenTime = [];
if (res.code == 200 && res.rows.length > 0) {
this.exportData = res.rows;
res.rows.forEach((item) => {
if ((this.total == 10)) {
//
console.log("不用请求");
if (this.tableData.length > 0) {
this.exportData = this.tableData;
this.exportData.forEach((item) => {
this.brokenData1.push(item.useHotWater);
this.brokenData2.push(item.electValue);
this.brokenData3.push(item.electWater);
@ -516,10 +500,71 @@ export default {
this.brokenTime = [];
}
this.renderingBroken();
});
} else {
console.log("图表参数", this.queryParams);
let timeType = null;
if (this.dateType == "day") {
timeType = 1;
this.queryParams.startTime =
this.dayDate.length > 0 ? this.dayDate[0] : "";
this.queryParams.endTime =
this.dayDate.length > 0 ? this.dayDate[1] : "";
} else if (this.dateType == "month") {
timeType = 2;
this.queryParams.startTime =
this.monthDate.length > 0 ? this.monthDate[0] : "";
this.queryParams.endTime =
this.monthDate.length > 0 ? this.monthDate[1] : "";
} else if (this.dateType == "year") {
timeType = 3;
this.queryParams.startTime = this.startYear;
this.queryParams.endTime = this.endYear;
}
let data = {
type: timeType,
page: 1,
limit: this.total,
startDate: this.queryParams.startTime,
endDate: this.queryParams.endTime,
buildingId: this.building,
};
hotEnergyQuery(data).then((res) => {
console.log("图表返回的数据", res);
this.brokenData1 = [];
this.brokenData2 = [];
this.brokenData3 = [];
this.brokenTime = [];
if (res.code == 200 && res.rows.length > 0) {
this.exportData = res.rows;
res.rows.forEach((item) => {
this.brokenData1.push(item.useHotWater);
this.brokenData2.push(item.electValue);
this.brokenData3.push(item.electWater);
this.brokenTime.push(item.curDate);
});
//
this.brokenData1.reverse();
this.brokenData2.reverse();
this.brokenData3.reverse();
this.brokenTime.reverse();
this.renderingBroken();
} else {
this.brokenData1 = [];
this.brokenData2 = [];
this.brokenData3 = [];
this.brokenTime = [];
}
this.renderingBroken();
});
}
},
renderingBroken() {
if (this.currentIndex === 0) {
this.brokenOption.yAxis.name = "吨";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#d48e17";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -533,6 +578,11 @@ export default {
},
];
} else if (this.currentIndex === 1) {
this.brokenOption.yAxis.name = "度";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData2;
this.brokenOption.series[0].itemStyle.color = "#1ab395";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -546,6 +596,11 @@ export default {
},
];
} else if (this.currentIndex === 2) {
this.brokenOption.yAxis.name = "度/吨";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData3;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -620,12 +675,7 @@ export default {
import("@/assets/excel/Export2Excel").then((excel) => {
// excel
if (this.building == "所有") {
var tHeader = [
"日期",
"用水量(吨)",
"用电量(度)",
"单耗(度/吨)",
]; // excel
var tHeader = ["日期", "用水量(吨)", "用电量(度)", "单耗(度/吨)"]; // excel
var filterVal = [
"curDate",
"useHotWater",
@ -714,7 +764,7 @@ export default {
},
grid: {
top: "4%",
top: "10%",
left: "3%",
right: "4%",
bottom: "5%",

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

@ -224,6 +224,11 @@ export default {
},
//
renderingBroken() {
this.brokenOption.yAxis.name = "℃";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -432,7 +437,7 @@ export default {
},
grid: {
top: "4%",
top: "10%",
left: "3%",
right: "4%",
bottom: "5%",

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

@ -223,6 +223,11 @@ export default {
},
//
renderingBroken() {
this.brokenOption.yAxis.name = "%";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -432,7 +437,7 @@ export default {
},
grid: {
top: "4%",
top: "10%",
left: "3%",
right: "4%",
bottom: "5%",

10
src/views/hotWater/energyQuery/components/energy.vue

@ -160,6 +160,11 @@ export default {
//
getChartData() {
if (this.currentIndex === 0) {
this.brokenOption.yAxis.name = "吨";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
@ -173,6 +178,11 @@ export default {
},
];
} else if (this.currentIndex === 1) {
this.brokenOption.yAxis.name = "度";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData2;
this.brokenOption.series[0].itemStyle.color = "#1ab395";
this.brokenOption.series[0].areaStyle.color.colorStops = [

1080
src/views/hotWater/hotPumpLog/index.vue

File diff suppressed because it is too large Load Diff

462
src/views/hotWater/waterControl/index.vue

@ -67,59 +67,67 @@
/>
<div class="monitor-words">
<div class="words-li">
<div class="ash">运行状态模式:</div>
<div class="ash">开关控制:</div>
<div class="white">
<el-select
<el-switch
style="display: block"
v-model="item.hotPumpStatus"
placeholder="请选择"
active-color="#13ce66"
active-text="开机"
inactive-text="关机"
@change="handleHotPump(item)"
>
<el-option
v-for="item in hotPumpOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-switch>
</div>
</div>
<div class="words-li">
<div class="ash">故障信息:</div>
<el-tag
</div>
</div>
<div class="control-bottom">
<div class="words-li">
<div class="ash">故障信息:</div>
<el-tag
size="mini"
v-if="item.alarmStatus === '无故障'"
type="success"
>{{ item.alarmStatus }}</el-tag
>
<el-tag size="mini" v-else type="danger">{{
item.alarmStatus
}}</el-tag>
</div>
<div class="words-li">
<div class="ash">运行状态:</div>
<el-tag
size="mini"
v-if="item.runningStatus === '运行'"
type="success"
>{{ item.runningStatus }}</el-tag
>
<el-tag size="mini" v-else type="danger">不运行</el-tag>
</div>
<div class="words-li">
<div class="ash">实际温度:</div>
<div class="white">{{ item.temp }}</div>
</div>
<div class="words-li">
<div class="ash">设定温度:</div>
<div class="white">
<el-input
size="mini"
v-if="item.alarmStatus === '无故障'"
type="success"
>{{ item.alarmStatus }}</el-tag
>
<el-tag size="mini" v-else type="danger">{{
item.alarmStatus
}}</el-tag>
</div>
<div class="words-li">
<div class="ash">实际温度:</div>
<div class="white">{{ item.temp }}</div>
</div>
<div class="words-li">
<div class="ash">设定温度:</div>
<div class="white">
<el-input
size="mini"
v-model="item.tempSet"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.tempSet,
item.tempSetId,
'设定温度',
'℃'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
</div>
v-model="item.tempSet"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.tempSet,
item.tempSetId,
'设定温度',
'℃'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
</div>
</div>
</div>
@ -272,7 +280,7 @@
<div class="white"></div>
</div>
<div class="words-li">
<div class="white">一次50分钟</div>
<div class="white">总共:{{ item.counterSet * 50 }}分钟</div>
</div>
</div>
</div>
@ -336,7 +344,7 @@
item.delayTimeSet,
item.delayTimeSetId,
'回水温度设定延时时间',
'S'
'min'
)
"
@input="handleInput(item)"
@ -367,6 +375,25 @@
</el-switch>
</div>
</div>
<div class="words-li words-li4">
<div class="ash">最低液位设置值:</div>
<el-input
v-model="item.minSet"
size="mini"
@keyup.enter.native="
handleEnter(
item,
item.minSet,
item.minSetId,
'最低液位设置值',
'%'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
<div class="white">%</div>
</div>
</div>
</div>
<div class="control-bottom">
@ -437,15 +464,131 @@
</div>
</div>
</div>
<!-- 高区中厨中区裙楼 -->
<!-- 中厨裙楼 -->
<div
class="monitor-flex-left"
v-if="
activeName === '裙楼' ||
activeName === '中厨' ||
activeName === '高区' ||
activeName === '中区'
"
v-if="activeName === '裙楼' || activeName === '中厨'"
>
<div class="control-top">
<img
class="monitor-img2"
src="../../../assets/images/startpum.png"
/>
<div class="monitor-words">
<div class="words-li">
<div class="ash" style="letter-spacing: 8px">一键启动:</div>
<div class="white">
<el-switch
style="display: block"
v-model="item.openSwitch"
active-color="#13ce66"
active-text="开启"
inactive-text="停止"
@change="handleAllStart(item)"
>
</el-switch>
</div>
</div>
<!-- <div class="words-li">
<div class="ash">停止:</div>
<div class="white">
<el-switch
style="display: block"
v-model="item.closeSwitch"
active-color="#13ce66"
active-text=""
inactive-text=""
@change="handleAllEnd(item)"
>
</el-switch>
</div>
</div> -->
</div>
</div>
<div class="control-bottom">
<div class="words-li words-li3">
<div class="ash">供水温度:</div>
<div class="white">{{ item.temp }}</div>
</div>
<!-- <div class="words-li words-li4">
<div class="ash">供水温度设定:</div>
<el-input
v-model="item.tempSet"
size="mini"
@keyup.enter.native="
handleEnter(
item,
item.tempSet,
item.tempSetId,
'供水温度设定',
'℃'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
<div class="white"></div>
</div> -->
<div class="words-li words-li3">
<div class="ash">供水压力</div>
<div class="white">{{ item.pressure }}bar</div>
</div>
<!-- <div class="words-li words-li4">
<div class="ash">温度偏差值:</div>
<el-input
v-model="item.diffValueSet"
@keyup.enter.native="
handleEnter(
item,
item.diffValueSet,
item.diffValueSetId,
'温度偏差值',
'℃'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
size="mini"
></el-input>
<div class="white"></div>
</div> -->
<div class="words-li words-li3">
<div class="ash">故障信息:</div>
<el-tag
size="mini"
v-if="item.alarmStatus === '无故障'"
type="success"
>{{ item.alarmStatus }}</el-tag
>
<el-tag size="mini" v-else type="danger">{{
item.alarmStatus
}}</el-tag>
</div>
<!-- <div class="words-li words-li4">
<div class="ash">补水延时时间设定:</div>
<el-input
v-model="item.delayTimeSet"
@keyup.enter.native="
handleEnter(
item,
item.delayTimeSet,
item.delayTimeSetId,
'补水延时时间设定',
'S'
)
"
@input="handleInput(item)"
@blur="handleBlur()"
size="mini"
></el-input>
<div class="white">S</div>
</div> -->
</div>
</div>
<!-- 高区中区 -->
<div
class="monitor-flex-left"
v-if="activeName === '高区' || activeName === '中区'"
>
<div class="control-top">
<img
@ -563,6 +706,124 @@
</div> -->
</div>
</div>
<!-- 传感器参数设置 -->
<div class="monitor-flex-left" v-if="activeName === '传感器参数设置'">
<div class="control-bottom">
<div class="words-li words-li4">
<div class="ash">上限:</div>
<el-input
v-model="item.engineeringMaxValue"
size="mini"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.engineeringMaxValue,
item.engineeringMaxValueId,
'上限',
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : ''
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
<div class="white" v-if="item.name.includes('温度')"></div>
<div class="white" v-else-if="item.name.includes('压力')">bar</div>
<div class="white" v-else-if="item.name.includes('液位')">m</div>
</div>
<div class="words-li words-li4">
<div class="ash">下限:</div>
<el-input
v-model="item.engineeringMinValue"
size="mini"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.engineeringMinValue,
item.engineeringMinValueId,
'下限',
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : ''
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
<div class="white" v-if="item.name.includes('温度')"></div>
<div class="white" v-else-if="item.name.includes('压力')">bar</div>
<div class="white" v-else-if="item.name.includes('液位')">m</div>
</div>
<div class="words-li words-li4">
<div class="ash">数字上限:</div>
<el-input
v-model="item.digitalMaxValue"
size="mini"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.digitalMaxValue,
item.digitalMaxValueId,
'数字上限',
''
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
</div>
<div class="words-li words-li4">
<div class="ash">数字下限:</div>
<el-input
v-model="item.digitalMinValue"
size="mini"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.digitalMinValue,
item.digitalMinValueId,
'数字下限',
''
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
</div>
<div class="words-li words-li4">
<div class="ash">校准值:</div>
<el-input
v-model="item.calibrationValue"
size="mini"
placeholder="请输入"
@keyup.enter.native="
handleEnter(
item,
item.calibrationValue,
item.calibrationValueId,
'校准值',
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : ''
)
"
@input="handleInput(item)"
@blur="handleBlur()"
></el-input>
<div class="white" v-if="item.name.includes('温度')"></div>
<div class="white" v-else-if="item.name.includes('压力')">bar</div>
<div class="white" v-else-if="item.name.includes('液位')">m</div>
</div>
<div class="words-li words-li4">
<div class="ash">当前值:</div>
<div class="white">
<span v-if="item.name.includes('温度')">{{ item.temp }}</span>
<span v-else-if="item.name.includes('压力')">{{ item.pressure }}bar</span>
<span v-else-if="item.name.includes('液位')">{{ item.waterLevel }}%</span>
<span v-else>{{ item.temp }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -593,15 +854,7 @@ export default {
value: 0,
},
{
label: "制冷",
value: 2,
},
{
label: "制热",
value: 3,
},
{
label: "热水",
label: "开机",
value: 4,
},
],
@ -768,13 +1021,31 @@ export default {
...item,
waterLevel: Number(item.waterLevel),
runningStatus: Number(item.runningStatus) == 0 ? "停止" : "运行", //
hotPumpStatus: item.switchStatus, //
hotPumpStatus:
Number(item.switchStatus) === 0
? false
: Number(item.switchStatus) === 4
? true
: "", //
switchStatus: Number(item.switchStatus) == 0 ? false : true, //
alarmStatus: Number(item.alarmStatus) == 0 ? "无故障" : "故障", //
handAutomaticSwitch:
Number(item.handAutomaticSwitch) == 1 ? false : true, //
openSwitch: Number(item.openSwitch) == 0 ? false : true, //
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //
//
engineeringMaxValue: item.engineeringMaxValue || '',
engineeringMaxValueId: item.engineeringMaxValueId || '',
engineeringMinValue: item.engineeringMinValue || '',
engineeringMinValueId: item.engineeringMinValueId || '',
digitalMaxValue: item.digitalMaxValue || '',
digitalMaxValueId: item.digitalMaxValueId || '',
digitalMinValue: item.digitalMinValue || '',
digitalMinValueId: item.digitalMinValueId || '',
calibrationValue: item.calibrationValue || '',
calibrationValueId: item.calibrationValueId || '',
middleValue: item.middleValue || '',
middleValueId: item.middleValueId || '',
};
// devicesList
this.devicesList.push(deviceItem);
@ -829,7 +1100,12 @@ export default {
waterLevel: Number(item.waterLevel),
runningStatus:
Number(item.runningStatus) == 0 ? "运行" : "停止", //
hotPumpStatus: item.switchStatus, //
hotPumpStatus:
Number(item.switchStatus) === 0
? false
: Number(item.switchStatus) === 4
? true
: "未知状态", //
switchStatus:
Number(item.switchStatus) == 0 ? false : true, //
alarmStatus:
@ -838,6 +1114,19 @@ export default {
Number(item.handAutomaticSwitch) == 0 ? false : true, //
openSwitch: Number(item.openSwitch) == 0 ? false : true, //
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //
//
engineeringMaxValue: item.engineeringMaxValue || '',
engineeringMaxValueId: item.engineeringMaxValueId || '',
engineeringMinValue: item.engineeringMinValue || '',
engineeringMinValueId: item.engineeringMinValueId || '',
digitalMaxValue: item.digitalMaxValue || '',
digitalMaxValueId: item.digitalMaxValueId || '',
digitalMinValue: item.digitalMinValue || '',
digitalMinValueId: item.digitalMinValueId || '',
calibrationValue: item.calibrationValue || '',
calibrationValueId: item.calibrationValueId || '',
middleValue: item.middleValue || '',
middleValueId: item.middleValueId || '',
};
// devicesList
this.devicesList.push(deviceItem);
@ -933,26 +1222,10 @@ export default {
},
//
handleHotPump(item) {
//
const originalStatus = item.hotPumpStatus;
// value label
let statusLabel = "";
switch (item.hotPumpStatus) {
case 0:
statusLabel = "关机";
break;
case 2:
statusLabel = "制冷";
break;
case 3:
statusLabel = "制热";
break;
case 4:
statusLabel = "热水";
break;
}
this.$confirm(
`确定要切换设备"${item.name}"的状态为:${statusLabel} 吗?"`,
`确定要切换设备"${item.name}"的状态为:${
item.hotPumpStatus ? "开机" : "关机 吗?"
}`,
"提示",
{
confirmButtonText: "确定",
@ -961,11 +1234,20 @@ export default {
}
)
.then(() => {
this.hadleOperationConrol(item.switchStatusId, item.hotPumpStatus);
//
console.log("请求后台", item.hotPumpStatus);
let param = null;
if (item.hotPumpStatus) {
param = 4;
} else {
param = 0;
}
console.log("参数", param);
this.hadleOperationConrol(item.switchStatusId, param);
})
.catch(() => {
//
item.hotPumpStatus = originalStatus;
//
item.switchStatus = !item.switchStatus;
});
},
//
@ -1318,9 +1600,9 @@ export default {
width: 36%;
}
.words-li4 {
width: 60%;
width: 45%;
.ash {
width: 130px;
width: 80px;
}
}
.words-li5 {

1108
src/views/hotWater/waterMonitor/index.vue

File diff suppressed because it is too large Load Diff

2398
src/views/hotWater/waterMonitor/waterMonitorDetails copy.vue

File diff suppressed because it is too large Load Diff

2164
src/views/hotWater/waterMonitor/waterMonitorDetails.vue

File diff suppressed because it is too large Load Diff

186
src/views/region/index.vue

@ -202,7 +202,7 @@
:title="dialogTitle"
:visible.sync="isDialogOpen"
@close="addExpenseClose"
width="700px"
width="730px"
append-to-body
>
<el-form
@ -241,6 +241,7 @@
v-model="dialogForm.systemType"
placeholder="选择系统类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_type"
@ -467,6 +468,7 @@
v-model="dialogForm.status"
placeholder="请选择状态"
clearable
filterable
>
<el-option label="正常" value="0" />
<el-option
@ -475,6 +477,45 @@
/> </el-select></el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="设备名称" prop="ledgerId">
<el-select
v-model="dialogForm.ledgerId"
placeholder="请选择设备类型"
clearable
@change="handleDevice"
filterable
multiple
collapse-tags
>
<el-option
v-for="item in devices"
:key="item.id"
:label="item.deviceName"
:value="item.id"
/> </el-select></el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="采集点位" prop="cpmId">
<el-select
v-model="dialogForm.cpmId"
placeholder="请选择设备类型"
clearable
@change="handleMeter"
filterable
multiple
collapse-tags
>
<el-option
v-for="item in cpmList"
:key="item.id"
:label="item.otherName"
:value="item.id"
/>
</el-select> </el-form-item
></el-col>
</el-row>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
@ -508,6 +549,8 @@ import {
getHouse,
delHouse,
} from "@/api/region";
import { cpmList2 } from "@/api/device/gather";
import { ledgerList } from "@/api/device/ledger";
export default {
name: "region",
dicts: ["sys_type"],
@ -531,7 +574,12 @@ export default {
//
total: 0,
isDialogOpen: false, //
dialogForm: {},
dialogForm: {
ledgerId: "",
deviceName: "",
cpmId: "",
cpmName: "",
},
dialogRules: {
status: [
{ required: true, message: "请选择二维码状态", trigger: "blur" },
@ -541,6 +589,8 @@ export default {
isUpdate: false,
isTableUpdate: false,
rowId: "", //id
devices: [], //
cpmList: [], //
};
},
mounted() {
@ -736,6 +786,7 @@ export default {
this.dialogTitle = "修改房间";
this.currentParentId = row.floorId;
this.getDialogRoom(row.id);
this.getDeviceList();
}
this.isDialogOpen = true;
},
@ -864,6 +915,7 @@ export default {
this.dialogTitle = "新增楼层";
} else if (data.nodeType === 3) {
this.dialogTitle = "新增房间";
this.getDeviceList();
}
this.isDialogOpen = true;
},
@ -892,6 +944,7 @@ export default {
} else if (data.nodeType === 4) {
this.dialogTitle = "修改房间";
this.getDialogRoom(data.id);
this.getDeviceList();
}
this.isDialogOpen = true;
},
@ -1000,6 +1053,18 @@ export default {
this.dialogForm.status !== null
? this.dialogForm.status.toString()
: null;
// // idid,"1,2,3"["1","2","3"]
// this.dialogForm.ledgerId = this.dialogForm.ledgerId
// ? this.dialogForm.ledgerId.split(",")
// : [];
// this.dialogForm.cpmId = this.dialogForm.cpmId
// ? this.dialogForm.cpmId.split(",")
// : [];
// this.dialogForm.ledgerId
if (this.dialogForm.ledgerId && this.dialogForm.ledgerId.length > 0) {
this.getCpmIdList(this.dialogForm.ledgerId);
}
}
});
},
@ -1050,6 +1115,10 @@ export default {
},
addSet() {
if (this.currentLevel === 0) {
if (!this.dialogForm.areaName || !this.dialogForm.systemType) {
this.$modal.msgWarning("请输入新增数据");
return;
}
//
let data = {
areaName: this.dialogForm.areaName,
@ -1074,6 +1143,10 @@ export default {
}
});
} else if (this.currentLevel === 1) {
if (!this.dialogForm.buildingName) {
this.$modal.msgWarning("请输入新增数据");
return;
}
//
let data = {
buildingName: this.dialogForm.buildingName,
@ -1106,6 +1179,10 @@ export default {
}
});
} else if (this.currentLevel === 2) {
if (!this.dialogForm.floorName) {
this.$modal.msgWarning("请输入新增数据");
return;
}
//
let data = {
buildingId: this.currentId,
@ -1134,6 +1211,10 @@ export default {
}
});
} else if (this.currentLevel === 3) {
if (!this.dialogForm.houseName) {
this.$modal.msgWarning("请输入新增数据");
return;
}
//
let data = {
buildingId: "",
@ -1148,7 +1229,16 @@ export default {
usableArea: this.dialogForm.usableArea,
builtYear: this.dialogForm.builtYear,
status: this.dialogForm.status,
ledgerId:
this.dialogForm.ledgerId && this.dialogForm.ledgerId.length > 0
? this.dialogForm.ledgerId
: [],
cpmId:
this.dialogForm.cpmId && this.dialogForm.cpmId.length > 0
? this.dialogForm.cpmId
: [],
};
console.log("新增的参数", data);
addHouse(data).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("新增成功");
@ -1167,6 +1257,10 @@ export default {
}
},
updateAreaData(id) {
if (!this.dialogForm.areaName) {
this.$modal.msgWarning("请输入修改数据");
return;
}
let data = {
id: id,
areaName: this.dialogForm.areaName,
@ -1198,6 +1292,10 @@ export default {
} else {
nextId = "";
}
if (!this.dialogForm.buildingName) {
this.$modal.msgWarning("请输入修改数据");
return;
}
let data = {
id: id,
buildingName: this.dialogForm.buildingName,
@ -1238,6 +1336,10 @@ export default {
} else {
nextId = "";
}
if (!this.dialogForm.floorName) {
this.$modal.msgWarning("请输入修改数据");
return;
}
let data = {
id: id,
buildingId: nextId,
@ -1274,6 +1376,10 @@ export default {
} else {
nextId = "";
}
if (!this.dialogForm.houseName) {
this.$modal.msgWarning("请输入修改数据");
return;
}
let data = {
id: id,
buildingId: "",
@ -1288,6 +1394,14 @@ export default {
usableArea: this.dialogForm.usableArea,
builtYear: this.dialogForm.builtYear,
status: this.dialogForm.status,
ledgerId:
this.dialogForm.ledgerId && this.dialogForm.ledgerId.length > 0
? this.dialogForm.ledgerId
: [],
cpmId:
this.dialogForm.cpmId && this.dialogForm.cpmId.length > 0
? this.dialogForm.cpmId
: [],
};
console.log("修改的参数", data);
updateHouse(data).then((res) => {
@ -1306,6 +1420,74 @@ export default {
}
});
},
//
getDeviceList() {
let data = {
pageNum: 1,
pageSize: 100000,
};
ledgerList(data).then((response) => {
this.devices = response.rows;
});
},
//
handleDevice(selectedValue) {
console.log("选择设备", selectedValue);
this.getCpmIdList(selectedValue);
// // value label
// const selectedItem = this.devices.find(
// (item) => item.id === selectedValue
// );
// if (selectedItem) {
// const selectedLabel = selectedItem.deviceName;
// console.log(" value:", selectedValue);
// console.log(" label:", selectedLabel);
// //
// this.dialogForm.ledgerId = selectedValue;
// this.dialogForm.deviceName = selectedLabel;
// //
// this.getCpmIdList(this.dialogForm.ledgerId);
// }
// if (!val) {
// console.log("-");
// //
// this.dialogForm.cpmId = "";
// } else {
// console.log("-");
// this.dialogForm = {
// cpmId: "",
// };
// }
},
//
getCpmIdList(ids) {
if (ids.length > 0) {
cpmList2(ids).then((response) => {
this.cpmList = response.rows;
console.log("this.cpmList", this.cpmList);
});
} else {
console.log("无值不请求");
this.cpmList = [];
}
},
//
handleMeter(selectedValue) {
console.log("选择的采集类型", selectedValue);
console.log("dialogForm.cpmId", this.dialogForm.cpmId);
// // value label
// const selectedItem = this.cpmList.find(
// (item) => item.id === selectedValue
// );
// if (selectedItem) {
// const selectedLabel = selectedItem.otherName;
// console.log(" value:", selectedValue);
// console.log(" label:", selectedLabel);
// //
// this.dialogForm.cpmId = selectedValue;
// this.dialogForm.cpmName = selectedLabel;
// }
},
},
};
</script>

Loading…
Cancel
Save