feat(login): 添加租户名称获取功能并优化前端布局

- 在登录控制器中注入租户服务并获取租户名称信息
- 添加租户名称到登录响应结果中
- 更新样式变量定义侧边栏宽度和Logo高度
- 重构公告面板组件统一公告通知显示逻辑
- 简化公告类型图标和样式映射关系
- 更新侧边栏为垂直菜单布局并添加折叠功能
- 优化Logo组件显示租户名称和系统标题
- 调整导航栏布局结构和响应式样式
- 重构主应用容器样式和标签页显示逻辑
This commit is contained in:
2025-12-31 10:28:52 +08:00
parent 10e738edd9
commit 4d4828ea71
54 changed files with 3510 additions and 754 deletions

View File

@@ -11,6 +11,7 @@ import com.core.framework.web.service.SysLoginService;
import com.core.framework.web.service.SysPermissionService;
import com.core.framework.web.service.TokenService;
import com.core.system.service.ISysMenuService;
import com.core.system.service.ISysTenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -39,6 +40,9 @@ public class SysLoginController {
@Autowired
private TokenService tokenService;
@Autowired
private ISysTenantService tenantService;
/**已评审
* 登录方法
*
@@ -72,12 +76,21 @@ public class SysLoginController {
loginUser.setPermissions(permissions);
tokenService.refreshToken(loginUser);
}
// 获取租户名称
String tenantName = null;
if (loginUser.getTenantId() != null) {
com.core.system.domain.SysTenant tenant = tenantService.getById(loginUser.getTenantId());
if (tenant != null) {
tenantName = tenant.getTenantName();
}
}
AjaxResult ajax = AjaxResult.success();
ajax.put("optionJson", loginUser.getOptionJson());
ajax.put("practitionerId", String.valueOf(loginUser.getPractitionerId()));
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
ajax.put("tenantName", tenantName);
return ajax;
}