update websocket reconnect policy & fix some bugs

This commit is contained in:
lb
2024-01-03 15:07:43 +08:00
parent 6b838ce089
commit 0f56538c27
8 changed files with 124 additions and 40 deletions

View File

@@ -94,7 +94,7 @@ function getOptions(showChart, hisState, runState) {
.fill(1)
.map((_, index) => {
const today = new Date();
const dtimestamp = today - index * 24 * 60 * 60 * 1000;
const dtimestamp = today - (index + 1) * 24 * 60 * 60 * 1000;
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
dtimestamp
).getDate()}`;

View File

@@ -36,7 +36,7 @@ export default function getOptions(seriesData, name) {
.fill(1)
.map((_, index) => {
const today = new Date();
const dtimestamp = today - index * 24 * 60 * 60 * 1000;
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
dtimestamp
).getDate()}`;

View File

@@ -133,7 +133,7 @@ function getOptions(source, period, trend) {
},
},
yAxis: {
name: "单位m³/h",
name: source == 'O2_float' ? "单位:%" : "单位mg/m³",
nameTextStyle: {
color: "#fff",
fontSize: 10,

View File

@@ -12,16 +12,16 @@ function SmokeHandle(props) {
<div className={`${cls.smokeHandle__content} flex flex-col`}>
<div className={cls.info__item_groups}>
<div className={cls.info__item}>
: {smokeInfo?.O2_float || 0}%
: {smokeInfo?.O2_float?.toFixed(2) || 0}%
</div>
<div className={cls.info__item}>
氮氧化物浓度: {smokeInfo?.NOX_float || 0}mg/
氮氧化物浓度: {smokeInfo?.NOX_float?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
二氧化硫浓度: {smokeInfo?.SO2_float || 0}mg/
二氧化硫浓度: {smokeInfo?.SO2_float?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
颗粒物浓度: {smokeInfo?.dust_float || 0}mg/
颗粒物浓度: {smokeInfo?.dust_float?.toFixed(2) || 0}mg/
</div>
</div>
<TechSplitline />