From 4cc5dd5eae2a3f5c2839dab1842713270e201d2b Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 29 四月 2024 13:56:07 +0800 Subject: [PATCH] # --- src/pages/left/components/agv-charts.jsx | 64 ++++++++-------- /dev/null | 31 ------- src/pages/right/index.jsx | 4 package-lock.json | 58 ++++++++++++++ package.json | 1 src/pages/left/index.jsx | 6 src/pages/right/components/inout-charts.jsx | 31 +++++++ 7 files changed, 127 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9501035..5db9499 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "three-asrs", "version": "0.0.0", "dependencies": { + "@jiaminghi/data-view-react": "^1.2.5", "@react-three/csg": "^2.2.0", "@react-three/drei": "^9.70.3", "@react-three/fiber": "^8.13.0", @@ -2861,6 +2862,63 @@ "node": ">=8" } }, + "node_modules/@jiaminghi/bezier-curve": { + "version": "0.0.9", + "resolved": "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz", + "integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==", + "dependencies": { + "@babel/runtime": "^7.5.5" + } + }, + "node_modules/@jiaminghi/c-render": { + "version": "0.4.3", + "resolved": "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz", + "integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@jiaminghi/bezier-curve": "*", + "@jiaminghi/color": "*", + "@jiaminghi/transition": "*" + } + }, + "node_modules/@jiaminghi/charts": { + "version": "0.2.18", + "resolved": "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz", + "integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@jiaminghi/c-render": "^0.4.3" + } + }, + "node_modules/@jiaminghi/color": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/@jiaminghi/color/-/color-1.1.3.tgz", + "integrity": "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg==" + }, + "node_modules/@jiaminghi/data-view-react": { + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/@jiaminghi/data-view-react/-/data-view-react-1.2.5.tgz", + "integrity": "sha512-hxlfg0yULj7nUde8oj5hB9pUWrHqFyuPUeJWNG70YPPHFnWXqmlWCx1aB1OpqD3lwxaI1aKkA4YJRhkvfLyKrg==", + "dependencies": { + "@jiaminghi/charts": "^0.2" + }, + "engines": { + "node": ">=8", + "npm": ">=5" + }, + "peerDependencies": { + "react": "^16.8.0", + "react-dom": "^16.8.0" + } + }, + "node_modules/@jiaminghi/transition": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz", + "integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==", + "dependencies": { + "@babel/runtime": "^7.5.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", diff --git a/package.json b/package.json index 947ce6d..ca96205 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@jiaminghi/data-view-react": "^1.2.5", "@react-three/csg": "^2.2.0", "@react-three/drei": "^9.70.3", "@react-three/fiber": "^8.13.0", diff --git a/src/pages/left/components/agv-charts.jsx b/src/pages/left/components/agv-charts.jsx index 130b621..2e2e57f 100644 --- a/src/pages/left/components/agv-charts.jsx +++ b/src/pages/left/components/agv-charts.jsx @@ -1,34 +1,34 @@ -// import { ScrollBoard } from '@jiaminghi/data-view-react'; +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' }} -// /> -// ); -// }; +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; +export default AgvCharts; diff --git a/src/pages/left/index.jsx b/src/pages/left/index.jsx index ac51b28..9be5251 100644 --- a/src/pages/left/index.jsx +++ b/src/pages/left/index.jsx @@ -7,7 +7,7 @@ import StockCharts from './components/stock-charts'; import TaskCharts from './components/task-charts'; -// import AgvCharts from './components/agv-charts'; +import AgvCharts from './components/agv-charts'; import CapacityCharts from './components/capacity-charts'; const Left = () => { @@ -36,8 +36,8 @@ <TaskCharts /> </Panel> <Panel title="AGV淇℃伅"> - {/* <AgvCharts /> */} - <CapacityCharts /> + <AgvCharts /> + {/* <CapacityCharts /> */} </Panel> </div> <div diff --git a/src/pages/right/components/Allerway.jsx b/src/pages/right/components/Allerway.jsx deleted file mode 100644 index ad2b140..0000000 --- a/src/pages/right/components/Allerway.jsx +++ /dev/null @@ -1,31 +0,0 @@ -// import { ScrollBoard } from '@jiaminghi/data-view-react'; - -// const Allerway = () => { -// const config = { -// header: ['缂栧彿', '鏃堕棿', '绫诲瀷', '鍖哄煙', '鍗曞彿'], -// data: [ -// ['1', '2023-06-01 12:00:00', '鍏ュ簱', 'A1', 'b12c3'], -// ['2', '2023-06-01 12:00:00', '鍑哄簱', 'A2', 'b12c3'], -// ['3', '2023-06-01 12:00:00', '鍏ュ簱', 'A3', 'b12c3'], -// ['4', '2023-06-01 12:00:00', '鍑哄簱', 'A4', 'b12c3'], -// ['5', '2023-06-01 12:00:00', '鍏ュ簱', 'A5', 'b12c3'], -// ['6', '2023-06-01 12:00:00', '鍑哄簱', 'A6', 'b12c3'], -// ['7', '2023-06-01 12:00:00', '鍏ュ簱', 'A7', 'b12c3'], -// ['8', '2023-06-01 12:00:00', '鍑哄簱', 'A8', 'b12c3'], -// ], -// 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 Allerway; diff --git a/src/pages/right/components/inout-charts.jsx b/src/pages/right/components/inout-charts.jsx new file mode 100644 index 0000000..94f6a1b --- /dev/null +++ b/src/pages/right/components/inout-charts.jsx @@ -0,0 +1,31 @@ +import { ScrollBoard } from '@jiaminghi/data-view-react'; + +const InOutCharts = () => { + const config = { + header: ['缂栧彿', '鏃堕棿', '绫诲瀷', '鍖哄煙', '鍗曞彿'], + data: [ + ['1', '2023-06-01 12:00:00', '鍏ュ簱', 'A1', 'b12c3'], + ['2', '2023-06-01 12:00:00', '鍑哄簱', 'A2', 'b12c3'], + ['3', '2023-06-01 12:00:00', '鍏ュ簱', 'A3', 'b12c3'], + ['4', '2023-06-01 12:00:00', '鍑哄簱', 'A4', 'b12c3'], + ['5', '2023-06-01 12:00:00', '鍏ュ簱', 'A5', 'b12c3'], + ['6', '2023-06-01 12:00:00', '鍑哄簱', 'A6', 'b12c3'], + ['7', '2023-06-01 12:00:00', '鍏ュ簱', 'A7', 'b12c3'], + ['8', '2023-06-01 12:00:00', '鍑哄簱', 'A8', 'b12c3'], + ], + 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 InOutCharts; diff --git a/src/pages/right/index.jsx b/src/pages/right/index.jsx index 168e2c2..576c077 100644 --- a/src/pages/right/index.jsx +++ b/src/pages/right/index.jsx @@ -6,7 +6,7 @@ import Panel from '@/components/panel'; -// import Allerway from './components/Allerway'; +import InOutCharts from './components/inout-charts'; import StatCharts from './components/stat-charts'; import TaskCharts from './components/task-charts'; // import Handles from './components/Handles'; @@ -32,7 +32,7 @@ > <div className="overflow-hidden h-full"> <Panel title="鍑哄叆搴撲俊鎭�"> - {/* <Allerway /> */} + <InOutCharts /> </Panel> <Panel title="鍑哄叆搴撶粺璁�"> <StatCharts /> -- Gitblit v1.9.1