Browse Source

PFC-982 修复工具栏权限颗粒度设置时卡死的问题

master
rinoux 7 years ago
parent
commit
01fcdf0740
  1. 31
      designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java
  2. 31
      designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java

31
designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.FRContext;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -20,6 +21,7 @@ import javax.swing.tree.TreePath;
import java.awt.*; import java.awt.*;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -96,23 +98,22 @@ public class AuthorityEditToolBarPane extends AuthorityPropertyPane {
null || selectedPathArray == null) { null || selectedPathArray == null) {
return; return;
} }
for (int t = 0; t < selectedPathArray.length; t++) { ToolBarButton selectedButton = null;
for (int i = 0; i < buttonlists.size(); i++) { //是否可见的checkbox
if (buttonlists.get(i).isSelected()) { UICheckBox checkbox = (UICheckBox) e.getSource();
buttonlists.get(i).changeAuthorityState(selectedPathArray[t], buttonVisible.isSelected()); for (int i = 0; i < buttonlists.size(); i++) {
authorityToolBarPane.repaint(); if (buttonlists.get(i).isSelected()) {
} selectedButton = buttonlists.get(i);
} }
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); }
RolesAlreadyEditedPane.getInstance().refreshDockingView(); if (selectedButton != null) {
UICheckBox checkbox = (UICheckBox) e.getSource(); for (int t = 0; t < selectedPathArray.length; t++) {
List<ToolBarButton> btns = AuthorityEditPane.this.buttonlists; selectedButton.changeAuthorityState(selectedPathArray[t], buttonVisible.isSelected());
for (int j = 0; j < btns.size(); j++) { authorityToolBarPane.repaint();
if (btns.get(j).isSelected()) { authorityToolBarPane.setAuthorityWebAttr(selectedButton.getWidget(), checkbox.isSelected(), selectedPathArray[t]);
//由引擎实现保存进模板报表
authorityToolBarPane.setAuthorityWebAttr(btns.get(j).getWidget(), checkbox.isSelected(), selectedPathArray[t]);
}
} }
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();//模版更新
RolesAlreadyEditedPane.getInstance().refreshDockingView();//已配置角色视图刷新
} }
} }
}; };

31
designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java

@ -219,23 +219,24 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
//wbTpl.clear先清空 //wbTpl.clear先清空
//再将所有的保存进去 //再将所有的保存进去
//看是存在服务器还存在模板里面 //看是存在服务器还存在模板里面
if (choseComboBox.getSelectedIndex() == 0) { if (webAttr != null) {
//分页 if (choseComboBox.getSelectedIndex() == 0) {
if (rw == null || rw.getWebPage() == null) { //分页
dealWithWebContent(webAttr.getWebPage(), widget, isSelected, selectedRole); if (rw == null || rw.getWebPage() == null) {
} dealWithWebContent(webAttr.getWebPage(), widget, isSelected, selectedRole);
} else if (choseComboBox.getSelectedIndex() == 1) { }
//填报 } else if (choseComboBox.getSelectedIndex() == 1) {
if (rw == null || rw.getWebPage() == null) { //填报
dealWithWebContent(webAttr.getWebWrite(), widget, isSelected, selectedRole); if (rw == null || rw.getWebPage() == null) {
} dealWithWebContent(webAttr.getWebWrite(), widget, isSelected, selectedRole);
} else { }
//view } else {
if (rw == null || rw.getWebPage() == null) { //view
dealWithWebContent(webAttr.getWebView(), widget, isSelected, selectedRole); if (rw == null || rw.getWebPage() == null) {
dealWithWebContent(webAttr.getWebView(), widget, isSelected, selectedRole);
}
} }
} }
} }
private void dealWithWebContent(WebContent wc, Widget widget, boolean isSelected, String selectedRole) { private void dealWithWebContent(WebContent wc, Widget widget, boolean isSelected, String selectedRole) {

Loading…
Cancel
Save