From 8877cd129a4dc36f7848101a78dbefe18263a6f8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 28 四月 2024 15:22:04 +0800
Subject: [PATCH] #

---
 src/components/panel.jsx                      |    2 -
 src/pages/left/components/agv-charts.jsx      |   34 +++++++++++++++++
 src/pages/left/components/task-charts.jsx     |    7 +--
 /dev/null                                     |   34 -----------------
 src/pages/left/components/capacity-charts.jsx |   17 +-------
 package.json                                  |    6 +-
 src/pages/left/index.jsx                      |   10 +++--
 7 files changed, 48 insertions(+), 62 deletions(-)

diff --git a/package.json b/package.json
index baaef17..947ce6d 100644
--- a/package.json
+++ b/package.json
@@ -17,15 +17,15 @@
     "@tweenjs/tween.js": "^21.0.0",
     "antd": "^5.16.4",
     "axios": "^1.6.2",
+    "echarts": "^5.4.2",
+    "echarts-for-react": "^3.0.2",
     "maath": "0.10.7",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "react-router-dom": "^6.15.0",
     "react-spring": "^9.7.1",
     "three": "^0.153.0",
-    "valtio": "^1.12.1",
-    "echarts": "^5.4.2",
-    "echarts-for-react": "^3.0.2"
+    "valtio": "^1.12.1"
   },
   "devDependencies": {
     "@types/react": "^18.2.66",
diff --git a/src/components/panel.jsx b/src/components/panel.jsx
index c38e60e..9c27083 100644
--- a/src/components/panel.jsx
+++ b/src/components/panel.jsx
@@ -42,8 +42,6 @@
     });
   };
 
