From cc3a8f6647edc1ddb2e9fecdee0e089a5696cde8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 15 五月 2024 16:47:25 +0800
Subject: [PATCH] #
---
src/pages/right/components/task-charts.jsx | 2 +-
src/api/report/index.js | 8 ++++++++
src/pages/right/components/inout-charts.jsx | 10 +++++-----
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/api/report/index.js b/src/api/report/index.js
index 180db24..ca69eef 100644
--- a/src/api/report/index.js
+++ b/src/api/report/index.js
@@ -22,4 +22,12 @@
return res.data.data;
}
return Promise.reject(new Error(res.data.msg));
+}
+
+export async function getInout(_params) {
+ const res = await request.get('/digital/charts/inout', _params);
+ if (res.data.code === 200) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.msg));
}
\ No newline at end of file
diff --git a/src/pages/right/components/inout-charts.jsx b/src/pages/right/components/inout-charts.jsx
index 0342784..617f7af 100644
--- a/src/pages/right/components/inout-charts.jsx
+++ b/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,7 +35,7 @@
return (
<ScrollBoard
config={{
- header: ['缂栧彿', '杞借揣鍙�', '璐у弶', '浣滀笟'],
+ header: ['缂栧彿', '浣滀笟'],
data: apiData,
headerBGC: '#00fff138',
oddRowBGC: '#00000017',
diff --git a/src/pages/right/components/task-charts.jsx b/src/pages/right/components/task-charts.jsx
index f139811..88ea37a 100644
--- a/src/pages/right/components/task-charts.jsx
+++ b/src/pages/right/components/task-charts.jsx
@@ -19,7 +19,7 @@
setSeriesData(res.data);
setWeek(res.week);
})
- }, 1000);
+ }, 60000);
return () => {
clearInterval(timer);
--
Gitblit v1.9.1