Commit 4d53368e authored by 朱超's avatar 朱超

换热站趋势图更新

parent a3c2038d
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-card class="card-contianer"> <el-card class="card-contianer">
<el-form <el-form
:inline="true" :inline="true"
:model="heatUctInfo" :model="enertyInfo"
class="demo-form-inline" class="demo-form-inline"
:rules="rules" :rules="rules"
ref="formRef" ref="formRef"
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
<el-form-item label="换热机组:" prop="transferId"> <el-form-item label="换热机组:" prop="transferId">
<el-cascader <el-cascader
:options="options" :options="options"
v-model="heatUctInfo.transferId" v-model="enertyInfo.transferId"
:props="props" :props="props"
collapse-tags collapse-tags
clearable clearable
:show-all-levels="false" :show-all-levels="false"
placeholder="请选择" placeholder="请选择"
style="width: 220px" style="width: 220px"
@change="transferIdChange"
/> />
</el-form-item> </el-form-item>
<el-form-item label="开始时间:" prop="startTime"> <el-form-item label="开始时间:" prop="startTime">
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择开始时间" placeholder="选择开始时间"
style="width: 180px" style="width: 180px"
v-model="heatUctInfo.startTime" v-model="enertyInfo.startTime"
/> />
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
...@@ -38,13 +39,13 @@ ...@@ -38,13 +39,13 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择结束时间" placeholder="选择结束时间"
style="width: 180px" style="width: 180px"
v-model="heatUctInfo.endTime" v-model="enertyInfo.endTime"
/> />
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
<el-form-item label="时间类型"> <el-form-item label="时间类型">
<el-select <el-select
v-model="heatUctInfo.interval" v-model="enertyInfo.interval"
placeholder="请选择" placeholder="请选择"
style="min-width: 80px" style="min-width: 80px"
> >
...@@ -56,11 +57,12 @@ ...@@ -56,11 +57,12 @@
</el-form-item> </el-form-item>
<el-form-item label="能耗类型"> <el-form-item label="能耗类型">
<el-select <el-select
v-model="heatUctInfo.type" v-model="enertyInfo.type"
placeholder="请选择" placeholder="请选择"
style="min-width: 150px" style="min-width: 150px"
@change="selTypeChange"
> >
<!-- <el-option label="用量环比" :value="0" /> --> <el-option label="用量环比" :value="0" />
<el-option label="热单耗" :value="1" /> <el-option label="热单耗" :value="1" />
<el-option label="电单耗" :value="2" /> <el-option label="电单耗" :value="2" />
<el-option label="水单耗" :value="3" /> <el-option label="水单耗" :value="3" />
...@@ -73,6 +75,17 @@ ...@@ -73,6 +75,17 @@
<el-option label="二网均温" :value="10" /> --> <el-option label="二网均温" :value="10" /> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="用量环比类型" v-show="energyTypeDis">
<el-select
v-model="enertyInfo.energyType"
placeholder="请选择"
style="min-width: 80px"
>
<el-option label="耗水" :value="2" />
<el-option label="耗热" :value="3" />
<el-option label="耗电" :value="4" />
</el-select>
</el-form-item>
<!-- 控制表格和图表的开关 --> <!-- 控制表格和图表的开关 -->
<el-form-item> <el-form-item>
<el-switch <el-switch
...@@ -128,7 +141,18 @@ import * as echarts from "echarts"; ...@@ -128,7 +141,18 @@ import * as echarts from "echarts";
import http from "../../api/http"; import http from "../../api/http";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { postQOQlist, postHeatUct, postElecUc, postWaterUc, postDayHeat, postFirBackT, postWPMLL, postHeatEffiUc, postSecAvgTUc, postSecAbsTUc } from "../../api/analysis"; import {
postQOQlist,
postHeatUct,
postElecUc,
postWaterUc,
postDayHeat,
postFirBackT,
postWPMLL,
postHeatEffiUc,
postSecAvgTUc,
postSecAbsTUc,
} from "../../api/analysis";
const options = reactive([]); const options = reactive([]);
const enterpriseId = ref(); const enterpriseId = ref();
const props = { multiple: true, emitPath: false }; const props = { multiple: true, emitPath: false };
...@@ -145,16 +169,19 @@ const tableHeight = ref(500); ...@@ -145,16 +169,19 @@ const tableHeight = ref(500);
const computedWidth = ref("1200px"); const computedWidth = ref("1200px");
const computedHeight = ref("500px"); const computedHeight = ref("500px");
const formRef = ref(null); const formRef = ref(null);
const heatUctInfo = reactive({ const enertyInfo = reactive({
supplyId: null, supplyId: null,
transferId: [], transferId: [],
startTime: null, startTime: null,
endTime: null, endTime: null,
energyType: 3,
interval: 2, interval: 2,
type: 1, type: 1,
}); });
const heatUctInfoStyle = reactive(0); const enertyInfoStyle = reactive(0);
const energyType = reactive(1);
const qoqEnergyType = reactive(3);
const energyTypeDis = ref(false);
const rules = { const rules = {
transferId: [{ required: true, message: "请选择换热机组", trigger: "blur" }], transferId: [{ required: true, message: "请选择换热机组", trigger: "blur" }],
startTime: [{ required: true, message: "请选择开始时间", trigger: "blur" }], startTime: [{ required: true, message: "请选择开始时间", trigger: "blur" }],
...@@ -168,6 +195,12 @@ function getEnterprise() { ...@@ -168,6 +195,12 @@ function getEnterprise() {
} }
} }
function transferIdChange() {
if(enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个')
}
}
//获取换热机组列表 //获取换热机组列表
function getSupplys() { function getSupplys() {
var result = store.getters.getEnterprise(); var result = store.getters.getEnterprise();
...@@ -205,8 +238,12 @@ function getSupplys() { ...@@ -205,8 +238,12 @@ function getSupplys() {
function sendClick() { function sendClick() {
formRef.value.validate((valid) => { formRef.value.validate((valid) => {
if(enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个');
return false;
}
if (valid) { if (valid) {
switch (heatUctInfo.type) { switch (enertyInfo.type) {
case 0: case 0:
postQOQlistFun(); postQOQlistFun();
break; //用量环比 break; //用量环比
...@@ -242,10 +279,32 @@ function sendClick() { ...@@ -242,10 +279,32 @@ function sendClick() {
}); });
} }
function delJson() {}
function selTypeChange() {
console.log(energyTypeDis);
if (enertyInfo.type == 0) {
energyTypeDis.value = true;
} else {
energyTypeDis.value = false;
}
}
//换热站机组能耗数据接口(用量环比) //换热站机组能耗数据接口(用量环比)
function postQOQlistFun() { function postQOQlistFun() {
tabloading.value = true; tabloading.value = true;
postQOQlist(heatUctInfo).then((res) => { let params = {
supplyIdList: null,
idList: [
"EF0864C6-1A01-41CF-94BE-523B4D6063DB",
"977A50B1-B3E5-40F0-9A16-89A1A4BFE57C",
],
startTime: "2024-01-01 00:00:00",
endTime: "2024-02-01 00:00:00",
energyType: 2,
interval: 1,
};
postQOQlist(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -271,7 +330,7 @@ function postHeatUctFun() { ...@@ -271,7 +330,7 @@ function postHeatUctFun() {
endTime: "2024-10-30 00:00:00", endTime: "2024-10-30 00:00:00",
interval: 2, interval: 2,
}; };
postHeatUct(heatUctInfo).then((res) => { postHeatUct(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
// postHeatUct(params).then((res) => { // postHeatUct(params).then((res) => {
if (res.success === true) { if (res.success === true) {
...@@ -288,7 +347,7 @@ function postHeatUctFun() { ...@@ -288,7 +347,7 @@ function postHeatUctFun() {
//换热站机组能耗数据接口(电单耗) //换热站机组能耗数据接口(电单耗)
function postElecUcFun() { function postElecUcFun() {
tabloading.value = true; tabloading.value = true;
postElecUc(heatUctInfo).then((res) => { postElecUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -304,7 +363,7 @@ function postElecUcFun() { ...@@ -304,7 +363,7 @@ function postElecUcFun() {
//换热站机组能耗数据接口(水单耗) //换热站机组能耗数据接口(水单耗)
function postWaterUcFun() { function postWaterUcFun() {
tabloading.value = true; tabloading.value = true;
postWaterUc(heatUctInfo).then((res) => { postWaterUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -320,7 +379,7 @@ function postWaterUcFun() { ...@@ -320,7 +379,7 @@ function postWaterUcFun() {
//换热站机组能耗数据接口(度日数热耗) //换热站机组能耗数据接口(度日数热耗)
function postDayHeatFun() { function postDayHeatFun() {
tabloading.value = true; tabloading.value = true;
postDayHeat(heatUctInfo).then((res) => { postDayHeat(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -336,7 +395,7 @@ function postDayHeatFun() { ...@@ -336,7 +395,7 @@ function postDayHeatFun() {
//换热站机组能耗数据接口(一网回温) //换热站机组能耗数据接口(一网回温)
function postFirBackTFun() { function postFirBackTFun() {
tabloading.value = true; tabloading.value = true;
postFirBackT(heatUctInfo).then((res) => { postFirBackT(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -352,7 +411,7 @@ function postFirBackTFun() { ...@@ -352,7 +411,7 @@ function postFirBackTFun() {
//换热站机组能耗数据接口(一网万平米流量) //换热站机组能耗数据接口(一网万平米流量)
function postWPMLLFun() { function postWPMLLFun() {
tabloading.value = true; tabloading.value = true;
postWPMLL(heatUctInfo).then((res) => { postWPMLL(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -368,7 +427,7 @@ function postWPMLLFun() { ...@@ -368,7 +427,7 @@ function postWPMLLFun() {
//换热站机组能耗数据接口(一网万平米流量) //换热站机组能耗数据接口(一网万平米流量)
function postHeatEffiUcFun() { function postHeatEffiUcFun() {
tabloading.value = true; tabloading.value = true;
postHeatEffiUc(heatUctInfo).then((res) => { postHeatEffiUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -384,7 +443,7 @@ function postHeatEffiUcFun() { ...@@ -384,7 +443,7 @@ function postHeatEffiUcFun() {
//换热站机组能耗数据接口(换热站二网均温) //换热站机组能耗数据接口(换热站二网均温)
function postSecAvgTUcFun() { function postSecAvgTUcFun() {
tabloading.value = true; tabloading.value = true;
postSecAvgTUc(heatUctInfo).then((res) => { postSecAvgTUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
...@@ -399,7 +458,7 @@ function postSecAvgTUcFun() { ...@@ -399,7 +458,7 @@ function postSecAvgTUcFun() {
function pageInitFun(res) { function pageInitFun(res) {
tableData.length = 0; tableData.length = 0;
res.data.forEach((element) => { res.data.datalist.forEach((element) => {
let tableArr = { let tableArr = {
transferName: element.transferName, transferName: element.transferName,
gatherTime: element.gatherTime, gatherTime: element.gatherTime,
...@@ -413,7 +472,7 @@ function pageInitFun(res) { ...@@ -413,7 +472,7 @@ function pageInitFun(res) {
echartSeries.length = 0; echartSeries.length = 0;
echartDataLegend.length = 0; echartDataLegend.length = 0;
echartDataTime.length = 0; echartDataTime.length = 0;
echartData.value = dataDeal(res.data); echartData.value = dataDeal(res.data.datalist);
echartData.value[0].listInfo.forEach((element) => { echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) { if (element.gatherTime) {
echartDataTime.push(element.gatherTime.split(" 00:00:00")[0]); echartDataTime.push(element.gatherTime.split(" 00:00:00")[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment