Commit f2573870 authored by 朱超's avatar 朱超

换热站趋势图更新

parent 027ae4a3
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
<el-option label="水单耗" :value="3" /> <el-option label="水单耗" :value="3" />
<el-option label="度日数热耗" :value="4" /> <el-option label="度日数热耗" :value="4" />
<el-option label="一网回温" :value="5" /> <el-option label="一网回温" :value="5" />
<el-option label="一网万平米流量" :value="6" /> <!-- <el-option label="一网万平米流量" :value="6" />
<el-option label="换热站板换效率" :value="7" /> <el-option label="换热站板换效率" :value="7" />
<el-option label="换热站二网均温" :value="8" /> <el-option label="换热站二网均温" :value="8" /> -->
<!-- <el-option label="二网温差" :value="9" /> <!-- <el-option label="二网温差" :value="9" />
<el-option label="二网均温" :value="10" /> --> <el-option label="二网均温" :value="10" /> -->
</el-select> </el-select>
...@@ -308,11 +308,9 @@ function postQOQlistFun() { ...@@ -308,11 +308,9 @@ function postQOQlistFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postQOQlistFun();
}, 600000);
} }
}); });
} }
...@@ -335,11 +333,9 @@ function postHeatUctFun() { ...@@ -335,11 +333,9 @@ function postHeatUctFun() {
// postHeatUct(params).then((res) => { // postHeatUct(params).then((res) => {
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postHeatUctFun();
}, 600000);
} }
}); });
} }
...@@ -351,11 +347,9 @@ function postElecUcFun() { ...@@ -351,11 +347,9 @@ function postElecUcFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postElecUcFun();
}, 600000);
} }
}); });
} }
...@@ -367,11 +361,9 @@ function postWaterUcFun() { ...@@ -367,11 +361,9 @@ function postWaterUcFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postWaterUcFun();
}, 600000);
} }
}); });
} }
...@@ -383,11 +375,9 @@ function postDayHeatFun() { ...@@ -383,11 +375,9 @@ function postDayHeatFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postDayHeatFun();
}, 600000);
} }
}); });
} }
...@@ -399,11 +389,9 @@ function postFirBackTFun() { ...@@ -399,11 +389,9 @@ function postFirBackTFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postFirBackTFun();
}, 600000);
} }
}); });
} }
...@@ -415,11 +403,9 @@ function postWPMLLFun() { ...@@ -415,11 +403,9 @@ function postWPMLLFun() {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { if (res.success === true) {
pageInitFun(res); pageInitFun(res);
} else if (res.status == 9) { } else {
setInterval(function () { tabloading.value = false;
tabloading.value = false; ElMessage.error(res.message);
this.postWPMLLFun();
}, 600000);
} }
}); });
} }
...@@ -458,7 +444,7 @@ function postSecAvgTUcFun() { ...@@ -458,7 +444,7 @@ function postSecAvgTUcFun() {
function pageInitFun(res) { function pageInitFun(res) {
tableData.length = 0; tableData.length = 0;
res.data.datalist.forEach((element) => { res.data.hourWater.forEach((element) => {
let tableArr = { let tableArr = {
transferName: element.transferName, transferName: element.transferName,
gatherTime: element.gatherTime, gatherTime: element.gatherTime,
...@@ -472,7 +458,7 @@ function pageInitFun(res) { ...@@ -472,7 +458,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.datalist); echartData.value = dataDeal(res.data.hourWater);
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]);
...@@ -481,22 +467,22 @@ function pageInitFun(res) { ...@@ -481,22 +467,22 @@ function pageInitFun(res) {
echartData.value.forEach((element) => { echartData.value.forEach((element) => {
let data1 = []; let data1 = [];
let data2 = []; let data2 = [];
element.listInfo.forEach((item) => { element.listInfo.forEach((item) => {
data1.push(item.temperature); data1.push(item.temperature);
data2.push(parseFloat(item.uc).toFixed(2)); data2.push(parseFloat(item.uc).toFixed(2));
}); });
echartSeries.push( echartSeries.push(
{ // {
name: element.transferName + "温度", // name: element.transferName + "温度",
type: "line", // type: "line",
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value + " ℃"; // return value + " ℃";
}, // },
}, // },
data: data1, // data: data1,
}, // },
{ {
name: element.transferName + "能耗", name: element.transferName + "能耗",
type: "bar", type: "bar",
...@@ -510,6 +496,23 @@ function pageInitFun(res) { ...@@ -510,6 +496,23 @@ function pageInitFun(res) {
} }
); );
}); });
let temperatureListArr = [];
res.data.temperatureList.forEach(element => {
temperatureListArr.push(element)
})
echartSeries.push(
{
name: "平均温度",
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + " ℃";
},
},
data: temperatureListArr,
},
)
echartSeries.forEach((element, index) => { echartSeries.forEach((element, index) => {
echartDataLegend.push(element.name); echartDataLegend.push(element.name);
}); });
......
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