fix(gui): 同步侧边栏/选项卡文本与路由映射,删除回归预测 tab

This commit is contained in:
DXC
2026-06-11 11:24:28 +08:00
parent 3c4d4081a4
commit 604886abb3

View File

@ -1856,14 +1856,14 @@ class WaterQualityGUI(QMainWindow):
], ],
"阶段三:模型构建与训练": [ "阶段三:模型构建与训练": [
("step9", "9. 机器学习建模"), ("step9", "9. 机器学习建模"),
("step8_non_empirical_modeling", "8b. 回归模型训练"),
], ],
"阶段四:预测与成果输出 ": [ "阶段四:预测与成果输出 ": [
("step10", "10. 机器学习预测"), ("step10", "10. 机器学习预测"),
("step11", "11. 回归预测"), ("step8_non_empirical_modeling", "11. 水色指数反演"),
("step14", "12. 专题图生成"), ("step9_concentration", "12. 浓度反演"),
("step9_viz", "13. 可视化分析"), ("step14", "14. 专题图生成"),
("step_report", "14. 分析报告生成"), ("step9_viz", "15. 可视化分析"),
("step_report", "16. 分析报告生成"),
] ]
} }
@ -1978,14 +1978,11 @@ class WaterQualityGUI(QMainWindow):
self.step8_waterindex_panel = Step9WaterColorPanel() self.step8_waterindex_panel = Step9WaterColorPanel()
self.step_stack.addTab(self.create_scroll_area(self.step8_waterindex_panel), QIcon(self.get_icon_path("8.png")), "水色指数反演") self.step_stack.addTab(self.create_scroll_area(self.step8_waterindex_panel), QIcon(self.get_icon_path("8.png")), "水色指数反演")
self.step9_concentration_panel = Step10ConcentrationPanel()
self.step_stack.addTab(self.create_scroll_area(self.step9_concentration_panel), QIcon(self.get_icon_path("9.png")), "浓度反演")
self.step10_ml_panel = Step10MlPanel() self.step10_ml_panel = Step10MlPanel()
self.step_stack.addTab(self.create_scroll_area(self.step10_ml_panel), QIcon(self.get_icon_path("10.png")), "机器学习预测") self.step_stack.addTab(self.create_scroll_area(self.step10_ml_panel), QIcon(self.get_icon_path("10.png")), "机器学习预测")
self.step11_non_empirical_panel = Step11NonEmpiricalPanel() self.step9_concentration_panel = Step10ConcentrationPanel()
self.step_stack.addTab(self.create_scroll_area(self.step11_non_empirical_panel), QIcon(self.get_icon_path("11.png")), "回归预测") self.step_stack.addTab(self.create_scroll_area(self.step9_concentration_panel), QIcon(self.get_icon_path("9.png")), "浓度反演")
self.step14_panel = Step14Panel() self.step14_panel = Step14Panel()
self.step_stack.addTab(self.create_scroll_area(self.step14_panel), QIcon(self.get_icon_path("10.png")), "专题图生成") self.step_stack.addTab(self.create_scroll_area(self.step14_panel), QIcon(self.get_icon_path("10.png")), "专题图生成")
@ -2142,13 +2139,12 @@ class WaterQualityGUI(QMainWindow):
'step7': 6, 'step7': 6,
'step8': 7, 'step8': 7,
'step9': 8, 'step9': 8,
'step8_non_empirical_modeling': 9, 'step10': 9,
'step9_concentration': 10, 'step8_non_empirical_modeling': 10,
'step10': 11, 'step9_concentration': 11,
'step11': 12, 'step14': 12,
'step14': 13, 'step9_viz': 13,
'step9_viz': 14, 'step_report': 14,
'step_report': 15,
} }
if item_data in step_id_to_tab: if item_data in step_id_to_tab:
@ -2173,13 +2169,12 @@ class WaterQualityGUI(QMainWindow):
6: 'step7', 6: 'step7',
7: 'step8', 7: 'step8',
8: 'step9', 8: 'step9',
9: 'step8_non_empirical_modeling', 9: 'step10',
10: 'step9_concentration', 10: 'step8_non_empirical_modeling',
11: 'step10', 11: 'step9_concentration',
12: 'step11', 12: 'step14',
13: 'step14', 13: 'step9_viz',
14: 'step9_viz', 14: 'step_report',
15: 'step_report',
} }
if index not in tab_to_step_id: if index not in tab_to_step_id:
@ -2230,24 +2225,24 @@ class WaterQualityGUI(QMainWindow):
elif index == 8: elif index == 8:
self.step9_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline) self.step9_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step8b水色指数反演切换时自动填充光谱数据和输出路径 # Step10机器学习预测切换时自动填充采样光谱和模型目录
elif index == 9: elif index == 9:
self.step8_waterindex_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step10浓度反演切换时自动填充 QAA 结果和输出路径
elif index == 10:
self.step9_concentration_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step11机器学习预测切换时自动填充采样光谱和模型目录
elif index == 11:
self.step10_ml_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline) self.step10_ml_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step11水色指数反演切换时自动填充光谱数据和输出路径
elif index == 10:
self.step8_waterindex_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step12浓度反演切换时自动填充 QAA 结果和输出路径
elif index == 11:
self.step9_concentration_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# Step14专题图生成切换时自动填充预测结果目录 # Step14专题图生成切换时自动填充预测结果目录
elif index == 13: elif index == 12:
self.step14_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline) self.step14_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
# 可视化分析面板切换时自动推断图像目录并加载目录树 # Step15可视化分析切换时自动推断图像目录并加载目录树
elif index == 14: elif index == 13:
self.viz_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline) self.viz_panel.update_from_config(work_dir=self.work_dir, pipeline=self.pipeline)
def apply_stylesheet(self): def apply_stylesheet(self):
@ -3236,8 +3231,8 @@ class WaterQualityGUI(QMainWindow):
step_id_to_tab = { step_id_to_tab = {
'step1': 0, 'step2': 1, 'step3': 2, 'step4': 3, 'step1': 0, 'step2': 1, 'step3': 2, 'step4': 3,
'step5': 4, 'step6': 5, 'step7': 6, 'step8': 7, 'step5': 4, 'step6': 5, 'step7': 6, 'step8': 7,
'step9': 8, 'step8_non_empirical_modeling': 9, 'step9_concentration': 10, 'step9': 8, 'step10': 9, 'step8_non_empirical_modeling': 10,
'step10': 11, 'step11': 12, 'step14': 13, 'step9_viz': 14 'step9_concentration': 11, 'step14': 12, 'step9_viz': 13, 'step_report': 14
} }
for step_id in disabled_step_ids: for step_id in disabled_step_ids: