基础设置界面 系统名称和默认电站的 显示和更新 ,完善恢复默认功能

This commit is contained in:
mmc
2026-10-09 14:59:17 +08:00
parent c2eb04b4a4
commit 7e4872e560
3 changed files with 53 additions and 11 deletions

View File

@@ -40,6 +40,7 @@ export default function AppLayout() {
const { userInfo } = useSelector((state: RootState) => state.user);
// 从 store 中同时取出 stationList(优先级最高,保证最新)
const { currentStation, stationId, stationList: storeStationList } = useSelector((state: RootState) => state.station);
const { systemName } = useSelector((state: RootState) => state.basicSettings);
// 真正用于展示和选择的列表:优先用 store 中的(StationManage 编辑后会同步),否则用本地接口的
@@ -213,7 +214,7 @@ export default function AppLayout() {
<img src={logo} alt="Logo" style={{ width: 24, height: 24 }} />
{!collapsed && (
<span style={{ fontWeight: 'bold', fontSize: 'clamp(14px, 1.2vw, 16px)', color: '#fff', whiteSpace: 'nowrap' }}>
{t('layout.systemName')}
{systemName || t('layout.systemName')}
</span>
)}
</div>