xiejun
2023-08-02 8b34692ac1b7cf58a1e1ead92b930d9acb9f86f6
Source/UBCS/ubcs-codeApply/src/main/java/com/vci/ubcs/codeapply/CodeDataMainPanel.java
@@ -5,17 +5,19 @@
import com.vci.base.ui.swing.components.VCIJPanel;
import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider;
import com.vci.base.ui.swing.components.table.VCIJTablePanel;
import com.vci.ubcs.codeapply.object.BaseModel;
import com.vci.ubcs.codeapply.object.UIFormRefer;
import org.apache.poi.ss.formula.functions.T;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;
public class CodeDataMainPanel extends VCIJPanel {
   /**
    * 自定义顶部控件区域
    */
   private VCIJPanel customTopPanel = null;
   private AttarSearchPanel customTopPanel = null;
   private UIFormRefer uiFormRefer;
   private CodeDataMainPanelActionListener actionListener = new CodeDataMainPanelActionListener(this);
   private VCIJButton btnSearch = VCISwingUtil.createVCIJButton("search", "查询", "查询", "search.png", actionListener);
@@ -23,7 +25,7 @@
   public CodeDataMainPanel(UIFormRefer uiFormRefer) {
      this.uiFormRefer=uiFormRefer;
   }
   private Map<String,String> customCondtionMap=new HashMap<>();
   public void buildPanel(){
      this.init();
   }
@@ -39,13 +41,14 @@
   /**
    * 根据类型显示table
    */
   private VCIJTablePanel<T> tablePanel = null;
   private AbstractVCIJTableDataProvider<T> dataProvider = null;
   private VCIJTablePanel<BaseModel> tablePanel = null;
   private AbstractVCIJTableDataProvider<BaseModel> dataProvider = null;
   private VCIJPanel createCenterDataTablePanel() {
      tablePanel = new VCIJTablePanel<T>(dataProvider);
      tablePanel = new VCIJTablePanel<BaseModel>(dataProvider);
      //tablePanel.setCustomButtons(getCombinedButtons());
      tablePanel.setShowExport(true);
      tablePanel.setShowPaging(true);
      tablePanel.setShowProgressBar(false);
      tablePanel.setPageButtonFlowAlign(FlowLayout.CENTER);
      tablePanel.setCustomButtonFlowAlign(FlowLayout.CENTER);
      tablePanel.buildTablePanel();
@@ -92,19 +95,19 @@
      return palRes;
   }
   public VCIJPanel getCustomTopPanel() {
   public AttarSearchPanel getCustomTopPanel() {
      return customTopPanel;
   }
   public void setCustomTopPanel(VCIJPanel customTopPanel) {
   public void setCustomTopPanel(AttarSearchPanel customTopPanel) {
      this.customTopPanel = customTopPanel;
   }
   public VCIJTablePanel<T> getTablePanel() {
   public VCIJTablePanel<BaseModel> getTablePanel() {
      return tablePanel;
   }
   public void setTablePanel(VCIJTablePanel<T> tablePanel) {
   public void setTablePanel(VCIJTablePanel<BaseModel> tablePanel) {
      this.tablePanel = tablePanel;
   }
@@ -117,11 +120,35 @@
      this.uiFormRefer = uiFormRefer;
   }
   public AbstractVCIJTableDataProvider<T> getDataProvider() {
   public AbstractVCIJTableDataProvider<BaseModel> getDataProvider() {
      return dataProvider;
   }
   public void setDataProvider(AbstractVCIJTableDataProvider<T> dataProvider) {
   public void setDataProvider(AbstractVCIJTableDataProvider<BaseModel> dataProvider) {
      this.dataProvider = dataProvider;
   }
   public Map<String, String> getCustomCondtionMap() {
      if(this.getCustomTopPanel()!=null){
         Map<String,String> newCustomCondtionMap= this.getCustomTopPanel().getAttrSearchFilterString();
         customCondtionMap.putAll(newCustomCondtionMap);
      }
      return customCondtionMap;
   }
   public void setCustomCondtionMap(Map<String, String> customCondtionMap) {
      this.customCondtionMap = customCondtionMap;
   }
   /**
    * 清空条件
    * <p>Description: </p>
    *
    * @author liujw
    */
   public void clearCustomTopPanel(){
      customCondtionMap.clear();
      AttarSearchPanel search = (AttarSearchPanel)getCustomTopPanel();
      search.clear();
   }
}