Browse Source

Merge pull request #3046 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit 'a5735a84dae8562b324b3390ac7e5ce057256cb6':
  代码质量
  REPORT-44784 复制tab块中的图表块到决定画布块中 移动端h5查看不应该有展开收起按钮
  REPORT-44596 下拉树控件-急速构建依赖层数自动变化
  REPORT-44390 alpha-fine搜索帮助文档,右侧不展示详细内容,只显示文档名称 改动:修改一下方法名
  update
  CHART-17231 默认不选中 无
  REPORT-44390 alpha-fine搜索帮助文档,右侧不展示详细内容,只显示文档名称 【问题原因】本地常用的逻辑有点问题,比如用户搜索"定时填报",关键词被解析成关键词组,遍历关键词组去搜索结果,但是搜索结果的逻辑里会将结果集先清空然后添加新的,然后把这个返回的结果又赋值给结果集合,这会不断刷新结果集合,导致返回结果只是关键词组中最后一个元素的搜索结果 【改动思路】在搜索结果的逻辑里,将清空结果集的逻辑去掉,放到更上层的遍历之前,这样就不是每一次遍历就清空结果集,而是用户每一次搜索才清空结果集,然后搜索结果的返回值也无须赋值给结果集,因为在搜索的时候已经添加到结果集中了
research/11.0
superman 4 years ago
parent
commit
faf662f0cf
  1. 1
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
  2. 10
      designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java
  3. 6
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  4. 24
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

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

@ -142,6 +142,7 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
this.model.clear();
this.model.addAll(dependenceList);
this.model.fireTableDataChanged();
}

10
designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java

@ -2,6 +2,8 @@ package com.fr.extended.chart;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import java.util.List;
@ -17,6 +19,11 @@ public class UIComboBoxWithNone extends UIComboBox {
public UIComboBoxWithNone() {
super();
addDefaultItem();
setDefaultSelectedItem();
}
protected void setDefaultSelectedItem() {
setSelectedItem(StringUtils.EMPTY);
}
@Override
@ -43,7 +50,8 @@ public class UIComboBoxWithNone extends UIComboBox {
//找不到的都选中无。中文的无 英文下是none。
//改正:找不到的且anObject不是null的 全部选中无。
if (getSelectedIndex() == -1 && anObject != null) {
//改正:找不到的且anObject不是null的且anObject不是空字符串的 全部选中无。
if (getSelectedIndex() == -1 && StringUtils.isNotEmpty(GeneralUtils.objectToString(anObject))) {
super.setSelectedItem(getDefaultLocaleString());
}
}

6
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -176,8 +176,10 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
this.functionalWhenUnactivatedCheckBox.setSelected(!isFunctionalWhenUnactivated);
this.bindListeners2Widgets();
this.addAttributeChangeListener(changeListener);
// 直接return时 也要处理下相应数据
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
if (!FormDesignerUtils.isAppRelayout(designer) || isInAbsoluteLayout()) {
fix(style);
return;
}
@ -199,8 +201,6 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
}
}
});
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
this.mobileCollapsedStyleEditor.setStyle(style);
fix(style);
this.mobileCollapsedStyleEditor.setSelected(style.isCollapsedWork());

24
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -45,9 +45,9 @@ import java.util.List;
*/
public class RecentSearchManager implements AlphaFineSearchProvider {
private static final int MAX_SIZE = 100;
private static final RecentSearchManager INSTANCE = new RecentSearchManager();
private IndexReader indexReader = null;
//索引存储路径
private String path = ProductConstants.getEnvHome() + File.separator + "searchIndex";
@ -58,18 +58,18 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
private IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_40, analyzer);
private IndexWriter indexWriter = null;
private SearchResult recentModelList = new SearchResult();
public static RecentSearchManager getInstance() {
return INSTANCE;
}
@Override
public SearchResult getLessSearchResult(String[] searchText) {
this.recentModelList = new SearchResult();
SearchResult modelList = new SearchResult();
for (String aSearchText : searchText) {
recentModelList = getRecentModelList(aSearchText);
addToRecentModelList(aSearchText);
}
if (recentModelList != null && recentModelList.size() > 0) {
modelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Latest")));
@ -86,9 +86,13 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
public SearchResult getMoreSearchResult(String searchText) {
return new SearchResult();
}
private synchronized SearchResult getRecentModelList(String searchText) {
return searchBySort(searchText);
/**
* 将单次遍历的关键词的搜索结果添加到结果集中
* @param searchText
*/
private synchronized void addToRecentModelList(String searchText) {
searchBySort(searchText);
}
public List<AlphaCellModel> getRecentModelList() {
@ -161,7 +165,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
* 按序搜索
*/
private synchronized SearchResult searchBySort(String key) {
recentModelList = new SearchResult();
try {
initReader();
@ -175,7 +178,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
Query query = new TermQuery(term);
TopFieldDocs docs = searcher.search(query, MAX_SIZE, sortKey);
ScoreDoc[] scores = docs.scoreDocs;
this.recentModelList = new SearchResult();
//遍历结果
for (ScoreDoc scoreDoc : scores) {
Document document = searcher.doc(scoreDoc.doc);

Loading…
Cancel
Save