import TitleBox from "../../Component/TitleBox";
import ScrollBoard from "../../../Component/ScrollBoard";
// import { useAppSelector } from "../../../../store/hooks";
// import { selectOrderCompletionWO } from "../../../../store/HomePageSlice";
function RightDown2() {
  // const data = useAppSelector(selectOrderCompletionWO);
  // console.log("222222封装工单完成情况+", data);
  const config = {
    header: ["序号", "设备名称", "运行频率", "设备状态"],
    headerHeight: 30,
    rowNum: 5,
    headerBGC: "rgba(4, 74, 132, 0.2)",
    oddRowBGC: "rgba(4, 74, 132, 0.2)",
    evenRowBGC: "rgba(11, 84, 153, 0.36)",
    columnWidth: [110, 180, 120, 120],
    align: ["center", "left", "left", "center"],
    data: [
      ['1','产线1的名称','<span style=color:#fff>未运行</span>','<span style=color:#3984FF><span style=display:inline-block;width:7px;height:7px;border-radius:4px;background:#2760FF;vertical-align:middle;margin-right:5px;margin-bottom:5px;></span>正常</span>'],
      ['2','产线1的名称','<span style=color:#30E89A>未运行</span>','<span style=color:#FF0C0C><span style=display:inline-block;width:7px;height:7px;border-radius:4px;background:#FF0C0C;vertical-align:middle;margin-right:5px;margin-bottom:5px;></span>故障</span>'],
      ['3','产线1的名称','<span style=color:#fff>未运行</span>','<span style=color:#3984FF><span style=display:inline-block;width:7px;height:7px;border-radius:4px;background:#2760FF;vertical-align:middle;margin-right:5px;margin-bottom:5px;></span>正常</span>'],
      ['4','产线1的名称','<span style=color:#30E89A>未运行</span>','<span style=color:#3984FF><span style=display:inline-block;width:7px;height:7px;border-radius:4px;background:#2760FF;vertical-align:middle;margin-right:5px;margin-bottom:5px;></span>正常</span>'],
      ['5','产线1的名称','<span style=color:#fff>未运行</span>','<span style=color:#FF0C0C><span style=display:inline-block;width:7px;height:7px;border-radius:4px;background:#FF0C0C;vertical-align:middle;margin-right:5px;margin-bottom:5px;></span>故障</span>']
    ],
  };
  // let arr: any = [];
  // data &&
  //   data.map((item: any, index: any) => {
  //     let arrInner = [];
  //     arrInner.push(
  //       item.workOrderNo ? item.workOrderNo : "-",
  //       item.planQuantity
  //         ? item.planQuantity
  //         : item.planQuantity === 0
  //         ? item.planQuantity
  //         : "-",
  //       item.actualPutIn
  //         ? item.actualPutIn
  //         : item.actualPutIn === 0
  //         ? item.actualPutIn
  //         : "-",
  //       item.actualQuantity
  //         ? item.actualQuantity
  //         : item.actualQuantity === 0
  //         ? item.actualQuantity
  //         : "-",
  //       item.completeness
  //         ? item.completeness + "%"
  //         : item.completeness === 0
  //         ? item.completeness + "%"
  //         : "-"
  //     );
  //     arr.push(arrInner);
  //   });
  // config.data = arr;
  return (
    <div className="left_down2">
      <TitleBox title="fan_run5" />
      {/* <div style={{ marginTop: "8px" }}>
        <ScrollBoard
          config={config}
          style={{ width: "476px", height: "155px" }}
        />
      </div> */}
      {/* {data.length !== 0 && (
        <div style={{ marginTop: "15px" }}>
          <ScrollBoard
            config={config}
            style={{ width: "500px", height: "440px" }}
          />
        </div>
      )} */}
        <p
          style={{
            color: "#cccf",
            fontSize: "24px",
            userSelect: "none",
            textAlign: "center",
            paddingTop: "72px",
          }}
        >
          暂无数据
        </p>
    </div>
  );
}
export default RightDown2;
