|
|
@@ -66,7 +66,6 @@
|
|
|
<div
|
|
|
style="
|
|
|
display: flex;
|
|
|
- flex: 1;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
"
|
|
|
@@ -396,6 +395,12 @@
|
|
|
'params',
|
|
|
this.getParams(res['steamQualityInspectionRecord'] || {})
|
|
|
);
|
|
|
+ // 综合数据更新后重新 resize 所有图表
|
|
|
+ this.$nextTick(() => {
|
|
|
+ Object.values(this.charts).forEach(
|
|
|
+ (chart) => chart && chart.resize()
|
|
|
+ );
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
getParams(data = {}) {
|
|
|
@@ -620,6 +625,7 @@
|
|
|
]
|
|
|
};
|
|
|
chart.setOption(option);
|
|
|
+ setTimeout(() => chart.resize(), 100);
|
|
|
this.charts.water = chart;
|
|
|
},
|
|
|
initReturnChart(res) {
|
|
|
@@ -676,6 +682,7 @@
|
|
|
]
|
|
|
};
|
|
|
chart.setOption(option);
|
|
|
+ setTimeout(() => chart.resize(), 100);
|
|
|
this.charts.return = chart;
|
|
|
},
|
|
|
initAlertPieChart(res) {
|
|
|
@@ -834,6 +841,11 @@
|
|
|
};
|
|
|
chart.setOption(option);
|
|
|
this.charts.alertPie = chart;
|
|
|
+ // alertStatsData 更新后 alert-panel 高度变化,需要 resize 其他图表
|
|
|
+ this.$nextTick(() => {
|
|
|
+ chart.resize();
|
|
|
+ Object.values(this.charts).forEach((c) => c && c.resize());
|
|
|
+ });
|
|
|
},
|
|
|
initAlertTrendChart(res) {
|
|
|
if (!this.$refs.alertTrendChart) return;
|
|
|
@@ -889,6 +901,7 @@
|
|
|
]
|
|
|
};
|
|
|
chart.setOption(option);
|
|
|
+ this.$nextTick(() => chart.resize());
|
|
|
this.charts.alertTrend = chart;
|
|
|
},
|
|
|
initElectricityTrend(res) {
|
|
|
@@ -940,6 +953,7 @@
|
|
|
]
|
|
|
};
|
|
|
chart.setOption(option);
|
|
|
+ this.$nextTick(() => chart.resize());
|
|
|
this.charts.electricityTrendChart = chart;
|
|
|
}
|
|
|
}
|