Browse Source

REPORT-82112 模板锁定,超管强制解锁的按钮没了--抽方法,看起来更整洁

newui
John.Ying 2 years ago
parent
commit
cd6e94613e
  1. 25
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

25
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -599,26 +599,31 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
*/
public void refreshRightToolBarByContentPaneType() {
if (rightToolBar != null) {
if (StringUtils.equals(TemplateTreeSearchToolbarPane.CONTENT_PANE_TYPE, TemplateTreeSearchToolbarPane.SEARCH_PANE)) {
if (StringUtils.equals(TemplateTreeSearchToolbarPane.contentPaneType, TemplateTreeSearchToolbarPane.SEARCH_PANE)) {
rightToolBar.setVisible(false);
}
}
}
public void refreshRightToolBarBy(FileNode fileNode) {
refreshRightToolBarByNode(fileNode);
refreshRightToolBarByContentPaneType();
}
/**
* 根据当前选中节点判断是否锁定状态
*
* @param fileNode 选中文件节点
*/
public void refreshRightToolBarByNode(FileNode fileNode) {
if (rightToolBar != null) {
if (StringUtils.equals(TemplateTreeSearchToolbarPane.CONTENT_PANE_TYPE, TemplateTreeSearchToolbarPane.SEARCH_PANE)) {
rightToolBar.setVisible(false);
return;
}
boolean locked = fileNode != null
&& StringUtils.isNotEmpty(fileNode.getLock())
&& !ComparatorUtils.equals(fileNode.getLock(), fileNode.getUserID());
&& StringUtils.isNotEmpty(fileNode.getLock())
&& !ComparatorUtils.equals(fileNode.getLock(), fileNode.getUserID());
boolean visible = locked
&& WorkContext.getCurrent().isRoot()
&& WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable()
&& !WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(fileNode.getEnvPath());
&& WorkContext.getCurrent().isRoot()
&& WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable()
&& !WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(fileNode.getEnvPath());
rightToolBar.setVisible(visible);
}
}

Loading…
Cancel
Save