Commit 518fa6e5 authored by 朱超's avatar 朱超

换热站趋势图优化

parent b1443579
...@@ -197,8 +197,8 @@ function getEnterprise() { ...@@ -197,8 +197,8 @@ function getEnterprise() {
} }
function transferIdChange() { function transferIdChange() {
if(enertyInfo.transferId.length > 10) { if (enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个') ElMessage.error("换热机组最多只能选择10个");
} }
} }
...@@ -239,8 +239,8 @@ function getSupplys() { ...@@ -239,8 +239,8 @@ function getSupplys() {
function sendClick() { function sendClick() {
formRef.value.validate((valid) => { formRef.value.validate((valid) => {
if(enertyInfo.transferId.length > 10) { if (enertyInfo.transferId.length > 10) {
ElMessage.error('换热机组最多只能选择10个'); ElMessage.error("换热机组最多只能选择10个");
return false; return false;
} }
if (valid) { if (valid) {
...@@ -503,21 +503,19 @@ function pageInitFun(res) { ...@@ -503,21 +503,19 @@ function pageInitFun(res) {
); );
}); });
let temperatureListArr = []; let temperatureListArr = [];
res.data.temperatureList.forEach(element => { res.data.temperatureList.forEach((element) => {
temperatureListArr.push(element) temperatureListArr.push(element);
}) });
echartSeries.push( echartSeries.push({
{ name: "平均温度",
name: "平均温度", type: "line",
type: "line", tooltip: {
tooltip: { valueFormatter: function (value) {
valueFormatter: function (value) { return value + " ℃";
return value + " ℃";
},
},
data: temperatureListArr,
}, },
) },
data: temperatureListArr,
});
echartSeries.forEach((element, index) => { echartSeries.forEach((element, index) => {
echartDataLegend.push(element.name); echartDataLegend.push(element.name);
...@@ -576,6 +574,7 @@ function echartInit() { ...@@ -576,6 +574,7 @@ function echartInit() {
// var company = "T"; // var company = "T";
option = { option = {
color: ["#91cc75", "#fac858", "#5470c6", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#ea7ccc", "#766451", "#cba1ff", "#470c66"],
title: { title: {
text: "换热站趋势图", text: "换热站趋势图",
top: 0, top: 0,
...@@ -591,6 +590,7 @@ function echartInit() { ...@@ -591,6 +590,7 @@ function echartInit() {
}, },
}, },
legend: { legend: {
width: "70%",
data: echartDataLegend, data: echartDataLegend,
}, },
xAxis: [ xAxis: [
......
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