| | |
| | | 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', |
| | | evenRowBGC: '#ededed13', |
| | | headerHeight: 28, |
| | | rowNum: 10, |
| | | columnWidth: [80, 120, 100, 130], |
| | | columnWidth: [80, 200], |
| | | }} |
| | | style={{ width: '100%', height: '400px', fontSize: '12px', marginBottom: '8px' }} |
| | | /> |