refactor: 流程模板end round 切换为end

统一判断流程结束
          流程节点类型统一用字符串表示
This commit is contained in:
yubaolee
2025-04-17 14:44:57 +08:00
parent d32ef5b78d
commit 831053aaf1
12 changed files with 138 additions and 114 deletions

View File

@@ -17,7 +17,7 @@
haveHead: false,
haveTool: true,
headLabel: true,
toolBtns: ["start round mix", "end round", "node", "join", "fork"],
toolBtns: ["start", "end", "node", "join", "fork"],
haveGroup: true,
useOperStack: true
};
@@ -78,14 +78,14 @@
var _node = data.nodes[j];
var _flag = false;
switch (_node.type) {
case "start round mix":
case "start":
startroundFlag++;
if (fromlines[_node.id] == undefined) {
layer.msg("开始节点无法流转到下一个节点");
return -1;
}
break;
case "end round":
case "end":
endroundFlag++;
if (tolines[_node.id] == undefined) {
layer.msg("无法流转到结束节点");
@@ -173,7 +173,7 @@
$.each(options.nodeData,
function (i, item) {
$("#" + item.id).css("background", "#999");
if (item.type == "start round mix") {
if (item.type == "start") {
$("#" + item.id).css("background", "#5cb85c");
} else {
if (item.id == options.activityId) {

View File

@@ -36,7 +36,7 @@
OpenNode: function (object) {
FlowDesignObject = object; //为NodeInfo窗口提供调用
if (object.type == 'start round mix' || object.type == 'end round') {
if (object.type == 'start' || object.type == 'end') {
return false;
}

View File

@@ -60,7 +60,7 @@
OpenNode: function (object) {
FlowDesignObject = object; //为NodeInfo窗口提供调用
if (object.type == 'start round mix' || object.type == 'end round') {
if (object.type == 'start' || object.type == 'end') {
layer.msg("开始节点与结束节点不能设置");
return false;
}

View File

@@ -16,7 +16,7 @@
OpenNode: function (object) {
FlowDesignObject = object; //为NodeInfo窗口提供调用
if (object.type == 'start round mix' || object.type == 'end round') {
if (object.type == 'start' || object.type == 'end') {
layer.msg("开始节点与结束节点不能设置");
return false;
}