Files
xuchang-new/src/components/Common/KilnInfo/Kiln.jsx
‘937886381’ f702e950ac 修改
2024-08-30 17:17:45 +08:00

35 lines
1013 B
JavaScript

/*
* @Author: zhp
* @Date: 2024-08-20 14:08:32
* @LastEditTime: 2024-08-30 09:50:51
* @LastEditors: zhp
* @Description:
*/
import cls from "./kiln.module.scss";
import Container from "../../Container";
import { useSelector } from "react-redux";
import { stateNameMap } from "../../../store/features/kilnSlice";
export default function Kiln() {
const kilnInfo = useSelector((state) => state.kiln);
const infos = Object.keys(kilnInfo).map((key) => ({
label: stateNameMap[key],
value: kilnInfo[key],
}));
return (
<Container title="窑炉信息" icon="kiln" className={cls.leftBar__top}>
<div className={cls.leftBar__top__content}>
{infos.slice(0,infos.length-1).map((item) => (
<div key={item.label} className={cls.info__item}>
<span className={cls.label}>{item.label}</span>
<span className={cls.value}>{item.value}</span>
{/* {item.label}: {item.value} */}
</div>
))}
</div>
</Container>
);
}