update rightbar

This commit is contained in:
lb
2024-01-25 10:24:08 +08:00
parent be5fbe1c01
commit b27a20f3cf
8 changed files with 77 additions and 60 deletions

View File

@@ -0,0 +1,24 @@
import { useSelector } from "react-redux";
import cls from "../index.module.scss";
const SmokeHandleTable = () => {
const smokeInfo = useSelector((state) => state.smoke?.info);
return (
<div className={cls.info__item_groups}>
<div className={cls.info__item}>
: {(+smokeInfo?.O2_float)?.toFixed(2) || 0}%
</div>
<div className={cls.info__item}>
氮氧化物浓度: {(+smokeInfo?.NOX_float)?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
二氧化硫浓度: {(+smokeInfo?.SO2_float)?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
颗粒物浓度: {(+smokeInfo?.dust_float)?.toFixed(2) || 0}mg/
</div>
</div>
);
};
export default SmokeHandleTable;

View File

@@ -1,7 +1,6 @@
import cls from "./index.module.css";
import { randomInt } from "../../../../utils";
import * as echarts from "echarts";
import { Radio, Select } from "antd";
import { Select } from "antd";
import ReactECharts from "echarts-for-react";
import { useEffect, useState } from "react";
import { useSelector } from "react-redux";
@@ -194,7 +193,7 @@ const SmokeTrendChart = (props) => {
onChange={(value, option) => handleDateChange(value)}
/>
</div>
{options && <ReactECharts option={options} style={{ height: "240px" }} />}
{options && <ReactECharts option={options} style={{ height: "220px" }} />}
{!options && (
<p
style={{
@@ -278,9 +277,6 @@ function getOptions(source, period, trend) {
color: "#213259a0",
},
},
// interval: 10,
// min: 0,
// max: 100,
},
series: [
{
@@ -338,7 +334,6 @@ function getOptions(source, period, trend) {
type: "shadow",
},
className: "xc-chart-tooltip",
// backgroundColor: ''
},
};
}

View File

@@ -93,6 +93,7 @@
.radioGroup_button_wrapper.ant-radio-button-wrapper-checked {
background: #02457e !important;
}
.graphBaseDesc {
margin: 0 12px;
line-height: 1;

View File

@@ -2,28 +2,13 @@ import cls from "./index.module.scss";
import Container from "../../Container";
import TechSplitline from "../TechSplitline";
import SmokeTrendChart from "./SmokeTrendChart";
import { useSelector } from "react-redux";
import SmokeHandleTable from "./SmokeHandleTable";
function SmokeHandle(props) {
const smokeInfo = useSelector((state) => state.smoke?.info);
return (
<Container title="烟气处理" icon="smoke" className={cls.smokeHandle}>
<div className={`${cls.smokeHandle__content} flex flex-col`}>
<div className={cls.info__item_groups}>
<div className={cls.info__item}>
: {(+smokeInfo?.O2_float)?.toFixed(2) || 0}%
</div>
<div className={cls.info__item}>
氮氧化物浓度: {(+smokeInfo?.NOX_float)?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
二氧化硫浓度: {(+smokeInfo?.SO2_float)?.toFixed(2) || 0}mg/
</div>
<div className={cls.info__item}>
颗粒物浓度: {(+smokeInfo?.dust_float)?.toFixed(2) || 0}mg/
</div>
</div>
<SmokeHandleTable />
<TechSplitline />
<SmokeTrendChart />
</div>

View File

@@ -3,7 +3,7 @@
background: url(../../../assets/smoke.png) no-repeat;
background-size: 100% 100%;
width: 626px;
height: 540px;
height: 490px;
.smokeHandle__content {
margin-top: 8px;
}
@@ -13,19 +13,17 @@
border-radius: 2px;
color: hsl(0, 0%, 100%, 0.9);
box-shadow: inset 0 0 17px 0px hsla(0, 0%, 100%, 0.15);
// width: 288px;
height: 56px;
height: 32px;
font-size: 16px;
letter-spacing: 1.43px;
line-height: 56px;
line-height: 32px;
text-align: center;
user-select: none;
}
.info__item_groups {
margin-bottom: 12px;
margin-left: 8px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
gap: 4px;
}