#
luxiaotao1123
2024-08-20 9d71e24e7982f6915e5f832512925bee9b245f35
src/pages/right/components/inout-charts.jsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { ScrollBoard } from '@jiaminghi/data-view-react';
import { getAgvCharts } from '@/api/report';
import { getAgvCharts, getInout } from '@/api/report';
const InOutCharts = () => {
@@ -20,12 +20,12 @@
  useEffect(() => {
    const timer = setInterval(() => {
      getAgvCharts().then(res => {
      getInout().then(res => {
        setApiData(res.reverse().map(item => {
          return ["AGV" + item.agvNo, item.loaderTheta + "°", item.forkLength, item.inOutFlag]
          return ["AGV" + item.agvNo, item.name]
        }))
      })
    }, 1000);
    }, 3000);
    return () => {
      clearInterval(timer);
@@ -35,14 +35,14 @@
  return (
    <ScrollBoard
      config={{
        header: ['编号', '载货台', '货叉', '作业'],
        header: ['编号', '作业'],
        data: apiData,
        headerBGC: '#00fff138',
        oddRowBGC: '#00000017',
        evenRowBGC: '#ededed13',
        headerHeight: 28,
        rowNum: 10,
        columnWidth: [80, 120, 100, 130],
        columnWidth: [80, 200],
      }}
      style={{ width: '100%', height: '400px', fontSize: '12px', marginBottom: '8px' }}
    />