luoyang-screen/src/page/LinePage4-2/Right/RightUp.tsx
2025-02-21 11:10:35 +08:00

53 lines
1.5 KiB
TypeScript

import TitleBox from "../Component/TitleBox";
import ScrollBoard from "./../../Component/ScrollBoard";
import {useAppSelector} from "./../../../store/hooks"
import {selectLine4After} from "./../../../store/LinePageSlice"
function RightUp() {
const data = useAppSelector(selectLine4After);
const config = {
header: ["序号", "产线", "上片数据量", "成品下片数量"],
headerHeight: 32,
rowNum: 5,
align: ["center", "left", "left", "left"],
headerBGC: "rgba(79, 114, 136, 0.3)",
oddRowBGC: "rgba(79, 114, 136, 0.3)",
evenRowBGC: "rgba(76, 97, 123, 0.1)",
columnWidth: [55, 115, 100, 110],
data: [],
};
let arr:any = []
// @ts-ignore
if (data.sectionDet && data.sectionDet.length > 0) {
// @ts-ignore
data.sectionDet.map((item, index) => {
let arrInner = []
arrInner.push(index + 1, item.lineName, item.inputNum, item.outputNum)
arr.push(arrInner)
})
}
config.data = arr
return (
<div className="right_up">
<TitleBox title={"right_up"} />
<div style={{ padding: "10px", height: "213px" }}>
{arr.length>0?<ScrollBoard
config={config}
style={{ width: "380px", height: "193px" }}
/>:(<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "50px",
margin:0
}}
>
</p>)}
</div>
</div>
);
}
export default RightUp;