{"id":7538,"date":"2026-06-29T16:20:46","date_gmt":"2026-06-29T08:20:46","guid":{"rendered":"https:\/\/www.hightopo.com\/blog\/?p=7538"},"modified":"2026-06-29T16:20:46","modified_gmt":"2026-06-29T08:20:46","slug":"%e4%ba%8c%e4%b8%89%e7%bb%b4%e8%a1%a8%e5%8d%95%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e6%9c%ba%e6%9f%9c%e6%8b%96%e6%8b%bd%e4%b8%8a%e4%b8%8b%e6%9e%b6%ef%bc%9f-%e5%9b%be%e6%89%91%e6%99%ba%e6%85%a7%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/www.hightopo.com\/blog\/7538.html","title":{"rendered":"\u4e8c\u4e09\u7ef4\u8868\u5355\u5982\u4f55\u5b9e\u73b0\u673a\u67dc\u62d6\u62fd\u4e0a\u4e0b\u67b6\uff1f| \u56fe\u6251\u667a\u6167\u673a\u623f"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/01-1.webp\"><img loading=\"lazy\" width=\"1080\" height=\"1078\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/01-1.webp\" alt=\"\" class=\"wp-image-7563\"\/><\/a><\/figure>\n\n\n\n<p>\u5728\u6570\u636e\u4e2d\u5fc3\u8fd0\u7ef4\u7684\u65e5\u5e38\u4e2d\uff0c\u8bbe\u5907\u4e0a\u4e0b\u67b6\u7ba1\u7406\u4e00\u76f4\u662f\u4e2a\u201c\u7ecf\u5178\u96be\u9898\u201d\uff1a\u8fd0\u7ef4\u4eba\u5458\u9700\u8981\u53cd\u590d\u5728\u00a0Excel\u00a0\u8868\u683c\u3001U\u00a0\u4f4d\u56fe\u7eb8\u548c\u7269\u7406\u673a\u67dc\u4e4b\u95f4\u6765\u56de\u5207\u6362\u3002\u6574\u4e2a\u6d41\u7a0b\u4e0d\u4ec5\u8017\u65f6\u8017\u529b\uff0c\u8fd0\u7ef4\u6548\u7387\u4f4e\u4e0b\uff0c\u8fd8\u6613\u51fa\u73b0\u673a\u4f4d\u9519\u653e\u3001\u8d44\u4ea7\u8d26\u5b9e\u4e0d\u7b26\u7b49\u95ee\u9898\u3002<\/p>\n\n\n\n<ul><li>\u4f8b\u5982\u5b9a\u4f4d\u00a0A01423\u00a0\u670d\u52a1\u5668\u65f6\uff0c\u9700\u5148\u540e\u6838\u5bf9\u8868\u683c\u3001\u673a\u67dc\u56fe\u7eb8\uff0c\u786e\u8ba4\u5176\u00a0B7\u00a0\u673a\u67dc\u00a014U-16U\u00a0\u673a\u4f4d\u540e\uff0c\u518d\u53bb\u673a\u623f\u73b0\u573a\u7cbe\u786e\u67e5\u627e\u3002<\/li><\/ul>\n\n\n\n<p>\u672c\u6587\u63d0\u51fa<strong>\u4e8c\u7ef4\u8868\u5355\u8054\u52a8\u4e09\u7ef4\u673a\u67dc\u53ef\u89c6\u5316<\/strong>\u89e3\u51b3\u65b9\u6848\uff0c\u901a\u8fc7\u56fe\u6251\u521b\u65b0\u5f0f\u53ef\u89c6\u5316\u7ba1\u63a7\u7cfb\u7edf\uff0c\u8ba9\u8bbe\u5907\u7ba1\u7406\u4ece\u201c\u8868\u683c\u67e5\u627e\u201d\u5347\u7ea7\u4e3a\u201c\u7a7a\u95f4\u64cd\u4f5c\u201d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1024x576.png\" alt=\"\" class=\"wp-image-7539\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1024x576.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-300x169.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-768x432.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1536x864.png 1536w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-660x371.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>\u8be5\u6848\u4f8b\u4f9d\u6258<strong>\u62d6\u62fd\u4ea4\u4e92\u6a21\u5f0f<\/strong>\uff0c\u5b9e\u73b0\u8868\u683c\u8bbe\u5907\u76f4\u63a5\u4e0a\u67b6\u3001\u4e09\u7ef4\u573a\u666f\u8bbe\u5907\u53cd\u5411\u4e0b\u67b6\u3002\u7cfb\u7edf\u642d\u5efa\u4e00\u4f53\u5316\u4ea4\u4e92\u67b6\u6784\uff0c\u57fa\u4e8e\u5171\u4eab\u6570\u636e\u6a21\u578b\u5b9e\u73b0\u4e8c\u4e09\u7ef4\u89c6\u56fe\u6570\u636e\u5b9e\u65f6\u540c\u6b65\uff0c\u901a\u8fc7\u4e8b\u4ef6\u9a71\u52a8\u4fdd\u969c\u53cc\u5411\u62d6\u62fd\u7cbe\u51c6\u5b9a\u4f4d\uff0c\u642d\u914d\u53ef\u81ea\u9002\u5e94\u89c6\u89d2\u4e0e\u7a97\u53e3\u53d8\u5316\u7684\u52a8\u6001\u8fde\u63a5\u7ebf\u3001\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u667a\u80fd\u63a8\u8350\u7b97\u6cd5\uff0c\u4ee5\u53ca\u591a\u5c42\u4ea4\u4e92\u52a8\u753b\u4f18\u5316\u6574\u4f53\u64cd\u4f5c\u4f53\u9a8c\u3002\u4e0b\u6587\u5c06\u5bf9\u7cfb\u7edf\u7684\u8bbe\u8ba1\u601d\u8def\u4e0e\u5177\u4f53\u5b9e\u73b0\u65b9\u5f0f\u5c55\u5f00\u8be6\u7ec6\u9610\u8ff0\u3002<\/p>\n\n\n\n<h1>\u7cfb\u7edf\u5206\u6790<\/h1>\n\n\n\n<h2>01 <strong>\u8bbe\u5907\u4e0a\u4e0b\u67b6\u4ea4\u4e92<\/strong><\/h2>\n\n\n\n<h3><strong>\u8bbe\u5907\u4e0a\u67b6\u6d41\u7a0b<\/strong><\/h3>\n\n\n\n<p>\u5728\u4f20\u7edf\u00a0Excel\u00a0\u5f0f\u7ba1\u7406\u4e2d\uff0c\u4e00\u53f0\u670d\u52a1\u5668\u4ec5\u8868\u73b0\u4e3a\u4e00\u884c\u6570\u5b57\u4e0e\u6587\u5b57\u3002\u800c\u5728\u672c\u7cfb\u7edf\u4e2d\uff0c\u8bbe\u5907\u5177\u5907\u5b8c\u6574\u7684<strong>\u201c\u53ef\u62d6\u62fd\u201d\u5b9e\u4f53\u5c5e\u6027<\/strong>\uff0c\u4e0a\u67b6\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/03-3.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/03-3.gif\" alt=\"\" class=\"wp-image-7549\"\/><\/a><\/figure><\/div>\n\n\n\n<h4><strong>01<\/strong> <strong>\u6743\u9650\u6821\u9a8c<\/strong><\/h4>\n\n\n\n<p>\u7cfb\u7edf\u9996\u5148\u68c0\u67e5\u7528\u6237\u662f\u5426\u5904\u4e8e\u7f16\u8f91\u6a21\u5f0f\u2014\u2014\u9632\u6b62\u8bef\u64cd\u4f5c\u5f71\u54cd\u751f\u4ea7\u73af\u5883\u3002\u8be5\u673a\u5236\u7c7b\u4f3c\u4e8e\u7269\u7406\u673a\u623f\u9700\u51ed\u5de5\u5355\u64cd\u4f5c\uff0c\u786e\u4fdd\u5b89\u5168\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u68c0\u67e5\u7f16\u8f91\u6743\u9650<\/em><\/code>\n<code>if\u00a0(!isEditMode &amp;&amp;\u00a0event.kind !==\u00a0'sortChange')\u00a0return;<\/code><\/code><\/pre>\n\n\n\n<h4><strong>02<\/strong> <strong>\u89e6\u53d1\u62d6\u62fd\u4e0e\u673a\u4f4d\u9ad8\u4eae<\/strong><\/h4>\n\n\n\n<p>\u7528\u6237\u4ece\u8868\u683c\u4e2d\u62d6\u62fd\u4e00\u53f0\u201c\u672a\u4e0a\u67b6\u201d\u8bbe\u5907\u65f6\uff0c\u7cfb\u7edf\u6807\u8bb0\u62d6\u62fd\u65b9\u5411\uff0c\u5e76\u751f\u6210\u81ea\u5b9a\u4e49\u62d6\u62fd\u56fe\u6807\u3002\u540c\u65f6\u5728\u00a03D\u00a0\u673a\u67dc\u4e2d\u9ad8\u4eae\u6240\u6709\u7b26\u5408\u5c3a\u5bf8\u8981\u6c42\u7684\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u3002\u62d6\u62fd\u56fe\u6807\u901a\u8fc7\u72ec\u7acb\u00a0JSON\u00a0\u6587\u4ef6\u914d\u7f6e\uff0c\u652f\u6301\u6309\u9700\u81ea\u5b9a\u4e49\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u6807\u8bb0\u62d6\u62fd\u65b9\u5411\u4e3a2D\u21923D\r\nisDraggingFromTable = true;\r\nconst rowData = event.info.data;\r\n\/\/ \u521b\u5efa\u62d6\u62fd\u89c6\u89c9\u5143\u7d20\r\nevent.elementInfo = {\r\n    element: ht.Default.toCanvas('device-drag-icon.json', 24, 24),\r\n    offsetX: 0,\r\n    offsetY: 0\r\n};\r\n\/\/ \u901a\u77e53D\u89c6\u56fe\u521b\u5efa\u9ad8\u4eae\u5757\r\nevent.fire(\"createHighlightBlock\",rowData.a('unit') );<\/code><\/pre>\n\n\n\n<p>\u62d6\u62fd\u8fc7\u7a0b\u4e2d\uff0c\u76ee\u6807\u673a\u67dc\u4e0a\u6240\u6709\u53ef\u7528\u7684\u8fde\u7eed&nbsp;U&nbsp;\u4f4d\u4f1a\u4ee5\u9ad8\u4eae\u5757\u5f62\u5f0f\u5448\u73b0\uff0c\u7c7b\u4f3c\u5f71\u9662\u7a7a\u5ea7\u4f4d\u6807\u8bc6\u3002<\/p>\n\n\n\n<h4><strong>03<\/strong> <strong>\u5b9e\u65f6\u4f4d\u7f6e\u8ba1\u7b97\u4e0e\u60ac\u505c\u9ad8\u4eae<\/strong><\/h4>\n\n\n\n<p>\u9f20\u6807\u79fb\u52a8\u65f6\uff0c\u7cfb\u7edf\u5b9e\u65f6\u8ba1\u7b97\u5f53\u524d\u60ac\u505c\u7684 U \u4f4d\u69fd\u4f4d\uff0c\u5e76\u52a8\u6001\u8c03\u6574\u9ad8\u4eae\u72b6\u6001\uff0c\u5b9e\u73b0\u7cbe\u51c6\u70b9\u4f4d\u6307\u5f15\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const targetSlot = rack3DView.getDataAt(event.nativeEvent);\nif (targetSlot &amp;&amp; targetSlot.getParent() === highlightBlock) {\n    highlightBlock.eachChild(slot => {\n        \/\/ \u9ad8\u4eae\u5f53\u524d\u60ac\u505c\u7684\u69fd\u4f4d\n        slot.s('highlight.group', slot === targetSlot ? 1 : undefined);\n        slot.s('highlight.mode', slot === targetSlot);\n    });\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/04-2.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/04-2.gif\" alt=\"\" class=\"wp-image-7548\"\/><\/a><\/figure><\/div>\n\n\n\n<p>\u9488\u5bf9\u670d\u52a1\u5668\u3001\u4ea4\u6362\u673a\u7b49\u5360\u7528\u591a\u8054\u00a0U\u00a0\u4f4d\u7684\u8bbe\u5907\uff0c\u7cfb\u7edf\u5185\u7f6e\u7b97\u6cd5\uff0c\u53ef\u6839\u636e\u8bbe\u5907\u5c3a\u5bf8\u3001\u673a\u67dc\u603b\u5bb9\u91cf\u53ca\u5df2\u5360\u7528\u673a\u4f4d\uff0c\u5feb\u901f\u7b5b\u9009\u5168\u90e8\u53ef\u7528\u8fde\u7eed\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * \u5bfb\u627e\u673a\u67dc\u4e2d\u53ef\u7528\u7684\u8fde\u7eedU\u4f4d\n * @param {number}deviceUnit - \u8bbe\u5907\u6240\u9700U\u4f4d\u6570\uff08\u5fc5\u987b\u5927\u4e8e0\uff09\n * @param {number}maxUnits - \u673a\u67dc\u603bU\u4f4d\u6570\uff08\u5fc5\u987b\u5927\u4e8e0\uff09\n * @param {Array&lt;number>}occupiedUnits - \u5df2\u5360\u7528U\u4f4d\u6570\u7ec4\uff0c\u8303\u56f4\u5e94\u5728&#91;1, maxUnits]\u4e4b\u95f4\n * @returns {Array&lt;number>}\u53ef\u7528\u7684\u8d77\u59cbU\u4f4d\u6570\u7ec4\uff0c\u6309\u5347\u5e8f\u6392\u5217\n * @example\n * \/\/ \u8fd4\u56de &#91;1, 7, 12]\n * findAvailablePositions(2, 24, &#91;3, 4, 5, 6, 9, 10]);\n *\/\nfunctionfindAvailablePositions(deviceUnit, maxUnits, occupiedUnits) {\n    \/\/ 1. \u53c2\u6570\u9a8c\u8bc1\n    if (typeof deviceUnit !== 'number' || deviceUnit &lt;= 0 ||\n         typeof maxUnits !== 'number' || maxUnits &lt;= 0 ||\n        !Array.isArray(occupiedUnits)) {\n        console.warn('findAvailablePositions: \u53c2\u6570\u65e0\u6548', { deviceUnit, maxUnits, occupiedUnits });\n        return &#91;];\n    }\n    \/\/ \u8bbe\u5907\u9700\u6c42\u8d85\u8fc7\u673a\u67dc\u603b\u5bb9\u91cf\uff0c\u76f4\u63a5\u8fd4\u56de\u7a7a\u6570\u7ec4\n    if (deviceUnit > maxUnits) {\n        return &#91;];\n    }\n    \/\/ 2. \u51c6\u5907\u6570\u636e\uff1a\u8fc7\u6ee4\u65e0\u6548\u7684\u5360\u7528\u4f4d\u7f6e\u5e76\u521b\u5efa\u67e5\u627e\u96c6\u5408\n    const validOccupiedUnits = occupiedUnits.filter(\n        position =>Number.isInteger(position) &amp;&amp; position >= 1 &amp;&amp; position &lt;= maxUnits\n    );\n    const occupiedSet = newSet(validOccupiedUnits);\n    \/\/ 3. \u67e5\u627e\u53ef\u7528\u4f4d\u7f6e\n    const availableStartPositions = &#91;];\n    let consecutiveFreeSlots = 0;\n    for (let position = 1; position &lt;= maxUnits; position++) {\n        if (occupiedSet.has(position)) {\n            \/\/ \u5f53\u524d\u4f4d\u7f6e\u88ab\u5360\u7528\uff0c\u91cd\u7f6e\u8fde\u7eed\u7a7a\u95f2\u8ba1\u6570\n            consecutiveFreeSlots = 0;\n            continue;\n        }\n        consecutiveFreeSlots++;\n        \/\/ \u627e\u5230\u6ee1\u8db3\u8bbe\u5907\u9700\u6c42\u7684\u8fde\u7eed\u7a7a\u4f4d\n        if (consecutiveFreeSlots >= deviceUnit) {\n            const startPosition = position - deviceUnit + 1;\n            availableStartPositions.push(startPosition);\n        }\n    }\n    \/\/ 4. \u6309\u7ea6\u5b9a\u8fd4\u56de\u7ed3\u679c\uff08\u5df2\u7ecf\u662f\u5347\u5e8f\uff09\n    return availableStartPositions;\n}<\/code><\/pre>\n\n\n\n<h4><strong>04 \u653e\u7f6e\u786e\u8ba4\u4e0e\u6570\u636e\u540c\u6b65<\/strong><\/h4>\n\n\n\n<p>\u7528\u6237\u677e\u5f00\u9f20\u6807\u65f6\uff0c\u7cfb\u7edf\u6267\u884c\u539f\u5b50\u6027\u6570\u636e\u66f4\u65b0\uff1a\u5728\u00a03D\u00a0\u673a\u67dc\u521b\u5efa\u8bbe\u5907\u6a21\u578b\u3001\u4fee\u6539\u00a02D\u00a0\u8868\u683c\u8bbe\u5907\u72b6\u6001\uff08\u5df2\u4e0a\u67b6\/\u672a\u4e0a\u67b6\uff09\u3001\u8bb0\u5f55\u673a\u4f4d\u4fe1\u606f\uff0c\u5e76\u540c\u6b65\u81f3\u4e0a\u67b6\u8bbe\u5907\u6e05\u5355\u3002<strong>\u6240\u6709\u64cd\u4f5c\u8981\u4e48\u5168\u90e8\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u56de\u6eda\uff0c\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027\u3002<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (slot === targetSlot) {\n    const deviceInfo = rowData.getAttrObject();\n    const startU = slot.a('slotIndexes')&#91;0];\n    \/\/ \u66f4\u65b0\u8bbe\u5907\u5360\u7528\u4fe1\u606f\n    deviceInfo.occupy = &#91;startU];\n    \/\/ \u57283D\u89c6\u56fe\u4e2d\u521b\u5efa\u8bbe\u5907\u6a21\u578b\n    mountDevice(deviceInfo);\n    \/\/ \u66f4\u65b0\u8bbe\u5907\u72b6\u6001\u4e3a\u5df2\u4e0a\u67b6\n    event.info.data.a('status', '\u5df2\u4e0a\u67b6');\n    \/\/ \u8bb0\u5f55\u5230\u5df2\u4e0a\u67b6\u8bbe\u5907\u5217\u8868\n    mountedDeviceList.push({\n        ...deviceInfo,\n        startU: startU,\n        position: `${startU}U-${startU + deviceInfo.unit}U`\n    });\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/05-5.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/05-5.gif\" alt=\"\" class=\"wp-image-7547\"\/><\/a><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/06-1.webp\"><img loading=\"lazy\" width=\"385\" height=\"355\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/06-1.webp\" alt=\"\" class=\"wp-image-7546\"\/><\/a><\/figure><\/div>\n\n\n\n<h4><strong>05<\/strong> <strong>\u754c\u9762\u72b6\u6001\u6536\u5c3e<\/strong><\/h4>\n\n\n\n<p>\u4e0a\u67b6\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u81ea\u52a8\u89e6\u53d1\u7edf\u8ba1\u9762\u677f\u66f4\u65b0\u3001\u5f53\u524d\u9009\u4e2d\u8bbe\u5907\u9ad8\u4eae\u5237\u65b0\u3001\u8fde\u63a5\u7ebf\u91cd\u7ed8\u4ee5\u53ca\u4e34\u65f6\u9ad8\u4eae\u5757\u6e05\u7406\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u66f4\u65b0\u7edf\u8ba1\u9762\u677f\nupdateStatisticsPanel();\n\/\/ \u66f4\u65b0\u5f53\u524d\u9009\u4e2d\u4fe1\u606f\nrowInfo = deviceInfo;\n\/\/ \u8ba93D\u89c6\u56fe\u9ad8\u4eae\u663e\u793a\u65b0\u8bbe\u5907\nhighlightSelectedDevice();\n\/\/ \u91cd\u65b0\u7ed8\u5236\u8fde\u63a5\u7ebf\nupdateConnectionLine();\n\/\/ \u6062\u590d\u9f20\u6807\u6307\u9488\nview.setCursor(null);\n\/\/ \u6e05\u7406\u9ad8\u4eae\u5757\nrack3DView.dm().remove(highlightBlock);<\/code><\/pre>\n\n\n\n<h4><strong>06<\/strong> <strong>\u8868\u683c\u6392\u5e8f\u4e0e\u673a\u5185\u8fc1\u79fb<\/strong><\/h4>\n\n\n\n<p><strong>\u8868\u683c\u6392\u5e8f\u9002\u914d<\/strong>\uff1a\u8fd0\u7ef4\u4eba\u5458<strong>\u53ef\u6309\u8bbe\u5907\u7c7b\u578b\u3001\u8d1f\u8f7d\u3001\u4e0a\u67b6\u65f6\u95f4\u7b49\u7ef4\u5ea6\u6392\u5e8f\u8868\u683c<\/strong>\u3002\u7cfb\u7edf\u7b49\u5f85\u8868\u683c\u6e32\u67d3\u5b8c\u6210\u540e\uff0c\u81ea\u52a8\u91cd\u65b0\u8ba1\u7b97\u5e76\u5237\u65b0\u8fde\u63a5\u7ebf\uff0c\u4fdd\u8bc1\u00a02D \u4e0e 3D\u00a0\u8bbe\u5907\u5bf9\u5e94\u5173\u7cfb\u4e0d\u53d8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (event.kind === 'sortChange') {\n    \/\/ \u7b49\u5f85\u8868\u683c\u6e32\u67d3\u5b8c\u6210\u540e\u91cd\u65b0\u8ba1\u7b97\u8fde\u63a5\u7ebf\n    ht.Default.callLater(() => {\n        calculateLineStartPoint();\n        updateConnectionLine();\n    });\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/07-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/07-1.gif\" alt=\"\" class=\"wp-image-7550\"\/><\/a><\/figure><\/div>\n\n\n\n<p><strong>\u673a\u67dc\u5185\u8bbe\u5907\u8fc1\u79fb<\/strong>\uff1a\u5bf9\u4e8e\u5df2\u5728\u673a\u67dc\u4e2d\u7684\u8bbe\u5907\uff0c\u7cfb\u7edf\u540c\u6837\u652f\u6301\u62d6\u62fd\u91cd\u5b9a\u4f4d\u3002\u62d6\u62fd\u5f00\u59cb\u65f6\u4fdd\u5b58\u539f\u59cb\u4f4d\u7f6e\uff0c\u5e76\u4e34\u65f6\u521b\u5efa\u53ef\u7528 U \u4f4d\u9ad8\u4eae\u5757\uff1b\u62d6\u62fd\u7ed3\u675f\u540e\u66f4\u65b0\u5360\u7528\u4fe1\u606f\uff0c\u62d6\u62fd\u53d6\u6d88\u5219\u6062\u590d\u539f\u4f4d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * \u5904\u7406\u8bbe\u5907\u62d6\u62fd\u5f00\u59cb\u4e8b\u4ef6\n * @param {Object}event - \u62d6\u62fd\u4e8b\u4ef6\u5bf9\u8c61\n *\/\nfunctiononBeginDrag(event) {\n    \/\/ \u68c0\u67e5\u7f16\u8f91\u6743\u9650\n    if (!isEditMode) return;\n    \/\/ \u9a8c\u8bc1\u62d6\u62fd\u4e8b\u4ef6\u7c7b\u578b\n    if (event.type !== 'data')  return;\n    const deviceData = event.data;\n    const deviceShape = deviceData.s('shape3d');\n    \/\/ \u9a8c\u8bc1\u662f\u5426\u4e3a\u53ef\u62d6\u62fd\u7684\u8bbe\u5907\u6a21\u578b\n    if (!deviceModels.includes(deviceShape)) return;\n    \/\/ \u8bb0\u5f55\u62d6\u62fd\u4fe1\u606f\n    dragInfo = {\n        draggingElementInfo: {\n            element: ht.Default.toCanvas('device-drag-icon.json', 24, 24),\n        },\n        view: view,\n        data: deviceData\n    };\n    \/\/ \u4fdd\u5b58\u539f\u59cb\u4f4d\u7f6e\u4ee5\u4fbf\u53d6\u6d88\u64cd\u4f5c\n    const originalPosition = deviceData.p3();\n    deviceData.a('originalPosition', originalPosition);\n    try {\n        \/\/ \u542f\u52a8\u62d6\u62fd\n        ht.drawing.Dragger.startDragging(dragInfo, event.event);\n        \/\/ \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\u7528\u4e8e\u9ad8\u4eae\u63d0\u793a\n        const unitSize = deviceData.a('unit');\n        const occupyArray = deviceData.a('occupy');\n        \/\/ \u521b\u5efa\u9ad8\u4eae\u5757\u663e\u793a\u53ef\u7528\u4f4d\u7f6e\n        if (unitSize &amp;&amp; occupyArray &amp;&amp; occupyArray.length > 0) {\n            const minOccupy = Math.min(...occupyArray);\n            createHighlightBlock(unitSize, minOccupy);\n        }\n        \/\/ \u4e34\u65f6\u53d6\u6d88\u8bbe\u5907\u9ad8\u4eae\n        deviceData.s('highlight.group', undefined);\n        deviceData.s('highlight.mode', false);\n    } catch (error) {\n        console.error('\u62d6\u62fd\u64cd\u4f5c\u5931\u8d25:', error);\n        \/\/ \u6e05\u7406\u62d6\u62fd\u72b6\u6001\n        dragInfo = null;\n        deviceData.a('originalPosition', null);\n    }\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/08-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/08-1.gif\" alt=\"\" class=\"wp-image-7551\"\/><\/a><\/figure><\/div>\n\n\n\n<h4><strong>07 \u62d6\u62fd\u72b6\u6001\u91cd\u7f6e<\/strong><\/h4>\n\n\n\n<p>\u62d6\u62fd\u52a8\u4f5c\u7ed3\u675f\u540e\uff0c\u6e05\u7a7a\u65b9\u5411\u6807\u8bb0\uff0c\u533a\u5206\u4e0a\u4e0b\u67b6\u4e24\u7c7b\u62d6\u62fd\u903b\u8f91\u3002<strong>isDraggingFromTable\u00a0\u6807\u5fd7\u4f4d\u5f88\u5173\u952e<\/strong>\uff0c\u7528\u4e8e\u533a\u5206\u62d6\u62fd\u6765\u6e90\uff0c\u786e\u4fdd\u540e\u7eed\u903b\u8f91\uff08\u5982\u4e0b\u67b6\uff09\u6b63\u786e\u5904\u7406\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (event.kind === 'endDrag') {\n    isDraggingFromTable = false;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u6280\u672f\u4eae\u70b9<\/strong><\/p>\n\n\n\n<ul><li><strong>\u72b6\u6001\u9a71\u52a8\u4ea4\u4e92<\/strong>\uff1a\u901a\u8fc7\u00a0isEditMode\u00a0\u63a7\u5236\u6574\u4e2a\u7cfb\u7edf\u7684\u53ef\u64cd\u4f5c\u6027\uff0c\u786e\u4fdd\u751f\u4ea7\u5b89\u5168\uff1b<\/li><li><strong>\u5b9e\u65f6\u89c6\u89c9\u53cd\u9988<\/strong>\uff1a\u62d6\u62fd\u8fc7\u7a0b\u4e2d\u7684\u9ad8\u4eae\u53d8\u5316\u3001\u653e\u7f6e\u65f6\u7684\u72b6\u6001\u66f4\u65b0\uff0c\u90fd\u63d0\u4f9b\u4e86\u6e05\u6670\u7684\u4ea4\u4e92\u5f15\u5bfc\uff1b<\/li><li><strong>\u5168\u57df\u6570\u636e\u540c\u6b65<\/strong>\uff1a2D\u00a0\u8868\u683c\u30013D\u00a0\u6a21\u578b\u3001\u7edf\u8ba1\u6570\u636e\u901a\u8fc7\u7edf\u4e00\u7684\u6570\u636e\u6a21\u578b\u4fdd\u6301\u540c\u6b65\uff1b<\/li><li><strong>\u5b8c\u5584\u5f02\u5e38\u515c\u5e95<\/strong>\uff1a\u65e0\u6548\u62d6\u62fd\u3001\u653e\u7f6e\u5931\u8d25\u7b49\u573a\u666f\u652f\u6301\u81ea\u52a8\u56de\u9000\uff0c\u907f\u514d\u754c\u9762\u5f02\u5e38\uff1b<\/li><li><strong>\u9ad8\u6027\u80fd\u8bbe\u8ba1<\/strong>\uff1a\u7ed3\u5408\u4e8b\u4ef6\u59d4\u6258\u3001\u5f02\u6b65\u6267\u884c\u673a\u5236\uff0c\u6d77\u91cf\u8bbe\u5907\u573a\u666f\u4e0b\u4ecd\u53ef\u6d41\u7545\u8fd0\u884c\u3002<\/li><\/ul>\n\n\n\n<h3><strong>\u8bbe\u5907\u4e0b\u67b6\u6d41\u7a0b<\/strong><\/h3>\n\n\n\n<p>\u7cfb\u7edf\u652f\u6301\u53cd\u5411\u62d6\u62fd\u5b9e\u73b0\u4ece\u00a03D\u00a0\u673a\u67dc\u62d6\u56de\u8868\u683c\uff0c<strong>\u91c7\u7528\u72b6\u6001\u6807\u8bb0\u66ff\u4ee3\u7269\u7406\u5220\u9664\u7684\u8bbe\u8ba1<\/strong>\uff0c\u4fdd\u7559\u8bbe\u5907\u5168\u91cf\u6570\u636e\uff0c\u652f\u6301\u64cd\u4f5c\u8ffd\u6eaf\u4e0e\u590d\u539f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (event.kind === 'crossDrop') {\n    const deviceData = event.info.data;\n    const deviceName = deviceData.a('name');\n    \/\/ 1. \u4fee\u6539\u8bbe\u5907\u72b6\u6001\n    deviceData.a('status', '\u672a\u4e0a\u67b6');\n    \/\/ 2. \u4ece\u5df2\u4e0a\u67b6\u8bbe\u5907\u5217\u8868\u4e2d\u79fb\u9664\n    const deviceIndex = mountedDeviceList.findIndex(device => device.name === deviceName);\n    if (deviceIndex === -1) {\n        console.warn(`\u8bbe\u5907 ${deviceName} \u672a\u5728\u4e0a\u67b6\u5217\u8868\u4e2d\u627e\u5230`);\n        return; \/\/ \u6216\u8fdb\u884c\u76f8\u5e94\u5904\u7406\n    } else {\n        \/\/ \u5982\u679c\u5f53\u524d\u9009\u4e2d\u7684\u8bbe\u5907\u662f\u6b63\u5728\u4e0b\u67b6\u7684\u8bbe\u5907\uff0c\u6e05\u9664\u9009\u4e2d\u72b6\u6001\n        if (selectedEdge &amp;&amp; selectedEdge.a('name') === deviceName) {\n            selectedEdge = null;\n            hideConnectionLine();\n        }\n        \/\/ \u4ece\u5df2\u4e0a\u67b6\u5217\u8868\u79fb\u9664\n        mountedDeviceList.splice(deviceIndex, 1);\n    }\n    \/\/ 3. \u5982\u679c\u662f\u4ece3D\u62d6\u52302D\uff0c\u4ece\u8868\u683c\u6570\u636e\u6a21\u578b\u4e2d\u79fb\u9664\u5bf9\u5e94\u884c\n    if (!isDraggingFromTable) {\n        const tableDataModel = data.a('dataModel');\n        const tableRows = tableDataModel.toDatas().toArray();\n        for (let i = 0; i &lt; tableRows.length; i++) {\n            const tableRow = tableRows&#91;i];\n            if (tableRow.a('name') === deviceName) {\n                tableDataModel.remove(tableRow);\n                break; \/\/ \u627e\u5230\u540e\u7acb\u5373\u8df3\u51fa\u5faa\u73af\n            }\n        }\n    }\n    \/\/ 4. \u66f4\u65b0\u7edf\u8ba1\u9762\u677f\n    updateStatisticsPanel();\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/09-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/09-1.gif\" alt=\"\" class=\"wp-image-7552\"\/><\/a><\/figure><\/div>\n\n\n\n<p><strong>\u6d41\u7a0b\u9075\u5faa<\/strong><\/p>\n\n\n\n<ul><li><strong>\u72b6\u6001\u9a71\u52a8\u800c\u975e\u5220\u9664<\/strong>\uff1a\u901a\u8fc7\u72b6\u6001\u53d8\u66f4\u800c\u975e\u7269\u7406\u5220\u9664\uff0c\u4fdd\u7559\u4e86\u64cd\u4f5c\u7684\u5386\u53f2\u75d5\u8ff9\uff1b<\/li><li><strong>\u6570\u636e\u4e00\u81f4\u6027\u4fdd\u969c<\/strong>\uff1a\u66f4\u65b0\u72b6\u6001\u7684\u540c\u65f6\uff0c\u540c\u6b65\u66f4\u65b0\u76f8\u5173\u7684\u7edf\u8ba1\u6570\u636e\u9762\u677f\uff1b<\/li><li><strong>\u667a\u80fd\u72b6\u6001\u6e05\u7406<\/strong>\uff1a\u81ea\u52a8\u6e05\u7406\u5197\u4f59\u754c\u9762\u5143\u7d20\uff0c\u4f18\u5316\u89c6\u89c9\u4f53\u9a8c\uff1b<\/li><li><strong>\u62d6\u62fd\u65b9\u5411\u611f\u77e5<\/strong>\uff1a\u901a\u8fc7\u00a0isDraggingFromTable\u00a0\u6807\u5fd7\u533a\u5206\u62d6\u62fd\u65b9\u5411\uff0c\u786e\u4fdd\u903b\u8f91\u6b63\u786e\u5904\u7406\u3002<\/li><\/ul>\n\n\n\n<h2>02 <strong>\u5173\u4e8e\u52a8\u6001\u8fde\u63a5\u7ebf<\/strong><\/h2>\n\n\n\n<h3><strong>\u8fde\u63a5\u7ebf\u751f\u6210\u903b\u8f91<\/strong><\/h3>\n\n\n\n<p>\u9009\u4e2d\u8868\u683c\u5185\u5df2\u4e0a\u67b6\u8bbe\u5907\u65f6\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u6761\u52a8\u6001\u8fde\u63a5\u7ebf\uff0c\u4f5c\u4e3a\u8fde\u63a5\u00a02D\u00a0\u8868\u5355\u4e0e\u00a03D\u00a0\u673a\u67dc\u7684\u89c6\u89c9\u6865\u6881\u3002<strong>\u8fde\u63a5\u7ebf\u7684\u751f\u6210\uff0c\u4f9d\u6258\u7cbe\u51c6\u7684\u5750\u6807\u6362\u7b97\u4e0e\u8def\u5f84\u8ba1\u7b97<\/strong>\uff0c\u9002\u914d\u8868\u683c\u6eda\u52a8\u3001\u89c6\u56fe\u65cb\u8f6c\u7b49\u5404\u7c7b\u754c\u9762\u53d8\u5316\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/10.webp\"><img loading=\"lazy\" width=\"1080\" height=\"608\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/10.webp\" alt=\"\" class=\"wp-image-7553\"\/><\/a><\/figure><\/div>\n\n\n\n<h4><strong>01<\/strong> <strong>\u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9<\/strong><\/h4>\n\n\n\n<p>\u8d77\u70b9\u5b9a\u4f4d\u9700\u7efc\u5408\u8868\u683c\u8868\u5934\u9ad8\u5ea6\u3001\u884c\u9ad8\u3001\u884c\u95f4\u8ddd\u3001\u7eb5\u5411\u6eda\u52a8\u504f\u79fb\u3001\u8868\u683c\u6392\u5e8f\u7ed3\u679c\u7b49\u591a\u91cd\u56e0\u7d20\uff0c\u7cbe\u51c6\u5b9a\u4f4d\u9009\u4e2d\u8868\u683c\u884c\u7684\u4e2d\u5fc3\u5750\u6807\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9\u4f4d\u7f6e\uff08\u8868\u683c\u884c\u4e2d\u5fc3\uff09<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Object|null}\u8fd4\u56de\u8d77\u70b9\u5750\u6807\u5bf9\u8c61 {x, y}\uff0c\u5982\u679c\u65e0\u6cd5\u8ba1\u7b97\u5219\u8fd4\u56denull<\/code><code>&nbsp;*\/<\/code><code>functioncalculateLineStartPoint() {<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 1. \u83b7\u53d6\u8868\u683c\u8282\u70b9<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableNode&nbsp;= dm.getDataByTag('table');<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 2. \u68c0\u67e5\u662f\u5426\u6709\u9009\u4e2d\u7684\u884c\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!rowInfo || !rowInfo.name) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u672a\u9009\u4e2d\u8868\u683c\u884c\uff0c\u65e0\u6cd5\u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 3. \u83b7\u53d6\u8868\u683c\u76f8\u5173\u5c5e\u6027<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableWidth&nbsp;= tableNode.getWidth();<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableHeight&nbsp;= tableNode.getHeight();<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableCenterX&nbsp;= tableNode.p().x + tableWidth \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;headRowHeight&nbsp;= tableNode.a('headRowHeight') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowHeight&nbsp;= tableNode.a('rowHeight') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowLineWidth&nbsp;= (tableNode.a('rowLineStyle') || {}).width ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;verticalScrollOffset&nbsp;= tableNode.a('table.translateY') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 4. \u8ba1\u7b97\u8868\u683c\u6570\u636e\u533a\u57df\u7b2c\u4e00\u884c\u7684\u8d77\u59cbY\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableTopY&nbsp;= tableNode.p().y - tableHeight \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;firstRowCenterY&nbsp;= tableTopY + headRowHeight + rowHeight \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 5. \u83b7\u53d6\u8bbe\u5907\u5728\u5f53\u524d\u6392\u5e8f\u540e\u7684\u884c\u7d22\u5f15<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowUIs&nbsp;=&nbsp;getTableRowUIs(view, tableNode);<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!rowUIs || rowUIs.length ===&nbsp;0) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u65e0\u6cd5\u83b7\u53d6\u8868\u683c\u884cUI\u4fe1\u606f');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowIndex&nbsp;=&nbsp;getRowIndexByName(rowUIs, rowInfo.name);<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(rowIndex === -1) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u672a\u627e\u5230\u5bf9\u5e94\u7684\u8868\u683c\u884c:', rowInfo.name);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 6. \u8ba1\u7b97\u8be5\u884c\u7684Y\u5750\u6807\uff08\u8003\u8651\u884c\u9ad8\u548c\u884c\u95f4\u8ddd\uff09<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowCenterY&nbsp;= firstRowCenterY + rowIndex * (rowHeight + rowLineWidth) + verticalScrollOffset;<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; x: tableCenterX,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; y: rowCenterY<\/code><code>&nbsp; &nbsp; };<\/code><code>}<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u83b7\u53d6\u8868\u683c\u884cUI\u5b9e\u4f8b<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Object}view - \u89c6\u56fe\u5bf9\u8c61<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Object}tableNode - \u8868\u683c\u8282\u70b9<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Array}\u8868\u683c\u884cUI\u6570\u7ec4<\/code><code>&nbsp;*\/<\/code><code>functiongetTableRowUIs(view, tableNode) {<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;drawingInstances&nbsp;= ht.drawing.getDrawingInstances(view, tableNode);<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;drawingInstances.length &gt;&nbsp;0&nbsp;? drawingInstances&#91;0].ui.rowUIs : &#91;];<\/code><code>}<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u6839\u636e\u8bbe\u5907\u540d\u79f0\u83b7\u53d6\u884c\u7d22\u5f15<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Array}rowUIs - \u884cUI\u6570\u7ec4<\/code><code>&nbsp;*&nbsp;@param&nbsp;{string}deviceName - \u8bbe\u5907\u540d\u79f0<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{number}\u884c\u7d22\u5f15\uff0c\u672a\u627e\u5230\u8fd4\u56de-1<\/code><code>&nbsp;*\/<\/code><code>functiongetRowIndexByName(rowUIs, deviceName) {<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;(let i =&nbsp;0; i &lt; rowUIs.length; i++) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;rowData&nbsp;= rowUIs&#91;i].data;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(rowData &amp;&amp; rowData.a('name') === deviceName) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;i;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;-1;<\/code><code>}<\/code><\/code><\/pre>\n\n\n\n<h4><strong>02<\/strong> <strong>\u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9<\/strong><\/h4>\n\n\n\n<p>\u7ec8\u70b9\u9700\u8981\u5b8c\u6210\u00a03D\u00a0\u4e16\u754c\u5750\u6807\u2192\u5c4f\u5e55\u5750\u6807\u21922D\u00a0\u903b\u8f91\u5750\u6807<strong>\u4e24\u5c42\u8f6c\u6362<\/strong>\uff0c\u7ed3\u5408\u00a03D\u00a0\u89c6\u56fe\u5f53\u524d\u89c6\u89d2\u3001\u76f8\u673a\u4f4d\u7f6e\u7b49\u56e0\u7d20\uff0c\u5c06\u4e09\u7ef4\u8bbe\u5907\u4f4d\u7f6e\u6620\u5c04\u5230\u4e8c\u7ef4\u754c\u9762\u4e2d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9\uff083D\u8bbe\u5907\u4e8c\u7ef4\u6295\u5f71\uff09<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Object|null} \u5750\u6807\u5bf9\u8c61 {x, y}\uff0c\u8ba1\u7b97\u5931\u8d25\u8fd4\u56denull<\/code><code>&nbsp;*\/<\/code><code>function&nbsp;calculateLineEndPoint() {<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!selectedEdge) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('\u672a\u9009\u4e2d3D\u8bbe\u5907\uff0c\u65e0\u6cd5\u8ba1\u7b97\u7ec8\u70b9');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rack3DView = ht.Default.findView('3d');<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;device3DPosition = selectedEdge.p3();<\/code><code>&nbsp; &nbsp;&nbsp;try&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ 3D\u4e16\u754c\u5750\u6807\u8f6c\u5c4f\u5e55\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;screenPosition = rack3DView.toViewPosition(device3DPosition);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(!screenPosition) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('3D\u5750\u6807\u8f6c\u5c4f\u5e55\u5750\u6807\u5931\u8d25');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5c4f\u5e55\u5750\u6807\u8f6c2D\u903b\u8f91\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;logicalPosition = view.getLogicalPoint(screenPosition);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(!logicalPosition) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('\u5c4f\u5e55\u5750\u6807\u8f6c\u903b\u8f91\u5750\u6807\u5931\u8d25');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;x: logicalPosition.x,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;y: logicalPosition.y<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; };<\/code><code>&nbsp; &nbsp; }&nbsp;catch&nbsp;(error) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.error('\u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9\u5f02\u5e38:', error);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>}<\/code><\/code><\/pre>\n\n\n\n<h4><strong>03<\/strong> <strong>\u751f\u6210\u81ea\u9002\u5e94\u8d1d\u585e\u5c14\u66f2\u7ebf<\/strong><\/h4>\n\n\n\n<p>\u83b7\u53d6\u8d77\u6b62\u5750\u6807\u540e\uff0c\u7cfb\u7edf\u4e0d\u4f7f\u7528\u751f\u786c\u76f4\u7ebf\uff0c\u800c\u662f<strong>\u52a8\u6001\u751f\u6210\u8d1d\u585e\u5c14\u66f2\u7ebf<\/strong>\u3002\u63a7\u5236\u70b9\u4f1a\u6839\u636e\u4e24\u70b9\u6c34\u5e73\u8ddd\u79bb\u81ea\u52a8\u9002\u914d\uff0c\u517c\u987e\u77ed\u8ddd\u79bb\u4e0d\u5c16\u9510\u3001\u957f\u8ddd\u79bb\u6bd4\u4f8b\u534f\u8c03\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u66f4\u65b0\u8fde\u63a5\u7ebf\u663e\u793a\u72b6\u6001<\/code><code>&nbsp;*&nbsp;@param&nbsp;{boolean}shouldShow - \u662f\u5426\u663e\u793a\u8fde\u63a5\u7ebf<\/code><code>&nbsp;*\/<\/code><code>functionupdateConnectionLine(shouldShow) {<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!shouldShow) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u9690\u85cf\u6240\u6709\u8fde\u63a5\u7ebf\u5143\u7d20<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; connectionLine.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; startMarker.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; endMarker.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u663e\u793a\u8d77\u70b9\u548c\u7ec8\u70b9\u6807\u8bb0<\/em><\/code><code>&nbsp; &nbsp; startMarker.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp; endMarker.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;startPoint&nbsp;=&nbsp;calculateLineStartPoint(); &nbsp;<em>\/\/ \u8868\u683c\u884c\u4e2d\u5fc3<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;endPoint&nbsp;=&nbsp;calculateLineEndPoint(); &nbsp; &nbsp; &nbsp;<em>\/\/ 3D\u8bbe\u5907\u6295\u5f71\u4f4d\u7f6e<\/em><\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u521b\u5efa\u8d1d\u585e\u5c14\u66f2\u7ebf\u63a7\u5236\u70b9\u6570\u7ec4<\/em><\/code><code>&nbsp; &nbsp; let controlPoints = &#91;];<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;horizontalDistance&nbsp;= Math.abs(endPoint.x - startPoint.x);<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 6\u4e2a\u63a7\u5236\u70b9\u6784\u6210\u7684\u8d1d\u585e\u5c14\u66f2\u7ebf<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push(startPoint); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u8d77\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;x: startPoint.x +&nbsp;12,&nbsp;y: startPoint.y }); &nbsp; &nbsp;<em>\/\/ \u6c34\u5e73\u53f3\u79fb12px<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; x: startPoint.x + Math.max(40, horizontalDistance \/&nbsp;2),&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; y: startPoint.y&nbsp;<\/code><code>&nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u52a8\u6001\u63a7\u5236\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; x: endPoint.x - Math.max(40, horizontalDistance \/&nbsp;2),&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; y: endPoint.y&nbsp;<\/code><code>&nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u63a5\u8fd1\u7ec8\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;x: endPoint.x -&nbsp;12,&nbsp;y: endPoint.y }); &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u6c34\u5e73\u5de6\u79fb12px<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push(endPoint); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u7ec8\u70b9<\/em><\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u66f4\u65b0\u8fde\u63a5\u7ebf\u663e\u793a<\/em><\/code><code>&nbsp; &nbsp; connectionLine.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp; connectionLine.setPoints(controlPoints);<\/code><code>&nbsp; &nbsp; connectionLine.setSegments(&#91;1,&nbsp;2,&nbsp;4,&nbsp;2]);&nbsp;<em>\/\/ \u63a7\u5236\u66f2\u7ebf\u5206\u6bb5\uff1a\u76f4\u7ebf-\u66f2\u7ebf-\u76f4\u7ebf<\/em><\/code><code>}<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u6280\u672f\u4eae\u70b9<\/strong><\/p>\n\n\n\n<ul><li><strong>\u52a8\u6001\u63a7\u5236\u70b9<\/strong>\uff1a\u6839\u636e\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u6c34\u5e73\u8ddd\u79bb\u52a8\u6001\u8c03\u6574\u63a7\u5236\u70b9\u4f4d\u7f6e\uff0c\u786e\u4fdd\u65e0\u8bba\u8ddd\u79bb\u8fdc\u8fd1\uff0c\u66f2\u7ebf\u90fd\u4fdd\u6301\u4f18\u96c5\u7684\u6bd4\u4f8b\uff1b<\/li><li><strong>\u6700\u5c0f\u6c34\u5e73\u504f\u79fb<\/strong>\uff1a\u4f7f\u7528\u00a0Math.max(40, horizontalDistance \/ 2)\u00a0\u786e\u4fdd\u8fde\u63a5\u7ebf\u6709\u8db3\u591f\u7684\u6c34\u5e73\u5ef6\u4f38\uff0c\u907f\u514d\u77ed\u8ddd\u79bb\u65f6\u66f2\u7ebf\u8fc7\u4e8e\u5c16\u9510\uff1b<\/li><li><strong>\u5e73\u6ed1\u8fc7\u6e21<\/strong>\uff1aSegments\u00a0\u53c2\u6570[1, 2, 4, 2]\u63a7\u5236\u66f2\u7ebf\u5206\u6bb5\u65b9\u5f0f\uff0c\u521b\u5efa\u81ea\u7136\u7684&#8221;S&#8221;\u5f62\u8fc7\u6e21\uff1b<\/li><li><strong>\u89c6\u89c9\u7f8e\u611f<\/strong>\uff1a\u901a\u8fc7\u5728\u8d77\u70b9\u548c\u7ec8\u70b9\u9644\u8fd1\u8bbe\u7f6e\u00a012\u00a0\u50cf\u7d20\u7684\u6c34\u5e73\u5ef6\u4f38\uff0c\u521b\u5efa\u4f18\u96c5\u7684\u66f2\u7ebf\u5165\u53e3\u548c\u51fa\u53e3\u3002<\/li><\/ul>\n\n\n\n<h3><strong>\u8de8\u7ef4\u5ea6\u5feb\u901f\u68c0\u7d22<\/strong><\/h3>\n\n\n\n<p>\u4f9d\u6258\u8fde\u63a5\u7ebf\u5b9e\u73b0\u8868\u683c\u4e0e&nbsp;3D&nbsp;\u8bbe\u5907\u53cc\u5411\u8054\u52a8\u67e5\u8be2\uff0c\u8fd0\u7ef4\u4eba\u5458\u53ef\u4ece\u4efb\u610f\u4e00\u7aef\u53d1\u8d77\u67e5\u627e\uff0c\u5feb\u901f\u5b9a\u4f4d\u5bf9\u5e94\u76ee\u6807\uff0c\u5f7b\u5e95\u6446\u8131\u4eba\u5de5\u8111\u8865\u6362\u7b97\u7684\u7e41\u7410\u3002<\/p>\n\n\n\n<h4><strong>01<\/strong> <strong>\u9009\u4e2d\u8868\u683c\u6761\u76ee\uff0c\u5b9a\u4f4d\u00a03D\u00a0\u8bbe\u5907\u4f4d\u7f6e<\/strong><\/h4>\n\n\n\n<p>\u70b9\u51fb\u8868\u683c\u4e2d\u7684\u8bbe\u5907\u884c\uff0c\u7cfb\u7edf\u81ea\u52a8\u8bb0\u5f55\u8bbe\u5907\u4fe1\u606f\uff0c\u540c\u6b65\u5728\u00a03D\u00a0\u89c6\u56fe\u4e2d\u5339\u914d\u5bf9\u5e94\u8bbe\u5907\u5e76\u9ad8\u4eae\uff0c\u540c\u65f6\u62c9\u8d77\u8fde\u63a5\u7ebf\u5b8c\u6210\u5173\u8054\u5c55\u793a\u3002<strong>\u82e5\u8bbe\u5907\u5904\u4e8e\u672a\u4e0a\u67b6\u72b6\u6001\uff0c\u5219\u4e0d\u89e6\u53d1\u67e5\u627e\u903b\u8f91\u3002<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u76d1\u542c\u8868\u683c\u9009\u4e2d\u72b6\u6001\u53d8\u5316<\/em><\/code><code>let&nbsp;tableDm =&nbsp;getDataAttr('table',&nbsp;'dataModel');<\/code><code>let&nbsp;tableSm = tableDm.sm();<\/code><code>tableSm.ms((event) =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;selectedRowData = tableSm.ld();<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(selectedRowData) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5b58\u50a8\u9009\u4e2d\u884c\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; rowInfo = selectedRowData.getAttrObject();<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5982\u679c\u8bbe\u5907\u672a\u4e0a\u67b6\uff0c\u5219\u6e05\u9664\u9009\u4e2d\u8fb9\u754c<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(rowInfo.status&nbsp;===&nbsp;'\u672a\u4e0a\u67b6') {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; }&nbsp;else&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u6e05\u9664\u9009\u4e2d\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; rowInfo = {};<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u66f4\u65b03D\u9009\u4e2d\u72b6\u6001\u5e76\u91cd\u7ed8\u8fde\u63a5\u7ebf<\/em><\/code><code>&nbsp; &nbsp;&nbsp;getSelectedEdge();<\/code><code>&nbsp; &nbsp;&nbsp;updateConnectionLine();<\/code><code>});<\/code><\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/11-2.gif\"><img loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/11-2.gif\" alt=\"\" class=\"wp-image-7554\"\/><\/a><\/figure><\/div>\n\n\n\n<p><strong>\u8be5\u6a21\u5f0f\u4f18\u52bf\u663e\u8457<\/strong>\uff1a\u65e0\u9700\u4eba\u5de5\u5bf9\u7167\u7f16\u53f7\u67e5\u627e\uff0c\u89c6\u89c9\u5f15\u5bfc\u4e00\u76ee\u4e86\u7136\uff0c\u540c\u65f6\u81ea\u52a8\u8bc6\u522b\u8bbe\u5907\u4e0a\u67b6\u72b6\u6001\uff0c\u89c4\u907f\u65e0\u6548\u67e5\u627e\u3002<\/p>\n\n\n\n<h4><strong>02<\/strong> <strong>\u70b9\u51fb 3D \u8bbe\u5907\uff0c\u5b9a\u4f4d\u8868\u683c\u6570\u636e<\/strong><\/h4>\n\n\n\n<p>\u53cd\u5411\u64cd\u4f5c\u540c\u6837\u987a\u7545\uff1a\u70b9\u51fb\u673a\u67dc\u5185\u7684\u00a03D\u00a0\u8bbe\u5907\uff0c\u7cfb\u7edf\u6839\u636e\u8bbe\u5907\u540d\u79f0\u53cd\u5411\u5339\u914d\u8868\u683c\u6570\u636e\uff0c<strong>\u81ea\u52a8\u5c06\u5bf9\u5e94\u884c\u6eda\u52a8\u81f3\u89c6\u91ce\u4e2d\u5fc3\u5e76\u9ad8\u4eae<\/strong>\uff0c\u4e24\u7aef\u540c\u6b65\u6807\u8bb0\uff0c\u5b9e\u73b0\u53cc\u5411\u4e92\u901a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>functiongetSelectedEdge() {&nbsp;<em>\/\/ \u8bbe\u7f6e\u5f53\u524d\u9009\u4e2d\u76843d\u8bbe\u5907\u9ad8\u4eae\u6548\u679c<\/em><\/code><code>&nbsp; &nbsp;&nbsp;var&nbsp;g3d = ht.Default.findView('3d');<\/code><code>&nbsp; &nbsp;&nbsp;var&nbsp;upDevices = g3d.dm().getDataByTag('upDevices');<\/code><code>&nbsp; &nbsp; upDevices.eachChild((data) =&gt; {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;upInfo =&nbsp;data.getAttrObject();<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;selected = upInfo.name === rowInfo.name;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(selected) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;data;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;data.s('highlight.group', selected ?&nbsp;1&nbsp;: undefined);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;data.s('highlight.mode', selected);<\/code><code>&nbsp; &nbsp; });<\/code><code>}<\/code><\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/12-2.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/12-2.gif\" alt=\"\" class=\"wp-image-7555\"\/><\/a><\/figure><\/div>\n\n\n\n<p>\u53cc\u5411\u67e5\u627e\u673a\u5236\uff0c\u771f\u6b63\u5efa\u7acb\u8d77\u6570\u636e\u8bb0\u5f55\u4e0e\u7269\u7406\u8bbe\u5907\u7684\u5f3a\u5173\u8054\uff0c\u8ba9\u62bd\u8c61\u6570\u636e\u62e5\u6709\u76f4\u89c2\u7684\u7a7a\u95f4\u5f62\u6001\uff0c<strong>\u964d\u4f4e\u8fd0\u7ef4\u67e5\u627e\u6210\u672c<\/strong>\u3002<\/p>\n\n\n\n<h3><strong>\u89c6\u89d2\u4e0e\u7a97\u53e3\u53d8\u5316\u5b9e\u65f6\u5904\u7406<\/strong><\/h3>\n\n\n\n<p>\u8fde\u63a5\u7ebf\u9700\u8981\u5b9e\u65f6\u8ddf\u968f\u4e24\u79cd\u7528\u6237\u64cd\u4f5c\uff1a<strong>3D\u00a0\u89c6\u89d2\u65cb\u8f6c<\/strong>\uff08\u65cb\u8f6c\/\u5e73\u79fb\/\u7f29\u653e\uff09\u548c<strong>\u6d4f\u89c8\u5668\u7a97\u53e3\u5c3a\u5bf8\u53d8\u5316<\/strong>\u3002\u901a\u8fc7\u7cbe\u5fc3\u8bbe\u8ba1\u7684\u76d1\u542c\u4e0e\u8c03\u5ea6\u673a\u5236\uff0c\u7cfb\u7edf\u786e\u4fdd\u4e86\u00a02D\u00a0\u8868\u683c\u4e0e\u00a03D\u00a0\u8bbe\u5907\u4e4b\u95f4\u7684\u8fde\u63a5\u7ebf\u59cb\u7ec8\u51c6\u786e\u3001\u6d41\u7545\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/13-2.gif\"><img loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/13-2.gif\" alt=\"\" class=\"wp-image-7556\"\/><\/a><\/figure>\n\n\n\n<p><strong>\u53cc\u91cd\u76d1\u542c\u4e0e\u6027\u80fd\u4f18\u5316<\/strong><\/p>\n\n\n\n<p>\u7cfb\u7edf\u5efa\u7acb\u4e86\u4e24\u4e2a\u5173\u952e\u7684\u4e8b\u4ef6\u76d1\u542c\u5668\uff0c\u8986\u76d6\u53ef\u80fd\u5f71\u54cd\u8fde\u63a5\u7ebf\u4f4d\u7f6e\u7684\u53d8\u5316\u3002\u91c7\u7528\u57fa\u4e8e\u00a0requestAnimationFrame\u00a0\u7684\u667a\u80fd\u8282\u6d41\u673a\u5236\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u6027\u80fd\u4f18\u5316\u76f8\u5173\u53d8\u91cf<\/em><\/code><code>let&nbsp;animationFrameId =&nbsp;null;<\/code><code>let&nbsp;isUpdating =&nbsp;false;<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8c03\u5ea6\u8fde\u63a5\u7ebf\u66f4\u65b0\u4efb\u52a1<\/code><code>&nbsp;*\/<\/code><code>functionscheduleConnectionLineUpdate() {<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u5982\u679c\u5df2\u6709\u66f4\u65b0\u4efb\u52a1\u5728\u6267\u884c\uff0c\u8df3\u8fc7<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(isUpdating)&nbsp;return;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u53d6\u6d88\u672a\u6267\u884c\u7684\u66f4\u65b0\u4efb\u52a1<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(animationFrameId) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;cancelAnimationFrame(animationFrameId);<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u4f7f\u7528requestAnimationFrame\u8c03\u5ea6\u66f4\u65b0<\/em><\/code><code>&nbsp; &nbsp; animationFrameId =&nbsp;requestAnimationFrame(() =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; isUpdating =&nbsp;true;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;try&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;updateConnectionLine(); &nbsp;<em>\/\/ \u91cd\u65b0\u8ba1\u7b97\u5e76\u7ed8\u5236\u8fde\u63a5\u7ebf<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;finally&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isUpdating =&nbsp;false;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animationFrameId =&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; });<\/code><code>}<\/code><code><em>\/\/ \u76d1\u542c3D\u89c6\u89d2\u53d8\u5316\uff08\u65cb\u8f6c\u3001\u5e73\u79fb\u3001\u7f29\u653e\uff09<\/em><\/code><code>view.mp((event) =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u4ec5\u54cd\u5e94\u89c6\u89d2\u76f8\u5173\u7684\u53d8\u5316<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(event.property&nbsp;!==&nbsp;'eye'&nbsp;&amp;&amp; event.property&nbsp;!==&nbsp;'center')&nbsp;return;<\/code><code>&nbsp; &nbsp;&nbsp;scheduleConnectionLineUpdate();<\/code><code>});<\/code><code><em>\/\/ \u76d1\u542c\u7a97\u53e3\u5927\u5c0f\u53d8\u5316<\/em><\/code><code>addEventListener('resize',&nbsp;() =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;scheduleConnectionLineUpdate();<\/code><code>});<\/code><\/code><\/pre>\n\n\n\n<p><strong>\u91c7\u7528\u667a\u80fd\u8282\u6d41\u7b56\u7565<\/strong><\/p>\n\n\n\n<ul><li><strong>\u9632\u6296\u8bbe\u8ba1<\/strong>\uff1a\u901a\u8fc7\u00a0isUpdating\u00a0\u6807\u5fd7\u9632\u6b62\u91cd\u590d\u8ba1\u7b97\uff0c\u786e\u4fdd\u540c\u4e00\u65f6\u95f4\u53ea\u6709\u4e00\u4e2a\u66f4\u65b0\u4efb\u52a1\u5728\u6267\u884c\uff1b<\/li><li><strong>\u8bf7\u6c42\u5408\u5e76<\/strong>\uff1a\u4f7f\u7528\u00a0cancelAnimationFrame\u00a0\u53d6\u6d88\u672a\u6267\u884c\u7684\u66f4\u65b0\u8bf7\u6c42\uff0c\u907f\u514d\u4efb\u52a1\u5806\u79ef\uff1b<\/li><li><strong>\u5e27\u7387\u540c\u6b65<\/strong>\uff1a\u501f\u52a9\u00a0requestAnimationFrame\u00a0\u786e\u4fdd\u66f4\u65b0\u4e0e\u6d4f\u89c8\u5668\u5237\u65b0\u540c\u6b65\uff0c\u4fdd\u6301 60fps \u6d41\u7545\u4f53\u9a8c\u3002<\/li><\/ul>\n\n\n\n<p><strong>\u5b9e\u9645\u6548\u679c<\/strong><\/p>\n\n\n\n<ul><li>\u5feb\u901f\u65cb\u8f6c\u00a03D\u00a0\u89c6\u56fe \u2192 \u8fde\u63a5\u7ebf\u5e73\u6ed1\u8ddf\u968f\uff0c\u65e0\u5361\u987f\u6216\u95ea\u70c1\uff1b<\/li><li>\u62d6\u52a8\u7a97\u53e3\u8fb9\u754c \u2192 \u8fde\u63a5\u7ebf\u7acb\u5373\u91cd\u65b0\u8ba1\u7b97\u5e76\u7cbe\u51c6\u5bf9\u9f50\uff1b<\/li><li>\u9ad8\u9891\u7387\u89e6\u53d1\u4e8b\u4ef6 \u2192 \u7cfb\u7edf\u8d44\u6e90\u4e0d\u6d6a\u8d39\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u91cd\u7ed8\u3002<\/li><\/ul>\n\n\n\n<h1>\u603b\u7ed3<\/h1>\n\n\n\n<p>\u672c\u6587\u6240\u8ff0\u7684\u53ef\u89c6\u5316\u65b9\u6848\uff0c<strong>\u672c\u8d28\u4e0a\u662f\u5c06\u62bd\u8c61\u7684\u8bbe\u5907\u8bb0\u5f55\u4e0e\u5177\u4f53\u7684\u7269\u7406\u4f4d\u7f6e\u901a\u8fc7\u76f4\u89c2\u7684\u4ea4\u4e92\u548c\u89c6\u89c9\u53cd\u9988\u8fde\u63a5\u8d77\u6765<\/strong>\u3002\u5b83\u89e3\u51b3\u4e86\u4f20\u7edf\u8fd0\u7ef4\u4e2d\u7684\u51e0\u4e2a\u5173\u952e\u75db\u70b9\uff1a<\/p>\n\n\n\n<ul><li><strong>\u4f4d\u7f6e\u611f\u77e5<\/strong>\uff1a\u4e0d\u518d\u9700\u8981\u8111\u8865\u8bbe\u5907\u5728\u673a\u67dc\u91cc\u7684\u4f4d\u7f6e\uff1b<\/li><li><strong>\u64cd\u4f5c\u76f4\u89c2<\/strong>\uff1a\u62d6\u62fd\u6bd4\u586b\u8868\u683c\u66f4\u7b26\u5408\u76f4\u89c9\uff1b<\/li><li><strong>\u5b9e\u65f6\u53cd\u9988<\/strong>\uff1a\u4efb\u4f55\u64cd\u4f5c\u90fd\u80fd\u7acb\u5373\u770b\u5230\u7ed3\u679c\uff1b<\/li><li><strong>\u964d\u4f4e\u95e8\u69db<\/strong>\uff1a\u65b0\u5458\u5de5\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\u3002<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"543\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-1024x543.png\" alt=\"\" class=\"wp-image-7560\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-1024x543.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-300x159.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-768x407.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-660x350.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1.png 1234w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>\u6210\u719f\u7684\u65b9\u6848\u7edd\u975e\u5355\u7eaf\u4ee3\u7801\u5806\u53e0\uff0c\u800c\u662f\u517c\u987e\u4f7f\u7528\u4f53\u9a8c\u7684\u4eba\u6027\u5316\u8bbe\u8ba1\uff1b\u52a8\u753b\u4e0d\u8ffd\u6c42\u89c6\u89c9\u7279\u6548\uff0c\u800c\u662f\u5f15\u5bfc\u7528\u6237\u89c6\u7ebf\uff1b\u62d6\u62fd\u4ea4\u4e92\u5e76\u975e\u7b80\u5316\u5f00\u53d1\uff0c\u800c\u662f\u6a21\u62df\u771f\u5b9e\u7269\u7406\u64cd\u4f5c\u903b\u8f91\uff1b\u8fde\u7ebf\u56fe\u5f62\u4e0d\u4ee5\u88c5\u9970\u4e3a\u76ee\u7684\uff0c\u642d\u5efa\u591a\u89c6\u56fe\u95f4\u7684\u6570\u636e\u8ba4\u77e5\u5173\u8054\u3002<\/p>\n\n\n\n<p>\u56fe\u6251\u5df2\u843d\u5730\u6d77\u91cf\u667a\u6167\u673a\u623f\u3001\u6570\u636e\u4e2d\u5fc3\u8fd0\u7ef4\u7ba1\u63a7\u53ef\u89c6\u5316\u9879\u76ee\uff0c\u8986\u76d6\u56ed\u533a\u3001\u673a\u623f\u3001\u673a\u67dc\u3001\u8bbe\u5907\u591a\u5c42\u7ea7\u573a\u666f\uff0c\u79ef\u7d2f\u4e86\u4e30\u5bcc\u7684\u8d44\u4ea7\u3001\u52a8\u73af\u3001\u80fd\u8017\u4e00\u4f53\u5316\u5f00\u53d1\u7ecf\u9a8c\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png\"><img loading=\"lazy\" width=\"875\" height=\"684\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png\" alt=\"\" class=\"wp-image-7561\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png 875w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-300x235.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-768x600.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-660x516.png 660w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p><!-- wp:image {\"id\":7563,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/01-1.webp\"><img loading=\"lazy\" width=\"1080\" height=\"1078\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/01-1.webp\" alt=\"\" class=\"wp-image-7563\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728\u6570\u636e\u4e2d\u5fc3\u8fd0\u7ef4\u7684\u65e5\u5e38\u4e2d\uff0c\u8bbe\u5907\u4e0a\u4e0b\u67b6\u7ba1\u7406\u4e00\u76f4\u662f\u4e2a\u201c\u7ecf\u5178\u96be\u9898\u201d\uff1a\u8fd0\u7ef4\u4eba\u5458\u9700\u8981\u53cd\u590d\u5728\u00a0Excel\u00a0\u8868\u683c\u3001U\u00a0\u4f4d\u56fe\u7eb8\u548c\u7269\u7406\u673a\u67dc\u4e4b\u95f4\u6765\u56de\u5207\u6362\u3002\u6574\u4e2a\u6d41\u7a0b\u4e0d\u4ec5\u8017\u65f6\u8017\u529b\uff0c\u8fd0\u7ef4\u6548\u7387\u4f4e\u4e0b\uff0c\u8fd8\u6613\u51fa\u73b0\u673a\u4f4d\u9519\u653e\u3001\u8d44\u4ea7\u8d26\u5b9e\u4e0d\u7b26\u7b49\u95ee\u9898\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li>\u4f8b\u5982\u5b9a\u4f4d\u00a0A01423\u00a0\u670d\u52a1\u5668\u65f6\uff0c\u9700\u5148\u540e\u6838\u5bf9\u8868\u683c\u3001\u673a\u67dc\u56fe\u7eb8\uff0c\u786e\u8ba4\u5176\u00a0B7\u00a0\u673a\u67dc\u00a014U-16U\u00a0\u673a\u4f4d\u540e\uff0c\u518d\u53bb\u673a\u623f\u73b0\u573a\u7cbe\u786e\u67e5\u627e\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u672c\u6587\u63d0\u51fa<strong>\u4e8c\u7ef4\u8868\u5355\u8054\u52a8\u4e09\u7ef4\u673a\u67dc\u53ef\u89c6\u5316<\/strong>\u89e3\u51b3\u65b9\u6848\uff0c\u901a\u8fc7\u56fe\u6251\u521b\u65b0\u5f0f\u53ef\u89c6\u5316\u7ba1\u63a7\u7cfb\u7edf\uff0c\u8ba9\u8bbe\u5907\u7ba1\u7406\u4ece\u201c\u8868\u683c\u67e5\u627e\u201d\u5347\u7ea7\u4e3a\u201c\u7a7a\u95f4\u64cd\u4f5c\u201d\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7539,\"sizeSlug\":\"large\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1024x576.png\" alt=\"\" class=\"wp-image-7539\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1024x576.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-300x169.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-768x432.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-1536x864.png 1536w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1-660x371.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/02-1.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8be5\u6848\u4f8b\u4f9d\u6258<strong>\u62d6\u62fd\u4ea4\u4e92\u6a21\u5f0f<\/strong>\uff0c\u5b9e\u73b0\u8868\u683c\u8bbe\u5907\u76f4\u63a5\u4e0a\u67b6\u3001\u4e09\u7ef4\u573a\u666f\u8bbe\u5907\u53cd\u5411\u4e0b\u67b6\u3002\u7cfb\u7edf\u642d\u5efa\u4e00\u4f53\u5316\u4ea4\u4e92\u67b6\u6784\uff0c\u57fa\u4e8e\u5171\u4eab\u6570\u636e\u6a21\u578b\u5b9e\u73b0\u4e8c\u4e09\u7ef4\u89c6\u56fe\u6570\u636e\u5b9e\u65f6\u540c\u6b65\uff0c\u901a\u8fc7\u4e8b\u4ef6\u9a71\u52a8\u4fdd\u969c\u53cc\u5411\u62d6\u62fd\u7cbe\u51c6\u5b9a\u4f4d\uff0c\u642d\u914d\u53ef\u81ea\u9002\u5e94\u89c6\u89d2\u4e0e\u7a97\u53e3\u53d8\u5316\u7684\u52a8\u6001\u8fde\u63a5\u7ebf\u3001\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u667a\u80fd\u63a8\u8350\u7b97\u6cd5\uff0c\u4ee5\u53ca\u591a\u5c42\u4ea4\u4e92\u52a8\u753b\u4f18\u5316\u6574\u4f53\u64cd\u4f5c\u4f53\u9a8c\u3002\u4e0b\u6587\u5c06\u5bf9\u7cfb\u7edf\u7684\u8bbe\u8ba1\u601d\u8def\u4e0e\u5177\u4f53\u5b9e\u73b0\u65b9\u5f0f\u5c55\u5f00\u8be6\u7ec6\u9610\u8ff0\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":1} --><\/p>\n<h1>\u7cfb\u7edf\u5206\u6790<\/h1>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2>01 <strong>\u8bbe\u5907\u4e0a\u4e0b\u67b6\u4ea4\u4e92<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:heading {\"level\":3} --><\/p>\n<h3><strong>\u8bbe\u5907\u4e0a\u67b6\u6d41\u7a0b<\/strong><\/h3>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728\u4f20\u7edf\u00a0Excel\u00a0\u5f0f\u7ba1\u7406\u4e2d\uff0c\u4e00\u53f0\u670d\u52a1\u5668\u4ec5\u8868\u73b0\u4e3a\u4e00\u884c\u6570\u5b57\u4e0e\u6587\u5b57\u3002\u800c\u5728\u672c\u7cfb\u7edf\u4e2d\uff0c\u8bbe\u5907\u5177\u5907\u5b8c\u6574\u7684<strong>\u201c\u53ef\u62d6\u62fd\u201d\u5b9e\u4f53\u5c5e\u6027<\/strong>\uff0c\u4e0a\u67b6\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7549,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/03-3.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/03-3.gif\" alt=\"\" class=\"wp-image-7549\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>01<\/strong> <strong>\u6743\u9650\u6821\u9a8c<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7cfb\u7edf\u9996\u5148\u68c0\u67e5\u7528\u6237\u662f\u5426\u5904\u4e8e\u7f16\u8f91\u6a21\u5f0f\u2014\u2014\u9632\u6b62\u8bef\u64cd\u4f5c\u5f71\u54cd\u751f\u4ea7\u73af\u5883\u3002\u8be5\u673a\u5236\u7c7b\u4f3c\u4e8e\u7269\u7406\u673a\u623f\u9700\u51ed\u5de5\u5355\u64cd\u4f5c\uff0c\u786e\u4fdd\u5b89\u5168\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u68c0\u67e5\u7f16\u8f91\u6743\u9650<\/em><\/code>\n<code>if\u00a0(!isEditMode &amp;&amp;\u00a0event.kind !==\u00a0'sortChange')\u00a0return;<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>02<\/strong> <strong>\u89e6\u53d1\u62d6\u62fd\u4e0e\u673a\u4f4d\u9ad8\u4eae<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7528\u6237\u4ece\u8868\u683c\u4e2d\u62d6\u62fd\u4e00\u53f0\u201c\u672a\u4e0a\u67b6\u201d\u8bbe\u5907\u65f6\uff0c\u7cfb\u7edf\u6807\u8bb0\u62d6\u62fd\u65b9\u5411\uff0c\u5e76\u751f\u6210\u81ea\u5b9a\u4e49\u62d6\u62fd\u56fe\u6807\u3002\u540c\u65f6\u5728\u00a03D\u00a0\u673a\u67dc\u4e2d\u9ad8\u4eae\u6240\u6709\u7b26\u5408\u5c3a\u5bf8\u8981\u6c42\u7684\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u3002\u62d6\u62fd\u56fe\u6807\u901a\u8fc7\u72ec\u7acb\u00a0JSON\u00a0\u6587\u4ef6\u914d\u7f6e\uff0c\u652f\u6301\u6309\u9700\u81ea\u5b9a\u4e49\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\/\/ \u6807\u8bb0\u62d6\u62fd\u65b9\u5411\u4e3a2D\u21923D\r\nisDraggingFromTable = true;\r\nconst rowData = event.info.data;\r\n\/\/ \u521b\u5efa\u62d6\u62fd\u89c6\u89c9\u5143\u7d20\r\nevent.elementInfo = {\r\n    element: ht.Default.toCanvas('device-drag-icon.json', 24, 24),\r\n    offsetX: 0,\r\n    offsetY: 0\r\n};\r\n\/\/ \u901a\u77e53D\u89c6\u56fe\u521b\u5efa\u9ad8\u4eae\u5757\r\nevent.fire(\"createHighlightBlock\",rowData.a('unit') );<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u62d6\u62fd\u8fc7\u7a0b\u4e2d\uff0c\u76ee\u6807\u673a\u67dc\u4e0a\u6240\u6709\u53ef\u7528\u7684\u8fde\u7eed&nbsp;U&nbsp;\u4f4d\u4f1a\u4ee5\u9ad8\u4eae\u5757\u5f62\u5f0f\u5448\u73b0\uff0c\u7c7b\u4f3c\u5f71\u9662\u7a7a\u5ea7\u4f4d\u6807\u8bc6\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>03<\/strong> <strong>\u5b9e\u65f6\u4f4d\u7f6e\u8ba1\u7b97\u4e0e\u60ac\u505c\u9ad8\u4eae<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u9f20\u6807\u79fb\u52a8\u65f6\uff0c\u7cfb\u7edf\u5b9e\u65f6\u8ba1\u7b97\u5f53\u524d\u60ac\u505c\u7684 U \u4f4d\u69fd\u4f4d\uff0c\u5e76\u52a8\u6001\u8c03\u6574\u9ad8\u4eae\u72b6\u6001\uff0c\u5b9e\u73b0\u7cbe\u51c6\u70b9\u4f4d\u6307\u5f15\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>const targetSlot = rack3DView.getDataAt(event.nativeEvent);\nif (targetSlot &amp;&amp; targetSlot.getParent() === highlightBlock) {\n    highlightBlock.eachChild(slot => {\n        \/\/ \u9ad8\u4eae\u5f53\u524d\u60ac\u505c\u7684\u69fd\u4f4d\n        slot.s('highlight.group', slot === targetSlot ? 1 : undefined);\n        slot.s('highlight.mode', slot === targetSlot);\n    });\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7548,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/04-2.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/04-2.gif\" alt=\"\" class=\"wp-image-7548\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u9488\u5bf9\u670d\u52a1\u5668\u3001\u4ea4\u6362\u673a\u7b49\u5360\u7528\u591a\u8054\u00a0U\u00a0\u4f4d\u7684\u8bbe\u5907\uff0c\u7cfb\u7edf\u5185\u7f6e\u7b97\u6cd5\uff0c\u53ef\u6839\u636e\u8bbe\u5907\u5c3a\u5bf8\u3001\u673a\u67dc\u603b\u5bb9\u91cf\u53ca\u5df2\u5360\u7528\u673a\u4f4d\uff0c\u5feb\u901f\u7b5b\u9009\u5168\u90e8\u53ef\u7528\u8fde\u7eed\u7a7a\u95f2\u00a0U\u00a0\u4f4d\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\/**\n * \u5bfb\u627e\u673a\u67dc\u4e2d\u53ef\u7528\u7684\u8fde\u7eedU\u4f4d\n * @param {number}deviceUnit - \u8bbe\u5907\u6240\u9700U\u4f4d\u6570\uff08\u5fc5\u987b\u5927\u4e8e0\uff09\n * @param {number}maxUnits - \u673a\u67dc\u603bU\u4f4d\u6570\uff08\u5fc5\u987b\u5927\u4e8e0\uff09\n * @param {Array&lt;number>}occupiedUnits - \u5df2\u5360\u7528U\u4f4d\u6570\u7ec4\uff0c\u8303\u56f4\u5e94\u5728&#91;1, maxUnits]\u4e4b\u95f4\n * @returns {Array&lt;number>}\u53ef\u7528\u7684\u8d77\u59cbU\u4f4d\u6570\u7ec4\uff0c\u6309\u5347\u5e8f\u6392\u5217\n * @example\n * \/\/ \u8fd4\u56de &#91;1, 7, 12]\n * findAvailablePositions(2, 24, &#91;3, 4, 5, 6, 9, 10]);\n *\/\nfunctionfindAvailablePositions(deviceUnit, maxUnits, occupiedUnits) {\n    \/\/ 1. \u53c2\u6570\u9a8c\u8bc1\n    if (typeof deviceUnit !== 'number' || deviceUnit &lt;= 0 ||\n         typeof maxUnits !== 'number' || maxUnits &lt;= 0 ||\n        !Array.isArray(occupiedUnits)) {\n        console.warn('findAvailablePositions: \u53c2\u6570\u65e0\u6548', { deviceUnit, maxUnits, occupiedUnits });\n        return &#91;];\n    }\n    \/\/ \u8bbe\u5907\u9700\u6c42\u8d85\u8fc7\u673a\u67dc\u603b\u5bb9\u91cf\uff0c\u76f4\u63a5\u8fd4\u56de\u7a7a\u6570\u7ec4\n    if (deviceUnit > maxUnits) {\n        return &#91;];\n    }\n    \/\/ 2. \u51c6\u5907\u6570\u636e\uff1a\u8fc7\u6ee4\u65e0\u6548\u7684\u5360\u7528\u4f4d\u7f6e\u5e76\u521b\u5efa\u67e5\u627e\u96c6\u5408\n    const validOccupiedUnits = occupiedUnits.filter(\n        position =>Number.isInteger(position) &amp;&amp; position >= 1 &amp;&amp; position &lt;= maxUnits\n    );\n    const occupiedSet = newSet(validOccupiedUnits);\n    \/\/ 3. \u67e5\u627e\u53ef\u7528\u4f4d\u7f6e\n    const availableStartPositions = &#91;];\n    let consecutiveFreeSlots = 0;\n    for (let position = 1; position &lt;= maxUnits; position++) {\n        if (occupiedSet.has(position)) {\n            \/\/ \u5f53\u524d\u4f4d\u7f6e\u88ab\u5360\u7528\uff0c\u91cd\u7f6e\u8fde\u7eed\u7a7a\u95f2\u8ba1\u6570\n            consecutiveFreeSlots = 0;\n            continue;\n        }\n        consecutiveFreeSlots++;\n        \/\/ \u627e\u5230\u6ee1\u8db3\u8bbe\u5907\u9700\u6c42\u7684\u8fde\u7eed\u7a7a\u4f4d\n        if (consecutiveFreeSlots >= deviceUnit) {\n            const startPosition = position - deviceUnit + 1;\n            availableStartPositions.push(startPosition);\n        }\n    }\n    \/\/ 4. \u6309\u7ea6\u5b9a\u8fd4\u56de\u7ed3\u679c\uff08\u5df2\u7ecf\u662f\u5347\u5e8f\uff09\n    return availableStartPositions;\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>04 \u653e\u7f6e\u786e\u8ba4\u4e0e\u6570\u636e\u540c\u6b65<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7528\u6237\u677e\u5f00\u9f20\u6807\u65f6\uff0c\u7cfb\u7edf\u6267\u884c\u539f\u5b50\u6027\u6570\u636e\u66f4\u65b0\uff1a\u5728\u00a03D\u00a0\u673a\u67dc\u521b\u5efa\u8bbe\u5907\u6a21\u578b\u3001\u4fee\u6539\u00a02D\u00a0\u8868\u683c\u8bbe\u5907\u72b6\u6001\uff08\u5df2\u4e0a\u67b6\/\u672a\u4e0a\u67b6\uff09\u3001\u8bb0\u5f55\u673a\u4f4d\u4fe1\u606f\uff0c\u5e76\u540c\u6b65\u81f3\u4e0a\u67b6\u8bbe\u5907\u6e05\u5355\u3002<strong>\u6240\u6709\u64cd\u4f5c\u8981\u4e48\u5168\u90e8\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u56de\u6eda\uff0c\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>if (slot === targetSlot) {\n    const deviceInfo = rowData.getAttrObject();\n    const startU = slot.a('slotIndexes')&#91;0];\n    \/\/ \u66f4\u65b0\u8bbe\u5907\u5360\u7528\u4fe1\u606f\n    deviceInfo.occupy = &#91;startU];\n    \/\/ \u57283D\u89c6\u56fe\u4e2d\u521b\u5efa\u8bbe\u5907\u6a21\u578b\n    mountDevice(deviceInfo);\n    \/\/ \u66f4\u65b0\u8bbe\u5907\u72b6\u6001\u4e3a\u5df2\u4e0a\u67b6\n    event.info.data.a('status', '\u5df2\u4e0a\u67b6');\n    \/\/ \u8bb0\u5f55\u5230\u5df2\u4e0a\u67b6\u8bbe\u5907\u5217\u8868\n    mountedDeviceList.push({\n        ...deviceInfo,\n        startU: startU,\n        position: `${startU}U-${startU + deviceInfo.unit}U`\n    });\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7547,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/05-5.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/05-5.gif\" alt=\"\" class=\"wp-image-7547\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7546,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/06-1.webp\"><img loading=\"lazy\" width=\"385\" height=\"355\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/06-1.webp\" alt=\"\" class=\"wp-image-7546\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>05<\/strong> <strong>\u754c\u9762\u72b6\u6001\u6536\u5c3e<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4e0a\u67b6\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u81ea\u52a8\u89e6\u53d1\u7edf\u8ba1\u9762\u677f\u66f4\u65b0\u3001\u5f53\u524d\u9009\u4e2d\u8bbe\u5907\u9ad8\u4eae\u5237\u65b0\u3001\u8fde\u63a5\u7ebf\u91cd\u7ed8\u4ee5\u53ca\u4e34\u65f6\u9ad8\u4eae\u5757\u6e05\u7406\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\/\/ \u66f4\u65b0\u7edf\u8ba1\u9762\u677f\nupdateStatisticsPanel();\n\/\/ \u66f4\u65b0\u5f53\u524d\u9009\u4e2d\u4fe1\u606f\nrowInfo = deviceInfo;\n\/\/ \u8ba93D\u89c6\u56fe\u9ad8\u4eae\u663e\u793a\u65b0\u8bbe\u5907\nhighlightSelectedDevice();\n\/\/ \u91cd\u65b0\u7ed8\u5236\u8fde\u63a5\u7ebf\nupdateConnectionLine();\n\/\/ \u6062\u590d\u9f20\u6807\u6307\u9488\nview.setCursor(null);\n\/\/ \u6e05\u7406\u9ad8\u4eae\u5757\nrack3DView.dm().remove(highlightBlock);<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>06<\/strong> <strong>\u8868\u683c\u6392\u5e8f\u4e0e\u673a\u5185\u8fc1\u79fb<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u8868\u683c\u6392\u5e8f\u9002\u914d<\/strong>\uff1a\u8fd0\u7ef4\u4eba\u5458<strong>\u53ef\u6309\u8bbe\u5907\u7c7b\u578b\u3001\u8d1f\u8f7d\u3001\u4e0a\u67b6\u65f6\u95f4\u7b49\u7ef4\u5ea6\u6392\u5e8f\u8868\u683c<\/strong>\u3002\u7cfb\u7edf\u7b49\u5f85\u8868\u683c\u6e32\u67d3\u5b8c\u6210\u540e\uff0c\u81ea\u52a8\u91cd\u65b0\u8ba1\u7b97\u5e76\u5237\u65b0\u8fde\u63a5\u7ebf\uff0c\u4fdd\u8bc1\u00a02D \u4e0e 3D\u00a0\u8bbe\u5907\u5bf9\u5e94\u5173\u7cfb\u4e0d\u53d8\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>if (event.kind === 'sortChange') {\n    \/\/ \u7b49\u5f85\u8868\u683c\u6e32\u67d3\u5b8c\u6210\u540e\u91cd\u65b0\u8ba1\u7b97\u8fde\u63a5\u7ebf\n    ht.Default.callLater(() => {\n        calculateLineStartPoint();\n        updateConnectionLine();\n    });\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7550,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/07-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/07-1.gif\" alt=\"\" class=\"wp-image-7550\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u673a\u67dc\u5185\u8bbe\u5907\u8fc1\u79fb<\/strong>\uff1a\u5bf9\u4e8e\u5df2\u5728\u673a\u67dc\u4e2d\u7684\u8bbe\u5907\uff0c\u7cfb\u7edf\u540c\u6837\u652f\u6301\u62d6\u62fd\u91cd\u5b9a\u4f4d\u3002\u62d6\u62fd\u5f00\u59cb\u65f6\u4fdd\u5b58\u539f\u59cb\u4f4d\u7f6e\uff0c\u5e76\u4e34\u65f6\u521b\u5efa\u53ef\u7528 U \u4f4d\u9ad8\u4eae\u5757\uff1b\u62d6\u62fd\u7ed3\u675f\u540e\u66f4\u65b0\u5360\u7528\u4fe1\u606f\uff0c\u62d6\u62fd\u53d6\u6d88\u5219\u6062\u590d\u539f\u4f4d\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\/**\n * \u5904\u7406\u8bbe\u5907\u62d6\u62fd\u5f00\u59cb\u4e8b\u4ef6\n * @param {Object}event - \u62d6\u62fd\u4e8b\u4ef6\u5bf9\u8c61\n *\/\nfunctiononBeginDrag(event) {\n    \/\/ \u68c0\u67e5\u7f16\u8f91\u6743\u9650\n    if (!isEditMode) return;\n    \/\/ \u9a8c\u8bc1\u62d6\u62fd\u4e8b\u4ef6\u7c7b\u578b\n    if (event.type !== 'data')  return;\n    const deviceData = event.data;\n    const deviceShape = deviceData.s('shape3d');\n    \/\/ \u9a8c\u8bc1\u662f\u5426\u4e3a\u53ef\u62d6\u62fd\u7684\u8bbe\u5907\u6a21\u578b\n    if (!deviceModels.includes(deviceShape)) return;\n    \/\/ \u8bb0\u5f55\u62d6\u62fd\u4fe1\u606f\n    dragInfo = {\n        draggingElementInfo: {\n            element: ht.Default.toCanvas('device-drag-icon.json', 24, 24),\n        },\n        view: view,\n        data: deviceData\n    };\n    \/\/ \u4fdd\u5b58\u539f\u59cb\u4f4d\u7f6e\u4ee5\u4fbf\u53d6\u6d88\u64cd\u4f5c\n    const originalPosition = deviceData.p3();\n    deviceData.a('originalPosition', originalPosition);\n    try {\n        \/\/ \u542f\u52a8\u62d6\u62fd\n        ht.drawing.Dragger.startDragging(dragInfo, event.event);\n        \/\/ \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\u7528\u4e8e\u9ad8\u4eae\u63d0\u793a\n        const unitSize = deviceData.a('unit');\n        const occupyArray = deviceData.a('occupy');\n        \/\/ \u521b\u5efa\u9ad8\u4eae\u5757\u663e\u793a\u53ef\u7528\u4f4d\u7f6e\n        if (unitSize &amp;&amp; occupyArray &amp;&amp; occupyArray.length > 0) {\n            const minOccupy = Math.min(...occupyArray);\n            createHighlightBlock(unitSize, minOccupy);\n        }\n        \/\/ \u4e34\u65f6\u53d6\u6d88\u8bbe\u5907\u9ad8\u4eae\n        deviceData.s('highlight.group', undefined);\n        deviceData.s('highlight.mode', false);\n    } catch (error) {\n        console.error('\u62d6\u62fd\u64cd\u4f5c\u5931\u8d25:', error);\n        \/\/ \u6e05\u7406\u62d6\u62fd\u72b6\u6001\n        dragInfo = null;\n        deviceData.a('originalPosition', null);\n    }\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7551,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/08-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/08-1.gif\" alt=\"\" class=\"wp-image-7551\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>07 \u62d6\u62fd\u72b6\u6001\u91cd\u7f6e<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u62d6\u62fd\u52a8\u4f5c\u7ed3\u675f\u540e\uff0c\u6e05\u7a7a\u65b9\u5411\u6807\u8bb0\uff0c\u533a\u5206\u4e0a\u4e0b\u67b6\u4e24\u7c7b\u62d6\u62fd\u903b\u8f91\u3002<strong>isDraggingFromTable\u00a0\u6807\u5fd7\u4f4d\u5f88\u5173\u952e<\/strong>\uff0c\u7528\u4e8e\u533a\u5206\u62d6\u62fd\u6765\u6e90\uff0c\u786e\u4fdd\u540e\u7eed\u903b\u8f91\uff08\u5982\u4e0b\u67b6\uff09\u6b63\u786e\u5904\u7406\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>if (event.kind === 'endDrag') {\n    isDraggingFromTable = false;\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u6280\u672f\u4eae\u70b9<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u72b6\u6001\u9a71\u52a8\u4ea4\u4e92<\/strong>\uff1a\u901a\u8fc7\u00a0isEditMode\u00a0\u63a7\u5236\u6574\u4e2a\u7cfb\u7edf\u7684\u53ef\u64cd\u4f5c\u6027\uff0c\u786e\u4fdd\u751f\u4ea7\u5b89\u5168\uff1b<\/li>\n<li><strong>\u5b9e\u65f6\u89c6\u89c9\u53cd\u9988<\/strong>\uff1a\u62d6\u62fd\u8fc7\u7a0b\u4e2d\u7684\u9ad8\u4eae\u53d8\u5316\u3001\u653e\u7f6e\u65f6\u7684\u72b6\u6001\u66f4\u65b0\uff0c\u90fd\u63d0\u4f9b\u4e86\u6e05\u6670\u7684\u4ea4\u4e92\u5f15\u5bfc\uff1b<\/li>\n<li><strong>\u5168\u57df\u6570\u636e\u540c\u6b65<\/strong>\uff1a2D\u00a0\u8868\u683c\u30013D\u00a0\u6a21\u578b\u3001\u7edf\u8ba1\u6570\u636e\u901a\u8fc7\u7edf\u4e00\u7684\u6570\u636e\u6a21\u578b\u4fdd\u6301\u540c\u6b65\uff1b<\/li>\n<li><strong>\u5b8c\u5584\u5f02\u5e38\u515c\u5e95<\/strong>\uff1a\u65e0\u6548\u62d6\u62fd\u3001\u653e\u7f6e\u5931\u8d25\u7b49\u573a\u666f\u652f\u6301\u81ea\u52a8\u56de\u9000\uff0c\u907f\u514d\u754c\u9762\u5f02\u5e38\uff1b<\/li>\n<li><strong>\u9ad8\u6027\u80fd\u8bbe\u8ba1<\/strong>\uff1a\u7ed3\u5408\u4e8b\u4ef6\u59d4\u6258\u3001\u5f02\u6b65\u6267\u884c\u673a\u5236\uff0c\u6d77\u91cf\u8bbe\u5907\u573a\u666f\u4e0b\u4ecd\u53ef\u6d41\u7545\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:heading {\"level\":3} --><\/p>\n<h3><strong>\u8bbe\u5907\u4e0b\u67b6\u6d41\u7a0b<\/strong><\/h3>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7cfb\u7edf\u652f\u6301\u53cd\u5411\u62d6\u62fd\u5b9e\u73b0\u4ece\u00a03D\u00a0\u673a\u67dc\u62d6\u56de\u8868\u683c\uff0c<strong>\u91c7\u7528\u72b6\u6001\u6807\u8bb0\u66ff\u4ee3\u7269\u7406\u5220\u9664\u7684\u8bbe\u8ba1<\/strong>\uff0c\u4fdd\u7559\u8bbe\u5907\u5168\u91cf\u6570\u636e\uff0c\u652f\u6301\u64cd\u4f5c\u8ffd\u6eaf\u4e0e\u590d\u539f\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>if (event.kind === 'crossDrop') {\n    const deviceData = event.info.data;\n    const deviceName = deviceData.a('name');\n    \/\/ 1. \u4fee\u6539\u8bbe\u5907\u72b6\u6001\n    deviceData.a('status', '\u672a\u4e0a\u67b6');\n    \/\/ 2. \u4ece\u5df2\u4e0a\u67b6\u8bbe\u5907\u5217\u8868\u4e2d\u79fb\u9664\n    const deviceIndex = mountedDeviceList.findIndex(device => device.name === deviceName);\n    if (deviceIndex === -1) {\n        console.warn(`\u8bbe\u5907 ${deviceName} \u672a\u5728\u4e0a\u67b6\u5217\u8868\u4e2d\u627e\u5230`);\n        return; \/\/ \u6216\u8fdb\u884c\u76f8\u5e94\u5904\u7406\n    } else {\n        \/\/ \u5982\u679c\u5f53\u524d\u9009\u4e2d\u7684\u8bbe\u5907\u662f\u6b63\u5728\u4e0b\u67b6\u7684\u8bbe\u5907\uff0c\u6e05\u9664\u9009\u4e2d\u72b6\u6001\n        if (selectedEdge &amp;&amp; selectedEdge.a('name') === deviceName) {\n            selectedEdge = null;\n            hideConnectionLine();\n        }\n        \/\/ \u4ece\u5df2\u4e0a\u67b6\u5217\u8868\u79fb\u9664\n        mountedDeviceList.splice(deviceIndex, 1);\n    }\n    \/\/ 3. \u5982\u679c\u662f\u4ece3D\u62d6\u52302D\uff0c\u4ece\u8868\u683c\u6570\u636e\u6a21\u578b\u4e2d\u79fb\u9664\u5bf9\u5e94\u884c\n    if (!isDraggingFromTable) {\n        const tableDataModel = data.a('dataModel');\n        const tableRows = tableDataModel.toDatas().toArray();\n        for (let i = 0; i &lt; tableRows.length; i++) {\n            const tableRow = tableRows&#91;i];\n            if (tableRow.a('name') === deviceName) {\n                tableDataModel.remove(tableRow);\n                break; \/\/ \u627e\u5230\u540e\u7acb\u5373\u8df3\u51fa\u5faa\u73af\n            }\n        }\n    }\n    \/\/ 4. \u66f4\u65b0\u7edf\u8ba1\u9762\u677f\n    updateStatisticsPanel();\n}<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7552,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/09-1.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/09-1.gif\" alt=\"\" class=\"wp-image-7552\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u6d41\u7a0b\u9075\u5faa<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u72b6\u6001\u9a71\u52a8\u800c\u975e\u5220\u9664<\/strong>\uff1a\u901a\u8fc7\u72b6\u6001\u53d8\u66f4\u800c\u975e\u7269\u7406\u5220\u9664\uff0c\u4fdd\u7559\u4e86\u64cd\u4f5c\u7684\u5386\u53f2\u75d5\u8ff9\uff1b<\/li>\n<li><strong>\u6570\u636e\u4e00\u81f4\u6027\u4fdd\u969c<\/strong>\uff1a\u66f4\u65b0\u72b6\u6001\u7684\u540c\u65f6\uff0c\u540c\u6b65\u66f4\u65b0\u76f8\u5173\u7684\u7edf\u8ba1\u6570\u636e\u9762\u677f\uff1b<\/li>\n<li><strong>\u667a\u80fd\u72b6\u6001\u6e05\u7406<\/strong>\uff1a\u81ea\u52a8\u6e05\u7406\u5197\u4f59\u754c\u9762\u5143\u7d20\uff0c\u4f18\u5316\u89c6\u89c9\u4f53\u9a8c\uff1b<\/li>\n<li><strong>\u62d6\u62fd\u65b9\u5411\u611f\u77e5<\/strong>\uff1a\u901a\u8fc7\u00a0isDraggingFromTable\u00a0\u6807\u5fd7\u533a\u5206\u62d6\u62fd\u65b9\u5411\uff0c\u786e\u4fdd\u903b\u8f91\u6b63\u786e\u5904\u7406\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2>02 <strong>\u5173\u4e8e\u52a8\u6001\u8fde\u63a5\u7ebf<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:heading {\"level\":3} --><\/p>\n<h3><strong>\u8fde\u63a5\u7ebf\u751f\u6210\u903b\u8f91<\/strong><\/h3>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u9009\u4e2d\u8868\u683c\u5185\u5df2\u4e0a\u67b6\u8bbe\u5907\u65f6\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u6761\u52a8\u6001\u8fde\u63a5\u7ebf\uff0c\u4f5c\u4e3a\u8fde\u63a5\u00a02D\u00a0\u8868\u5355\u4e0e\u00a03D\u00a0\u673a\u67dc\u7684\u89c6\u89c9\u6865\u6881\u3002<strong>\u8fde\u63a5\u7ebf\u7684\u751f\u6210\uff0c\u4f9d\u6258\u7cbe\u51c6\u7684\u5750\u6807\u6362\u7b97\u4e0e\u8def\u5f84\u8ba1\u7b97<\/strong>\uff0c\u9002\u914d\u8868\u683c\u6eda\u52a8\u3001\u89c6\u56fe\u65cb\u8f6c\u7b49\u5404\u7c7b\u754c\u9762\u53d8\u5316\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7553,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/10.webp\"><img loading=\"lazy\" width=\"1080\" height=\"608\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/10.webp\" alt=\"\" class=\"wp-image-7553\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>01<\/strong> <strong>\u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8d77\u70b9\u5b9a\u4f4d\u9700\u7efc\u5408\u8868\u683c\u8868\u5934\u9ad8\u5ea6\u3001\u884c\u9ad8\u3001\u884c\u95f4\u8ddd\u3001\u7eb5\u5411\u6eda\u52a8\u504f\u79fb\u3001\u8868\u683c\u6392\u5e8f\u7ed3\u679c\u7b49\u591a\u91cd\u56e0\u7d20\uff0c\u7cbe\u51c6\u5b9a\u4f4d\u9009\u4e2d\u8868\u683c\u884c\u7684\u4e2d\u5fc3\u5750\u6807\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9\u4f4d\u7f6e\uff08\u8868\u683c\u884c\u4e2d\u5fc3\uff09<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Object|null}\u8fd4\u56de\u8d77\u70b9\u5750\u6807\u5bf9\u8c61 {x, y}\uff0c\u5982\u679c\u65e0\u6cd5\u8ba1\u7b97\u5219\u8fd4\u56denull<\/code><code>&nbsp;*\/<\/code><code>functioncalculateLineStartPoint() {<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 1. \u83b7\u53d6\u8868\u683c\u8282\u70b9<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableNode&nbsp;= dm.getDataByTag('table');<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 2. \u68c0\u67e5\u662f\u5426\u6709\u9009\u4e2d\u7684\u884c\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!rowInfo || !rowInfo.name) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u672a\u9009\u4e2d\u8868\u683c\u884c\uff0c\u65e0\u6cd5\u8ba1\u7b97\u8fde\u63a5\u7ebf\u8d77\u70b9');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 3. \u83b7\u53d6\u8868\u683c\u76f8\u5173\u5c5e\u6027<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableWidth&nbsp;= tableNode.getWidth();<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableHeight&nbsp;= tableNode.getHeight();<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableCenterX&nbsp;= tableNode.p().x + tableWidth \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;headRowHeight&nbsp;= tableNode.a('headRowHeight') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowHeight&nbsp;= tableNode.a('rowHeight') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowLineWidth&nbsp;= (tableNode.a('rowLineStyle') || {}).width ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;verticalScrollOffset&nbsp;= tableNode.a('table.translateY') ||&nbsp;0;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 4. \u8ba1\u7b97\u8868\u683c\u6570\u636e\u533a\u57df\u7b2c\u4e00\u884c\u7684\u8d77\u59cbY\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;tableTopY&nbsp;= tableNode.p().y - tableHeight \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;firstRowCenterY&nbsp;= tableTopY + headRowHeight + rowHeight \/&nbsp;2;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 5. \u83b7\u53d6\u8bbe\u5907\u5728\u5f53\u524d\u6392\u5e8f\u540e\u7684\u884c\u7d22\u5f15<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowUIs&nbsp;=&nbsp;getTableRowUIs(view, tableNode);<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!rowUIs || rowUIs.length ===&nbsp;0) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u65e0\u6cd5\u83b7\u53d6\u8868\u683c\u884cUI\u4fe1\u606f');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowIndex&nbsp;=&nbsp;getRowIndexByName(rowUIs, rowInfo.name);<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(rowIndex === -1) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; console.warn('\u672a\u627e\u5230\u5bf9\u5e94\u7684\u8868\u683c\u884c:', rowInfo.name);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; returnnull;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 6. \u8ba1\u7b97\u8be5\u884c\u7684Y\u5750\u6807\uff08\u8003\u8651\u884c\u9ad8\u548c\u884c\u95f4\u8ddd\uff09<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rowCenterY&nbsp;= firstRowCenterY + rowIndex * (rowHeight + rowLineWidth) + verticalScrollOffset;<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; x: tableCenterX,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; y: rowCenterY<\/code><code>&nbsp; &nbsp; };<\/code><code>}<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u83b7\u53d6\u8868\u683c\u884cUI\u5b9e\u4f8b<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Object}view - \u89c6\u56fe\u5bf9\u8c61<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Object}tableNode - \u8868\u683c\u8282\u70b9<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Array}\u8868\u683c\u884cUI\u6570\u7ec4<\/code><code>&nbsp;*\/<\/code><code>functiongetTableRowUIs(view, tableNode) {<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;drawingInstances&nbsp;= ht.drawing.getDrawingInstances(view, tableNode);<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;drawingInstances.length &gt;&nbsp;0&nbsp;? drawingInstances&#91;0].ui.rowUIs : &#91;];<\/code><code>}<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u6839\u636e\u8bbe\u5907\u540d\u79f0\u83b7\u53d6\u884c\u7d22\u5f15<\/code><code>&nbsp;*&nbsp;@param&nbsp;{Array}rowUIs - \u884cUI\u6570\u7ec4<\/code><code>&nbsp;*&nbsp;@param&nbsp;{string}deviceName - \u8bbe\u5907\u540d\u79f0<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{number}\u884c\u7d22\u5f15\uff0c\u672a\u627e\u5230\u8fd4\u56de-1<\/code><code>&nbsp;*\/<\/code><code>functiongetRowIndexByName(rowUIs, deviceName) {<\/code><code>&nbsp; &nbsp;&nbsp;for&nbsp;(let i =&nbsp;0; i &lt; rowUIs.length; i++) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;rowData&nbsp;= rowUIs&#91;i].data;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(rowData &amp;&amp; rowData.a('name') === deviceName) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;i;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;return&nbsp;-1;<\/code><code>}<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>02<\/strong> <strong>\u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ec8\u70b9\u9700\u8981\u5b8c\u6210\u00a03D\u00a0\u4e16\u754c\u5750\u6807\u2192\u5c4f\u5e55\u5750\u6807\u21922D\u00a0\u903b\u8f91\u5750\u6807<strong>\u4e24\u5c42\u8f6c\u6362<\/strong>\uff0c\u7ed3\u5408\u00a03D\u00a0\u89c6\u56fe\u5f53\u524d\u89c6\u89d2\u3001\u76f8\u673a\u4f4d\u7f6e\u7b49\u56e0\u7d20\uff0c\u5c06\u4e09\u7ef4\u8bbe\u5907\u4f4d\u7f6e\u6620\u5c04\u5230\u4e8c\u7ef4\u754c\u9762\u4e2d\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9\uff083D\u8bbe\u5907\u4e8c\u7ef4\u6295\u5f71\uff09<\/code><code>&nbsp;*&nbsp;@returns&nbsp;{Object|null} \u5750\u6807\u5bf9\u8c61 {x, y}\uff0c\u8ba1\u7b97\u5931\u8d25\u8fd4\u56denull<\/code><code>&nbsp;*\/<\/code><code>function&nbsp;calculateLineEndPoint() {<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!selectedEdge) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('\u672a\u9009\u4e2d3D\u8bbe\u5907\uff0c\u65e0\u6cd5\u8ba1\u7b97\u7ec8\u70b9');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;rack3DView = ht.Default.findView('3d');<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;device3DPosition = selectedEdge.p3();<\/code><code>&nbsp; &nbsp;&nbsp;try&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ 3D\u4e16\u754c\u5750\u6807\u8f6c\u5c4f\u5e55\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;screenPosition = rack3DView.toViewPosition(device3DPosition);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(!screenPosition) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('3D\u5750\u6807\u8f6c\u5c4f\u5e55\u5750\u6807\u5931\u8d25');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5c4f\u5e55\u5750\u6807\u8f6c2D\u903b\u8f91\u5750\u6807<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;logicalPosition = view.getLogicalPoint(screenPosition);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(!logicalPosition) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.warn('\u5c4f\u5e55\u5750\u6807\u8f6c\u903b\u8f91\u5750\u6807\u5931\u8d25');<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;x: logicalPosition.x,<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;y: logicalPosition.y<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; };<\/code><code>&nbsp; &nbsp; }&nbsp;catch&nbsp;(error) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.error('\u8ba1\u7b97\u8fde\u63a5\u7ebf\u7ec8\u70b9\u5f02\u5e38:', error);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>}<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>03<\/strong> <strong>\u751f\u6210\u81ea\u9002\u5e94\u8d1d\u585e\u5c14\u66f2\u7ebf<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u83b7\u53d6\u8d77\u6b62\u5750\u6807\u540e\uff0c\u7cfb\u7edf\u4e0d\u4f7f\u7528\u751f\u786c\u76f4\u7ebf\uff0c\u800c\u662f<strong>\u52a8\u6001\u751f\u6210\u8d1d\u585e\u5c14\u66f2\u7ebf<\/strong>\u3002\u63a7\u5236\u70b9\u4f1a\u6839\u636e\u4e24\u70b9\u6c34\u5e73\u8ddd\u79bb\u81ea\u52a8\u9002\u914d\uff0c\u517c\u987e\u77ed\u8ddd\u79bb\u4e0d\u5c16\u9510\u3001\u957f\u8ddd\u79bb\u6bd4\u4f8b\u534f\u8c03\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/**<\/em><\/code><code>&nbsp;* \u66f4\u65b0\u8fde\u63a5\u7ebf\u663e\u793a\u72b6\u6001<\/code><code>&nbsp;*&nbsp;@param&nbsp;{boolean}shouldShow - \u662f\u5426\u663e\u793a\u8fde\u63a5\u7ebf<\/code><code>&nbsp;*\/<\/code><code>functionupdateConnectionLine(shouldShow) {<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(!shouldShow) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u9690\u85cf\u6240\u6709\u8fde\u63a5\u7ebf\u5143\u7d20<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; connectionLine.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; startMarker.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; endMarker.s('2d.visible',&nbsp;false);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u663e\u793a\u8d77\u70b9\u548c\u7ec8\u70b9\u6807\u8bb0<\/em><\/code><code>&nbsp; &nbsp; startMarker.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp; endMarker.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;startPoint&nbsp;=&nbsp;calculateLineStartPoint(); &nbsp;<em>\/\/ \u8868\u683c\u884c\u4e2d\u5fc3<\/em><\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;endPoint&nbsp;=&nbsp;calculateLineEndPoint(); &nbsp; &nbsp; &nbsp;<em>\/\/ 3D\u8bbe\u5907\u6295\u5f71\u4f4d\u7f6e<\/em><\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u521b\u5efa\u8d1d\u585e\u5c14\u66f2\u7ebf\u63a7\u5236\u70b9\u6570\u7ec4<\/em><\/code><code>&nbsp; &nbsp; let controlPoints = &#91;];<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;horizontalDistance&nbsp;= Math.abs(endPoint.x - startPoint.x);<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ 6\u4e2a\u63a7\u5236\u70b9\u6784\u6210\u7684\u8d1d\u585e\u5c14\u66f2\u7ebf<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push(startPoint); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u8d77\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;x: startPoint.x +&nbsp;12,&nbsp;y: startPoint.y }); &nbsp; &nbsp;<em>\/\/ \u6c34\u5e73\u53f3\u79fb12px<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; x: startPoint.x + Math.max(40, horizontalDistance \/&nbsp;2),&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; y: startPoint.y&nbsp;<\/code><code>&nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u52a8\u6001\u63a7\u5236\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; x: endPoint.x - Math.max(40, horizontalDistance \/&nbsp;2),&nbsp;<\/code><code>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; y: endPoint.y&nbsp;<\/code><code>&nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u63a5\u8fd1\u7ec8\u70b9<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push({&nbsp;x: endPoint.x -&nbsp;12,&nbsp;y: endPoint.y }); &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u6c34\u5e73\u5de6\u79fb12px<\/em><\/code><code>&nbsp; &nbsp; controlPoints.push(endPoint); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>\/\/ \u7ec8\u70b9<\/em><\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u66f4\u65b0\u8fde\u63a5\u7ebf\u663e\u793a<\/em><\/code><code>&nbsp; &nbsp; connectionLine.s('2d.visible',&nbsp;true);<\/code><code>&nbsp; &nbsp; connectionLine.setPoints(controlPoints);<\/code><code>&nbsp; &nbsp; connectionLine.setSegments(&#91;1,&nbsp;2,&nbsp;4,&nbsp;2]);&nbsp;<em>\/\/ \u63a7\u5236\u66f2\u7ebf\u5206\u6bb5\uff1a\u76f4\u7ebf-\u66f2\u7ebf-\u76f4\u7ebf<\/em><\/code><code>}<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u6280\u672f\u4eae\u70b9<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u52a8\u6001\u63a7\u5236\u70b9<\/strong>\uff1a\u6839\u636e\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u6c34\u5e73\u8ddd\u79bb\u52a8\u6001\u8c03\u6574\u63a7\u5236\u70b9\u4f4d\u7f6e\uff0c\u786e\u4fdd\u65e0\u8bba\u8ddd\u79bb\u8fdc\u8fd1\uff0c\u66f2\u7ebf\u90fd\u4fdd\u6301\u4f18\u96c5\u7684\u6bd4\u4f8b\uff1b<\/li>\n<li><strong>\u6700\u5c0f\u6c34\u5e73\u504f\u79fb<\/strong>\uff1a\u4f7f\u7528\u00a0Math.max(40, horizontalDistance \/ 2)\u00a0\u786e\u4fdd\u8fde\u63a5\u7ebf\u6709\u8db3\u591f\u7684\u6c34\u5e73\u5ef6\u4f38\uff0c\u907f\u514d\u77ed\u8ddd\u79bb\u65f6\u66f2\u7ebf\u8fc7\u4e8e\u5c16\u9510\uff1b<\/li>\n<li><strong>\u5e73\u6ed1\u8fc7\u6e21<\/strong>\uff1aSegments\u00a0\u53c2\u6570[1, 2, 4, 2]\u63a7\u5236\u66f2\u7ebf\u5206\u6bb5\u65b9\u5f0f\uff0c\u521b\u5efa\u81ea\u7136\u7684&#8221;S&#8221;\u5f62\u8fc7\u6e21\uff1b<\/li>\n<li><strong>\u89c6\u89c9\u7f8e\u611f<\/strong>\uff1a\u901a\u8fc7\u5728\u8d77\u70b9\u548c\u7ec8\u70b9\u9644\u8fd1\u8bbe\u7f6e\u00a012\u00a0\u50cf\u7d20\u7684\u6c34\u5e73\u5ef6\u4f38\uff0c\u521b\u5efa\u4f18\u96c5\u7684\u66f2\u7ebf\u5165\u53e3\u548c\u51fa\u53e3\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:heading {\"level\":3} --><\/p>\n<h3><strong>\u8de8\u7ef4\u5ea6\u5feb\u901f\u68c0\u7d22<\/strong><\/h3>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4f9d\u6258\u8fde\u63a5\u7ebf\u5b9e\u73b0\u8868\u683c\u4e0e&nbsp;3D&nbsp;\u8bbe\u5907\u53cc\u5411\u8054\u52a8\u67e5\u8be2\uff0c\u8fd0\u7ef4\u4eba\u5458\u53ef\u4ece\u4efb\u610f\u4e00\u7aef\u53d1\u8d77\u67e5\u627e\uff0c\u5feb\u901f\u5b9a\u4f4d\u5bf9\u5e94\u76ee\u6807\uff0c\u5f7b\u5e95\u6446\u8131\u4eba\u5de5\u8111\u8865\u6362\u7b97\u7684\u7e41\u7410\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>01<\/strong> <strong>\u9009\u4e2d\u8868\u683c\u6761\u76ee\uff0c\u5b9a\u4f4d\u00a03D\u00a0\u8bbe\u5907\u4f4d\u7f6e<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u70b9\u51fb\u8868\u683c\u4e2d\u7684\u8bbe\u5907\u884c\uff0c\u7cfb\u7edf\u81ea\u52a8\u8bb0\u5f55\u8bbe\u5907\u4fe1\u606f\uff0c\u540c\u6b65\u5728\u00a03D\u00a0\u89c6\u56fe\u4e2d\u5339\u914d\u5bf9\u5e94\u8bbe\u5907\u5e76\u9ad8\u4eae\uff0c\u540c\u65f6\u62c9\u8d77\u8fde\u63a5\u7ebf\u5b8c\u6210\u5173\u8054\u5c55\u793a\u3002<strong>\u82e5\u8bbe\u5907\u5904\u4e8e\u672a\u4e0a\u67b6\u72b6\u6001\uff0c\u5219\u4e0d\u89e6\u53d1\u67e5\u627e\u903b\u8f91\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u76d1\u542c\u8868\u683c\u9009\u4e2d\u72b6\u6001\u53d8\u5316<\/em><\/code><code>let&nbsp;tableDm =&nbsp;getDataAttr('table',&nbsp;'dataModel');<\/code><code>let&nbsp;tableSm = tableDm.sm();<\/code><code>tableSm.ms((event) =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;const&nbsp;selectedRowData = tableSm.ld();<\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(selectedRowData) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5b58\u50a8\u9009\u4e2d\u884c\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; rowInfo = selectedRowData.getAttrObject();<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u5982\u679c\u8bbe\u5907\u672a\u4e0a\u67b6\uff0c\u5219\u6e05\u9664\u9009\u4e2d\u8fb9\u754c<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(rowInfo.status&nbsp;===&nbsp;'\u672a\u4e0a\u67b6') {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; }&nbsp;else&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>\/\/ \u6e05\u9664\u9009\u4e2d\u4fe1\u606f<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; rowInfo = {};<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;null;<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u66f4\u65b03D\u9009\u4e2d\u72b6\u6001\u5e76\u91cd\u7ed8\u8fde\u63a5\u7ebf<\/em><\/code><code>&nbsp; &nbsp;&nbsp;getSelectedEdge();<\/code><code>&nbsp; &nbsp;&nbsp;updateConnectionLine();<\/code><code>});<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7554,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/11-2.gif\"><img loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/11-2.gif\" alt=\"\" class=\"wp-image-7554\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u8be5\u6a21\u5f0f\u4f18\u52bf\u663e\u8457<\/strong>\uff1a\u65e0\u9700\u4eba\u5de5\u5bf9\u7167\u7f16\u53f7\u67e5\u627e\uff0c\u89c6\u89c9\u5f15\u5bfc\u4e00\u76ee\u4e86\u7136\uff0c\u540c\u65f6\u81ea\u52a8\u8bc6\u522b\u8bbe\u5907\u4e0a\u67b6\u72b6\u6001\uff0c\u89c4\u907f\u65e0\u6548\u67e5\u627e\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":4} --><\/p>\n<h4><strong>02<\/strong> <strong>\u70b9\u51fb 3D \u8bbe\u5907\uff0c\u5b9a\u4f4d\u8868\u683c\u6570\u636e<\/strong><\/h4>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u53cd\u5411\u64cd\u4f5c\u540c\u6837\u987a\u7545\uff1a\u70b9\u51fb\u673a\u67dc\u5185\u7684\u00a03D\u00a0\u8bbe\u5907\uff0c\u7cfb\u7edf\u6839\u636e\u8bbe\u5907\u540d\u79f0\u53cd\u5411\u5339\u914d\u8868\u683c\u6570\u636e\uff0c<strong>\u81ea\u52a8\u5c06\u5bf9\u5e94\u884c\u6eda\u52a8\u81f3\u89c6\u91ce\u4e2d\u5fc3\u5e76\u9ad8\u4eae<\/strong>\uff0c\u4e24\u7aef\u540c\u6b65\u6807\u8bb0\uff0c\u5b9e\u73b0\u53cc\u5411\u4e92\u901a\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code>functiongetSelectedEdge() {&nbsp;<em>\/\/ \u8bbe\u7f6e\u5f53\u524d\u9009\u4e2d\u76843d\u8bbe\u5907\u9ad8\u4eae\u6548\u679c<\/em><\/code><code>&nbsp; &nbsp;&nbsp;var&nbsp;g3d = ht.Default.findView('3d');<\/code><code>&nbsp; &nbsp;&nbsp;var&nbsp;upDevices = g3d.dm().getDataByTag('upDevices');<\/code><code>&nbsp; &nbsp; upDevices.eachChild((data) =&gt; {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;upInfo =&nbsp;data.getAttrObject();<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;selected = upInfo.name === rowInfo.name;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(selected) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedEdge =&nbsp;data;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;data.s('highlight.group', selected ?&nbsp;1&nbsp;: undefined);<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;data.s('highlight.mode', selected);<\/code><code>&nbsp; &nbsp; });<\/code><code>}<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7555,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/12-2.gif\"><img loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/12-2.gif\" alt=\"\" class=\"wp-image-7555\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u53cc\u5411\u67e5\u627e\u673a\u5236\uff0c\u771f\u6b63\u5efa\u7acb\u8d77\u6570\u636e\u8bb0\u5f55\u4e0e\u7269\u7406\u8bbe\u5907\u7684\u5f3a\u5173\u8054\uff0c\u8ba9\u62bd\u8c61\u6570\u636e\u62e5\u6709\u76f4\u89c2\u7684\u7a7a\u95f4\u5f62\u6001\uff0c<strong>\u964d\u4f4e\u8fd0\u7ef4\u67e5\u627e\u6210\u672c<\/strong>\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":3} --><\/p>\n<h3><strong>\u89c6\u89d2\u4e0e\u7a97\u53e3\u53d8\u5316\u5b9e\u65f6\u5904\u7406<\/strong><\/h3>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8fde\u63a5\u7ebf\u9700\u8981\u5b9e\u65f6\u8ddf\u968f\u4e24\u79cd\u7528\u6237\u64cd\u4f5c\uff1a<strong>3D\u00a0\u89c6\u89d2\u65cb\u8f6c<\/strong>\uff08\u65cb\u8f6c\/\u5e73\u79fb\/\u7f29\u653e\uff09\u548c<strong>\u6d4f\u89c8\u5668\u7a97\u53e3\u5c3a\u5bf8\u53d8\u5316<\/strong>\u3002\u901a\u8fc7\u7cbe\u5fc3\u8bbe\u8ba1\u7684\u76d1\u542c\u4e0e\u8c03\u5ea6\u673a\u5236\uff0c\u7cfb\u7edf\u786e\u4fdd\u4e86\u00a02D\u00a0\u8868\u683c\u4e0e\u00a03D\u00a0\u8bbe\u5907\u4e4b\u95f4\u7684\u8fde\u63a5\u7ebf\u59cb\u7ec8\u51c6\u786e\u3001\u6d41\u7545\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":7556,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/13-2.gif\"><img loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/13-2.gif\" alt=\"\" class=\"wp-image-7556\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u53cc\u91cd\u76d1\u542c\u4e0e\u6027\u80fd\u4f18\u5316<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7cfb\u7edf\u5efa\u7acb\u4e86\u4e24\u4e2a\u5173\u952e\u7684\u4e8b\u4ef6\u76d1\u542c\u5668\uff0c\u8986\u76d6\u53ef\u80fd\u5f71\u54cd\u8fde\u63a5\u7ebf\u4f4d\u7f6e\u7684\u53d8\u5316\u3002\u91c7\u7528\u57fa\u4e8e\u00a0requestAnimationFrame\u00a0\u7684\u667a\u80fd\u8282\u6d41\u673a\u5236\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code><code><em>\/\/ \u6027\u80fd\u4f18\u5316\u76f8\u5173\u53d8\u91cf<\/em><\/code><code>let&nbsp;animationFrameId =&nbsp;null;<\/code><code>let&nbsp;isUpdating =&nbsp;false;<\/code><code><em>\/**<\/em><\/code><code>&nbsp;* \u8c03\u5ea6\u8fde\u63a5\u7ebf\u66f4\u65b0\u4efb\u52a1<\/code><code>&nbsp;*\/<\/code><code>functionscheduleConnectionLineUpdate() {<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u5982\u679c\u5df2\u6709\u66f4\u65b0\u4efb\u52a1\u5728\u6267\u884c\uff0c\u8df3\u8fc7<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(isUpdating)&nbsp;return;<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u53d6\u6d88\u672a\u6267\u884c\u7684\u66f4\u65b0\u4efb\u52a1<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(animationFrameId) {<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;cancelAnimationFrame(animationFrameId);<\/code><code>&nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u4f7f\u7528requestAnimationFrame\u8c03\u5ea6\u66f4\u65b0<\/em><\/code><code>&nbsp; &nbsp; animationFrameId =&nbsp;requestAnimationFrame(() =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; isUpdating =&nbsp;true;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;try&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;updateConnectionLine(); &nbsp;<em>\/\/ \u91cd\u65b0\u8ba1\u7b97\u5e76\u7ed8\u5236\u8fde\u63a5\u7ebf<\/em><\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;finally&nbsp;{<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isUpdating =&nbsp;false;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animationFrameId =&nbsp;null;<\/code><code>&nbsp; &nbsp; &nbsp; &nbsp; }<\/code><code>&nbsp; &nbsp; });<\/code><code>}<\/code><code><em>\/\/ \u76d1\u542c3D\u89c6\u89d2\u53d8\u5316\uff08\u65cb\u8f6c\u3001\u5e73\u79fb\u3001\u7f29\u653e\uff09<\/em><\/code><code>view.mp((event) =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;<em>\/\/ \u4ec5\u54cd\u5e94\u89c6\u89d2\u76f8\u5173\u7684\u53d8\u5316<\/em><\/code><code>&nbsp; &nbsp;&nbsp;if&nbsp;(event.property&nbsp;!==&nbsp;'eye'&nbsp;&amp;&amp; event.property&nbsp;!==&nbsp;'center')&nbsp;return;<\/code><code>&nbsp; &nbsp;&nbsp;scheduleConnectionLineUpdate();<\/code><code>});<\/code><code><em>\/\/ \u76d1\u542c\u7a97\u53e3\u5927\u5c0f\u53d8\u5316<\/em><\/code><code>addEventListener('resize',&nbsp;() =&gt;&nbsp;{<\/code><code>&nbsp; &nbsp;&nbsp;scheduleConnectionLineUpdate();<\/code><code>});<\/code><\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u91c7\u7528\u667a\u80fd\u8282\u6d41\u7b56\u7565<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u9632\u6296\u8bbe\u8ba1<\/strong>\uff1a\u901a\u8fc7\u00a0isUpdating\u00a0\u6807\u5fd7\u9632\u6b62\u91cd\u590d\u8ba1\u7b97\uff0c\u786e\u4fdd\u540c\u4e00\u65f6\u95f4\u53ea\u6709\u4e00\u4e2a\u66f4\u65b0\u4efb\u52a1\u5728\u6267\u884c\uff1b<\/li>\n<li><strong>\u8bf7\u6c42\u5408\u5e76<\/strong>\uff1a\u4f7f\u7528\u00a0cancelAnimationFrame\u00a0\u53d6\u6d88\u672a\u6267\u884c\u7684\u66f4\u65b0\u8bf7\u6c42\uff0c\u907f\u514d\u4efb\u52a1\u5806\u79ef\uff1b<\/li>\n<li><strong>\u5e27\u7387\u540c\u6b65<\/strong>\uff1a\u501f\u52a9\u00a0requestAnimationFrame\u00a0\u786e\u4fdd\u66f4\u65b0\u4e0e\u6d4f\u89c8\u5668\u5237\u65b0\u540c\u6b65\uff0c\u4fdd\u6301 60fps \u6d41\u7545\u4f53\u9a8c\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u5b9e\u9645\u6548\u679c<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li>\u5feb\u901f\u65cb\u8f6c\u00a03D\u00a0\u89c6\u56fe \u2192 \u8fde\u63a5\u7ebf\u5e73\u6ed1\u8ddf\u968f\uff0c\u65e0\u5361\u987f\u6216\u95ea\u70c1\uff1b<\/li>\n<li>\u62d6\u52a8\u7a97\u53e3\u8fb9\u754c \u2192 \u8fde\u63a5\u7ebf\u7acb\u5373\u91cd\u65b0\u8ba1\u7b97\u5e76\u7cbe\u51c6\u5bf9\u9f50\uff1b<\/li>\n<li>\u9ad8\u9891\u7387\u89e6\u53d1\u4e8b\u4ef6 \u2192 \u7cfb\u7edf\u8d44\u6e90\u4e0d\u6d6a\u8d39\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u91cd\u7ed8\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:heading {\"level\":1} --><\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u672c\u6587\u6240\u8ff0\u7684\u53ef\u89c6\u5316\u65b9\u6848\uff0c<strong>\u672c\u8d28\u4e0a\u662f\u5c06\u62bd\u8c61\u7684\u8bbe\u5907\u8bb0\u5f55\u4e0e\u5177\u4f53\u7684\u7269\u7406\u4f4d\u7f6e\u901a\u8fc7\u76f4\u89c2\u7684\u4ea4\u4e92\u548c\u89c6\u89c9\u53cd\u9988\u8fde\u63a5\u8d77\u6765<\/strong>\u3002\u5b83\u89e3\u51b3\u4e86\u4f20\u7edf\u8fd0\u7ef4\u4e2d\u7684\u51e0\u4e2a\u5173\u952e\u75db\u70b9\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u4f4d\u7f6e\u611f\u77e5<\/strong>\uff1a\u4e0d\u518d\u9700\u8981\u8111\u8865\u8bbe\u5907\u5728\u673a\u67dc\u91cc\u7684\u4f4d\u7f6e\uff1b<\/li>\n<li><strong>\u64cd\u4f5c\u76f4\u89c2<\/strong>\uff1a\u62d6\u62fd\u6bd4\u586b\u8868\u683c\u66f4\u7b26\u5408\u76f4\u89c9\uff1b<\/li>\n<li><strong>\u5b9e\u65f6\u53cd\u9988<\/strong>\uff1a\u4efb\u4f55\u64cd\u4f5c\u90fd\u80fd\u7acb\u5373\u770b\u5230\u7ed3\u679c\uff1b<\/li>\n<li><strong>\u964d\u4f4e\u95e8\u69db<\/strong>\uff1a\u65b0\u5458\u5de5\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:image {\"id\":7560,\"sizeSlug\":\"large\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"543\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-1024x543.png\" alt=\"\" class=\"wp-image-7560\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-1024x543.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-300x159.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-768x407.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1-660x350.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/14-1.png 1234w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6210\u719f\u7684\u65b9\u6848\u7edd\u975e\u5355\u7eaf\u4ee3\u7801\u5806\u53e0\uff0c\u800c\u662f\u517c\u987e\u4f7f\u7528\u4f53\u9a8c\u7684\u4eba\u6027\u5316\u8bbe\u8ba1\uff1b\u52a8\u753b\u4e0d\u8ffd\u6c42\u89c6\u89c9\u7279\u6548\uff0c\u800c\u662f\u5f15\u5bfc\u7528\u6237\u89c6\u7ebf\uff1b\u62d6\u62fd\u4ea4\u4e92\u5e76\u975e\u7b80\u5316\u5f00\u53d1\uff0c\u800c\u662f\u6a21\u62df\u771f\u5b9e\u7269\u7406\u64cd\u4f5c\u903b\u8f91\uff1b\u8fde\u7ebf\u56fe\u5f62\u4e0d\u4ee5\u88c5\u9970\u4e3a\u76ee\u7684\uff0c\u642d\u5efa\u591a\u89c6\u56fe\u95f4\u7684\u6570\u636e\u8ba4\u77e5\u5173\u8054\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u56fe\u6251\u5df2\u843d\u5730\u6d77\u91cf\u667a\u6167\u673a\u623f\u3001\u6570\u636e\u4e2d\u5fc3\u8fd0\u7ef4\u7ba1\u63a7\u53ef\u89c6\u5316\u9879\u76ee\uff0c\u8986\u76d6\u56ed\u533a\u3001\u673a\u623f\u3001\u673a\u67dc\u3001\u8bbe\u5907\u591a\u5c42\u7ea7\u573a\u666f\uff0c\u79ef\u7d2f\u4e86\u4e30\u5bcc\u7684\u8d44\u4ea7\u3001\u52a8\u73af\u3001\u80fd\u8017\u4e00\u4f53\u5316\u5f00\u53d1\u7ecf\u9a8c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7561,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png\"><img loading=\"lazy\" width=\"875\" height=\"684\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png\" alt=\"\" class=\"wp-image-7561\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1.png 875w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-300x235.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-768x600.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/06\/15-1-660x516.png 660w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n","protected":false},"author":2,"featured_media":7562,"comment_status":"closed","ping_status":"","sticky":true,"template":"","format":"standard","meta":[],"categories":[1],"tags":[3,7,9,20,17,59,25],"_links":{"self":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7538"}],"collection":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/comments?post=7538"}],"version-history":[{"count":2,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7538\/revisions"}],"predecessor-version":[{"id":7564,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7538\/revisions\/7564"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media\/7562"}],"wp:attachment":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media?parent=7538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/categories?post=7538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/tags?post=7538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}