Browse Source

Merge pull request #1589 in DESIGN/design from ~ZACK/design:release/10.0 to release/10.0

* commit '72308f9db4c7c2932deeb17c4c85c62d239066c3':
  代码质量
  REPORT-29773 外包验收:附件模板参数面板下拉树控件第3层设置了列序号,预览无内容
feature/big-screen
zack 5 years ago
parent
commit
fbe0f6dda3
  1. 13
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java

13
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java

@ -7,6 +7,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.present.dict.TableDataDictPane; import com.fr.design.present.dict.TableDataDictPane;
import com.fr.form.ui.tree.LayerConfig; import com.fr.form.ui.tree.LayerConfig;
import com.fr.form.ui.tree.LayerDependence; import com.fr.form.ui.tree.LayerDependence;
import com.fr.stable.StringUtils;
import java.awt.*; import java.awt.*;
import java.util.*; import java.util.*;
@ -73,13 +74,19 @@ public class LayerDataConfigPane extends BasicBeanPane<LayerConfig> {
if (wrapper != null) { if (wrapper != null) {
columnNames = wrapper.calculateColumnNameList(); columnNames = wrapper.calculateColumnNameList();
} else { } else {
columnNames = new ArrayList<String>(); columnNames = new ArrayList<>();
} }
String viewColStr = tableDataDictPane.updateBean().getValueColumnName();
String modelColStr = tableDataDictPane.updateBean().getKeyColumnName();
TableDataDictionary dictionary = tableDataDictPane.updateBean(); TableDataDictionary dictionary = tableDataDictPane.updateBean();
String viewColStr = dictionary.getValueColumnName();
String modelColStr = dictionary.getKeyColumnName();
int viewCol = columnNames.indexOf(viewColStr); int viewCol = columnNames.indexOf(viewColStr);
int modelCol = columnNames.indexOf(modelColStr); int modelCol = columnNames.indexOf(modelColStr);
if (StringUtils.EMPTY.equals(viewColStr)) {
viewCol = dictionary.getValueColumnIndex();
}
if (StringUtils.EMPTY.equals(modelColStr)) {
modelCol = dictionary.getKeyColumnIndex();
}
//将数据设置到当前正在修改的layerData中 //将数据设置到当前正在修改的layerData中
this.layerConfig.setDictionary(dictionary); this.layerConfig.setDictionary(dictionary);
this.layerConfig.setModelColumn(modelCol); this.layerConfig.setModelColumn(modelCol);

Loading…
Cancel
Save