|
|
@@ -234,14 +234,9 @@
|
|
|
.then(async (res) => {
|
|
|
localStorage.setItem('userId', res.data.userId);
|
|
|
localStorage.setItem('accountId', res.data.accountId);
|
|
|
- // 用户信息:默认部门/角色取主所属部门(isMainGroup=1,后端以 t_main_user.group_id 为基准)
|
|
|
+ // 用户信息:默认部门/角色取主所属部门(isMainGroup=1,后端以 t_main_user.group_id 为基准),没有则取第一个
|
|
|
const groupList = res.data?.loginChangeGroupVOList || [];
|
|
|
const mainGroup = groupList.find((item) => item.isMainGroup == 1);
|
|
|
- if (!mainGroup && groupList.length) {
|
|
|
- this.$message.warning(
|
|
|
- '登录接口未返回主所属部门(isMainGroup=1),已默认第一个部门,请后端确认'
|
|
|
- );
|
|
|
- }
|
|
|
const defaultGroup = mainGroup || groupList[0];
|
|
|
if (defaultGroup) {
|
|
|
setCurrentUser(
|