add centermenu

This commit is contained in:
lb
2023-07-03 15:48:20 +08:00
parent 8d134803b7
commit 1062775867
6 changed files with 43 additions and 22 deletions

View File

@@ -9,7 +9,7 @@ import SocketContext from '../../../store/socket-data-provider';
function GasI(props) {
const [showChart, setShowChart] = useState(true);
const { runState } = useContext(SocketContext);
const { runState, hisState } = useContext(SocketContext);
const dataList = runState?.combustionAirFlow
? [
@@ -35,9 +35,9 @@ function GasI(props) {
{ id: 7, name: '7#助燃风', value: '172m³/h' },
{ id: 8, name: '8#助燃风', value: '145m³/h' },
];
const seriesData = runState?.combustionAir
? Object.keys(runState.combustionAir).map(
(key) => runState.combustionAir[key],
const seriesData = hisState?.combustionAir
? Object.keys(hisState.combustionAir).map(
(key) => hisState.combustionAir[key],
)
: Array(8).fill(Array(7).fill(0));

View File

@@ -0,0 +1,5 @@
import cls from './index.module.less';
export default function CenterMenu() {
return <div className={cls.centerMenu}>cetner menu</div>;
}

View File

@@ -0,0 +1,9 @@
.centerMenu {
position: fixed;
top: 80px;
left: 240px;
height: 200px;
width: 1000px;
background: #1ed65278;
color: white;
}

View File

@@ -1,19 +1,22 @@
import React from 'react'
import React from 'react';
import CenterMenu from './CenterMenu';
import Item2 from './RightTable';
import Item1 from './LeftBoxes';
import Item2 from './RightTable'
import Item1 from './LeftBoxes'
import cls from './index.module.less'
import cls from './index.module.less';
export default function index() {
return (
<div className='flex justify-between w-full h-full'>
<div className={cls.leftGrid}>
<Item1 />
</div>
<div className={cls.rightTable}>
<Item2 />
</div>
</div>
)
return (
<>
<CenterMenu />
<div className="flex justify-between w-full h-full">
<div className={cls.leftGrid}>
<Item1 />
</div>
<div className={cls.rightTable}>
<Item2 />
</div>
</div>
</>
);
}

View File

@@ -12,7 +12,7 @@ function EnergyCost(props) {
className={`${cls.info__item} ${cls.hAuto} flex flex-col justify-center items-center self-stretch`}
>
<span> </span>
<span>922kwh</span>
<span>922kWh</span>
</div>
<div className={cls.info__item_groups}>
<div className={cls.info__item}> : 32Km³</div>