2.21日版
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ReactECharts from "echarts-for-react";
|
||||
import TitleBox from "../Component/TitleBox";
|
||||
import ScrollBoard from "./../../Component/ScrollBoard";
|
||||
import SwitchButton from "../Component/SwitchButton";
|
||||
// import SwitchButton from "../Component/SwitchButton";
|
||||
import { useState } from "react";
|
||||
import getOptions from "../../Component/LineChart/chart.config";
|
||||
import {useAppSelector} from "./../../../store/hooks"
|
||||
@@ -29,10 +29,10 @@ function CenterDown() {
|
||||
{ name: "周", ename: "week" },
|
||||
{ name: "月", ename: "month" },
|
||||
];
|
||||
const [activeName, setActiveName] = useState<string>(nameList[0].ename);
|
||||
const handleButtonChange = (activeName: string) => {
|
||||
setActiveName(activeName);
|
||||
};
|
||||
const [activeName, setActiveName] = useState<string>(nameList[1].ename);
|
||||
// const handleButtonChange = (activeName: string) => {
|
||||
// setActiveName(activeName);
|
||||
// };
|
||||
const config = {
|
||||
header: ["序号", "报警时间", "报警设备", "报警内容"],
|
||||
headerHeight: 36,
|
||||
@@ -41,7 +41,7 @@ function CenterDown() {
|
||||
headerBGC: "rgba(79, 114, 136, 0.3)",
|
||||
oddRowBGC: "rgba(79, 114, 136, 0.3)",
|
||||
evenRowBGC: "rgba(76, 97, 123, 0.1)",
|
||||
columnWidth: [80, 137, 137, 137],
|
||||
columnWidth: [80, 137, 177, 97],
|
||||
data: []
|
||||
};
|
||||
// 报警数据
|
||||
@@ -64,7 +64,7 @@ function CenterDown() {
|
||||
});
|
||||
}
|
||||
config.data = arr
|
||||
// 产线成品率
|
||||
// 工段成品率
|
||||
// @ts-ignore
|
||||
if (data.todayProductionRates && Object.keys(data.todayProductionRates).length > 0) {
|
||||
// @ts-ignore
|
||||
@@ -181,12 +181,12 @@ function CenterDown() {
|
||||
</p>)}
|
||||
</div>
|
||||
</div>
|
||||
{/* 产线成品率 */}
|
||||
{/* 工段成品率 */}
|
||||
<div className="center_down_inner flex-col right_box">
|
||||
<TitleBox title={"center_down_right"} />
|
||||
<div className="left_up_switch">
|
||||
{/* <div className="left_up_switch">
|
||||
<SwitchButton nameList={nameList} onChange={handleButtonChange} />
|
||||
</div>
|
||||
</div> */}
|
||||
{chartData.xData.length>0 && (
|
||||
<div className="chart_box">
|
||||
{<ReactECharts option={options} style={{ height: "100%" }} />}
|
||||
|
||||
Reference in New Issue
Block a user