端到端流程 节点展开内外节点连线处理v2阶段性提交(保留记录)
This commit is contained in:
parent
19df749406
commit
1953a9aa1a
Binary file not shown.
@ -7,6 +7,8 @@ import com.actionsoft.apps.coe.method.process.subprocess.graph.util.LinkerPointC
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -173,57 +175,90 @@ public class ExpandOrCloseShapeLinkerConvertHandle {
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对闭合的节点相关连线 后置处理
|
||||
* 根据节点连线保存记录信息 进行连线替换
|
||||
*/
|
||||
public void closeShapeLinkerConvertHandle(){
|
||||
// JSONObject subProcessNode = definitionHandle.getShapeByKey(shapeId);
|
||||
// JSONObject extendAttr = subProcessNode.getJSONObject(SubProcessConst.EXTEND_ATTR);
|
||||
// JSONArray linkers = definitionHandle.getLinkers();
|
||||
// // 当前节点的前置节点
|
||||
// JSONArray leadNodeArr = extendAttr.getJSONArray("leadNodeArr");
|
||||
// if (leadNodeArr.size() > 0){
|
||||
// for (Object o : leadNodeArr) {
|
||||
// String leadNodeId = (String) o;
|
||||
// Set<String> linkerIds = linkers.stream()
|
||||
// .filter(l -> ((JSONObject) l).getJSONObject("from").getString("id").equals(leadNodeId) && ((JSONObject) l).getJSONObject("to").getString("id").equals(shapeId))
|
||||
// .map(l -> ((JSONObject) l).getString("id"))
|
||||
// .collect(Collectors.toSet());
|
||||
// if (linkerIds.size() > 0){
|
||||
// for (String linkerId : linkerIds) {
|
||||
// definitionHandle.removeShape(linkerId);
|
||||
// }
|
||||
// }
|
||||
// // 生成连线
|
||||
// double[] fromBounding = new double[]{definitionHandle.getShapeX(leadNodeId), definitionHandle.getShapeY(leadNodeId), definitionHandle.getShapeW(leadNodeId), definitionHandle.getShapeH(leadNodeId)};
|
||||
// double[] toBounding = new double[]{definitionHandle.getShapeX(shapeId), definitionHandle.getShapeY(shapeId), definitionHandle.getShapeW(shapeId), definitionHandle.getShapeH(shapeId)};
|
||||
// JSONObject linker = linkerPointCalculationHandle.toAssembleLinker(direction, leadNodeId, shapeId, fromBounding, toBounding);
|
||||
//
|
||||
// linker.put("elementType", ElementType.OUTER_LINKER.name());
|
||||
// definitionHandle.addEle(linker.getString("id"), linker);
|
||||
// }
|
||||
// }
|
||||
// // 当前节点的后置节点
|
||||
// JSONArray rearNodeArr = extendAttr.getJSONArray("rearNodeArr");
|
||||
// if (rearNodeArr.size() > 0){
|
||||
// for (Object o : rearNodeArr) {
|
||||
// String rearNodeId = (String) o;
|
||||
// Set<String> linkerIds = linkers.stream()
|
||||
// .filter(l -> ((JSONObject) l).getJSONObject("from").getString("id").equals(shapeId) && ((JSONObject) l).getJSONObject("to").getString("id").equals(rearNodeId))
|
||||
// .map(l -> ((JSONObject) l).getString("id"))
|
||||
// .collect(Collectors.toSet());
|
||||
// if (linkerIds.size() > 0){
|
||||
// for (String linkerId : linkerIds) {
|
||||
// definitionHandle.removeShape(linkerId);
|
||||
// }
|
||||
// }
|
||||
// // 生成连线
|
||||
// double[] fromBounding = new double[]{definitionHandle.getShapeX(shapeId), definitionHandle.getShapeY(shapeId), definitionHandle.getShapeW(shapeId), definitionHandle.getShapeH(shapeId)};
|
||||
// double[] toBounding = new double[]{definitionHandle.getShapeX(rearNodeId), definitionHandle.getShapeY(rearNodeId), definitionHandle.getShapeW(rearNodeId), definitionHandle.getShapeH(rearNodeId)};
|
||||
// JSONObject linker = linkerPointCalculationHandle.toAssembleLinker(direction, shapeId, rearNodeId, fromBounding, toBounding);
|
||||
//
|
||||
// linker.put("elementType", ElementType.OUTER_LINKER.name());
|
||||
// definitionHandle.addEle(linker.getString("id"), linker);
|
||||
// }
|
||||
// }
|
||||
public void shapeLinkerReplaceHandle(){
|
||||
JSONObject nodeLinkerRecord = definitionHandle.getNodeLinkerRecord();
|
||||
JSONObject elements = definitionHandle.getElements();
|
||||
List<JSONObject> nodeList = elements.keySet()
|
||||
.stream().filter(key -> "OUTER_NODE".equals(elements.getJSONObject(key).getString("elementType")) || "SCOPE_NODE".equals(elements.getJSONObject(key).getString("elementType")))
|
||||
.map(key -> elements.getJSONObject(key))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (JSONObject shape : nodeList) {
|
||||
String leadShapeId = shape.getString("id");
|
||||
JSONObject nodeLinkerInfo = nodeLinkerRecord.getJSONObject(leadShapeId);
|
||||
JSONObject status = null;
|
||||
String fromNodeType = "close";
|
||||
if (definitionHandle.getElementTypeByKey(leadShapeId).name().equals(ElementType.OUTER_NODE.name())){ // 当前节点是闭合的
|
||||
if (!nodeLinkerInfo.containsKey("close")){
|
||||
continue; // 不处理
|
||||
}
|
||||
status = nodeLinkerInfo.getJSONObject("close");
|
||||
}else {
|
||||
if (!nodeLinkerInfo.containsKey("expand")){
|
||||
continue; // 不处理
|
||||
}
|
||||
status = nodeLinkerInfo.getJSONObject("expand");
|
||||
fromNodeType = "expand";
|
||||
}
|
||||
JSONObject leadNodeProps = shape.getJSONObject("props");
|
||||
JSONArray rearLinkerInfo = status.getJSONArray("rearLinkerInfo");
|
||||
if (rearLinkerInfo.size() > 0){
|
||||
List<JSONObject> linkerList = new ArrayList<>();
|
||||
for (Object o : rearLinkerInfo) {
|
||||
JSONObject linker = (JSONObject) o;
|
||||
String rearNodeId = linker.getString("rearNodeId");
|
||||
String hisFromNodeType = linker.getString("fromNodeType");
|
||||
String hisToNodeType = linker.getString("toNodeType");
|
||||
String toNodeType = "close";
|
||||
if (!definitionHandle.getElementTypeByKey(rearNodeId).name().equals(ElementType.OUTER_NODE.name())){
|
||||
toNodeType = "expand";
|
||||
}
|
||||
JSONObject rearNodeProps = definitionHandle.getShapeByProps(rearNodeId);
|
||||
|
||||
JSONObject hisLeadNodeProps = linker.getJSONObject("leadNodeProps");
|
||||
JSONObject hisRearNodeProps = linker.getJSONObject("rearNodeProps");
|
||||
|
||||
if (leadNodeProps.getDouble("x").doubleValue() == hisLeadNodeProps.getDouble("x").doubleValue()
|
||||
&& leadNodeProps.getDouble("y").doubleValue() == hisLeadNodeProps.getDouble("y").doubleValue()
|
||||
&& leadNodeProps.getDouble("w").doubleValue() == hisLeadNodeProps.getDouble("w").doubleValue()
|
||||
&& leadNodeProps.getDouble("h").doubleValue() == hisLeadNodeProps.getDouble("h").doubleValue()
|
||||
&& rearNodeProps.getDouble("x").doubleValue() == hisRearNodeProps.getDouble("x").doubleValue()
|
||||
&& rearNodeProps.getDouble("y").doubleValue() == hisRearNodeProps.getDouble("y").doubleValue()
|
||||
&& rearNodeProps.getDouble("w").doubleValue() == hisRearNodeProps.getDouble("w").doubleValue()
|
||||
&& rearNodeProps.getDouble("h").doubleValue() == hisRearNodeProps.getDouble("h").doubleValue()
|
||||
&& fromNodeType.equals(hisFromNodeType) && toNodeType.equals(hisToNodeType)){
|
||||
|
||||
|
||||
JSONObject tempLinker = linker.getJSONObject("linker");
|
||||
linkerList.add(tempLinker);
|
||||
|
||||
}
|
||||
}
|
||||
if (linkerList.size() > 0){
|
||||
// 删除当前节点的后置连线
|
||||
JSONArray linkers = definitionHandle.getLinkers();
|
||||
List<String> toDeleteLinkerId = linkers.stream().filter(l -> {
|
||||
boolean flag = false;
|
||||
JSONObject link = (JSONObject) l;
|
||||
String fromId = link.getJSONObject("from").getString("id");
|
||||
JSONObject fromNode = definitionHandle.getShapeByKey(fromId);
|
||||
if ((fromNode.getString("elementType").equals(ElementType.OUTER_NODE.name()) || fromNode.getString("elementType").equals(ElementType.SCOPE_NODE.name())) && fromId.equals(leadShapeId)) {
|
||||
flag = true;
|
||||
} else if (fromNode.getString("elementType").equals(ElementType.INNER_NODE.name()) && fromNode.getString("scopeShapeId").equals(leadShapeId) && link.getString("elementType").equals(ElementType.CROSS_LINKER.name())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(l -> ((JSONObject) l).getString("id")).collect(Collectors.toList());
|
||||
for (String id : toDeleteLinkerId) {
|
||||
definitionHandle.removeShape(id);
|
||||
}
|
||||
for (JSONObject tempLinker : linkerList) {
|
||||
definitionHandle.addEle(tempLinker.getString("id"), tempLinker);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,6 +87,8 @@ public class GraphNodeCloseHandle {
|
||||
|
||||
linkerConvertHandle.scopeShapeLinkerHandle();
|
||||
|
||||
linkerConvertHandle.shapeLinkerReplaceHandle();
|
||||
|
||||
return definitionHandle.getDefine().toJSONString();
|
||||
}
|
||||
|
||||
|
||||
@ -140,6 +140,8 @@ public class GraphNodeExpandHandle {
|
||||
|
||||
linkerConvertHandle.scopeShapeLinkerHandle();
|
||||
|
||||
linkerConvertHandle.shapeLinkerReplaceHandle();
|
||||
|
||||
return definitionHandle.getDefine().toJSONString();
|
||||
}
|
||||
|
||||
|
||||
@ -162,4 +162,11 @@ public abstract class AbstractDefinitionHandle {
|
||||
*/
|
||||
public abstract List<String> getScopeNodeIds() throws AWSException;
|
||||
|
||||
/**
|
||||
* 获取节点连线信息维护记录
|
||||
* @return
|
||||
* @throws AWSException
|
||||
*/
|
||||
public abstract JSONObject getNodeLinkerRecord() throws AWSException;
|
||||
|
||||
}
|
||||
|
||||
@ -240,4 +240,16 @@ public class DefinitionThreadSafe extends AbstractDefinitionHandle {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getNodeLinkerRecord() throws AWSException {
|
||||
lock.lock();
|
||||
try {
|
||||
if (!getDefine().containsKey("nodeLinkerRecord"))
|
||||
throw new AWSException("节点连线记录信息未找到!");
|
||||
return getDefine().getJSONObject("nodeLinkerRecord");
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,4 +142,11 @@ public class DefinitionThreadUnSafe extends AbstractDefinitionHandle {
|
||||
List<String> scopeShapeIds = elements.keySet().stream().filter(key -> elements.getJSONObject(key).getString("elementType").equals(ElementType.SCOPE_NODE.name())).collect(Collectors.toList());
|
||||
return scopeShapeIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getNodeLinkerRecord() throws AWSException {
|
||||
if (!getDefine().containsKey("nodeLinkerRecord"))
|
||||
throw new AWSException("节点连线记录信息未找到!");
|
||||
return getDefine().getJSONObject("nodeLinkerRecord");
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -6134,9 +6134,29 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
for (JSONObject shape : nodeList) {
|
||||
String shapeId = shape.getString("id");
|
||||
JSONObject status = new JSONObject();
|
||||
if (nodeLinkerRecord.containsKey(shapeId)){
|
||||
status = nodeLinkerRecord.getJSONObject(shapeId);
|
||||
}
|
||||
JSONObject recordContent = new JSONObject();
|
||||
if ("OUTER_NODE".equals(shape.getString("elementType"))){ // 当前状态为闭合
|
||||
if (status.containsKey("close")){
|
||||
recordContent = status.getJSONObject("close");
|
||||
}
|
||||
}else { // 当前状态为展开
|
||||
if (status.containsKey("expand")){
|
||||
recordContent = status.getJSONObject("expand");
|
||||
}
|
||||
}
|
||||
|
||||
JSONArray leadLinkerInfo = new JSONArray(); // 前置连线信息
|
||||
if (recordContent.containsKey("leadLinkerInfo")){
|
||||
leadLinkerInfo = recordContent.getJSONArray("leadLinkerInfo");
|
||||
}
|
||||
JSONArray rearLinkerInfo = new JSONArray(); // 后置连线信息
|
||||
if (recordContent.containsKey("rearLinkerInfo")){
|
||||
rearLinkerInfo = recordContent.getJSONArray("rearLinkerInfo");
|
||||
}
|
||||
|
||||
for (JSONObject linker : linkers) {
|
||||
JSONObject from = linker.getJSONObject("from");
|
||||
@ -6148,20 +6168,96 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
linkerInfo.put("linker", JSONObject.parse(linker.toString()));
|
||||
linkerInfo.put("fromNodeType", fromNode.getString("elementType").equals("OUTER_NODE") ? "close" : "expand");
|
||||
linkerInfo.put("toNodeType", toNode.getString("elementType").equals("OUTER_NODE") ? "close" : "expand");
|
||||
linkerInfo.put("actualLeadNodeId", fromNode.getString("id"));
|
||||
linkerInfo.put("actualRearNodeId", toNode.getString("id"));
|
||||
if ("OUTER_NODE".equals(shape.getString("elementType"))){ // 当前节点闭合
|
||||
if (shapeId.equals(to.getString("id"))){ // 当前节点的前置连线信息
|
||||
linkerInfo.put("leadNodeId", "OUTER_NODE".equals(fromNode.getString("elementType")) ? from.getString("id") : fromNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("leadNodeId", "OUTER_NODE".equals(fromNode.getString("elementType")) || "SCOPE_NODE".equals(fromNode.getString("elementType")) ? from.getString("id") : fromNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("rearNodeId", shapeId);
|
||||
JSONObject fromProps = null;
|
||||
if (fromNode.getString("elementType").equals("OUTER_NODE") || fromNode.getString("elementType").equals("SCOPE_NODE")){
|
||||
fromProps = fromNode.getJSONObject("props");
|
||||
}else {
|
||||
fromProps = elements.getJSONObject(fromNode.getString("scopeShapeId")).getJSONObject("props");
|
||||
}
|
||||
linkerInfo.put("leadNodeProps", JSONObject.parse(fromProps.toString()));
|
||||
linkerInfo.put("rearNodeProps", JSONObject.parse(shape.getJSONObject("props").toString()));
|
||||
|
||||
// if (leadLinkerInfo.size() > 0){
|
||||
// leadLinkerInfo = leadLinkerInfo.stream()
|
||||
// .filter(o -> !(((JSONObject)o).getString("fromNodeType").equals(linkerInfo.getString("fromNodeType"))
|
||||
// && ((JSONObject)o).getString("toNodeType").equals(linkerInfo.getString("toNodeType"))
|
||||
// && ((JSONObject)o).getString("actualLeadNodeId").equals(fromNode.getString("id"))
|
||||
// && ((JSONObject)o).getString("actualRearNodeId").equals(shapeId)
|
||||
// && ((JSONObject)o).getString("leadNodeId").equals(linkerInfo.getString("leadNodeId"))
|
||||
// && ((JSONObject)o).getString("rearNodeId").equals(linkerInfo.getString("rearNodeId"))))
|
||||
// .map(o -> ((JSONObject)o)).collect(Collectors.toCollection(JSONArray::new));
|
||||
// }
|
||||
leadLinkerInfo.add(linkerInfo);
|
||||
}else if (shapeId.equals(from.getString("id"))){ // 当前节点的后置连线信息
|
||||
linkerInfo.put("rearNodeId", "OUTER_NODE".equals(toNode.getString("elementType")) ? to.getString("id") : toNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("leadNodeId", shapeId);
|
||||
linkerInfo.put("rearNodeId", "OUTER_NODE".equals(toNode.getString("elementType")) || "SCOPE_NODE".equals(toNode.getString("elementType")) ? to.getString("id") : toNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("leadNodeProps", JSONObject.parse(shape.getJSONObject("props").toString()));
|
||||
JSONObject toProps = null;
|
||||
if (toNode.getString("elementType").equals("OUTER_NODE") || toNode.getString("elementType").equals("SCOPE_NODE")){
|
||||
toProps = toNode.getJSONObject("props");
|
||||
}else {
|
||||
toProps = elements.getJSONObject(toNode.getString("scopeShapeId")).getJSONObject("props");
|
||||
}
|
||||
linkerInfo.put("rearNodeProps", JSONObject.parse(toProps.toString()));
|
||||
// if (rearLinkerInfo.size() > 0){
|
||||
// rearLinkerInfo = rearLinkerInfo.stream()
|
||||
// .filter(o -> !(((JSONObject)o).getString("fromNodeType").equals(linkerInfo.getString("fromNodeType"))
|
||||
// && ((JSONObject)o).getString("toNodeType").equals(linkerInfo.getString("toNodeType"))
|
||||
// && ((JSONObject)o).getString("actualLeadNodeId").equals(shapeId)
|
||||
// && ((JSONObject)o).getString("actualRearNodeId").equals(toNode.getString("id"))
|
||||
// && ((JSONObject)o).getString("leadNodeId").equals(linkerInfo.getString("leadNodeId"))
|
||||
// && ((JSONObject)o).getString("rearNodeId").equals(linkerInfo.getString("rearNodeId")))).map(o -> ((JSONObject)o)).collect(Collectors.toCollection(JSONArray::new));
|
||||
// }
|
||||
rearLinkerInfo.add(linkerInfo);
|
||||
}
|
||||
}else {
|
||||
if (shapeId.equals(toNode.getString("scopeShapeId"))){
|
||||
linkerInfo.put("leadNodeId", "OUTER_NODE".equals(fromNode.getString("elementType")) ? from.getString("id") : fromNode.getString("scopeShapeId"));
|
||||
if (shapeId.equals("INNER_NODE".equals(toNode.getString("elementType")) ? toNode.getString("scopeShapeId") : toNode.getString("id"))){
|
||||
linkerInfo.put("leadNodeId", "OUTER_NODE".equals(fromNode.getString("elementType")) || "SCOPE_NODE".equals(fromNode.getString("elementType")) ? from.getString("id") : fromNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("rearNodeId", shapeId);
|
||||
JSONObject fromProps = null;
|
||||
if (fromNode.getString("elementType").equals("OUTER_NODE") || fromNode.getString("elementType").equals("SCOPE_NODE")){
|
||||
fromProps = fromNode.getJSONObject("props");
|
||||
}else {
|
||||
fromProps = elements.getJSONObject(fromNode.getString("scopeShapeId")).getJSONObject("props");
|
||||
}
|
||||
linkerInfo.put("leadNodeProps", JSONObject.parse(fromProps.toString()));
|
||||
linkerInfo.put("rearNodeProps", JSONObject.parse(shape.getJSONObject("props").toString()));
|
||||
// if (leadLinkerInfo.size() > 0){
|
||||
// leadLinkerInfo = leadLinkerInfo.stream()
|
||||
// .filter(o -> !(((JSONObject)o).getString("fromNodeType").equals(linkerInfo.getString("fromNodeType"))
|
||||
// && ((JSONObject)o).getString("toNodeType").equals(linkerInfo.getString("toNodeType"))
|
||||
// && ((JSONObject)o).getString("actualLeadNodeId").equals(fromNode.getString("id"))
|
||||
// && ((JSONObject)o).getString("actualRearNodeId").equals(shapeId)
|
||||
// && ((JSONObject)o).getString("leadNodeId").equals(linkerInfo.getString("leadNodeId"))
|
||||
// && ((JSONObject)o).getString("rearNodeId").equals(linkerInfo.getString("rearNodeId")))).map(o -> ((JSONObject)o)).collect(Collectors.toCollection(JSONArray::new));
|
||||
// }
|
||||
leadLinkerInfo.add(linkerInfo);
|
||||
}else if (shapeId.equals(fromNode.getString("scopeShapeId"))){
|
||||
linkerInfo.put("rearNodeId", "OUTER_NODE".equals(toNode.getString("elementType")) ? to.getString("id") : toNode.getString("scopeShapeId"));
|
||||
}else if (shapeId.equals("INNER_NODE".equals(fromNode.getString("elementType")) ? fromNode.getString("scopeShapeId") : fromNode.getString("id"))){
|
||||
linkerInfo.put("leadNodeId", shapeId);
|
||||
linkerInfo.put("rearNodeId", "OUTER_NODE".equals(toNode.getString("elementType")) || "SCOPE_NODE".equals(toNode.getString("elementType")) ? to.getString("id") : toNode.getString("scopeShapeId"));
|
||||
linkerInfo.put("leadNodeProps", JSONObject.parse(shape.getJSONObject("props").toString()));
|
||||
JSONObject toProps = null;
|
||||
if (toNode.getString("elementType").equals("OUTER_NODE") || toNode.getString("elementType").equals("SCOPE_NODE")){
|
||||
toProps = toNode.getJSONObject("props");
|
||||
}else {
|
||||
toProps = elements.getJSONObject(toNode.getString("scopeShapeId")).getJSONObject("props");
|
||||
}
|
||||
linkerInfo.put("rearNodeProps", JSONObject.parse(toProps.toString()));
|
||||
// if (rearLinkerInfo.size() > 0){
|
||||
// rearLinkerInfo = rearLinkerInfo.stream()
|
||||
// .filter(o -> !(((JSONObject)o).getString("fromNodeType").equals(linkerInfo.getString("fromNodeType"))
|
||||
// && ((JSONObject)o).getString("toNodeType").equals(linkerInfo.getString("toNodeType"))
|
||||
// && ((JSONObject)o).getString("actualLeadNodeId").equals(shapeId)
|
||||
// && ((JSONObject)o).getString("actualRearNodeId").equals(toNode.getString("id"))
|
||||
// && ((JSONObject)o).getString("leadNodeId").equals(linkerInfo.getString("leadNodeId"))
|
||||
// && ((JSONObject)o).getString("rearNodeId").equals(linkerInfo.getString("rearNodeId")))).map(o -> ((JSONObject)o)).collect(Collectors.toCollection(JSONArray::new));
|
||||
// }
|
||||
rearLinkerInfo.add(linkerInfo);
|
||||
}
|
||||
}
|
||||
@ -6169,11 +6265,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
recordContent.put("leadLinkerInfo", leadLinkerInfo);
|
||||
recordContent.put("rearLinkerInfo", rearLinkerInfo);
|
||||
|
||||
|
||||
JSONObject status = new JSONObject();
|
||||
if (nodeLinkerRecord.containsKey(shapeId)){
|
||||
status = nodeLinkerRecord.getJSONObject(shapeId);
|
||||
}
|
||||
if ("OUTER_NODE".equals(shape.getString("elementType"))){ // 当前状态为闭合
|
||||
status.put("close", recordContent);
|
||||
}else { // 当前状态为展开
|
||||
|
||||
@ -81,6 +81,9 @@ $(function() {
|
||||
function initSaveFun() {
|
||||
Dock.showView('');
|
||||
var obj = Model.define;
|
||||
if (!obj.nodeLinkerRecord){
|
||||
obj.nodeLinkerRecord = definition.nodeLinkerRecord
|
||||
}
|
||||
var tempMessageArr = {};
|
||||
// 保存前校验,过滤可能出现的错误数据
|
||||
for (var messageId in messageArrayForSave) {
|
||||
@ -143,7 +146,7 @@ $(function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
Model.define.nodeLinkerRecord = msg.data.define.nodeLinkerRecord;
|
||||
definition.nodeLinkerRecord = msg.data.define.nodeLinkerRecord;
|
||||
$.simpleAlert("保存成功", "ok");
|
||||
//保存结束时间戳
|
||||
//var saveEndTime = new Date().getTime();
|
||||
|
||||
@ -144,6 +144,7 @@ class SubProcess {
|
||||
if (window.subProcess.checkLayoutIsReasonable()){
|
||||
return;
|
||||
}
|
||||
param.Model.define.nodeLinkerRecord = definition.nodeLinkerRecord;
|
||||
// 2、传递当前模型文件ID、子流程节点ID
|
||||
awsui.ajax.request({
|
||||
url: './jd',
|
||||
@ -191,6 +192,7 @@ class SubProcess {
|
||||
return;
|
||||
}
|
||||
let param = event.data;
|
||||
param.Model.define.nodeLinkerRecord = definition.nodeLinkerRecord;
|
||||
awsui.ajax.request({
|
||||
url: './jd',
|
||||
method: 'POST',
|
||||
@ -224,6 +226,7 @@ class SubProcess {
|
||||
return;
|
||||
}
|
||||
// console.log('oneClickExpand',this);
|
||||
this.Model.define.nodeLinkerRecord = definition.nodeLinkerRecord;
|
||||
awsui.ajax.request({
|
||||
url: './jd',
|
||||
method: 'POST',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user