修改仿真重新进入后之前的角色没有清除
This commit is contained in:
parent
8151a465ab
commit
94c8f30305
@ -202,6 +202,7 @@ const training = {
|
||||
state.memberList = memberList;
|
||||
state.memberData = {};
|
||||
if (memberList && memberList.length) {
|
||||
let hasUserId = false;
|
||||
memberList.forEach(item => {
|
||||
state.memberData[item.id] = deepAssign({userId: ''}, item);
|
||||
state.memberData[item.id].disabled = userId == item.userId;
|
||||
@ -209,8 +210,14 @@ const training = {
|
||||
state.roles = item.type;
|
||||
state.roleDeviceCode = item.deviceCode;
|
||||
state.myMemberId = item.id;
|
||||
hasUserId = true;
|
||||
}
|
||||
});
|
||||
if (!hasUserId) {
|
||||
state.roles = '';
|
||||
state.roleDeviceCode = '';
|
||||
state.myMemberId = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
setSimulationUserList: (state, simulationUserList) => {
|
||||
|
Loading…
Reference in New Issue
Block a user