From e553b9fe20648bf6215406737af513afd9f2190a Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Fri, 29 May 2026 16:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AE=BE=E8=B7=AF=E7=BA=BF=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/devices/RobotTaskPage.tsx | 144 ++++++++++++----------- 1 file changed, 76 insertions(+), 68 deletions(-) diff --git a/src/components/devices/RobotTaskPage.tsx b/src/components/devices/RobotTaskPage.tsx index 8c1914a..72fbcac 100644 --- a/src/components/devices/RobotTaskPage.tsx +++ b/src/components/devices/RobotTaskPage.tsx @@ -539,7 +539,7 @@ export default function RobotTaskPage({ devices }) { setRouteSearch(e.target.value)} /> @@ -550,76 +550,84 @@ export default function RobotTaskPage({ devices }) { style={cardStyle} >
- {routeList.map(route => ( -
e.currentTarget.style.borderColor = '#165DFF'} - onMouseLeave={e => e.currentTarget.style.borderColor = 'transparent'} - > - {/* 路线预览图 */} -
- {route.imgUrl ? ( - {route.workName - ) : ( -
- + {routeList + .filter(item => { + if (!routeSearch) return true; + const name = (item.workName || item.name || '').toLowerCase(); + const id = String(item.id || '').toLowerCase(); + const key = routeSearch.toLowerCase(); + return name.includes(key) || id.includes(key); + }) + .map(route => ( +
e.currentTarget.style.borderColor = '#165DFF'} + onMouseLeave={e => e.currentTarget.style.borderColor = 'transparent'} + > + {/* 路线预览图 */} +
+ {route.imgUrl ? ( + {route.workName + ) : ( +
+ +
+ )} +
+ + {/* 路线信息 */} +
+
+ {route.workName || route.name || '未命名路线'} +
+
+ ID: {route.id}
- )} -
- - {/* 路线信息 */} -
-
- {route.workName || route.name || '未命名路线'} -
-
- ID: {route.id}
+ + {/* 执行按钮 */} + +
- - {/* 执行按钮 */} - -
- ))} + ))}