From 6b4f76384577bb09df63758c1523dd5d2b94d87f Mon Sep 17 00:00:00 2001 From: luoyifan Date: Thu, 12 Jun 2025 11:57:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A7=E6=9E=B6=E5=8E=8B=E5=8A=9B=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/example/ExampleUtil.js | 88 +++++++++++++++++++++++++++++++++++++++ src/example/example1.js | 101 ++++++++++++++++++++++++--------------------- 2 files changed, 141 insertions(+), 48 deletions(-) diff --git a/src/example/ExampleUtil.js b/src/example/ExampleUtil.js index 39c814d..78bd8e0 100644 --- a/src/example/ExampleUtil.js +++ b/src/example/ExampleUtil.js @@ -1,3 +1,91 @@ +export function buildRackPerformanceData(rows, cols) { + + const spacingX = 60 // X轴间距 + const spacingZ = 2.5 // Y轴间距 + + // 创建一个二维数组来存储点阵数据 + const data = new Map() + for (let row = 0; row < rows; row++) { + for (let col = 0; col < cols; col++) { + // 计算每个点的坐标 + const node = { + id: 'wp_' + row + '_' + col, + t: 'rack', + v: true, + tf: [[4.196, 0.1, 5.882], [0, 270, 0], [1, 1, 1]], + dt: { + rackDepth: 1, + rackWidth: 5.1, + rackHeight: 4.2, + levelCount: 3, + bayCount: 4, + hideFloor: false, + extendColumns: true, + columnSpacing: 1, + bays: [ + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }], + center: [], + in: [], + out: [] + } + } + node.tf[0][0] = row * spacingX + node.tf[0][1] = 0.01 + node.tf[0][2] = col * spacingZ + node.tf[1] = [0, 0, 0] + node.tf[2] = [1, 0.4, 1] + data.set(node.id, node) + } + } + + debugger + return Array.from(data.values()) +} + /** * 构建点阵性能数据 * @param t diff --git a/src/example/example1.js b/src/example/example1.js index 6368283..3f4ef9e 100644 --- a/src/example/example1.js +++ b/src/example/example1.js @@ -1,4 +1,4 @@ -import { buildAgvPerformanceData, buildPointPerformanceData } from '@/example/ExampleUtil.js' +import { buildAgvPerformanceData, buildPointPerformanceData, buildRackPerformanceData } from '@/example/ExampleUtil.js' export default { project_uuid: 'example1', @@ -168,51 +168,51 @@ export default { extendColumns: true, columnSpacing: 1, bays: [ - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, - { bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }], + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }, + { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }], center: [], in: [], out: [] @@ -378,14 +378,14 @@ export default { t: 'way', v: true, tf: [[2, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]], - dt: { in: [], out: [], center: ['way2'] } + dt: { in: ['way2'], out: ['way2'], center: [] } }, { id: 'way2', t: 'way', v: true, tf: [[5, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]], - dt: { in: [], out: [], center: ['way1'] } + dt: { in: ['way1'], out: ['way1'], center: [] } } ] }, @@ -396,6 +396,10 @@ export default { { catalogCode: '__f2', t: 'floor', items: buildPointPerformanceData('carton', 100, 100) + }, + { + catalogCode: '__f3', t: 'floor', + items: buildRackPerformanceData(5, 200) } ], elevator: [], // 电梯 @@ -405,6 +409,7 @@ export default { { label: '仓库楼层', // 目录分组名 items: [ + { catalogCode: '__f3', label: '货架测试 (-f3)' }, { catalogCode: '__f2', label: '压力测试 (-f2)' }, // 目录项 { catalogCode: '__f1', label: '地下室 (-f1)' }, // 目录项 { catalogCode: 'f1', label: '一楼 (f1)' },