| | |
| | | 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 = () => { |
| | | |
| | |
| | | |
| | | 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); |
| | |
| | | return ( |
| | | <ScrollBoard |
| | | config={{ |
| | | header: ['编号', '载货台', '货叉', '作业'], |
| | | header: ['编号', '作业'], |
| | | data: apiData, |
| | | headerBGC: '#00fff138', |
| | | oddRowBGC: '#00000017', |