From 5a51d49437976e2fbb26e33231c00531fa3f8bff Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 14 五月 2024 14:04:28 +0800
Subject: [PATCH] #

---
 src/pages/left/components/agv-charts.jsx |    4 ++--
 src/pages/left/components/loc-charts.jsx |   28 ++++++++++++++++++++++------
 src/components/camera.jsx                |    2 +-
 src/pages/left/index.jsx                 |    4 ++--
 4 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/components/camera.jsx b/src/components/camera.jsx
index c835502..b450ce9 100644
--- a/src/components/camera.jsx
+++ b/src/components/camera.jsx
@@ -12,7 +12,7 @@
         <>
             <PerspectiveCamera
                 makeDefault
-                position={[0, 150, 1100]}
+                position={[0, 350, 1150]}
                 fov={48}
                 near={1}
                 far={100000}
diff --git a/src/pages/left/components/agv-charts.jsx b/src/pages/left/components/agv-charts.jsx
index 3c5846e..52e882f 100644
--- a/src/pages/left/components/agv-charts.jsx
+++ b/src/pages/left/components/agv-charts.jsx
@@ -40,10 +40,10 @@
         oddRowBGC: '#00000017',
         evenRowBGC: '#ededed13',
         headerHeight: 28,
-        rowNum: 8,
+        rowNum: 10,
         columnWidth: [80, 100, 90, 80],
       }}
-      style={{ width: '100%', height: '280px', fontSize: '12px', marginBottom: '8px' }}
+      style={{ width: '100%', height: '400px', fontSize: '12px', marginBottom: '8px' }}
     />
   );
 };
diff --git a/src/pages/left/components/task-charts.jsx b/src/pages/left/components/loc-charts.jsx
similarity index 83%
rename from src/pages/left/components/task-charts.jsx
rename to src/pages/left/components/loc-charts.jsx
index 44a091a..a4ca30d 100644
--- a/src/pages/left/components/task-charts.jsx
+++ b/src/pages/left/components/loc-charts.jsx
@@ -1,9 +1,9 @@
-import React from 'react';
+import { useEffect, useState } from 'react';
 import ReactECharts from 'echarts-for-react';
 import * as echarts from 'echarts/core';
 
-const TaskCharts = () => {
-  const trafficWay = [
+const LocCharts = () => {
+  const [trafficWay, setTrafficWay] = useState([
     {
       name: 'HG',
       value: 20,
@@ -24,7 +24,23 @@
       name: 'PG',
       value: 30,
     },
-  ];
+  ]);
+
+  useEffect(() => {
+    const timer = setInterval(() => {
+      // getAgvCharts().then(res => {
+      //   setApiData(res.reverse().map(item => {
+      //     return ["AGV" + item.agvNo, "0000" + Number(item.qrcode), item.angle.toFixed(1) + "掳", item.height]
+      //   }))
+      // })
+      console.log("aasadsa");
+    }, 1000);
+
+    return () => {
+      clearInterval(timer);
+    }
+  }, []);
+
 
   const data = [];
   const color = ['#00ffff', '#00cfff', '#006ced', '#ffe000', '#ffa800', '#ff5b00'];
@@ -145,10 +161,10 @@
   return (
     <>
       <div>
-        <ReactECharts style={{ height: '250px' }} option={option} />
+        <ReactECharts style={{ height: '300px' }} option={option} />
       </div>
     </>
   );
 };
 
-export default TaskCharts;
+export default LocCharts;
diff --git a/src/pages/left/index.jsx b/src/pages/left/index.jsx
index 4922587..27b8158 100644
--- a/src/pages/left/index.jsx
+++ b/src/pages/left/index.jsx
@@ -6,7 +6,7 @@
 import Panel from '@/components/panel';
 
 import StockCharts from './components/stock-charts';
-import TaskCharts from './components/task-charts';
+import LocCharts from './components/loc-charts';
 import AgvCharts from './components/agv-charts';
 import CapacityCharts from './components/capacity-charts';
 
@@ -33,7 +33,7 @@
                     <StockCharts />
                 </Panel>
                 <Panel title="搴撳瓨绫诲瀷">
-                    <TaskCharts />
+                    <LocCharts />
                 </Panel>
                 <Panel title="AGV淇℃伅">
                     <AgvCharts />

--
Gitblit v1.9.1