Browse Source

Merge pull request #3012 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '0ad5b29abbd731f281e0af435477574af4514ddd':
  REPORT-44390 alpha-fine搜索帮助文档,右侧不展示详细内容,只显示文档名称 【问题原因】之前的搜索接口有变化,导致返回结果里表示文档详情的key值也变化了(summary → content),然后修改过程中发现"本地常用"也不会显示文档详情,因为保存到本地的时候转json的key值错了 【改动思路】将key修改为现在使用的"content",然后为了让读和写的key保持一致,统一用DocumentModel中的字符串常量表示
  REPORT-43795 表单拖拽组件有问题,报表块可以通过body拖入参数面板
  REPORT-43814 组件复用插件在设计器启动的时候会初始化两遍
bugfix/10.0
superman 4 years ago
parent
commit
2087bdaf4a
  1. 9
      designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java
  2. 7
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java
  3. 8
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java

9
designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java

@ -4,6 +4,7 @@ import com.fr.design.beans.location.Absorptionline;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.HoverPainter;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.location.Location;
@ -136,6 +137,14 @@ public class StateModel {
private boolean addBean(XLayoutContainer container, int mouseX, int mouseY) {
LayoutAdapter adapter = container.getLayoutAdapter();
Rectangle rectangleContainer = ComponentUtils.getRelativeBounds(container);
// 判断是否能把控件从表单布局中拖拽到参数面板中
if (adapter instanceof FRParameterLayoutAdapter) {
for (XCreator xCreator : selectionModel.getSelection().getSelectedCreators()) {
if (!xCreator.canEnterIntoParaPane()) {
return false;
}
}
}
if (selectionModel.getSelection().size() == 1) {
return adapter.addBean(selectionModel.getSelection().getSelectedCreator(),
mouseX + designer.getArea().getHorizontalValue() - rectangleContainer.x,

7
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java

@ -19,6 +19,11 @@ public class DocumentModel extends AlphaCellModel {
private String informationUrl;
private int documentId;
public static final String TITLE = "title";
public static final String CONTENT = "content";
public static final String DID = "did";
public static final String SEARCHCOUNT = "searchcount";
public DocumentModel(String name, String content, int documentId) {
super(name, content, CellType.DOCUMENT);
this.documentId = documentId;
@ -43,7 +48,7 @@ public class DocumentModel extends AlphaCellModel {
public JSONObject modelToJson() {
JSONObject object = JSONObject.create();
JSONObject modelObject = JSONObject.create();
modelObject.put("title", getName()).put("summary", getContent()).put("did", getDocumentId()).put("searchCount", getSearchCount());
modelObject.put(TITLE, getName()).put(CONTENT, getContent()).put(DID, getDocumentId()).put(SEARCHCOUNT, getSearchCount());
object.put("result", modelObject).put("cellType", getType().getTypeValue());
return object;
}

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

@ -43,10 +43,10 @@ public class DocumentSearchManager implements AlphaFineSearchProvider {
* @return
*/
public static DocumentModel getModelFromCloud(JSONObject object) {
String name = object.optString("title");
String content = object.optString("summary");
int documentId = object.optInt("did");
int searchCount = object.optInt("searchCount");
String name = object.optString(DocumentModel.TITLE);
String content = object.optString(DocumentModel.CONTENT);
int documentId = object.optInt(DocumentModel.DID);
int searchCount = object.optInt(DocumentModel.SEARCHCOUNT);
return new DocumentModel(name, content, documentId, searchCount);
}

Loading…
Cancel
Save