5个页面的ws接口
This commit is contained in:
52
src/page/LinePage1-1/Right/RightUp.tsx
Normal file
52
src/page/LinePage1-1/Right/RightUp.tsx
Normal file
@@ -0,0 +1,52 @@
|
||||
import TitleBox from "../Component/TitleBox";
|
||||
import ScrollBoard from "./../../Component/ScrollBoard";
|
||||
import {useAppSelector} from "./../../../store/hooks"
|
||||
import {selectLine1Before} from "./../../../store/LinePageSlice"
|
||||
function RightUp() {
|
||||
const data = useAppSelector(selectLine1Before);
|
||||
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: [70, 90, 106, 114],
|
||||
data: [],
|
||||
};
|
||||
let arr:any = []
|
||||
// @ts-ignore
|
||||
if (data.sumProductionDets && data.sumProductionDets.length > 0) {
|
||||
// @ts-ignore
|
||||
data.sumProductionDets.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;
|
||||
Reference in New Issue
Block a user