-  console.log(styles);
-
   return (
     <div className="w-full mt-2" ref={cardRef}>
       {/* <BorderBox8 dur={12}> */}
diff --git a/src/pages/left/components/AgvPanel.tsx b/src/pages/left/components/AgvPanel.tsx
deleted file mode 100644
index 5b34104..0000000
--- a/src/pages/left/components/AgvPanel.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { ScrollBoard } from '@jiaminghi/data-view-react';
-
-const AgvPanel = () => {
-  const config = {
-    header: ['缂栧彿', '鐢甸噺', '浣嶇疆', '閫熷害'],
-    data: [
-      ['AGV1', '100%', 'A1', '1m/s'],
-      ['AGV2', '100%', 'A2', '1m/s'],
-      ['AGV3', '100%', 'A3', '1m/s'],
-      ['AGV4', '100%', 'A4', '1m/s'],
-      ['AGV5', '100%', 'A5', '1m/s'],
-      ['AGV6', '100%', 'A6', '1m/s'],
-      ['AGV7', '100%', 'A7', '1m/s'],
-      ['AGV8', '100%', 'A8', '1m/s'],
-      ['AGV9', '100%', 'A9', '1m/s'],
-      ['AGV10', '100%', 'A10', '1m/s'],
-      ['AGV11', '100%', 'A11', '1m/s'],
-    ],
-    headerBGC: '#00fff138',
-    oddRowBGC: '#00000017',
-    evenRowBGC: '#ededed13',
-    headerHeight: 28,
-    rowNum: 8,
-    columnWidth: [80, 70, 60, 100],
-  };
-  return (
-    <ScrollBoard
-      config={config}
-      style={{ width: '100%', height: '220px', fontSize: '12px', marginBottom: '8px' }}
-    />
-  );
-};
-
-export default AgvPanel;
diff --git a/src/pages/left/components/agv-charts.jsx b/src/pages/left/components/agv-charts.jsx
new file mode 100644
index 0000000..130b621
--- /dev/null
+++ b/src/pages/left/components/agv-charts.jsx
@@ -0,0 +1,34 @@
+// import { ScrollBoard } from '@jiaminghi/data-view-react';
+
+// const AgvCharts = () => {
+//   const config = {
+//     header: ['缂栧彿', '鐢甸噺', '浣嶇疆', '閫熷害'],
+//     data: [
+//       ['AGV1', '100%', 'A1', '1m/s'],
+//       ['AGV2', '100%', 'A2', '1m/s'],
+//       ['AGV3', '100%', 'A3', '1m/s'],
+//       ['AGV4', '100%', 'A4', '1m/s'],
+//       ['AGV5', '100%', 'A5', '1m/s'],
+//       ['AGV6', '100%', 'A6', '1m/s'],
+//       ['AGV7', '100%', 'A7', '1m/s'],
+//       ['AGV8', '100%', 'A8', '1m/s'],
+//       ['AGV9', '100%', 'A9', '1m/s'],
+//       ['AGV10', '100%', 'A10', '1m/s'],
+//       ['AGV11', '100%', 'A11', '1m/s'],
+//     ],
+//     headerBGC: '#00fff138',
+//     oddRowBGC: '#00000017',
+//     evenRowBGC: '#ededed13',
+//     headerHeight: 28,
+//     rowNum: 8,
+//     columnWidth: [80, 70, 60, 100],
+//   };
+//   return (
+//     <ScrollBoard
+//       config={config}
+//       style={{ width: '100%', height: '220px', fontSize: '12px', marginBottom: '8px' }}
+//     />
+//   );
+// };
+
+// export default AgvCharts;
diff --git a/src/pages/left/components/Capacity.tsx b/src/pages/left/components/capacity-charts.jsx
similarity index 76%
rename from src/pages/left/components/Capacity.tsx
rename to src/pages/left/components/capacity-charts.jsx
index f212c21..b0c7de1 100644
--- a/src/pages/left/components/Capacity.tsx
+++ b/src/pages/left/components/capacity-charts.jsx
@@ -1,19 +1,9 @@
-// import { observer } from "mobx-react-lite";
 import React, { useEffect, useState } from 'react';
 import * as echarts from 'echarts/core';
 import ReactECharts from 'echarts-for-react';
-import { GetAreaLocationWeekSummary } from 'apis';
-import { config } from '../../config';
-import { useRequest } from 'ahooks';
 
-function Capacity() {
-  const [data, setData] = useState<Record<string, any>[]>([]);
-  useRequest(init, { ...config });
-
-  async function init() {
-    const res = await GetAreaLocationWeekSummary<Record<string, any>[]>({});
-    setData(res.resultData || []);
-  }
+const CapacityCharts = () => {
+  const [data, setData] = useState([]);
 
   const options = {
     title: {
@@ -85,5 +75,4 @@
 
   return <ReactECharts option={options} />;
 }
-// export default observer(Capacity);
-export default Capacity;
+export default CapacityCharts;
diff --git a/src/pages/left/components/Task.tsx b/src/pages/left/components/task-charts.jsx
similarity index 94%
rename from src/pages/left/components/Task.tsx
rename to src/pages/left/components/task-charts.jsx
index c78918e..613e31f 100644
--- a/src/pages/left/components/Task.tsx
+++ b/src/pages/left/components/task-charts.jsx
@@ -1,11 +1,8 @@
 import React from 'react';
 import ReactECharts from 'echarts-for-react';
-import { useRequest } from 'ahooks';
-import { config } from '../../config';
 import * as echarts from 'echarts/core';
-import { GetCurrentLocationSummary } from 'apis';
 
-const Task: React.FC = () => {
+const TaskCharts = () => {
   const trafficWay = [
     {
       name: 'HG',
@@ -154,4 +151,4 @@
   );
 };
 
-export default Task;
+export default TaskCharts;
diff --git a/src/pages/left/index.jsx b/src/pages/left/index.jsx
index a669749..7977331 100644
--- a/src/pages/left/index.jsx
+++ b/src/pages/left/index.jsx
@@ -6,8 +6,9 @@
 import Panel from '@/components/panel';
 
 import StockCharts from './components/stock-charts';
-// import Task from './modules/Task';
-// import AgvPanel from './modules/AgvPanel';
+import TaskCharts from './components/task-charts';
+// import AgvCharts from './components/agv-charts';
+import CapacityCharts from './components/capacity-charts';
 
 const Left = () => {
     const [isExpanded, setIsExpanded] = useState(true);
@@ -33,10 +34,11 @@
                     <StockCharts />
                 </Panel>
                 <Panel title="搴撳瓨绫诲瀷">
-                    {/* <Task /> */}
+                    <TaskCharts />
                 </Panel>
                 <Panel title="AGV淇℃伅">
-                    {/* <AgvPanel /> */}
+                    {/* <AgvCharts /> */}
+                    <CapacityCharts />
                 </Panel>
             </div>
             <div

--
Gitblit v1.9.1