+ {/* 顶部提示文字 */}
+
+ 选择需要执行任务的路线(可多选)
+
+
+ {/* 路线选择卡片 */}
+
+ {regionAvailableRoutes.map((route, index) => {
+ const checked = dispatchRouteIds.includes(route.id);
+
+ const regionColors = [
+ '#1677ff',
+ '#13b879',
+ '#fa8c16',
+ '#a33cff',
+ ];
+
+ const color = regionColors[index % regionColors.length];
+
+ return (
+ {
+ setDispatchRouteIds(prev =>
+ nextChecked
+ ? [...prev, route.id]
+ : prev.filter(id => id !== route.id)
+ );
+
+ if (nextChecked) {
+ flyToRoute(route.id);
+ }
+ }}
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: 5,
+ width: '100%',
+ minWidth: 0,
+ height: 40,
+ boxSizing: 'border-box',
+ margin: 0,
+ padding: '0 8px',
+ color: '#344054',
+ background: '#fff',
+ border: '1px solid #dce5f2',
+ borderRadius: 4,
+ fontSize: 12,
+ lineHeight: 'normal',
+ cursor: 'pointer',
+ overflow: 'hidden',
+ }}
+ >
+ {/* 自定义复选框 */}
+
+ {checked ? '✓' : ''}
+
+
+ {/* 路线定位图标 */}
+
+
+ {/* 路线名称 */}
+
+ {route.workName || route.name}
+
+
+ );
+ })}
+
+