优化 自定义模式不显示航线选项 自定义模式显示和弓子显示的默认选择从缓存获取

This commit is contained in:
mmc
2026-04-17 10:59:48 +08:00
parent fb3591bd59
commit 4ee48a115e
3 changed files with 79 additions and 42 deletions

View File

@@ -2520,6 +2520,7 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
child: FloatingActionButton(
onPressed: _moveToCurrentLocation,
child: VerticalFloatMenu(
selectedWorkModeIn: _currentWorkMode ?? WorkMode.bow,
onEditTap: (bool isOpen) {
setState(() {
_isPanelOpen = isOpen;
@@ -2545,7 +2546,12 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
},
onWorkModeSelected: (mode) {
_currentWorkMode = mode;
debugPrint('外部收到作业模式选择:$mode');
setState(() {
_currentWorkMode = mode;
_saveDataToLocal();
});
debugPrint('外部收到作业模式:$mode');
},
handleGotoLocation: _handleGotoLocation,
@@ -2565,6 +2571,7 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
initialRobotMode: _currentRobotMode,
initialAreaMode: _currentAreaMode,
initialWorkMode: _currentWorkMode!,
isShowButton: _currentWorkMode == WorkMode.bow ? true : false,
canUndo: _isWorkAreaCompleted && _currentAreaMode == AreaMode.work ? false : true,
onComplete: () async {
debugPrint(