diff --git a/.env.development b/.env.development index eb84861..c000d60 100644 --- a/.env.development +++ b/.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 diff --git a/src/api/comprehensiveEnergy/hotPumpLog.js b/src/api/comprehensiveEnergy/hotPumpLog.js new file mode 100644 index 0000000..631f7c7 --- /dev/null +++ b/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, + }); +}; diff --git a/src/api/comprehensiveEnergy/meterRecord.js b/src/api/comprehensiveEnergy/meterRecord.js new file mode 100644 index 0000000..a33c714 --- /dev/null +++ b/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", + }); +}; diff --git a/src/api/comprehensiveEnergy/systemEnergy.js b/src/api/comprehensiveEnergy/systemEnergy.js new file mode 100644 index 0000000..30fd012 --- /dev/null +++ b/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, + }); +}; diff --git a/src/api/device/gather.js b/src/api/device/gather.js index 9834a82..8d856b5 100644 --- a/src/api/device/gather.js +++ b/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) { diff --git a/src/api/region.js b/src/api/region.js index db51c9b..3797eba 100644 --- a/src/api/region.js +++ b/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) { diff --git a/src/assets/flowimg/circulate-move - 副本.gif b/src/assets/flowimg/circulate-move - 副本.gif new file mode 100644 index 0000000..24276f6 Binary files /dev/null and b/src/assets/flowimg/circulate-move - 副本.gif differ diff --git a/src/assets/flowimg/circulate-move.gif b/src/assets/flowimg/circulate-move.gif index 24276f6..c157849 100644 Binary files a/src/assets/flowimg/circulate-move.gif and b/src/assets/flowimg/circulate-move.gif differ diff --git a/src/assets/flowimg/circulate-nomove - 副本.png b/src/assets/flowimg/circulate-nomove - 副本.png new file mode 100644 index 0000000..1d14fb1 Binary files /dev/null and b/src/assets/flowimg/circulate-nomove - 副本.png differ diff --git a/src/assets/flowimg/circulate-nomove.png b/src/assets/flowimg/circulate-nomove.png index 1d14fb1..f9ce69a 100644 Binary files a/src/assets/flowimg/circulate-nomove.png and b/src/assets/flowimg/circulate-nomove.png differ diff --git a/src/assets/flowimg/coolWaterBox.png b/src/assets/flowimg/coolWaterBox.png new file mode 100644 index 0000000..cc256b6 Binary files /dev/null and b/src/assets/flowimg/coolWaterBox.png differ diff --git a/src/assets/flowimg/supply-move.gif b/src/assets/flowimg/supply-move.gif index 92fae8e..a007bd4 100644 Binary files a/src/assets/flowimg/supply-move.gif and b/src/assets/flowimg/supply-move.gif differ diff --git a/src/assets/flowimg/supply-move3.gif b/src/assets/flowimg/supply-move3.gif new file mode 100644 index 0000000..f1db1d6 Binary files /dev/null and b/src/assets/flowimg/supply-move3.gif differ diff --git a/src/assets/flowimg/supply-move3.png b/src/assets/flowimg/supply-move3.png new file mode 100644 index 0000000..36c5dd0 Binary files /dev/null and b/src/assets/flowimg/supply-move3.png differ diff --git a/src/assets/flowimg/supply-nomove.png b/src/assets/flowimg/supply-nomove.png index 54f0426..9a40e49 100644 Binary files a/src/assets/flowimg/supply-nomove.png and b/src/assets/flowimg/supply-nomove.png differ diff --git a/src/assets/flowimg/waterBox.png b/src/assets/flowimg/waterBox.png index 8f70533..419a8d0 100644 Binary files a/src/assets/flowimg/waterBox.png and b/src/assets/flowimg/waterBox.png differ diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 882a08b..e757071 100644 --- a/src/store/modules/permission.js +++ b/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); diff --git a/src/views/hotWater/dataAnalysis/components/analyzeMonth.vue b/src/views/hotWater/dataAnalysis/components/analyzeMonth.vue index 3b463c2..ab90e2a 100644 --- a/src/views/hotWater/dataAnalysis/components/analyzeMonth.vue +++ b/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 + "
"; + 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 = + ''; + // 根据不同的seriesName 返回不同的单位 + if (seriesName.includes("用水量")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "吨" + + "
"; + } else if (seriesName.includes("用电量")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "度" + + "
"; + } else if (seriesName.includes("单耗")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "度/吨" + + "
"; + } else { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "%" + + "
"; + } + } + 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", //折线的颜色 }, }, }, diff --git a/src/views/hotWater/dataAnalysis/components/analyzeYear.vue b/src/views/hotWater/dataAnalysis/components/analyzeYear.vue index b39a866..eaca2a1 100644 --- a/src/views/hotWater/dataAnalysis/components/analyzeYear.vue +++ b/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 + "
"; + 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 = + ''; + // 根据不同的seriesName 返回不同的单位 + if (seriesName.includes("用水量")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "吨" + + "
"; + } else if (seriesName.includes("用电量")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "度" + + "
"; + } else if (seriesName.includes("单耗")) { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "度/吨" + + "
"; + } else { + res += + marker + + seriesName + + ":" + + '' + + value + + " " + + "%" + + "
"; + } + } + 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 + - "
" + - params[0].seriesName + - " : " + - params[0].value + - " 吨"; - } else if (params[0].seriesName == "用电量") { - relVal = - params[0].name + - "
" + - params[0].seriesName + - " : " + - params[0].value + - " 度"; - } else if (params[0].seriesName == "耗能") { - relVal = - params[0].name + - "
" + - params[0].seriesName + - " : " + - params[0].value + - " 度/吨"; - } else { - relVal = - params[0].name + - "
" + - 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", //折线的颜色 }, }, }, diff --git a/src/views/hotWater/energyAnalysis/components/energyReport.vue b/src/views/hotWater/energyAnalysis/components/energyReport.vue index 7d628d8..32d6880 100644 --- a/src/views/hotWater/energyAnalysis/components/energyReport.vue +++ b/src/views/hotWater/energyAnalysis/components/energyReport.vue @@ -11,13 +11,13 @@
与昨日相比
与上月相比
与上年相比
-
- - +{{ useWaterRadio }} +
+ + {{ useWaterRadio }}
- -{{ useWaterRadio }} + {{ useWaterRadio }}
与昨日相比
与上月相比
与上年相比
-
- - +{{ useElectRadio }} +
+ + {{ useElectRadio }}
- -{{ useElectRadio }} + {{ useElectRadio }}
与昨日相比
与上月相比
与上年相比
-
- - +{{ useUnitRadio }} +
+ + {{ useUnitRadio }}
- -{{ useUnitRadio }} + {{ useUnitRadio }}
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%", diff --git a/src/views/hotWater/energyAnalysis/components/temReport.vue b/src/views/hotWater/energyAnalysis/components/temReport.vue index fcade05..e6eab20 100644 --- a/src/views/hotWater/energyAnalysis/components/temReport.vue +++ b/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%", diff --git a/src/views/hotWater/energyAnalysis/components/waterReport.vue b/src/views/hotWater/energyAnalysis/components/waterReport.vue index 6553c2a..a29214d 100644 --- a/src/views/hotWater/energyAnalysis/components/waterReport.vue +++ b/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%", diff --git a/src/views/hotWater/energyQuery/components/energy.vue b/src/views/hotWater/energyQuery/components/energy.vue index 7245372..6505800 100644 --- a/src/views/hotWater/energyQuery/components/energy.vue +++ b/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 = [ diff --git a/src/views/hotWater/hotPumpLog/index.vue b/src/views/hotWater/hotPumpLog/index.vue new file mode 100644 index 0000000..e69a793 --- /dev/null +++ b/src/views/hotWater/hotPumpLog/index.vue @@ -0,0 +1,1080 @@ + + + + diff --git a/src/views/hotWater/waterControl/index.vue b/src/views/hotWater/waterControl/index.vue index fec54f0..14236c7 100644 --- a/src/views/hotWater/waterControl/index.vue +++ b/src/views/hotWater/waterControl/index.vue @@ -67,59 +67,67 @@ />
-
运行状态模式:
+
开关控制:
- - - - +
-
-
故障信息:
- +
+
+
+
故障信息:
+ {{ item.alarmStatus }} + {{ + item.alarmStatus + }} +
+
+
运行状态:
+ {{ item.runningStatus }} + 不运行 +
+
+
实际温度:
+
{{ item.temp }}℃
+
+
+
设定温度:
+
+ {{ item.alarmStatus }} - {{ - item.alarmStatus - }} -
-
-
实际温度:
-
{{ item.temp }}℃
-
-
-
设定温度:
-
- -
+ v-model="item.tempSet" + placeholder="请输入" + @keyup.enter.native=" + handleEnter( + item, + item.tempSet, + item.tempSetId, + '设定温度', + '℃' + ) + " + @input="handleInput(item)" + @blur="handleBlur()" + >
@@ -272,7 +280,7 @@
-
一次50分钟
+
总共:{{ item.counterSet * 50 }}分钟
@@ -336,7 +344,7 @@ item.delayTimeSet, item.delayTimeSetId, '回水温度设定延时时间', - 'S' + 'min' ) " @input="handleInput(item)" @@ -367,6 +375,25 @@ +
+
最低液位设置值:
+ +
%
+
@@ -437,15 +464,131 @@
- +
+
+ +
+
+
一键启动:
+
+ + +
+
+ +
+
+
+
+
供水温度:
+
{{ item.temp }}℃
+
+ +
+
供水压力
+
{{ item.pressure }}bar
+
+ +
+
故障信息:
+ {{ item.alarmStatus }} + {{ + item.alarmStatus + }} +
+ +
+
+ +
-->
+ +
+
+
+
上限:
+ +
+
bar
+
m
+
+
+
下限:
+ +
+
bar
+
m
+
+
+
数字上限:
+ +
+
+
数字下限:
+ +
+
+
校准值:
+ +
+
bar
+
m
+
+
+
当前值:
+
+ {{ item.temp }}℃ + {{ item.pressure }}bar + {{ item.waterLevel }}% + {{ item.temp }} +
+
+
+
@@ -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 { diff --git a/src/views/hotWater/waterMonitor/index.vue b/src/views/hotWater/waterMonitor/index.vue index 045da6e..849bb60 100644 --- a/src/views/hotWater/waterMonitor/index.vue +++ b/src/views/hotWater/waterMonitor/index.vue @@ -1,1112 +1,20 @@ - - + \ No newline at end of file diff --git a/src/views/hotWater/waterMonitor/waterMonitorDetails copy.vue b/src/views/hotWater/waterMonitor/waterMonitorDetails copy.vue new file mode 100644 index 0000000..a099470 --- /dev/null +++ b/src/views/hotWater/waterMonitor/waterMonitorDetails copy.vue @@ -0,0 +1,2398 @@ + + + + + + diff --git a/src/views/hotWater/waterMonitor/waterMonitorDetails.vue b/src/views/hotWater/waterMonitor/waterMonitorDetails.vue new file mode 100644 index 0000000..34d378d --- /dev/null +++ b/src/views/hotWater/waterMonitor/waterMonitorDetails.vue @@ -0,0 +1,2164 @@ + + + + + + diff --git a/src/views/region/index.vue b/src/views/region/index.vue index 034138d..6128e76 100644 --- a/src/views/region/index.vue +++ b/src/views/region/index.vue @@ -202,7 +202,7 @@ :title="dialogTitle" :visible.sync="isDialogOpen" @close="addExpenseClose" - width="700px" + width="730px" append-to-body > + + + + + + + + + + +