|
|
@ -67,6 +67,12 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private List<RemoteDesignMember> addedMembers = new ArrayList<>(); |
|
|
|
private List<RemoteDesignMember> addedMembers = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 具有设计权限的角色/用户 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private List<RemoteDesignMember> authorityMembers = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 决策平台用户列表model |
|
|
|
* 决策平台用户列表model |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -211,6 +217,9 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
resetAddedMembers(); |
|
|
|
resetAddedMembers(); |
|
|
|
this.addedMembers.addAll(addedMembers); |
|
|
|
this.addedMembers.addAll(addedMembers); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resetAuthorityMembers(); |
|
|
|
|
|
|
|
this.authorityMembers.addAll(addedMembers); |
|
|
|
|
|
|
|
|
|
|
|
// 刷新右侧面板
|
|
|
|
// 刷新右侧面板
|
|
|
|
addToAddedMemberList(); |
|
|
|
addToAddedMemberList(); |
|
|
|
|
|
|
|
|
|
|
@ -314,15 +323,15 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private void addToMemberList() { |
|
|
|
private void addToMemberList() { |
|
|
|
addingListModel.clear(); |
|
|
|
addingListModel.clear(); |
|
|
|
for (RemoteDesignMember addingMember : addingMembers) { |
|
|
|
for (RemoteDesignMember member : addingMembers) { |
|
|
|
// 如果包含在右侧列表中,那么左侧列表默认选中
|
|
|
|
// 如果包含在右侧列表中,那么左侧列表默认选中
|
|
|
|
for (RemoteDesignMember addedMember : addedMembers){ |
|
|
|
if (addedMembers.contains(member)) { |
|
|
|
if (addingMember.equals(addedMember)){ |
|
|
|
member.setSelected(true); |
|
|
|
addingMember.setAuthority(addedMember.hasAuthority()); |
|
|
|
|
|
|
|
addingMember.setSelected(true); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
member.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
addingListModel.addElement(addingMember); |
|
|
|
addingListModel.addElement(member); |
|
|
|
} |
|
|
|
} |
|
|
|
addingList.revalidate(); |
|
|
|
addingList.revalidate(); |
|
|
|
addingList.repaint(); |
|
|
|
addingList.repaint(); |
|
|
@ -350,6 +359,10 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
addedMembers.clear(); |
|
|
|
addedMembers.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void resetAuthorityMembers() { |
|
|
|
|
|
|
|
authorityMembers.clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord); |
|
|
|
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord); |
|
|
|
|
|
|
|
|
|
|
|
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord, int pageNum, int count); |
|
|
|
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord, int pageNum, int count); |
|
|
@ -376,6 +389,7 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void done() { |
|
|
|
protected void done() { |
|
|
|
|
|
|
|
referAddingMemberList(); |
|
|
|
addToMemberList(); |
|
|
|
addToMemberList(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -403,12 +417,22 @@ public abstract class AbstractManagerPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void done() { |
|
|
|
protected void done() { |
|
|
|
|
|
|
|
referAddingMemberList(); |
|
|
|
addToMemberList(); |
|
|
|
addToMemberList(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
loadMoreWorker.execute(); |
|
|
|
loadMoreWorker.execute(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 检查左侧列表角色/用户是否有权限
|
|
|
|
|
|
|
|
private void referAddingMemberList() { |
|
|
|
|
|
|
|
for (RemoteDesignMember member : addingMembers) { |
|
|
|
|
|
|
|
if (authorityMembers.contains(member)){ |
|
|
|
|
|
|
|
member.setAuthority(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void sync2AddedMembersFromAdding() { |
|
|
|
private void sync2AddedMembersFromAdding() { |
|
|
|
RemoteDesignMember[] members = new RemoteDesignMember[addingListModel.getSize()]; |
|
|
|
RemoteDesignMember[] members = new RemoteDesignMember[addingListModel.getSize()]; |
|
|
|