Browse Source

update

main
wangshaoping 6 months ago
parent
commit
ed24d81a6d
  1. 12
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/impl/support/processor/DecisionTree.java
  2. 33
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/impl/support/processor/ExecutionFlow.java
  3. 49
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/parser/DecisionTreeParser.java
  4. 27
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/parser/ExecutionFlowParser.java
  5. 101
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/EdgeConditionBranchNode.java
  6. 54
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/EdgeNode.java
  7. 1
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/GraphNode.java
  8. 2
      io.sc.engine.rule.frontend/package.json
  9. 154
      io.sc.engine.rule.frontend/src/i18n/messages.json
  10. 155
      io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json
  11. 154
      io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json
  12. 84
      io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue
  13. 581
      io.sc.engine.rule.frontend/src/views/resources/designer/ExecutionFlowDialog.vue
  14. 2
      io.sc.engine.rule.frontend/src/views/resources/designer/Processor.vue
  15. 12
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/controller/ModelWebController.java
  16. 4
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/controller/ParameterProcessorWebController.java
  17. 2
      io.sc.platform.core.frontend/package.json
  18. 4
      io.sc.platform.core.frontend/src/platform/components/graph/PlatformGraph.ts
  19. 9
      io.sc.platform.core.frontend/src/platform/components/graph/WGraph.vue
  20. 3
      io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformDragAndDropHandler.ts
  21. 18
      io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformEdgeDefineHandler.ts
  22. 6
      io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformSelectedCellHandler.ts
  23. 14
      io.sc.platform.core.frontend/src/platform/i18n/messages.json
  24. 14
      io.sc.platform.core.frontend/src/platform/i18n/messages_tw_CN.json
  25. 27
      io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue
  26. 4
      io.sc.platform.core.frontend/template-project/package.json
  27. 506
      io.sc.platform.core.frontend/template-project/src/views/likm/Drawer.vue
  28. 3
      io.sc.platform.core.frontend/template-project/src/views/likm/Grid.vue
  29. 10
      io.sc.platform.core.frontend/template-project/src/views/likm/TreeGrid.vue
  30. 27
      io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue

12
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/impl/support/processor/DecisionTree.java

