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

换热站趋势图更新

parent a3c2038d
......@@ -3,7 +3,7 @@
<el-card class="card-contianer">
<el-form
:inline="true"
:model="heatUctInfo"
:model="enertyInfo"
class="demo-form-inline"
:rules="rules"
ref="formRef"
......@@ -11,13 +11,14 @@
<el-form-item label="换热机组:" prop="transferId">
<el-cascader
:options="options"
v-model="heatUctInfo.transferId"
v-model="enertyInfo.transferId"
:props="props"
collapse-tags
clearable
:show-all-levels="false"
placeholder="请选择"
style="width: 220px"
@change="transferIdChange"
/>
</el-form-item>
<el-form-item label="开始时间:" prop="startTime">
......@@ -27,7 +28,7 @@
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择开始时间"
style="width: 180px"
v-model="heatUctInfo.startTime"
v-model="enertyInfo.startTime"
/>
</el-config-provider>
</el-form-item>
......@@ -38,13 +39,13 @@
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择结束时间"
style="width: 180px"
v-model="heatUctInfo.endTime"
v-model="enertyInfo.endTime"
/>
</el-config-provider>
</el-form-item>
<el-form-item label="时间类型">
<el-select
v-model="heatUctInfo.interval"
v-model="enertyInfo.interval"
placeholder="请选择"
style="min-width: 80px"
>
......@@ -56,11 +57,12 @@
</el-form-item>
<el-form-item label="能耗类型">
<el-select
v-model="heatUctInfo.type"
v-model="enertyInfo.type"
placeholder="请选择"
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="2" />
<el-option label="水单耗" :value="3" />
......@@ -73,6 +75,17 @@
<el-option label="二网均温" :value="10" /> -->
</el-select>
</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-switch
......@@ -128,7 +141,18 @@ import * as echarts from "echarts";
import http from "../../api/http";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
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 enterpriseId = ref();
const props = { multiple: true, emitPath: false };
......@@ -145,16 +169,19 @@ const tableHeight = ref(500);
const computedWidth = ref("1200px");
const computedHeight = ref("500px");
const formRef = ref(null);
const heatUctInfo = reactive({
const enertyInfo = reactive({
supplyId: null,
transferId: [],
startTime: null,
endTime: null,
energyType: 3,
interval: 2,
type: 1,
});
const heatUctInfoStyle = reactive(0);
const enertyInfoStyle = reactive(0);
const energyType = reactive(1);
const qoqEnergyType = reactive(3);
const energyTypeDis = ref(false);
const rules = {
transferId: [{ required: true, message: "请选择换热机组", trigger: "blur" }],
startTime: [{ required: true, message: "请选择开始时间", trigger: "blur" }],
......@@ -168,6 +195,12 @@ function getEnterprise() {
}
}
function transferIdChange() {
if(enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个')
}
}
//获取换热机组列表
function getSupplys() {
var result = store.getters.getEnterprise();
......@@ -205,8 +238,12 @@ function getSupplys() {
function sendClick() {
formRef.value.validate((valid) => {
if(enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个');
return false;
}
if (valid) {
switch (heatUctInfo.type) {
switch (enertyInfo.type) {
case 0:
postQOQlistFun();
break; //用量环比
......@@ -222,16 +259,16 @@ function sendClick() {
case 4:
postDayHeatFun(); //度日数热耗
break;
case 5:
case 5:
postFirBackTFun(); //一网回温
break;
case 6:
case 6:
postWPMLLFun(); //一网万平米流量
break;
case 7:
case 7:
postHeatEffiUcFun(); //换热站板换效率
break;
case 8:
case 8:
postSecAvgTUcFun(); //换热站二网均温
break;
}
......@@ -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() {
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"));
if (res.success === true) {
pageInitFun(res);
......@@ -271,7 +330,7 @@ function postHeatUctFun() {
endTime: "2024-10-30 00:00:00",
interval: 2,
};
postHeatUct(heatUctInfo).then((res) => {
postHeatUct(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
// postHeatUct(params).then((res) => {
if (res.success === true) {
......@@ -288,7 +347,7 @@ function postHeatUctFun() {
//换热站机组能耗数据接口(电单耗)
function postElecUcFun() {
tabloading.value = true;
postElecUc(heatUctInfo).then((res) => {
postElecUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -304,7 +363,7 @@ function postElecUcFun() {
//换热站机组能耗数据接口(水单耗)
function postWaterUcFun() {
tabloading.value = true;
postWaterUc(heatUctInfo).then((res) => {
postWaterUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -320,7 +379,7 @@ function postWaterUcFun() {
//换热站机组能耗数据接口(度日数热耗)
function postDayHeatFun() {
tabloading.value = true;
postDayHeat(heatUctInfo).then((res) => {
postDayHeat(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -336,7 +395,7 @@ function postDayHeatFun() {
//换热站机组能耗数据接口(一网回温)
function postFirBackTFun() {
tabloading.value = true;
postFirBackT(heatUctInfo).then((res) => {
postFirBackT(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -352,7 +411,7 @@ function postFirBackTFun() {
//换热站机组能耗数据接口(一网万平米流量)
function postWPMLLFun() {
tabloading.value = true;
postWPMLL(heatUctInfo).then((res) => {
postWPMLL(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -368,7 +427,7 @@ function postWPMLLFun() {
//换热站机组能耗数据接口(一网万平米流量)
function postHeatEffiUcFun() {
tabloading.value = true;
postHeatEffiUc(heatUctInfo).then((res) => {
postHeatEffiUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -384,7 +443,7 @@ function postHeatEffiUcFun() {
//换热站机组能耗数据接口(换热站二网均温)
function postSecAvgTUcFun() {
tabloading.value = true;
postSecAvgTUc(heatUctInfo).then((res) => {
postSecAvgTUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
......@@ -399,7 +458,7 @@ function postSecAvgTUcFun() {
function pageInitFun(res) {
tableData.length = 0;
res.data.forEach((element) => {
res.data.datalist.forEach((element) => {
let tableArr = {
transferName: element.transferName,
gatherTime: element.gatherTime,
......@@ -413,7 +472,7 @@ function pageInitFun(res) {
echartSeries.length = 0;
echartDataLegend.length = 0;
echartDataTime.length = 0;
echartData.value = dataDeal(res.data);
echartData.value = dataDeal(res.data.datalist);
echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) {
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