@ -7,11 +7,7 @@ import java.util.Map;
import io.sc.engine.rule.core.enums.ValueType;
import io.sc.engine.rule.core.mxgraph.parser.DecisionTreeParser;
import io.sc.engine.rule.core.mxgraph.po.ConditionNode;
import io.sc.engine.rule.core.mxgraph.po.EdgeNode;
import io.sc.engine.rule.core.mxgraph.po.ExpressionNode;
import io.sc.engine.rule.core.mxgraph.po.GraphNode;
import io.sc.engine.rule.core.mxgraph.po.ResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.*;
import io.sc.engine.rule.core.po.model.Parameter;
import io.sc.engine.rule.core.po.model.processor.DecisionTreeParameterProcessor;
import io.sc.engine.rule.core.util.ExpressionReplacer;
@ -92,7 +88,7 @@ public class DecisionTree {
if(branches!=null && branches.size()>0) {
List<GraphNode> outs =orderEdges(branches); //对出口边进行排序,有条件的放前面,无条件的放后面
for(int i=0;i<outs.size();i++) {
EdgeNode edge =(EdgeNode)outs.get(i); //出口边
EdgeConditionBranchNode edge =(EdgeConditionBranchNode)outs.get(i); //出口边
GraphNode nexNode =edge.getOuts().get(0); //出口边指向的节点
if(i==0) {
@ -177,8 +173,8 @@ public class DecisionTree {
private static List<GraphNode> orderEdges(List<GraphNode> nodes){
List<GraphNode> result =new ArrayList<GraphNode>();
for(GraphNode node : nodes) {
if(node instanceof EdgeNode) {
EdgeNode edge =(EdgeNode)node;
if(node instanceof EdgeConditionBranchNode) {
EdgeConditionBranchNode edge =(EdgeConditionBranchNode)node;
String value =edge.getValue();
if(value!=null && !"".equals(value.trim())) {
result.add(0, edge);

33
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/impl/support/processor/ExecutionFlow.java

@ -6,14 +6,7 @@ import java.util.List;
import java.util.Map;
import io.sc.engine.rule.core.mxgraph.parser.ExecutionFlowParser;
import io.sc.engine.rule.core.mxgraph.po.CommandSetNode;
import io.sc.engine.rule.core.mxgraph.po.ConditionNode;
import io.sc.engine.rule.core.mxgraph.po.ConfigurableResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.EdgeNode;
import io.sc.engine.rule.core.mxgraph.po.GraphNode;
import io.sc.engine.rule.core.mxgraph.po.ParallelNode;
import io.sc.engine.rule.core.mxgraph.po.ResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.SubModelAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.*;
import io.sc.engine.rule.core.po.model.Parameter;
import io.sc.engine.rule.core.po.model.processor.ExecutionFlowParameterProcessor;
import io.sc.engine.rule.core.util.ExpressionReplacer;
@ -103,9 +96,8 @@ public class ExecutionFlow {
* 生成执行流条件节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param conditionNode 条件节点
* @param node 条件节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return groovy 代码
*/
private static String generateConditionGroovyCode(Map<String,String> methodNameCache,Parameter parameter,ConditionNode node,String methodName) {
@ -115,7 +107,7 @@ public class ExecutionFlow {
if(branches!=null && branches.size()>0) {
List<GraphNode> outs =orderEdges(branches); //对出口边进行排序,有条件的放前面,无条件的放后面
for(int i=0;i<outs.size();i++) {
EdgeNode edge =(EdgeNode)outs.get(i); //出口边
EdgeConditionBranchNode edge =(EdgeConditionBranchNode)outs.get(i); //出口边
GraphNode nexNode =edge.getOuts().get(0); //出口边指向的节点
if(i==0) {
@ -152,9 +144,8 @@ public class ExecutionFlow {
* 生成执行流并发网关节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param conditionNode 条件节点
* @param node 条件节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return groovy 代码
*/
private static String generateParallelGroovyCode(Map<String,String> methodNameCache,Parameter parameter,ParallelNode node,String methodName) {
@ -181,9 +172,8 @@ public class ExecutionFlow {
* 生成执行流表达式节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param expressionNode 表达式节点
* @param node 表达式节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return 代码
*/
private static String generateCommandSetGroovyCode(Map<String,String> methodNameCache,Parameter parameter,CommandSetNode node,String methodName) {
@ -218,9 +208,8 @@ public class ExecutionFlow {
* 生成执行流模型摘要节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param expressionNode 表达式节点
* @param node 表达式节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return 代码
*/
private static String generateResourceAbstractGroovyCode(Map<String,String> methodNameCache,Parameter parameter,ResourceAbstractNode node,String methodName) {
@ -258,9 +247,8 @@ public class ExecutionFlow {
* 生成执行流可配置模型摘要节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param expressionNode 表达式节点
* @param node 表达式节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return 代码
*/
private static String generateConfigurableResourceAbstractGroovyCode(Map<String,String> methodNameCache,Parameter parameter,ConfigurableResourceAbstractNode node,String methodName) {
@ -308,9 +296,8 @@ public class ExecutionFlow {
* 生成执行流子模型节点 groovy 代码
* @param methodNameCache 方法名缓存
* @param parameter 参数
* @param expressionNode 表达式节点
* @param node 表达式节点
* @param methodName 方法名
* @param returnType 返回值类型
* @return 代码
*/
private static String generateModelAbstractGroovyCode(Map<String,String> methodNameCache,Parameter parameter,SubModelAbstractNode node,String methodName) {
@ -348,8 +335,8 @@ public class ExecutionFlow {
private static List<GraphNode> orderEdges(List<GraphNode> nodes){
List<GraphNode> result =new ArrayList<GraphNode>();
for(GraphNode node : nodes) {
if(node instanceof EdgeNode) {
EdgeNode edge =(EdgeNode)node;
if(node instanceof EdgeConditionBranchNode) {
EdgeConditionBranchNode edge =(EdgeConditionBranchNode)node;
String value =edge.getValue();
if(value!=null && !"".equals(value.trim())) {
result.add(0, edge);

49
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/parser/DecisionTreeParser.java

@ -10,13 +10,9 @@ import java.util.Map;
import javax.imageio.ImageIO;
import io.sc.engine.rule.core.mxgraph.po.*;
import org.springframework.util.StringUtils;
import org.w3c.dom.Document;
import io.sc.engine.rule.core.mxgraph.po.ConditionNode;
import io.sc.engine.rule.core.mxgraph.po.EdgeNode;
import io.sc.engine.rule.core.mxgraph.po.ExpressionNode;
import io.sc.engine.rule.core.mxgraph.po.GraphNode;
import io.sc.engine.rule.core.mxgraph.po.ResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.StartNode;
import io.sc.engine.rule.core.mxgraph.support.DecisionTreeMxGraph;
import com.mxgraph.io.mxCodec;
@ -53,7 +49,7 @@ public class DecisionTreeParser {
* @throws IOException 违例
*/
public void generateImage(String xml,OutputStream outputStream,String format) throws IOException {
Document doc = mxXmlUtils.parseXml(xml);
Document doc = mxXmlUtils.parseXml(replaceXml(xml));
mxCodec codec = new mxCodec(doc);
mxGraphModel model =(mxGraphModel)codec.decode(doc.getDocumentElement());
mxGraph graph = new DecisionTreeMxGraph(model);
@ -72,7 +68,7 @@ public class DecisionTreeParser {
}
private Map<String,GraphNode> parseNodes(String xml){
Document doc = mxXmlUtils.parseXml(xml);
Document doc = mxXmlUtils.parseXml(replaceXml(xml));
mxCodec codec = new mxCodec(doc);
mxGraphModel model =(mxGraphModel)codec.decode(doc.getDocumentElement());
mxCell root =(mxCell)model.getRoot(); //获取根(<root> 标签对应的节点)
@ -109,8 +105,8 @@ public class DecisionTreeParser {
node.setCode(cell.getAttribute("code"));
node.setVersion(cell.getAttribute("version"));
result.put(id, node);
}else if(GraphNode.EDGE.equalsIgnoreCase(type)) {
EdgeNode node =new EdgeNode();
}else if(GraphNode.EDGE_CONDITION_BRANCH.equalsIgnoreCase(type)) {
EdgeConditionBranchNode node =new EdgeConditionBranchNode();
node.setId(id);
node.setLabel(label);
node.setValueType(cell.getAttribute("valueType"));
@ -125,6 +121,19 @@ public class DecisionTreeParser {
node.setTargetId(target.getId());
}
result.put(id, node);
} else if(GraphNode.EDGE.equalsIgnoreCase(type)) {
EdgeNode node =new EdgeNode();
node.setId(id);
node.setLabel(label);
mxICell source =cell.getSource();
if(source!=null) {
node.setSourceId(source.getId());
}
mxICell target =cell.getTarget();
if(target!=null) {
node.setTargetId(target.getId());
}
result.put(id, node);
}
}
return result;
@ -146,6 +155,16 @@ public class DecisionTreeParser {
source.addOut(edgeNode);
edgeNode.addOut(target);
}
}else if(node instanceof EdgeConditionBranchNode) {
EdgeConditionBranchNode edgeNode =(EdgeConditionBranchNode)node;
String sourceId =edgeNode.getSourceId();
String targetId =edgeNode.getTargetId();
GraphNode source =nodes.get(sourceId);
GraphNode target =nodes.get(targetId);
if(source!=null) {
source.addOut(edgeNode);
edgeNode.addOut(target);
}
}
}
if(startNode!=null) {
@ -160,4 +179,14 @@ public class DecisionTreeParser {
}
return null;
}
private String replaceXml(String xml){
if(StringUtils.hasText(xml)) {
xml = xml.replace("GraphDataModel", "mxGraphModel");
xml = xml.replace("Cell", "mxCell");
xml = xml.replace("Geometry", "mxGeometry");
return xml;
}
return xml;
}
}

27
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/parser/ExecutionFlowParser.java

@ -10,16 +10,8 @@ import java.util.Map;
import javax.imageio.ImageIO;
import io.sc.engine.rule.core.mxgraph.po.*;
import org.w3c.dom.Document;
import io.sc.engine.rule.core.mxgraph.po.CommandSetNode;
import io.sc.engine.rule.core.mxgraph.po.ConditionNode;
import io.sc.engine.rule.core.mxgraph.po.ConfigurableResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.EdgeNode;
import io.sc.engine.rule.core.mxgraph.po.GraphNode;
import io.sc.engine.rule.core.mxgraph.po.ParallelNode;
import io.sc.engine.rule.core.mxgraph.po.ResourceAbstractNode;
import io.sc.engine.rule.core.mxgraph.po.StartNode;
import io.sc.engine.rule.core.mxgraph.po.SubModelAbstractNode;
import io.sc.engine.rule.core.mxgraph.support.ExecutionFlowMxGraph;
import com.mxgraph.io.mxCodec;
@ -131,8 +123,8 @@ public class ExecutionFlowParser {
node.setLabel(label);
node.setCode(cell.getAttribute("code"));
result.put(id, node);
}else if(GraphNode.EDGE.equalsIgnoreCase(type)) {
EdgeNode node =new EdgeNode();
} else if(GraphNode.EDGE_CONDITION_BRANCH.equalsIgnoreCase(type)) {
EdgeConditionBranchNode node =new EdgeConditionBranchNode();
node.setId(id);
node.setLabel(label);
node.setValueType(cell.getAttribute("valueType"));
@ -147,6 +139,19 @@ public class ExecutionFlowParser {
node.setTargetId(target.getId());
}
result.put(id, node);
}else if(GraphNode.EDGE.equalsIgnoreCase(type)) {
EdgeNode node =new EdgeNode();
node.setId(id);
node.setLabel(label);
mxICell source =cell.getSource();
if(source!=null) {
node.setSourceId(source.getId());
}
mxICell target =cell.getTarget();
if(target!=null) {
node.setTargetId(target.getId());
}
result.put(id, node);
}
}
return result;

101
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/EdgeConditionBranchNode.java

@ -0,0 +1,101 @@
package io.sc.engine.rule.core.mxgraph.po;
public class EdgeConditionBranchNode extends GraphNode {
private String valueType; //值类型
private String value; //值
private String sourceId; //源节点ID
private String targetId; //目标节点ID
private String commands; //命令
/**
* 获取值类型
* @return 值类型
*/
public String getValueType() {
return valueType;
}
/**
* 设置值类型
* @param valueType 值类型
*/
public void setValueType(String valueType) {
this.valueType = valueType;
}
/**
* 获取值
* @return
*/
public String getValue() {
return value;
}
/**
* 设置值
* @param value
*/
public void setValue(String value) {
this.value = value;
}
/**
* 获取源节点ID
* @return 源节点ID
*/
public String getSourceId() {
return sourceId;
}
/**
* 设置源节点ID
* @param sourceId 源节点ID
*/
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
/**
* 获取目标节点ID
* @return 目标节点ID
*/
public String getTargetId() {
return targetId;
}
/**
* 设置目标节点ID
* @param targetId 目标节点ID
*/
public void setTargetId(String targetId) {
this.targetId = targetId;
}
/**
* 获取命令
* @return 命令
*/
public String getCommands() {
return commands;
}
/**
* 设置命令
* @param commands 命令
*/
public void setCommands(String commands) {
this.commands = commands;
}
@Override
public String toString() {
return "EdgeConditionBranchNode [id=" + id
+ ", label=" + label
+ ", valueType=" + valueType
+ ", value=" + value
+ ", sourceId=" + sourceId
+ ", targetId=" + targetId
+ ", commands=" + commands
+ ", outs=" + outs + "]";
}
}

54
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/EdgeNode.java

@ -6,43 +6,8 @@ package io.sc.engine.rule.core.mxgraph.po;
*
*/
public class EdgeNode extends GraphNode{
private String valueType; //值类型
private String value; //值
private String sourceId; //源节点ID
private String targetId; //目标节点ID
private String commands; //命令
/**
* 获取值类型
* @return 值类型
*/
public String getValueType() {
return valueType;
}
/**
* 设置值类型
* @param valueType 值类型
*/
public void setValueType(String valueType) {
this.valueType = valueType;
}
/**
* 获取值
* @return
*/
public String getValue() {
return value;
}
/**
* 设置值
* @param value
*/
public void setValue(String value) {
this.value = value;
}
/**
* 获取源节点ID
@ -76,31 +41,12 @@ public class EdgeNode extends GraphNode{
this.targetId = targetId;
}
/**
* 获取命令
* @return 命令
*/
public String getCommands() {
return commands;
}
/**
* 设置命令
* @param commands 命令
*/
public void setCommands(String commands) {
this.commands = commands;
}
@Override
public String toString() {
return "EdgeNode [id=" + id
+ ", label=" + label
+ ", valueType=" + valueType
+ ", value=" + value
+ ", sourceId=" + sourceId
+ ", targetId=" + targetId
+ ", commands=" + commands
+ ", outs=" + outs + "]";
}
}

1
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/mxgraph/po/GraphNode.java

@ -17,6 +17,7 @@ public class GraphNode {
public static final String RESOURCE_ABSTRACT ="ResourceAbstract";
public static final String CONFIGURABLE_RESOURCE_ABSTRACT ="ConfigurableResourceAbstract";
public static final String SUB_MODEL_ABSTRACT ="SubModelAbstract";
public static final String EDGE_CONDITION_BRANCH ="EdgeConditionBranch";
public static final String EDGE ="Edge";
protected String id;

2
io.sc.engine.rule.frontend/package.json

@ -92,7 +92,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.2.2",
"platform-core": "8.1.326",
"platform-core": "8.1.332",
"quasar": "2.16.11",
"tailwindcss": "3.4.10",
"vue": "3.5.4",

154
io.sc.engine.rule.frontend/src/i18n/messages.json

@ -1,5 +1,5 @@
{
"menu.engine.rule":"Rule Engine",
"menu.engine.rule": "Rule Engine",
"menu.engine.rule.resources": "Model Manager",
"menu.engine.rule.authorization": "Authorization Manager",
"menu.engine.rule.workflow": "Workflow",
@ -18,10 +18,10 @@
"re.resources.grid.toolbar.deepCloneNew": "Deep Clone(new)",
"re.resources.grid.toolbar.deepCloneNew.tip": "Are you sure to deep clone the resource as new resource?",
"re.resources.grid.toolbar.design": "View/Design",
"re.resources.grid.toolbar.deploy.online":"Online",
"re.resources.grid.toolbar.deploy.online.tip":"Are you sure to on line the resource?",
"re.resources.grid.toolbar.deploy.offline":"Offline",
"re.resources.grid.toolbar.deploy.offline.tip":"Are you sure to off line the resource?",
"re.resources.grid.toolbar.deploy.online": "Online",
"re.resources.grid.toolbar.deploy.online.tip": "Are you sure to on line the resource?",
"re.resources.grid.toolbar.deploy.offline": "Offline",
"re.resources.grid.toolbar.deploy.offline.tip": "Are you sure to off line the resource?",
"re.resources.grid.toolbar.importExample": "Import Example",
"re.resources.grid.entity.effectiveDate": "Effective Date",
@ -79,7 +79,7 @@
"re.resources.designer.processor.grid.title": "Processor",
"re.resources.designer.processor.grid.entity.content": "Content",
"re.resources.designer.processor.grid.entity.objectCondition":"Condition",
"re.resources.designer.processor.grid.entity.objectCondition": "Condition",
"re.resources.designer.processor.grid.entity.objectProperties": "Object Properties",
"re.resources.designer.processor.grid.entity.optionCode": "Option",
"re.resources.designer.processor.grid.entity.arithmetic": "Arithmetic",
@ -108,6 +108,34 @@
"re.resources.designer.processor.dialog.decisionTree.title": "Decision Tree Designer",
"re.resources.designer.processor.dialog.executionFlow.title": "Execution Flow Designer",
"re.graph.vertex.start.label": "Start",
"re.graph.vertex.start.title": "Start",
"re.graph.vertex.condition.label": "C",
"re.graph.vertex.condition.title": "Condition",
"re.graph.vertex.condition.entity.condition": "Condition",
"re.graph.vertex.expression.label": "Exp",
"re.graph.vertex.expression.title": "Expression",
"re.graph.vertex.expression.entity.expression": "Expression",
"re.graph.vertex.expression.entity.commands": "Commands",
"re.graph.vertex.resourceAbstract.label": "RA",
"re.graph.vertex.resourceAbstract.title": "Resource",
"re.graph.vertex.resourceAbstract.entity.resourceAbstractId": "Resource",
"re.graph.vertex.commandSet.label": "Commands",
"re.graph.vertex.commandSet.title": "Commands",
"re.graph.vertex.commandSet.entity.commands": "Commands",
"re.graph.vertex.configurableResourceAbstract.label": "RA(I/O)",
"re.graph.vertex.configurableResourceAbstract.title": "Resource with Input/Output Commands",
"re.graph.vertex.configurableResourceAbstract.entity.resourceAbstractId": "Resource",
"re.graph.vertex.configurableResourceAbstract.entity.inputCommands": "Input Commands",
"re.graph.vertex.configurableResourceAbstract.entity.outputCommands": "Output Commands",
"re.graph.vertex.subModelAbstract.label": "SM",
"re.graph.vertex.subModelAbstract.title": "Sub Model",
"re.graph.vertex.subModelAbstract.entity.code": "Sub Model",
"re.graph.edge.conditionBranch.entity.valueType": "Value Type",
"re.graph.edge.conditionBranch.entity.value": "Value",
"re.graph.edge.conditionBranch.entity.commands": "Commands",
"re.resources.designer.testCase.grid.title": "Test Cases",
"re.resources.designer.testCase.grid.tools.batchTest": "Batch Test",
"re.resources.designer.testCase.grid.tools.download": "Download Template",
@ -117,7 +145,7 @@
"re.resources.designer.testCase.grid.entity.ownerCode": "Code",
"re.resources.designer.testCase.grid.entity.ownerName": "Name",
"re.resources.designer.testCase.grid.entity.ownerVersion": "Version",
"re.resources.designer.testCase.grid.entity.ownerStatus":"Status",
"re.resources.designer.testCase.grid.entity.ownerStatus": "Status",
"re.resources.designer.testCaseParameter.grid.title": "Parameter List",
"re.resources.designer.testCaseParameter.grid.entity.inputValue": "Input Value",
@ -170,10 +198,10 @@
"re.dictionary.importSample.grid.toolbar.import": "Import Example",
"re.dictionary.importSample.grid.toolbar.import.tip": "Are you sure to import the meta data?",
"re.function.grid.title":"Functions",
"re.function.grid.entity.signature":"Signature",
"re.function.grid.entity.mathXml":"Math ML",
"re.function.grid.entity.body":"Body",
"re.function.grid.title": "Functions",
"re.function.grid.entity.signature": "Signature",
"re.function.grid.entity.mathXml": "Math ML",
"re.function.grid.entity.body": "Body",
"re.function.import.dialog.title": "Import User Defined Functions",
"re.lib.grid.title": "Feature Library Tree",
@ -199,56 +227,56 @@
"re.indicator.grid.toolbar.addInterface": "Interface",
"re.indicator.grid.toolbar.addIndicator": "Indicator",
"re.migration.import.title":"Import ( From The File Uploaded )",
"re.migration.import.subTitle":"",
"re.migration.import.action":"Import",
"re.migration.importFromServer.title":"Import ( From Server File)",
"re.migration.importFromServer.subTitle":"",
"re.migration.importFromServer.serverPath.label":"Please input the path of file in the server",
"re.migration.importFromServer.action":"Import",
"re.migration.export.title":"Export",
"re.migration.export.subTitle":"",
"re.migration.export.action":"Export",
"re.migration.remove.title":"Remove",
"re.migration.remove.subTitle":"Warning: It will remove all data in the engine, and can NOT undo!",
"re.migration.remove.action":"Remove",
"re.migration.remove.action.tip":"Are you sure to remove the all data?",
"re.workflow.dialog.title":"Workflow Approving",
"re.workflow.dialog.tip":"Tip: workflow approving needed, the resource will be active after approved!",
"re.workflow.dialog.entity.treatment":"Treatment",
"re.workflow.task.grid.title":"Task List",
"re.workflow.task.grid.toolbar.viewResource":"View Resource",
"re.workflow.task.grid.toolbar.viewAttachment":"View Attachment",
"re.workflow.task.grid.toolbar.claim":"Claim Task",
"re.workflow.task.grid.toolbar.claim.tip":"Are you sure to claim the task?",
"re.workflow.task.grid.toolbar.unclaim":"Unclaim Task",
"re.workflow.task.grid.toolbar.unclaim.tip":"Are you sure to unclaim the task?",
"re.workflow.task.grid.toolbar.complete":"Complete Task",
"re.workflow.task.grid.toolbar.terminate":"Terminate Task",
"re.workflow.task.grid.toolbar.terminate.tip":"Are you sure to terminate the task?",
"re.workflow.task.grid.entity.processDefinitionId":"Process Definition ID",
"re.workflow.task.grid.entity.processInstanceId":"Process Instance ID",
"re.workflow.task.grid.entity.taskDefinitionId":"Task Definition ID",
"re.workflow.task.grid.entity.taskId":"Task ID",
"re.workflow.task.grid.entity.taskName":"Task Name",
"re.workflow.task.grid.entity.taskAssignee":"Task Assignee",
"re.workflow.task.grid.entity.taskCreateTime":"Task Create Date",
"re.workflow.task.grid.entity.taskEndTime":"Task Complete Date",
"re.workflow.task.grid.entity.taskClaimTime":"Task Claim Date",
"re.workflow.task.grid.entity.taskTreatment":"Task Treatment",
"re.workflow.task.grid.entity.resourceType":"Resource Type",
"re.workflow.task.grid.entity.resourceId":"Resource ID",
"re.workflow.task.grid.entity.resourceCode":"Resource Code",
"re.workflow.task.grid.entity.resourceName":"Resource Name",
"re.workflow.task.grid.entity.resourceVersion":"Resource Version",
"re.workflow.task.grid.entity.resourceStatus":"Resource Status",
"re.workflow.task.grid.entity.attachments":"Attachments",
"re.workflow.historyTask.grid.title":"历史任务列表"
"re.migration.import.title": "Import ( From The File Uploaded )",
"re.migration.import.subTitle": "",
"re.migration.import.action": "Import",
"re.migration.importFromServer.title": "Import ( From Server File)",
"re.migration.importFromServer.subTitle": "",
"re.migration.importFromServer.serverPath.label": "Please input the path of file in the server",
"re.migration.importFromServer.action": "Import",
"re.migration.export.title": "Export",
"re.migration.export.subTitle": "",
"re.migration.export.action": "Export",
"re.migration.remove.title": "Remove",
"re.migration.remove.subTitle": "Warning: It will remove all data in the engine, and can NOT undo!",
"re.migration.remove.action": "Remove",
"re.migration.remove.action.tip": "Are you sure to remove the all data?",
"re.workflow.dialog.title": "Workflow Approving",
"re.workflow.dialog.tip": "Tip: workflow approving needed, the resource will be active after approved!",
"re.workflow.dialog.entity.treatment": "Treatment",
"re.workflow.task.grid.title": "Task List",
"re.workflow.task.grid.toolbar.viewResource": "View Resource",
"re.workflow.task.grid.toolbar.viewAttachment": "View Attachment",
"re.workflow.task.grid.toolbar.claim": "Claim Task",
"re.workflow.task.grid.toolbar.claim.tip": "Are you sure to claim the task?",
"re.workflow.task.grid.toolbar.unclaim": "Unclaim Task",
"re.workflow.task.grid.toolbar.unclaim.tip": "Are you sure to unclaim the task?",
"re.workflow.task.grid.toolbar.complete": "Complete Task",
"re.workflow.task.grid.toolbar.terminate": "Terminate Task",
"re.workflow.task.grid.toolbar.terminate.tip": "Are you sure to terminate the task?",
"re.workflow.task.grid.entity.processDefinitionId": "Process Definition ID",
"re.workflow.task.grid.entity.processInstanceId": "Process Instance ID",
"re.workflow.task.grid.entity.taskDefinitionId": "Task Definition ID",
"re.workflow.task.grid.entity.taskId": "Task ID",
"re.workflow.task.grid.entity.taskName": "Task Name",
"re.workflow.task.grid.entity.taskAssignee": "Task Assignee",
"re.workflow.task.grid.entity.taskCreateTime": "Task Create Date",
"re.workflow.task.grid.entity.taskEndTime": "Task Complete Date",
"re.workflow.task.grid.entity.taskClaimTime": "Task Claim Date",
"re.workflow.task.grid.entity.taskTreatment": "Task Treatment",
"re.workflow.task.grid.entity.resourceType": "Resource Type",
"re.workflow.task.grid.entity.resourceId": "Resource ID",
"re.workflow.task.grid.entity.resourceCode": "Resource Code",
"re.workflow.task.grid.entity.resourceName": "Resource Name",
"re.workflow.task.grid.entity.resourceVersion": "Resource Version",
"re.workflow.task.grid.entity.resourceStatus": "Resource Status",
"re.workflow.task.grid.entity.attachments": "Attachments",
"re.workflow.historyTask.grid.title": "历史任务列表"
}

155
io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json

@ -1,5 +1,5 @@
{
"menu.engine.rule":"規則引擎",
"menu.engine.rule": "規則引擎",
"menu.engine.rule.resources": "資源管理",
"menu.engine.rule.authorization": "權限管理",
"menu.engine.rule.workflow": "流程審批",
@ -18,10 +18,10 @@
"re.resources.grid.toolbar.deepCloneNew": "深度複製(新)",
"re.resources.grid.toolbar.deepCloneNew.tip": "您確定要深度複製資源成一個新的資源嗎?",
"re.resources.grid.toolbar.design": "查看/設計",
"re.resources.grid.toolbar.deploy.online":"上線",
"re.resources.grid.toolbar.deploy.online.tip":"您確定要上線資源嗎?",
"re.resources.grid.toolbar.deploy.offline":"下線",
"re.resources.grid.toolbar.deploy.offline.tip":"您確定要下線資源嗎?",
"re.resources.grid.toolbar.deploy.online": "上線",
"re.resources.grid.toolbar.deploy.online.tip": "您確定要上線資源嗎?",
"re.resources.grid.toolbar.deploy.offline": "下線",
"re.resources.grid.toolbar.deploy.offline.tip": "您確定要下線資源嗎?",
"re.resources.grid.toolbar.importExample": "導入示例",
"re.resources.grid.entity.effectiveDate": "生效日期",
@ -79,7 +79,7 @@
"re.resources.designer.processor.grid.title": "處理邏輯",
"re.resources.designer.processor.grid.entity.content": "內容",
"re.resources.designer.processor.grid.entity.objectCondition":"條件",
"re.resources.designer.processor.grid.entity.objectCondition": "條件",
"re.resources.designer.processor.grid.entity.objectProperties": "對象屬性",
"re.resources.designer.processor.grid.entity.optionCode": "選項",
"re.resources.designer.processor.grid.entity.arithmetic": "算數表達式",
@ -108,6 +108,34 @@
"re.resources.designer.processor.dialog.decisionTree.title": "決策樹設計器",
"re.resources.designer.processor.dialog.executionFlow.title": "執行流設計器",
"re.graph.vertex.start.label": "開始",
"re.graph.vertex.start.title": "開始",
"re.graph.vertex.condition.label": "條件",
"re.graph.vertex.condition.title": "條件",
"re.graph.vertex.condition.entity.condition": "判斷條件",
"re.graph.vertex.expression.label": "表達式",
"re.graph.vertex.expression.title": "表達式",
"re.graph.vertex.expression.entity.expression": "表達式",
"re.graph.vertex.expression.entity.commands": "附加指令集",
"re.graph.vertex.resourceAbstract.label": "資源",
"re.graph.vertex.resourceAbstract.title": "資源",
"re.graph.vertex.resourceAbstract.entity.resourceAbstractId": "資源",
"re.graph.vertex.commandSet.label": "指令集",
"re.graph.vertex.commandSet.title": "指令集",
"re.graph.vertex.commandSet.entity.commands": "指令集",
"re.graph.vertex.configurableResourceAbstract.label": "資源",
"re.graph.vertex.configurableResourceAbstract.title": "帶輸入輸出指令的資源",
"re.graph.vertex.configurableResourceAbstract.entity.resourceAbstractId": "資源",
"re.graph.vertex.configurableResourceAbstract.entity.inputCommands": "輸入指令集",
"re.graph.vertex.configurableResourceAbstract.entity.outputCommands": "輸出指令集",
"re.graph.vertex.subModelAbstract.label": "子模型",
"re.graph.vertex.subModelAbstract.title": "子模型",
"re.graph.vertex.subModelAbstract.entity.code": "子模型",
"re.graph.edge.conditionBranch.entity.valueType": "值類型",
"re.graph.edge.conditionBranch.entity.value": "值",
"re.graph.edge.conditionBranch.entity.commands": "附加指令集",
"re.resources.designer.testCase.grid.title": "試算用例",
"re.resources.designer.testCase.grid.tools.batchTest": "批量試算",
"re.resources.designer.testCase.grid.tools.download": "下載試算模版",
@ -117,7 +145,7 @@
"re.resources.designer.testCase.grid.entity.ownerCode": "資源代碼",
"re.resources.designer.testCase.grid.entity.ownerName": "資源名稱",
"re.resources.designer.testCase.grid.entity.ownerVersion": "資源版本",
"re.resources.designer.testCase.grid.entity.ownerStatus":"資源狀態",
"re.resources.designer.testCase.grid.entity.ownerStatus": "資源狀態",
"re.resources.designer.testCaseParameter.grid.title": "參數列表",
"re.resources.designer.testCaseParameter.grid.entity.inputValue": "輸入值",
@ -170,10 +198,10 @@
"re.dictionary.importSample.grid.toolbar.import": "導入示例",
"re.dictionary.importSample.grid.toolbar.import.tip": "您確定要導入示例元數據嗎?",
"re.function.grid.title":"自定義函數",
"re.function.grid.entity.signature":"函數簽名",
"re.function.grid.entity.mathXml":"數學符號",
"re.function.grid.entity.body":"函數體",
"re.function.grid.title": "自定義函數",
"re.function.grid.entity.signature": "函數簽名",
"re.function.grid.entity.mathXml": "數學符號",
"re.function.grid.entity.body": "函數體",
"re.function.import.dialog.title": "導入自定義函數",
"re.lib.grid.title": "特征庫",
@ -199,57 +227,56 @@
"re.indicator.grid.toolbar.addInterface": "接口",
"re.indicator.grid.toolbar.addIndicator": "指標",
"re.migration.import.title":"導入數據 (通過上傳文件導入)",
"re.migration.import.subTitle":"",
"re.migration.import.action":"導入數據",
"re.migration.importFromServer.title":"導入數據 (從服務器文件導入)",
"re.migration.importFromServer.subTitle":"",
"re.migration.importFromServer.serverPath.label":"請輸入服務器上導入文件的路徑",
"re.migration.importFromServer.action":"導入數據",
"re.migration.export.title":"導出所有數據",
"re.migration.export.subTitle":"",
"re.migration.export.action":"導出數據",
"re.migration.remove.title":"刪除所有現有數據",
"re.migration.remove.subTitle":"清注意: 此操作將刪除引擎中配置的所有數據, 且不可逆!",
"re.migration.remove.action":"刪除數據",
"re.migration.remove.action.tip":"您確定要刪除所有數據嗎?",
"re.workflow.dialog.title":"審批流程",
"re.workflow.dialog.tip":"提示: 該資源發佈需要流程審批, 待審批通過後方能生效!",
"re.workflow.dialog.entity.treatment":"說明",
"re.workflow.task.grid.title":"任務列表",
"re.workflow.task.grid.toolbar.viewResource":"查看資源",
"re.workflow.task.grid.toolbar.viewAttachment":"查看附件",
"re.workflow.task.grid.toolbar.claim":"領取任務",
"re.workflow.task.grid.toolbar.claim.tip":"您確定要領取任務嗎?",
"re.workflow.task.grid.toolbar.unclaim":"歸還任務",
"re.workflow.task.grid.toolbar.unclaim.tip":"您確定要歸還任務嗎?",
"re.workflow.task.grid.toolbar.complete":"審批任務",
"re.workflow.task.grid.toolbar.terminate":"終止任務",
"re.workflow.task.grid.toolbar.terminate.tip":"您確定要終止任務嗎?",
"re.workflow.task.grid.entity.processDefinitionId":"流程定義ID",
"re.workflow.task.grid.entity.processInstanceId":"流程實例ID",
"re.workflow.task.grid.entity.taskDefinitionId":"任務定義ID",
"re.workflow.task.grid.entity.taskId":"任務ID",
"re.workflow.task.grid.entity.taskName":"任務名稱",
"re.workflow.task.grid.entity.taskAssignee":"任務處理人",
"re.workflow.task.grid.entity.taskCreateTime":"任務創建日期",
"re.workflow.task.grid.entity.taskEndTime":"任務完成日期",
"re.workflow.task.grid.entity.taskClaimTime":"任務領取日期",
"re.workflow.task.grid.entity.taskTreatment":"審批意見",
"re.workflow.task.grid.entity.resourceType":"資源類型",
"re.workflow.task.grid.entity.resourceId":"資源ID",
"re.workflow.task.grid.entity.resourceCode":"資源代碼",
"re.workflow.task.grid.entity.resourceName":"資源名稱",
"re.workflow.task.grid.entity.resourceVersion":"資源版本",
"re.workflow.task.grid.entity.resourceStatus":"資源狀態",
"re.workflow.task.grid.entity.attachments":"資源附件",
"re.workflow.historyTask.grid.title":"歷史任務列表"
"re.migration.import.title": "導入數據 (通過上傳文件導入)",
"re.migration.import.subTitle": "",
"re.migration.import.action": "導入數據",
"re.migration.importFromServer.title": "導入數據 (從服務器文件導入)",
"re.migration.importFromServer.subTitle": "",
"re.migration.importFromServer.serverPath.label": "請輸入服務器上導入文件的路徑",
"re.migration.importFromServer.action": "導入數據",
"re.migration.export.title": "導出所有數據",
"re.migration.export.subTitle": "",
"re.migration.export.action": "導出數據",
"re.migration.remove.title": "刪除所有現有數據",
"re.migration.remove.subTitle": "清注意: 此操作將刪除引擎中配置的所有數據, 且不可逆!",
"re.migration.remove.action": "刪除數據",
"re.migration.remove.action.tip": "您確定要刪除所有數據嗎?",
"re.workflow.dialog.title": "審批流程",
"re.workflow.dialog.tip": "提示: 該資源發佈需要流程審批, 待審批通過後方能生效!",
"re.workflow.dialog.entity.treatment": "說明",
"re.workflow.task.grid.title": "任務列表",
"re.workflow.task.grid.toolbar.viewResource": "查看資源",
"re.workflow.task.grid.toolbar.viewAttachment": "查看附件",
"re.workflow.task.grid.toolbar.claim": "領取任務",
"re.workflow.task.grid.toolbar.claim.tip": "您確定要領取任務嗎?",
"re.workflow.task.grid.toolbar.unclaim": "歸還任務",
"re.workflow.task.grid.toolbar.unclaim.tip": "您確定要歸還任務嗎?",
"re.workflow.task.grid.toolbar.complete": "審批任務",
"re.workflow.task.grid.toolbar.terminate": "終止任務",
"re.workflow.task.grid.toolbar.terminate.tip": "您確定要終止任務嗎?",
"re.workflow.task.grid.entity.processDefinitionId": "流程定義ID",
"re.workflow.task.grid.entity.processInstanceId": "流程實例ID",
"re.workflow.task.grid.entity.taskDefinitionId": "任務定義ID",
"re.workflow.task.grid.entity.taskId": "任務ID",
"re.workflow.task.grid.entity.taskName": "任務名稱",
"re.workflow.task.grid.entity.taskAssignee": "任務處理人",
"re.workflow.task.grid.entity.taskCreateTime": "任務創建日期",
"re.workflow.task.grid.entity.taskEndTime": "任務完成日期",
"re.workflow.task.grid.entity.taskClaimTime": "任務領取日期",
"re.workflow.task.grid.entity.taskTreatment": "審批意見",
"re.workflow.task.grid.entity.resourceType": "資源類型",
"re.workflow.task.grid.entity.resourceId": "資源ID",
"re.workflow.task.grid.entity.resourceCode": "資源代碼",
"re.workflow.task.grid.entity.resourceName": "資源名稱",
"re.workflow.task.grid.entity.resourceVersion": "資源版本",
"re.workflow.task.grid.entity.resourceStatus": "資源狀態",
"re.workflow.task.grid.entity.attachments": "資源附件",
"re.workflow.historyTask.grid.title": "歷史任務列表"
}

154
io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json

@ -1,5 +1,5 @@
{
"menu.engine.rule":"规则引擎",
"menu.engine.rule": "规则引擎",
"menu.engine.rule.resources": "资源管理",
"menu.engine.rule.authorization": "权限管理",
"menu.engine.rule.workflow": "流程审批",
@ -18,10 +18,10 @@
"re.resources.grid.toolbar.deepCloneNew": "深度复制(新)",
"re.resources.grid.toolbar.deepCloneNew.tip": "您确定要深度复制资源成一个新的资源吗?",
"re.resources.grid.toolbar.design": "查看/设计",
"re.resources.grid.toolbar.deploy.online":"上线",
"re.resources.grid.toolbar.deploy.online.tip":"您确定要上线资源吗?",
"re.resources.grid.toolbar.deploy.offline":"下线",
"re.resources.grid.toolbar.deploy.offline.tip":"您确定要下线资源吗?",
"re.resources.grid.toolbar.deploy.online": "上线",
"re.resources.grid.toolbar.deploy.online.tip": "您确定要上线资源吗?",
"re.resources.grid.toolbar.deploy.offline": "下线",
"re.resources.grid.toolbar.deploy.offline.tip": "您确定要下线资源吗?",
"re.resources.grid.toolbar.importExample": "导入示例",
"re.resources.grid.entity.effectiveDate": "生效日期",
@ -79,7 +79,7 @@
"re.resources.designer.processor.grid.title": "处理逻辑",
"re.resources.designer.processor.grid.entity.content": "内容",
"re.resources.designer.processor.grid.entity.objectCondition":"条件",
"re.resources.designer.processor.grid.entity.objectCondition": "条件",
"re.resources.designer.processor.grid.entity.objectProperties": "对象属性",
"re.resources.designer.processor.grid.entity.optionCode": "选项",
"re.resources.designer.processor.grid.entity.arithmetic": "算数表达式",
@ -108,6 +108,34 @@
"re.resources.designer.processor.dialog.decisionTree.title": "决策树设计器",
"re.resources.designer.processor.dialog.executionFlow.title": "执行流设计器",
"re.graph.vertex.start.label": "开始",
"re.graph.vertex.start.title": "开始",
"re.graph.vertex.condition.label": "条件",
"re.graph.vertex.condition.title": "条件",
"re.graph.vertex.condition.entity.condition": "判断条件",
"re.graph.vertex.expression.label": "表达式",
"re.graph.vertex.expression.title": "表达式",
"re.graph.vertex.expression.entity.expression": "表达式",
"re.graph.vertex.expression.entity.commands": "附加指令集",
"re.graph.vertex.resourceAbstract.label": "资源",
"re.graph.vertex.resourceAbstract.title": "资源",
"re.graph.vertex.resourceAbstract.entity.resourceAbstractId": "资源",
"re.graph.vertex.commandSet.label": "指令集",
"re.graph.vertex.commandSet.title": "指令集",
"re.graph.vertex.commandSet.entity.commands": "指令集",
"re.graph.vertex.configurableResourceAbstract.label": "资源",
"re.graph.vertex.configurableResourceAbstract.title": "带输入输出指令的资源",
"re.graph.vertex.configurableResourceAbstract.entity.resourceAbstractId": "资源",
"re.graph.vertex.configurableResourceAbstract.entity.inputCommands": "输入指令集",
"re.graph.vertex.configurableResourceAbstract.entity.outputCommands": "输出指令集",
"re.graph.vertex.subModelAbstract.label": "子模型",
"re.graph.vertex.subModelAbstract.title": "子模型",
"re.graph.vertex.subModelAbstract.entity.code": "子模型",
"re.graph.edge.conditionBranch.entity.valueType": "值类型",
"re.graph.edge.conditionBranch.entity.value": "值",
"re.graph.edge.conditionBranch.entity.commands": "附加指令集",
"re.resources.designer.testCase.grid.title": "试算用例",
"re.resources.designer.testCase.grid.tools.batchTest": "批量试算",
"re.resources.designer.testCase.grid.tools.download": "下载试算模版",
@ -117,7 +145,7 @@
"re.resources.designer.testCase.grid.entity.ownerCode": "资源代码",
"re.resources.designer.testCase.grid.entity.ownerName": "资源名称",
"re.resources.designer.testCase.grid.entity.ownerVersion": "资源版本",
"re.resources.designer.testCase.grid.entity.ownerStatus":"资源状态",
"re.resources.designer.testCase.grid.entity.ownerStatus": "资源状态",
"re.resources.designer.testCaseParameter.grid.title": "参数列表",
"re.resources.designer.testCaseParameter.grid.entity.inputValue": "输入值",
@ -170,10 +198,10 @@
"re.dictionary.importSample.grid.toolbar.import": "导入示例",
"re.dictionary.importSample.grid.toolbar.import.tip": "您确定要导入示例元数据吗?",
"re.function.grid.title":"自定义函数",
"re.function.grid.entity.signature":"函数签名",
"re.function.grid.entity.mathXml":"数学符号",
"re.function.grid.entity.body":"函数体",
"re.function.grid.title": "自定义函数",
"re.function.grid.entity.signature": "函数签名",
"re.function.grid.entity.mathXml": "数学符号",
"re.function.grid.entity.body": "函数体",
"re.function.import.dialog.title": "导入自定义函数",
"re.lib.grid.title": "特征库",
@ -199,56 +227,56 @@
"re.indicator.grid.toolbar.addInterface": "接口",
"re.indicator.grid.toolbar.addIndicator": "指标",
"re.migration.import.title":"导入数据 (通过上传文件导入)",
"re.migration.import.subTitle":"",
"re.migration.import.action":"导入数据",
"re.migration.importFromServer.title":"导入数据 (从服务器文件导入)",
"re.migration.importFromServer.subTitle":"",
"re.migration.importFromServer.serverPath.label":"请输入服务器上导入文件的路径",
"re.migration.importFromServer.action":"导入数据",
"re.migration.export.title":"导出所有数据",
"re.migration.export.subTitle":"",
"re.migration.export.action":"导出数据",
"re.migration.remove.title":"删除所有现有数据",
"re.migration.remove.subTitle":"请注意: 此操作将删除引擎中配置的所有数据, 且不可逆!",
"re.migration.remove.action":"删除数据",
"re.migration.remove.action.tip":"您确定要删除所有数据吗?",
"re.workflow.dialog.title":"审批流程",
"re.workflow.dialog.tip":"提示: 该资源发布需要流程审批, 待审批通过后方能生效!",
"re.workflow.dialog.entity.treatment":"说明",
"re.workflow.task.grid.title":"任务列表",
"re.workflow.task.grid.toolbar.viewResource":"查看资源",
"re.workflow.task.grid.toolbar.viewAttachment":"查看附件",
"re.workflow.task.grid.toolbar.claim":"领取任务",
"re.workflow.task.grid.toolbar.claim.tip":"您确定要领取任务吗?",
"re.workflow.task.grid.toolbar.unclaim":"归还任务",
"re.workflow.task.grid.toolbar.unclaim.tip":"您确定要归还任务吗?",
"re.workflow.task.grid.toolbar.complete":"审批任务",
"re.workflow.task.grid.toolbar.terminate":"终止任务",
"re.workflow.task.grid.toolbar.terminate.tip":"您确定要归终止务吗?",
"re.workflow.task.grid.entity.processDefinitionId":"流程定义ID",
"re.workflow.task.grid.entity.processInstanceId":"流程实例ID",
"re.workflow.task.grid.entity.taskDefinitionId":"任务定义ID",
"re.workflow.task.grid.entity.taskId":"任务ID",
"re.workflow.task.grid.entity.taskName":"任务名称",
"re.workflow.task.grid.entity.taskAssignee":"任务处理人",
"re.workflow.task.grid.entity.taskCreateTime":"任务创建日期",
"re.workflow.task.grid.entity.taskEndTime":"任务完成日期",
"re.workflow.task.grid.entity.taskClaimTime":"任务领取日期",
"re.workflow.task.grid.entity.taskTreatment":"审批意见",
"re.workflow.task.grid.entity.resourceType":"资源类型",
"re.workflow.task.grid.entity.resourceId":"资源ID",
"re.workflow.task.grid.entity.resourceCode":"资源代码",
"re.workflow.task.grid.entity.resourceName":"资源名称",
"re.workflow.task.grid.entity.resourceVersion":"资源版本",
"re.workflow.task.grid.entity.resourceStatus":"资源状态",
"re.workflow.task.grid.entity.attachments":"资源附件",
"re.workflow.historyTask.grid.title":"历史任务列表"
"re.migration.import.title": "导入数据 (通过上传文件导入)",
"re.migration.import.subTitle": "",
"re.migration.import.action": "导入数据",
"re.migration.importFromServer.title": "导入数据 (从服务器文件导入)",
"re.migration.importFromServer.subTitle": "",
"re.migration.importFromServer.serverPath.label": "请输入服务器上导入文件的路径",
"re.migration.importFromServer.action": "导入数据",
"re.migration.export.title": "导出所有数据",
"re.migration.export.subTitle": "",
"re.migration.export.action": "导出数据",
"re.migration.remove.title": "删除所有现有数据",
"re.migration.remove.subTitle": "请注意: 此操作将删除引擎中配置的所有数据, 且不可逆!",
"re.migration.remove.action": "删除数据",
"re.migration.remove.action.tip": "您确定要删除所有数据吗?",
"re.workflow.dialog.title": "审批流程",
"re.workflow.dialog.tip": "提示: 该资源发布需要流程审批, 待审批通过后方能生效!",
"re.workflow.dialog.entity.treatment": "说明",
"re.workflow.task.grid.title": "任务列表",
"re.workflow.task.grid.toolbar.viewResource": "查看资源",
"re.workflow.task.grid.toolbar.viewAttachment": "查看附件",
"re.workflow.task.grid.toolbar.claim": "领取任务",
"re.workflow.task.grid.toolbar.claim.tip": "您确定要领取任务吗?",
"re.workflow.task.grid.toolbar.unclaim": "归还任务",
"re.workflow.task.grid.toolbar.unclaim.tip": "您确定要归还任务吗?",
"re.workflow.task.grid.toolbar.complete": "审批任务",
"re.workflow.task.grid.toolbar.terminate": "终止任务",
"re.workflow.task.grid.toolbar.terminate.tip": "您确定要归终止务吗?",
"re.workflow.task.grid.entity.processDefinitionId": "流程定义ID",
"re.workflow.task.grid.entity.processInstanceId": "流程实例ID",
"re.workflow.task.grid.entity.taskDefinitionId": "任务定义ID",
"re.workflow.task.grid.entity.taskId": "任务ID",
"re.workflow.task.grid.entity.taskName": "任务名称",
"re.workflow.task.grid.entity.taskAssignee": "任务处理人",
"re.workflow.task.grid.entity.taskCreateTime": "任务创建日期",
"re.workflow.task.grid.entity.taskEndTime": "任务完成日期",
"re.workflow.task.grid.entity.taskClaimTime": "任务领取日期",
"re.workflow.task.grid.entity.taskTreatment": "审批意见",
"re.workflow.task.grid.entity.resourceType": "资源类型",
"re.workflow.task.grid.entity.resourceId": "资源ID",
"re.workflow.task.grid.entity.resourceCode": "资源代码",
"re.workflow.task.grid.entity.resourceName": "资源名称",
"re.workflow.task.grid.entity.resourceVersion": "资源版本",
"re.workflow.task.grid.entity.resourceStatus": "资源状态",
"re.workflow.task.grid.entity.attachments": "资源附件",
"re.workflow.historyTask.grid.title": "历史任务列表"
}

84
io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue

@ -6,15 +6,11 @@
:maximized="true"
body-padding="0px 2px 2px 2px"
>
<!-- <iframe
:src="Environment.apiContextPath('api/re/model/parameter/processor/editDecisionTreeById/') + processorIdRef"
style="width: 100%; height: 100%"
></iframe> -->
<w-graph v-model="modelValueRef" :vertex-defines="vertexDefines" :edge-defines="edgeDefines" @save="save"></w-graph>
</w-dialog>
</template>
<script setup lang="ts">
import { ref, nextTick } from 'vue';
import { ref } from 'vue';
import { axios, Environment, NotifyManager, Formater, EnumTools, $t } from 'platform-core';
import { AutoCompletionManager } from '@/views/shared/AutoCompletionManager';
import { PlaceHolder } from '@/utils/PlaceHolder';
@ -34,7 +30,7 @@ const autoCompletion = (context) => {
const edgeDefines = [
{
type: 'ConditionBranch',
type: 'EdgeConditionBranch',
fromVertexType: 'Condition',
toVertexType: null,
getLabel: (value) => {
@ -43,9 +39,9 @@ const edgeDefines = [
getValue: (dom) => {
if (dom) {
return {
valueType: dom.getAttribute('valueType'),
value: dom.getAttribute('value'),
commands: dom.getAttribute('commands'),
valueType: dom.getAttribute('valueType') || '',
value: dom.getAttribute('value') || '',
commands: dom.getAttribute('commands') || '',
};
} else {
return {
@ -59,7 +55,7 @@ const edgeDefines = [
return [
{
name: 'valueType',
label: 'valueType',
label: $t('re.graph.edge.conditionBranch.entity.valueType'),
type: 'w-select',
options: [
{ label: $t('java.lang.String'), value: 'java.lang.String' },
@ -69,12 +65,12 @@ const edgeDefines = [
},
{
name: 'value',
label: 'value',
label: $t('re.graph.edge.conditionBranch.entity.value'),
type: 'w-text',
},
{
name: 'commands',
label: 'commands',
label: $t('re.graph.edge.conditionBranch.entity.commands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
@ -92,7 +88,15 @@ const edgeDefines = [
const vertexDefines = [
{
type: 'Start',
thumbnail: { shape: 'ellipse', label: $t('start'), rx: 8, ry: 8, strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
shape: 'ellipse',
label: $t('re.graph.vertex.start.label'),
title: $t('re.graph.vertex.start.title'),
rx: 8,
ry: 8,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
size: [50, 50],
@ -103,17 +107,17 @@ const vertexDefines = [
getValue: (dom) => {
if (dom) {
return {
label: dom.getAttribute('label'),
label: dom.getAttribute('label') || '',
};
} else {
return { label: $t('start') };
return { label: $t('re.graph.vertex.start.label') };
}
},
getFormFields: () => {
return [
{
name: 'label',
label: 'label',
label: $t('description'),
type: 'w-text',
},
];
@ -121,18 +125,24 @@ const vertexDefines = [
},
{
type: 'Condition',
thumbnail: { shape: 'rhombus', label: $t('condition'), strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
shape: 'rhombus',
label: $t('re.graph.vertex.condition.label'),
title: $t('re.graph.vertex.condition.title'),
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'rhombus',
size: [120, 60],
},
getLabel: (value) => {
return value.condition ? PlaceHolder.replace(value.condition) : $t('condition');
return value.condition ? PlaceHolder.replace(value.condition) : '';
},
getValue: (dom) => {
if (dom) {
return {
condition: dom.getAttribute('condition'),
condition: dom.getAttribute('condition') || '',
};
} else {
return {
@ -144,7 +154,7 @@ const vertexDefines = [
return [
{
name: 'condition',
label: 'condition',
label: $t('re.graph.vertex.condition.entity.condition'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
@ -159,7 +169,13 @@ const vertexDefines = [
},
{
type: 'Expression',
thumbnail: { shape: 'rectangle', label: $t('expression'), strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
shape: 'rectangle',
label: $t('re.graph.vertex.expression.label'),
title: $t('re.graph.vertex.expression.title'),
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'rectangle',
size: [120, 60],
@ -174,22 +190,22 @@ const vertexDefines = [
getValue: (dom) => {
if (dom) {
return {
expression: dom.getAttribute('expression'),
commands: dom.getAttribute('commands'),
expression: dom.getAttribute('expression') || '',
commands: dom.getAttribute('commands') || '',
};
} else {
return {
expression: 'xxx',
commands: 'kjsdfi=klsjdf="xxx";\na=b;',
expression: '',
commands: '',
};
}
},
getFormFields: () => {
return [
{ name: 'expression', label: 'expression', type: 'w-text' },
{ name: 'expression', label: $t('re.graph.vertex.expression.entity.expression'), type: 'w-text' },
{
name: 'commands',
label: 'commands',
label: $t('re.graph.vertex.expression.entity.commands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
@ -204,7 +220,15 @@ const vertexDefines = [
},
{
type: 'ResourceAbstract',
thumbnail: { shape: 'ellipse', label: '资源摘要', rx: 11, ry: 6, strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
shape: 'ellipse',
label: $t('re.graph.vertex.resourceAbstract.label'),
title: $t('re.graph.vertex.resourceAbstract.title'),
rx: 11,
ry: 6,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
size: [120, 60],
@ -250,13 +274,13 @@ const vertexDefines = [
return [
{
name: 'resourceAbstractId',
label: $t('re.resources.grid.title'),
label: $t('re.graph.vertex.resourceAbstract.entity.resourceAbstractId'),
type: 'w-grid-select',
displayValue: (args) => {
return args.data.name + '(V' + args.data.version + ')';
},
grid: {
title: $t('re.resources.grid.title'),
title: $t('re.graph.vertex.resourceAbstract.entity.resourceAbstractId'),
denseBody: true,
hideBottom: true,
configButton: true,

581
io.sc.engine.rule.frontend/src/views/resources/designer/ExecutionFlowDialog.vue

@ -6,21 +6,582 @@
:maximized="true"
body-padding="2px 2px 2px 2px"
>
<iframe
:src="Environment.getWebContextPath() + 'api/re/model/parameter/processor/editExecutionFlowById/' + processorIdRef"
style="width: 100%; height: 100%"
></iframe>
<w-graph v-model="modelValueRef" :vertex-defines="vertexDefines" :edge-defines="edgeDefines" @save="save"></w-graph>
</w-dialog>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Environment } from 'platform-core';
import { axios, Environment, NotifyManager, Formater, EnumTools, $t } from 'platform-core';
import { AutoCompletionManager } from '@/views/shared/AutoCompletionManager';
import { PlaceHolder } from '@/utils/PlaceHolder';
import ResourceDeployStatusTag from '@/views/shared/ResourceDeployStatusTag.vue';
const dialogRef = ref();
const processorIdRef = ref();
const modelValueRef = ref();
const open = (processorId) => {
const autoCompletionManager = new AutoCompletionManager();
const userDefinedFunctionsRef = ref();
const resourceAbstractsRef = ref();
const modeAbstractsRef = ref();
const autoCompletion = (context) => {
return autoCompletionManager.autoCompletion(context);
};
const edgeDefines = [
{
type: 'EdgeConditionBranch',
fromVertexType: 'Condition',
toVertexType: null,
getLabel: (value) => {
return value.value || '';
},
getValue: (dom) => {
if (dom) {
return {
valueType: dom.getAttribute('valueType') || '',
value: dom.getAttribute('value') || '',
commands: dom.getAttribute('commands') || '',
};
} else {
return {
valueType: 'java.lang.String',
value: '',
commands: '',
};
}
},
getFormFields: () => {
return [
{
name: 'valueType',
label: $t('re.graph.edge.conditionBranch.entity.valueType'),
type: 'w-select',
options: [
{ label: $t('java.lang.String'), value: 'java.lang.String' },
{ label: $t('java.lang.Boolean'), value: 'java.lang.Boolean' },
{ label: $t('java.math.BigDecimal'), value: 'java.math.BigDecimal' },
],
},
{
name: 'value',
label: $t('re.graph.edge.conditionBranch.entity.value'),
type: 'w-text',
},
{
name: 'commands',
label: $t('re.graph.edge.conditionBranch.entity.commands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
placeholder: true,
lineWrap: true,
lineBreak: true,
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
},
];
},
},
];
const vertexDefines = [
{
type: 'Start',
thumbnail: {
shape: 'ellipse',
label: $t('re.graph.vertex.start.label'),
title: $t('re.graph.vertex.start.title'),
rx: 8,
ry: 8,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
size: [50, 50],
},
getLabel: (value) => {
return value.label;
},
getValue: (dom) => {
if (dom) {
return {
label: dom.getAttribute('label') || '',
};
} else {
return { label: $t('re.graph.vertex.start.label') };
}
},
getFormFields: () => {
return [
{
name: 'label',
label: $t('description'),
type: 'w-text',
},
];
},
},
{
type: 'Condition',
thumbnail: {
shape: 'rhombus',
label: $t('re.graph.vertex.condition.label'),
title: $t('re.graph.vertex.condition.title'),
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'rhombus',
size: [120, 60],
},
getLabel: (value) => {
return value.condition ? PlaceHolder.replace(value.condition) : '';
},
getValue: (dom) => {
if (dom) {
return {
condition: dom.getAttribute('condition') || '',
};
} else {
return {
condition: '',
};
}
},
getFormFields: () => {
return [
{
name: 'condition',
label: $t('re.graph.vertex.condition.entity.condition'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
placeholder: true,
lineWrap: true,
lineBreak: false,
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
},
];
},
},
{
type: 'CommandSet',
thumbnail: {
shape: 'rectangle',
label: $t('re.graph.vertex.commandSet.label'),
title: $t('re.graph.vertex.commandSet.title'),
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'rectangle',
size: [120, 60],
},
getLabel: (value) => {
let html = '';
html += '<div style="text-align:left;">' + value.commands + '</div>';
return html;
},
getValue: (dom) => {
if (dom) {
return {
commands: dom.getAttribute('commands') || '',
};
} else {
return {
commands: '',
};
}
},
getFormFields: () => {
return [
{
name: 'commands',
label: $t('re.graph.vertex.commandSet.entity.commands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
placeholder: true,
lineWrap: true,
lineBreak: true,
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
},
];
},
},
{
type: 'ResourceAbstract',
thumbnail: {
shape: 'ellipse',
label: $t('re.graph.vertex.resourceAbstract.label'),
title: $t('re.graph.vertex.resourceAbstract.title'),
rx: 11,
ry: 6,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
size: [120, 60],
},
getLabel: (value) => {
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId);
if (resourceAbstract) {
return resourceAbstract.name + '(V' + resourceAbstract.version + ')';
}
return '';
},
getValue: (dom) => {
if (dom) {
const code = dom.getAttribute('code');
const version = dom.getAttribute('version');
const resourceAbstract = findResourceAbstractByCodeAndVersion(code, version);
if (resourceAbstract) {
return {
resourceAbstractId: resourceAbstract.id,
};
} else {
return {
resourceAbstractId: '',
};
}
} else {
return {
resourceAbstractId: '',
};
}
},
setValue: (dom, value) => {
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId);
if (resourceAbstract) {
dom.setAttribute('code', resourceAbstract.code);
dom.setAttribute('version', resourceAbstract.version);
} else {
dom.setAttribute('code', '');
dom.setAttribute('version', '');
}
},
getFormFields: () => {
return [
{
name: 'resourceAbstractId',
label: $t('re.graph.vertex.resourceAbstract.entity.resourceAbstractId'),
type: 'w-grid-select',
displayValue: (args) => {
return args.data.name + '(V' + args.data.version + ')';
},
grid: {
title: $t('re.graph.vertex.resourceAbstract.entity.resourceAbstractId'),
denseBody: true,
hideBottom: true,
configButton: true,
checkboxSelection: false,
tree: true,
treeIcon: (row) => {
if (row.type === 'FOLDER') {
return { name: 'folder', color: 'amber' };
} else if (row.type === 'MODEL') {
return { name: 'bi-boxes' };
} else if (row.type === 'SCORE_CARD') {
return { name: 'bi-card-list' };
} else {
return { name: row.icon };
}
},
dataUrl: Environment.apiContextPath('/api/re/resource'),
pageable: false,
sortBy: ['order', '-lastModifyDate'],
toolbarConfigure: { noIcon: false },
toolbarActions: ['refresh', 'expand'],
columns: [
{ width: '100%', name: 'name', label: $t('name') },
{
width: 80,
name: 'type',
label: $t('type'),
format: (value, row) => {
if (value !== 'FOLDER') {
return Formater.enum(Enums.ResourceType)(value);
}
},
},
{ width: 60, name: 'version', label: $t('version') },
{
width: 80,
name: 'status',
label: $t('status'),
align: 'center',
format: (value, row) => {
return {
componentType: ResourceDeployStatusTag,
attrs: { status: value },
};
},
},
],
},
},
];
},
},
{
type: 'ConfigurableResourceAbstract',
thumbnail: {
shape: 'doubleEllipse',
paths: [
'<path fill="white" stroke-width="1" stroke="black" d="M1 12a11 8 0 1 0 22 0a11 8 0 1 0 -22 0"></path>',
'<path fill="white" stroke-width="1" stroke="black" d="M3 12a9 6 0 1 0 18 0a9 6 0 1 0 -18 0"></path>',
],
label: $t('re.graph.vertex.configurableResourceAbstract.label'),
title: $t('re.graph.vertex.configurableResourceAbstract.title'),
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'doubleEllipse',
size: [120, 60],
},
getLabel: (value) => {
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId);
if (resourceAbstract) {
return resourceAbstract.name + '(V' + resourceAbstract.version + ')';
}
return '';
},
getValue: (dom) => {
if (dom) {
const code = dom.getAttribute('code');
const version = dom.getAttribute('version');
const inputCommands = dom.getAttribute('inputCommands');
const outputCommands = dom.getAttribute('outputCommands');
const resourceAbstract = findResourceAbstractByCodeAndVersion(code, version);
if (resourceAbstract) {
console.log(resourceAbstract);
return {
resourceAbstractId: resourceAbstract.id,
inputCommands: inputCommands,
outputCommands: outputCommands,
};
} else {
return {
resourceAbstractId: '',
inputCommands: '',
outputCommands: '',
};
}
} else {
return {
resourceAbstractId: '',
inputCommands: '',
outputCommands: '',
};
}
},
setValue: (dom, value) => {
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId);
if (resourceAbstract) {
dom.setAttribute('code', resourceAbstract.code);
dom.setAttribute('version', resourceAbstract.version);
dom.setAttribute('inputCommands', value.inputCommands);
dom.setAttribute('outputCommands', value.outputCommands);
} else {
dom.setAttribute('code', '');
dom.setAttribute('version', '');
dom.setAttribute('inputCommands', '');
dom.setAttribute('outputCommands', '');
}
},
getFormFields: () => {
return [
{
name: 'resourceAbstractId',
label: $t('re.graph.vertex.configurableResourceAbstract.entity.resourceAbstractId'),
type: 'w-grid-select',
displayValue: (args) => {
return args.data.name + '(V' + args.data.version + ')';
},
grid: {
title: $t('re.graph.vertex.configurableResourceAbstract.entity.resourceAbstractId'),
denseBody: true,
hideBottom: true,
configButton: true,
checkboxSelection: false,
tree: true,
treeIcon: (row) => {
if (row.type === 'FOLDER') {
return { name: 'folder', color: 'amber' };
} else if (row.type === 'MODEL') {
return { name: 'bi-boxes' };
} else if (row.type === 'SCORE_CARD') {
return { name: 'bi-card-list' };
} else {
return { name: row.icon };
}
},
dataUrl: Environment.apiContextPath('/api/re/resource'),
pageable: false,
sortBy: ['order', '-lastModifyDate'],
toolbarConfigure: { noIcon: false },
toolbarActions: ['refresh', 'expand'],
columns: [
{ width: '100%', name: 'name', label: $t('name') },
{
width: 80,
name: 'type',
label: $t('type'),
format: (value, row) => {
if (value !== 'FOLDER') {
return Formater.enum(Enums.ResourceType)(value);
}
},
},
{ width: 60, name: 'version', label: $t('version') },
{
width: 80,
name: 'status',
label: $t('status'),
align: 'center',
format: (value, row) => {
return {
componentType: ResourceDeployStatusTag,
attrs: { status: value },
};
},
},
],
},
},
{
name: 'inputCommands',
label: $t('re.graph.vertex.configurableResourceAbstract.entity.inputCommands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
placeholder: true,
lineWrap: true,
lineBreak: true,
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
},
{
name: 'outputCommands',
label: $t('re.graph.vertex.configurableResourceAbstract.entity.outputCommands'),
type: 'w-code-mirror',
lang: 'java',
rows: 10,
placeholder: true,
lineWrap: true,
lineBreak: true,
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
},
];
},
},
{
type: 'SubModelAbstract',
thumbnail: {
paths: ['<path fill="white" stroke-width="1" stroke="black" d="M 1 12 L 6 6 L 18 6 L 23 12 L 23 12 L 18 18 L 6 18 L 1 12 L 1 12"></path>'],
label: $t('re.graph.vertex.subModelAbstract.label'),
title: $t('re.graph.vertex.subModelAbstract.title'),
rx: 11,
ry: 6,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'hexagon',
size: [120, 60],
},
getLabel: (value) => {
for (const item of modeAbstractsRef.value) {
if (item.value === value.code) {
return item.label;
}
}
return '';
},
getValue: (dom) => {
if (dom) {
return {
code: dom.getAttribute('code') || '',
};
} else {
return {
code: '',
};
}
},
getFormFields: () => {
return [
{
name: 'code',
label: $t('re.graph.vertex.subModelAbstract.entity.code'),
type: 'w-select',
options: modeAbstractsRef,
},
];
},
},
];
const findResourceAbstractById = (id) => {
for (const item of resourceAbstractsRef.value) {
if (item.id === id) {
return item;
}
}
return null;
};
const findResourceAbstractByCodeAndVersion = (code, version) => {
for (const item of resourceAbstractsRef.value) {
if (item.code === code && item.version.toString() === version) {
return item;
}
}
return null;
};
const open = async (parameterId, processorId) => {
processorIdRef.value = processorId;
//
const resourceAbstractResponse = await axios.get(Environment.apiContextPath('/api/re/resource/getAllReleasableResourceAbstract'));
resourceAbstractsRef.value = resourceAbstractResponse?.data;
//
const modelResponse = await axios.get(Environment.apiContextPath('/api/re/model/getModeAbstractByParameterProcessor/' + processorId));
const modelOptions = [];
for (const item of modelResponse?.data || []) {
modelOptions.push({ label: item.name, value: item.code });
}
modeAbstractsRef.value = modelOptions;
//
const functionResponse = await axios.get(Environment.apiContextPath('/api/re/function?pageable=false'));
const functionOptions = [];
for (const item of functionResponse?.data?.content || []) {
if (item.enable) {
functionOptions.push(item);
}
}
userDefinedFunctionsRef.value = functionOptions;
//
const tipResponse = await axios.get(Environment.apiContextPath('/api/re/common/listParameterAndValueTypeByParameterId/' + parameterId));
autoCompletionManager.setParameters(tipResponse?.data?.parameters);
autoCompletionManager.setValueTypes(tipResponse?.data?.valueTypes);
// graph xml
const graphResponse = await axios.get(Environment.apiContextPath('api/re/model/parameter/processor/getExecutionFlowById/' + processorIdRef.value));
modelValueRef.value = graphResponse?.data;
//
dialogRef.value.show();
};
@ -28,8 +589,16 @@ const close = () => {
dialogRef.value.hide();
};
const save = (xml) => {
axios.post(Environment.apiContextPath('api/re/model/parameter/processor/saveExecutionFlowById/' + processorIdRef.value), { xml }).then((response) => {
NotifyManager.info($t('operationSuccess'));
});
};
defineExpose({
open,
close,
});
const Enums = await EnumTools.fetch(['io.sc.engine.rule.core.enums.ResourceType', 'io.sc.engine.rule.core.enums.DeployStatus']);
</script>

2
io.sc.engine.rule.frontend/src/views/resources/designer/Processor.vue

@ -256,7 +256,7 @@
if ('DECISION_TREE' === type) {
decisionTreeDialogRef.open(parameter.id, arg.selected?.id);
} else if ('EXECUTION_FLOW' === type) {
executionFlowDialogRef.open(arg.selected?.id);
executionFlowDialogRef.open(parameter.id, arg.selected?.id);
} else {
arg._click(arg);
}

12
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/controller/ModelWebController.java

@ -18,12 +18,11 @@ import java.util.List;
/**
* 模型 Controller
*/
@Controller
@RestController
@RequestMapping("/api/re/model")
public class ModelWebController extends RestCrudController<ModelVo, ModelEntity,String,ModelRepository,ModelService> {
@RequestMapping("findModelWithSubModelsByResourceId")
@ResponseBody
@GetMapping("findModelWithSubModelsByResourceId")
protected List<ModelVo> findModelWithSubModelsByResourceId(@RequestParam(name="resourceId") String resourceId) throws Exception {
if(StringUtils.hasText(resourceId)){
return service.findModelWithSubModelsByResourceId(resourceId);
@ -31,17 +30,14 @@ public class ModelWebController extends RestCrudController<ModelVo, ModelEntity,
return Collections.emptyList();
}
@RequestMapping(value="deepClone/{modelId}",method=RequestMethod.POST)
@ResponseBody
@PostMapping("deepClone/{modelId}")
public void deepClone(@PathVariable(name="modelId",required=true)String modelId) throws Exception{
if(StringUtils.hasText(modelId)) {
service.deepClone(modelId);
}
}
@RequestMapping(value="getModeAbstractByParameterProcessor/{parameterProcessorId}",method=RequestMethod.GET)
@ResponseBody
@IgnoreResponseBodyAdvice
@GetMapping("getModeAbstractByParameterProcessor/{parameterProcessorId}")
public List<ModelAbstract> getModeAbstractByParameterProcessor(@PathVariable(name="parameterProcessorId")String parameterProcessorId) throws Exception{
List<ModelAbstract> list =service.getModeAbstractByParameterProcessor(parameterProcessorId);
if(list==null) {

4
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/controller/ParameterProcessorWebController.java

@ -83,7 +83,6 @@ public class ParameterProcessorWebController extends RestCrudController<Paramete
@ResponseBody
public void saveDecisionTreeById(@PathVariable(name="processorId") String processorId,@RequestBody Map<String,String> map) throws Exception{
String xml =map.get("xml");
//public void saveDecisionTreeById(@PathVariable(name="processorId") String processorId,@RequestParam(name="xml") String xml) throws Exception{
ParameterProcessorEntity entity = service.findById(processorId);
if(entity!=null && entity instanceof DecisionTreeParameterProcessorEntity) {
DecisionTreeParameterProcessorEntity _entity =(DecisionTreeParameterProcessorEntity)entity;
@ -118,7 +117,8 @@ public class ParameterProcessorWebController extends RestCrudController<Paramete
@RequestMapping("saveExecutionFlowById/{processorId}")
@ResponseBody
public void saveExecutionFlowById(@PathVariable(name="processorId") String processorId,@RequestParam(name="xml") String xml) throws Exception{
public void saveExecutionFlowById(@PathVariable(name="processorId") String processorId,@RequestBody Map<String,String> map) throws Exception{
String xml =map.get("xml");
ParameterProcessorEntity entity = service.findById(processorId);
if(entity!=null && entity instanceof ExecutionFlowParameterProcessorEntity) {
ExecutionFlowParameterProcessorEntity _entity =(ExecutionFlowParameterProcessorEntity)entity;

2
io.sc.platform.core.frontend/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.326",
"version": "8.1.332",
"description": "前端核心包,用于快速构建前端的脚手架",
"//main": "库的主文件",
"main": "dist/platform-core.js",

4
io.sc.platform.core.frontend/src/platform/components/graph/PlatformGraph.ts

@ -113,7 +113,7 @@ class PlatformGraph extends Graph {
convertValueToString(cell) {
if (cell.isVertex()) {
const dom = cell.value;
const type = dom.nodeName;
const type = dom.getAttribute('type');
const vertexDefineHandler: PlatformVertexDefineHandler = this.getPlugin<PlatformVertexDefineHandler>('PlatformVertexDefineHandler');
if (vertexDefineHandler) {
const value = vertexDefineHandler.getValue(type, dom);
@ -121,7 +121,7 @@ class PlatformGraph extends Graph {
}
} else if (cell.isEdge()) {
const dom = cell.value;
const type = dom.nodeName;
const type = dom.getAttribute('type');
const edgeDefineHandler: PlatformEdgeDefineHandler = this.getPlugin<PlatformEdgeDefineHandler>('PlatformEdgeDefineHandler');
if (edgeDefineHandler) {
const value = edgeDefineHandler.getValue(type, dom);

9
io.sc.platform.core.frontend/src/platform/components/graph/WGraph.vue

@ -20,7 +20,7 @@
<template #before>
<div class="flex items-center p-1">
<div v-for="(vertexDefine, index) in vertexDefines" :key="index">
<q-btn flat dense draggable="true" @dragstart="dragstart($event, vertexDefine)">
<q-btn flat dense draggable="true" :title="vertexDefine.thumbnail.title" @dragstart="dragstart($event, vertexDefine)">
<q-icon v-dompurify-html="generateSvg(vertexDefine.thumbnail)" :color="vertexDefine.thumbnail.strokeColor" size="3rem"> </q-icon>
</q-btn>
</div>
@ -155,6 +155,13 @@ const generateSvg = (vertexDefine) => {
//
svg += `<rect x="2" y="6" width="20" height="12" rx="2" ry="2" fill="none" stroke="${vertexDefine.strokeColor}" stroke-width="${vertexDefine.strokeWidth}"/>`;
}
// svg path
if (vertexDefine.paths && vertexDefine.paths.length > 0) {
for (const path of vertexDefine.paths) {
svg += path;
}
}
svg += `<text x="12" y="14" font-size="5" style="text-anchor: middle">${vertexDefine.label}</text>`;
svg += `</svg>`;
return svg;

3
io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformDragAndDropHandler.ts

@ -26,7 +26,8 @@ export class PlatformDragAndDropHandler implements GraphPlugin {
const data = Tools.json2Object(event.dataTransfer.getData('data'));
const type = data.type;
const doc = xmlUtils.createXmlDocument();
const element = doc.createElement(type);
const element = doc.createElement('UserObject');
element.setAttribute('type', type);
const vertexDefineHandler: PlatformVertexDefineHandler = this.graph.getPlugin<PlatformVertexDefineHandler>('PlatformVertexDefineHandler');
if (vertexDefineHandler) {
const value = vertexDefineHandler.getValue(type) || {};

18
io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformEdgeDefineHandler.ts

@ -1,15 +1,16 @@
import { Graph, GraphPlugin, Cell, Geometry, xmlUtils } from '@maxgraph/core';
import { $t } from '@/platform';
export class PlatformEdgeDefineHandler implements GraphPlugin {
public static pluginId: string = 'PlatformEdgeDefineHandler';
private graph: Graph;
private defines = {
Connection: {
type: 'Connection',
Edge: {
type: 'Edge',
fromVertexType: null,
toVertexType: null,
getLabel: (value) => {
return value.label;
return value.label || '';
},
getValue: (dom) => {
if (dom) {
@ -26,7 +27,7 @@ export class PlatformEdgeDefineHandler implements GraphPlugin {
return [
{
name: 'label',
label: 'label',
label: $t('description'),
type: 'w-text',
},
];
@ -48,11 +49,12 @@ export class PlatformEdgeDefineHandler implements GraphPlugin {
}
createEdge(parent = null, id, value, source = null, target = null, style = {}) {
const sourceType = source.value.nodeName;
const targetType = target.value.nodeName;
const sourceType = source.value.getAttribute('type');
const targetType = target.value.getAttribute('type');
const type = this.getType(sourceType, targetType);
const doc = xmlUtils.createXmlDocument();
const element = doc.createElement(type);
const element = doc.createElement('UserObject');
element.setAttribute('type', type);
const edge = new Cell(element, new Geometry(), style);
edge.setEdge(true);
return edge;
@ -65,7 +67,7 @@ export class PlatformEdgeDefineHandler implements GraphPlugin {
return type;
}
}
return 'Connection';
return 'Edge';
}
getLabel(type, value) {

6
io.sc.platform.core.frontend/src/platform/components/graph/handler/PlatformSelectedCellHandler.ts

@ -22,7 +22,7 @@ export class PlatformSelectedCellHandler implements GraphPlugin {
}
if (cell.isVertex()) {
const dom = cell.value;
const type = dom.nodeName;
const type = dom.getAttribute('type');
const vertexDefineHandler: PlatformVertexDefineHandler = this.graph.getPlugin<PlatformVertexDefineHandler>('PlatformVertexDefineHandler');
if (vertexDefineHandler) {
const value = vertexDefineHandler.getValue(type, cell);
@ -35,7 +35,7 @@ export class PlatformSelectedCellHandler implements GraphPlugin {
}
} else {
const dom = cell.value;
const type = dom.nodeName;
const type = dom.getAttribute('type');
const edgeDefineHandler: PlatformEdgeDefineHandler = this.graph.getPlugin<PlatformEdgeDefineHandler>('PlatformEdgeDefineHandler');
if (edgeDefineHandler) {
const value = edgeDefineHandler.getValue(type, cell);
@ -63,7 +63,7 @@ export class PlatformSelectedCellHandler implements GraphPlugin {
return;
}
const dom = cell.value;
const type = dom.nodeName;
const type = dom.getAttribute('type');
if (cell.isVertex()) {
const vertexDefineHandler: PlatformVertexDefineHandler = this.graph.getPlugin<PlatformVertexDefineHandler>('PlatformVertexDefineHandler');
if (vertexDefineHandler) {

14
io.sc.platform.core.frontend/src/platform/i18n/messages.json

@ -264,10 +264,20 @@
"math.toolbar.functions.formater.comma": "Thousandth place, leave the y digits after the x decimal point",
"math.toolbar.functions.formater.percent": "percentage, leave the y digits after the x decimal point",
"math.toolbar.userDefinedFunction":"User Defined Function",
"math.toolbar.userDefinedFunction": "User Defined Function",
"math.contextMenu.miTomn": "Variable -> Const",
"math.contextMenu.mnTomi": "Const -> Variable",
"math.contextMenu.mnTo0": "Set to 0",
"math.contextMenu.mnTo1": "Set to 1"
"math.contextMenu.mnTo1": "Set to 1",
"graph.toolbar.actions.zoomIn": "Zoom In",
"graph.toolbar.actions.zoomOut": "Zoom Out",
"graph.toolbar.actions.undo": "Undo",
"graph.toolbar.actions.redo": "Redo",
"graph.setting.panel.properties.title": "Properties",
"graph.setting.panel.style.title": "Style",
"graph.setting.panel.text.title": "Text",
"graph.setting.panel.arrange.title": "Arrange"
}

14
io.sc.platform.core.frontend/src/platform/i18n/messages_tw_CN.json

@ -264,10 +264,20 @@
"math.toolbar.functions.formater.comma": "千分位, 保留 x 小數點後 y 位",
"math.toolbar.functions.formater.percent": "百分數, 保留 x 小數點後 y 位",
"math.toolbar.userDefinedFunction":"自定義函數",
"math.toolbar.userDefinedFunction": "自定義函數",
"math.contextMenu.miTomn": "變量 -> 常量",
"math.contextMenu.mnTomi": "常量 -> 變量",
"math.contextMenu.mnTo0": "設置為 0",
"math.contextMenu.mnTo1": "設置為 1"
"math.contextMenu.mnTo1": "設置為 1",
"graph.toolbar.actions.zoomIn": "放大",
"graph.toolbar.actions.zoomOut": "縮小",
"graph.toolbar.actions.undo": "撤銷",
"graph.toolbar.actions.redo": "重做",
"graph.setting.panel.properties.title": "屬性",
"graph.setting.panel.style.title": "樣式",
"graph.setting.panel.text.title": "文本",
"graph.setting.panel.arrange.title": "排列"
}

27
io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue

@ -14,18 +14,21 @@ const resourceAbstractsRef = ref();
const edgeDefines = [
{
type: 'ConditionBranch',
type: 'EdgeConditionBranch',
fromVertexType: 'Condition',
toVertexType: null,
getLabel: (value) => {
return value.value || '';
if (value && value.value) {
return value.value;
}
return '';
},
getValue: (dom) => {
if (dom) {
return {
valueType: dom.getAttribute('valueType'),
value: dom.getAttribute('value'),
commands: dom.getAttribute('commands'),
valueType: dom.getAttribute('valueType') || '',
value: dom.getAttribute('value') || '',
commands: dom.getAttribute('commands') || '',
};
} else {
return {
@ -70,7 +73,7 @@ const edgeDefines = [
const vertexDefines = [
{
type: 'Start',
thumbnail: { shape: 'ellipse', label: $t('start'), rx: 8, ry: 8, strokeColor: 'black', strokeWidth: 1 },
thumbnail: { shape: 'ellipse', label: $t('start'), title: $t('success'), rx: 8, ry: 8, strokeColor: 'black', strokeWidth: 1 },
cell: {
shape: 'ellipse',
size: [50, 50],
@ -178,9 +181,17 @@ const vertexDefines = [
},
{
type: 'ResourceAbstract',
thumbnail: { shape: 'ellipse', label: '资源摘要', rx: 11, ry: 6, strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
//shape: 'ellipse',
paths: ['<path fill="white" stroke-width="1" stroke="black" d="M 1 8 L 8 4 L 16 4 L 23 8 L 23 16 L 16 20 L 8 20 L 1 16 L 1 8"></path>'],
label: '资源摘要',
rx: 11,
ry: 6,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
shape: 'hexagon',
size: [120, 60],
},
getLabel: (value) => {

4
io.sc.platform.core.frontend/template-project/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.326",
"version": "8.1.332",
"description": "前端核心包,用于快速构建前端的脚手架",
"private": false,
"keywords": [],
@ -105,7 +105,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.2.2",
"platform-core": "8.1.326",
"platform-core": "8.1.332",
"quasar": "2.16.11",
"svg-path-commander": "2.0.10",
"tailwindcss": "3.4.10",

506
io.sc.platform.core.frontend/template-project/src/views/likm/Drawer.vue

@ -1,88 +1,426 @@
<template>
<div class="w-[500px] h-[300px]">
<w-echarts
:option="{
title: {
left: 'center',
text: '资产余额',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
dataZoom: [
{
type: 'slider',
show: true, //
borderColor: '#2563eb', //
showDetail: false, // detail
startValue: 0, //
endValue: 10, //
filterMode: 'empty',
width: '80%', //
height: 8, //
left: 'center', //
zoomLoxk: true, //
handleSize: 0, //
bottom: 0, //
},
{
type: 'inside',
zoomOnMouseWheel: false, //
moveOnMouseMove: true, //
moveOnMouseWheel: true, //
},
],
xAxis: [
{
type: 'category',
data: [
'黄浦支行',
'徐汇支行',
'长宁支行',
'静安支行',
'普陀支行',
'虹口支行',
'杨浦支行',
'浦东支行',
'闵行支行',
'宝山支行',
'嘉定支行',
'金山支行',
'松江支行',
'青浦支行',
'奉贤支行',
'崇明支行',
],
axisTick: {
alignWithLabel: true,
},
},
],
yAxis: [
{
type: 'value',
name: '单位:万元',
},
],
series: [
{
type: 'bar',
barWidth: '10%',
data: [1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 600, 500, 400, 300, 200, 100],
},
],
}"
></w-echarts>
<div class="h-full">
<q-splitter v-model="state.splitterModel" class="h-full">
<template #before>
<div class="h-full pr-1">
<w-grid
ref="mainGridRef"
title="标准模型映射列表"
:data-url="Environment.apiContextPath('api/rwa/params/data/mapping/main')"
:sort-no="false"
dense
:checkbox-selection="false"
:query-form-cols-num="3"
:query-form-fields="[
{ name: 'mappingTable', label: '目标表', type: 'w-text' },
{ name: 'mappingFeild', label: '目标字段', type: 'w-text' },
{ name: 'remark', label: '备注', type: 'w-text' },
{ name: 'fromTable', label: '来源表', type: 'w-text' },
{ name: 'fromFeild', label: '来源表字段', type: 'w-text' },
{ name: 'mappingTp', label: '映射方式', type: 'w-select', options: optionsMappingType },
{
name: 'isValid',
label: '是否有效',
type: 'w-select',
options: [
{ label: '有效', value: '1' },
{ label: '无效', value: '0' },
],
},
]"
:columns="[
// { name: 'listId', label: 'ID' },
{ name: 'mappingTable', label: '目标表', width: 150 },
{ name: 'mappingFeild', label: '目标字段', width: 100 },
{ name: 'remark', label: '备注', width: 100 },
{ name: 'fromTable', label: '来源表', width: 150 },
{ name: 'fromFeild', label: '来源表字段', width: 100 },
{ name: 'mappingTp', label: '映射方式', format: Formater.dictionary(dictMappingType) },
{ name: 'expression', label: '算式运算表达式' },
{ name: 'cacheTable', label: '缓存取值表' },
{ name: 'cacheFeild', label: '缓存取值字段' },
{ name: 'isValid', label: '是否有效', align: 'center', format: isValidFormat },
{ name: 'sortNo', label: '字段排序' },
]"
:editor="{
dialog: {
width: '60%',
},
form: {
colsNum: 3,
fields: [
{
name: 'listId',
label: '所属清单ID',
requiredIf: true,
type: 'w-grid-select',
displayValue: 'id',
grid: {
title: '标准模型映射清单',
dataUrl: Environment.apiContextPath('/api/rwa/params/data/mapping/list'),
sortBy: ['sortNo'],
pageable: false,
columns: [
{ name: 'id', label: '清单ID' },
{ name: 'fromTable', label: '来源表名称' },
{ name: 'toTable', label: '目标表名称' },
{ name: 'sortNo', label: '字段排序' },
{ name: 'toTableCacheKey', label: '缓存关键字' },
{ name: 'csvAppendFlg', label: '是否在csv续写数据', format: csvAppendFormat },
],
onRowClick: (args) => {
setListId(args.row);
},
},
onUpdateValue: (args) => {
console.info('onUpdateValue=========', args);
},
},
{
name: 'isValid',
label: '是否有效',
requiredIf: true,
type: 'w-select',
defaultValue: '1',
options: [
{ label: '有效', value: '1' },
{ label: '无效', value: '0' },
],
},
{ name: 'sortNo', label: '字段排序', requiredIf: true, type: 'w-number' },
{
name: 'mappingTable',
label: '目标表',
requiredIf: true,
type: 'w-text',
readOnlyIf: () => {
return true;
},
},
{
name: 'mappingFeild',
label: '目标字段',
requiredIf: true,
type: 'w-select',
colSpan: 2,
clearable: true,
options: state.mainMappingFieldOptions,
},
{
name: 'fromTable',
label: '来源表',
requiredIf: true,
type: 'w-text',
readOnlyIf: () => {
return true;
},
},
{ name: 'fromFeild', label: '来源表字段', type: 'w-select', colSpan: 2, clearable: true, options: state.mainFromFieldOptions },
{ name: 'remark', label: '备注', type: 'w-text', colSpan: 2 },
{ name: 'mappingTp', label: '映射方式', requiredIf: true, type: 'w-select', options: optionsMappingType },
{ name: 'cacheTable', label: '缓存取值表', type: 'w-text' },
{ name: 'cacheFeild', label: '缓存取值字段', type: 'w-text', colSpan: 2 },
{ name: 'expression', label: '算式运算表达式', type: 'w-textarea', rows: 3, colSpan: 'full' },
],
},
}"
:toolbar-actions="[
'query',
'reset',
'separator',
[
{ name: 'operator', label: '操作', icon: 'build' },
'add',
{
extend: 'edit',
beforeClick: (args) => {
console.info('args=======', args.selected);
getFieldOptions(args.selected['mappingTable'], FieldFlagEnums.MAIN_MAPPING_FIELD);
getFieldOptions(args.selected['fromTable'], FieldFlagEnums.MAIN_FROM_FIELD);
return true;
},
},
'remove',
],
'separator',
]"
:sort-by="['mappingTable', 'sortNo']"
:pagination="{
rowsPerPage: 100,
}"
@row-click="
(args) => {
if (!Tools.isUndefinedOrNull(detailGridRef)) {
detailGridRef.setQueryCriteriaFieldValue('mappingId', args.row.id);
detailGridRef.refresh();
}
}
"
></w-grid>
</div>
</template>
<template #after>
<div class="h-full pl-1">
<w-grid
ref="detailGridRef"
title="标准模型映射明细"
:data-url="Environment.apiContextPath('api/rwa/params/data/mapping/detail')"
:auto-fetch-data="false"
:query-criteria="{
fieldName: 'mappingId',
operator: 'equals',
value: '',
}"
:sort-no="true"
dense
:pageable="false"
:checkbox-selection="false"
:columns="[
{ name: 'fromTable', label: '来源表名称', width: 150, hidden: true },
{ name: 'fromFeild', label: '来源表字段', width: 200 },
{ name: 'valGetType', label: '取值方式', format: Formater.dictionary(dictValueGetType) },
{ name: 'cacheTable', label: '缓存取值表' },
{ name: 'cacheFeild', label: '缓存取值字段' },
{ name: 'fromDataTp', label: '字段值类型', format: Formater.dictionary(dictDataType) },
{ name: 'matchTp', label: '值匹配方式', format: Formater.dictionary(dictMatchType) },
{ name: 'matchVal', label: '字段匹配目标值' },
{ name: 'startSign', label: '条件开始标识', format: Formater.dictionary(dictConditionStart) },
{ name: 'endSign', label: '条件结束标识', format: Formater.dictionary(dictConditionEnd) },
{ name: 'isReturn', label: '是否返回结果值', format: isReturnFormat, align: 'center' },
{ name: 'returnVal', label: '返回结果值' },
{ name: 'sortNo', label: '条件排序' },
]"
:editor="{
dialog: {
width: '60%',
},
form: {
colsNum: 2,
fields: [
{
name: 'fromFeild',
label: '来源表字段',
type: 'w-select',
options: state.mainFromFieldOptions,
useInput: true,
clearable: true,
onInputValue: (value) => {
if (
!Tools.isEmpty(value) &&
detailGridRef
.getEditorForm()
.getFields()
['fromFeild'].options.findIndex((item) => {
return item['value'] === value;
}) < 0
) {
detailGridRef.getEditorForm().getFields()['fromFeild'].options.push({ label: value, value });
detailGridRef.getEditorForm().setFieldValue('fromFeild', value);
}
},
},
{ name: 'valGetType', label: '取值方式', type: 'w-select', options: optionsValueGetType },
{ name: 'cacheTable', label: '缓存取值表', type: 'w-text' },
{ name: 'cacheFeild', label: '缓存取值字段', type: 'w-text' },
{ name: 'fromDataTp', label: '字段值类型', type: 'w-select', options: optionsDataType },
{ name: 'matchTp', label: '值匹配方式', type: 'w-select', options: optionsMatchType },
{ name: 'matchVal', label: '字段匹配目标值', type: 'w-text' },
{ name: 'startSign', label: '条件开始标识', type: 'w-select', options: optionsConditionStart },
{ name: 'endSign', label: '条件结束标识', type: 'w-select', options: optionsConditionEnd },
{
name: 'isReturn',
label: '是否返回结果值',
type: 'w-select',
options: [
{ label: '返回', value: '1' },
{ label: '不返回', value: '0' },
],
},
{ name: 'returnVal', label: '返回结果值', type: 'w-text' },
{ name: 'sortNo', label: '条件排序', type: 'w-number' },
],
},
}"
:toolbar-actions="[
{
extend: 'add',
enableIf: () => {
if (!Tools.isUndefinedOrNull(mainGridRef) && !Tools.isUndefinedOrNull(mainGridRef.getSelectedRow())) {
return true;
}
return false;
},
beforeClick: () => {
if (!Tools.isUndefinedOrNull(mainGridRef) && !Tools.isUndefinedOrNull(mainGridRef.getSelectedRow())) {
getFieldOptions(mainGridRef.getSelectedRow()['fromTable'], FieldFlagEnums.MAIN_FROM_FIELD);
}
return true;
},
},
'edit',
'remove',
'separator',
]"
:pagination="{
rowsPerPage: 100,
}"
:sort-by="['sortNo']"
@before-editor-data-submit="
(args) => {
args['data'] = mainGridRef.getSelectedRow()['id'];
args.callback(args['data']);
}
"
></w-grid>
</div>
</template>
</q-splitter>
</div>
</template>
<script setup lang="ts"></script>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { Environment, DictionaryTools, Options, Tools, Formater, axios } from '@/platform';
const dictMappingType = await DictionaryTools.fetch('RWA_P_DP_MAPPING_TYPE');
const dictValueGetType = await DictionaryTools.fetch('RWA_P_DP_VAL_GET_TYPE');
const dictDataType = await DictionaryTools.fetch('RWA_P_DP_DATA_TYPE');
const dictMatchType = await DictionaryTools.fetch('RWA_P_DP_MATCH_TYPE');
const dictConditionStart = await DictionaryTools.fetch('RWA_P_DP_CONDITION_S');
const dictConditionEnd = await DictionaryTools.fetch('RWA_P_DP_CONDITION_E');
const optionsMappingType = Options.dictionary(dictMappingType);
const optionsValueGetType = Options.dictionary(dictValueGetType);
const optionsDataType = Options.dictionary(dictDataType);
const optionsMatchType = Options.dictionary(dictMatchType);
const optionsConditionStart = Options.dictionary(dictConditionStart);
const optionsConditionEnd = Options.dictionary(dictConditionEnd);
const mainGridRef = ref();
const detailGridRef = ref();
/**
* 字段标识
*/
enum FieldFlagEnums {
MAIN_MAPPING_FIELD, //
MAIN_FROM_FIELD, //
}
const state = reactive({
baseTableListOptions: <any>[],
mainMappingFieldOptions: <any>[],
mainFromFieldOptions: <any>[],
splitterModel: 60,
});
const csvAppendFormat = (val, row) => {
if (!Tools.isEmpty(val) && val === '1') {
return {
componentType: 'q-chip',
attrs: {
square: true,
outline: true,
label: '续写',
color: 'green',
size: 'sm',
},
};
} else if (!Tools.isEmpty(val) && val === '0') {
return {
componentType: 'q-chip',
attrs: {
square: true,
outline: true,
label: '覆盖',
color: 'red',
size: 'sm',
},
};
}
return '';
};
const setListId = (listData) => {
mainGridRef.value.getEditorForm().setFieldValue('listId', listData['id']);
mainGridRef.value.getEditorForm().setFieldValue('mappingTable', listData['toTable']);
mainGridRef.value.getEditorForm().setFieldValue('fromTable', listData['fromTable']);
getFieldOptions(listData['toTable'], FieldFlagEnums.MAIN_MAPPING_FIELD);
getFieldOptions(listData['fromTable'], FieldFlagEnums.MAIN_FROM_FIELD);
mainGridRef.value.getEditorForm().setFieldValue('mappingFeild', null);
mainGridRef.value.getEditorForm().setFieldValue('fromFeild', null);
};
const getFieldOptions = (table: string, fieldFlag: FieldFlagEnums) => {
if (Tools.isEmpty(table)) {
return;
}
axios
.get(Environment.apiContextPath('api/template/config/columns/' + table))
.then((resp) => {
if (fieldFlag === FieldFlagEnums.MAIN_MAPPING_FIELD) {
state.mainMappingFieldOptions = [];
if (resp.data && resp.data.length > 0) {
resp.data.forEach((field) => {
state.mainMappingFieldOptions.push({
label: field['name'] + (!Tools.isEmpty(field['remarks']) ? '(' + field['remarks'] + ')' : ''),
value: field['name'],
});
});
}
} else if (fieldFlag === FieldFlagEnums.MAIN_FROM_FIELD) {
state.mainFromFieldOptions = [];
if (resp.data && resp.data.length > 0) {
resp.data.forEach((field) => {
state.mainFromFieldOptions.push({
label: field['name'] + (!Tools.isEmpty(field['remarks']) ? '(' + field['remarks'] + ')' : ''),
value: field['name'],
});
});
}
}
})
.catch((error) => {
console.info('error==========', error);
});
};
const isValidFormat = (val, row) => {
if (!Tools.isEmpty(val)) {
if (val === '1') {
return {
componentType: 'q-icon',
attrs: {
name: 'check_circle',
color: 'green',
size: 'xs',
},
};
} else if (val === '0') {
return {
componentType: 'q-icon',
attrs: {
name: 'cancel',
color: 'red',
size: 'xs',
},
};
} else {
return val;
}
}
return '';
};
const isReturnFormat = (val, row) => {
if (!Tools.isEmpty(val) && val === '1') {
return {
componentType: 'q-icon',
attrs: {
name: 'check_circle',
color: 'green',
size: 'xs',
},
};
}
return '';
};
</script>

3
io.sc.platform.core.frontend/template-project/src/views/likm/Grid.vue

@ -4,7 +4,8 @@
ref="gridRef"
title="示例列表"
:data-url="Environment.apiContextPath('/api/system/application')"
:toolbar-actions="['add', 'edit']"
:toolbar-actions="['add', 'edit', 'query']"
:query-form-fields="[{ name: 'code', label: '编码', type: 'w-text' }]"
:columns="[
{ name: 'code', label: '编码', type: 'w-text' },
{ name: 'name', label: '名称', type: 'w-text' },

10
io.sc.platform.core.frontend/template-project/src/views/likm/TreeGrid.vue

@ -37,6 +37,16 @@
{ name: 'order', label: '排序号' },
]"
:toolbar-actions="['expand']"
@row-click="
(args) => {
console.info('args1=======', args);
}
"
@row-db-click="
(args) => {
console.info('args2=======', args);
}
"
></w-grid>
</div>
</template>

27
io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue

@ -14,18 +14,21 @@ const resourceAbstractsRef = ref();
const edgeDefines = [
{
type: 'ConditionBranch',
type: 'EdgeConditionBranch',
fromVertexType: 'Condition',
toVertexType: null,
getLabel: (value) => {
return value.value || '';
if (value && value.value) {
return value.value;
}
return '';
},
getValue: (dom) => {
if (dom) {
return {
valueType: dom.getAttribute('valueType'),
value: dom.getAttribute('value'),
commands: dom.getAttribute('commands'),
valueType: dom.getAttribute('valueType') || '',
value: dom.getAttribute('value') || '',
commands: dom.getAttribute('commands') || '',
};
} else {
return {
@ -70,7 +73,7 @@ const edgeDefines = [
const vertexDefines = [
{
type: 'Start',
thumbnail: { shape: 'ellipse', label: $t('start'), rx: 8, ry: 8, strokeColor: 'black', strokeWidth: 1 },
thumbnail: { shape: 'ellipse', label: $t('start'), title: $t('success'), rx: 8, ry: 8, strokeColor: 'black', strokeWidth: 1 },
cell: {
shape: 'ellipse',
size: [50, 50],
@ -178,9 +181,17 @@ const vertexDefines = [
},
{
type: 'ResourceAbstract',
thumbnail: { shape: 'ellipse', label: '资源摘要', rx: 11, ry: 6, strokeColor: 'black', strokeWidth: 1 },
thumbnail: {
//shape: 'ellipse',
paths: ['<path fill="white" stroke-width="1" stroke="black" d="M 1 8 L 8 4 L 16 4 L 23 8 L 23 16 L 16 20 L 8 20 L 1 16 L 1 8"></path>'],
label: '资源摘要',
rx: 11,
ry: 6,
strokeColor: 'black',
strokeWidth: 1,
},
cell: {
shape: 'ellipse',
shape: 'hexagon',
size: [120, 60],
},
getLabel: (value) => {

Loading…
Cancel
Save