beans_wev8.js
2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
var WorkflowBase = function () {
this.nodeBases = new Array();
this.nodeLinks = new Array();
this.groups = new Array();
this.getnNodeByNodeId = function (iid) {
for ( var i= 0; i < this.nodeBases.length; i++) {
var nb = this.nodeBases[i];
if (nb.id == iid) {
return nb;
}
}
return null;
};
};
var NodeBase = function () {
this.id = -1;
this.text = "";
this.isNew = false;
this.nodetype = 0;
this.nodeattribute = 0;
this.passNum = 0;
this.mustPassStep = 0;
this.shapetype = 0;
this.width = 0;
this.height = 0;
this.x = 0;
this.y = 0;
this.zIndex = 0;
this.nodeOptType = 0;
this.nodeOperatorName = "";
this.nodeViewNames = "";
this.nodeOperatorNames = "";
this.nodeNotOperatorNames = "";
this.fontColor = function () {
var color = "";
if (this.nodeOptType == 1) {
color = "#ffffff";
} else if (this.nodeOptType == 0) {
color = "#ffffff";
} else {
color = "#ffffff";
}
return color;
};
this.bgImage = function () {
var imgSrc = "";
if (this.nodetype == 0) {
if (this.nodeOptType == 1) {
imgSrc = "/workflow/design/bin-debug/assets/images/node/start2.png";
} else if (this.nodeOptType == 0) {
imgSrc = "/workflow/design/bin-debug/assets/images/node/start3.png";
} else {
imgSrc = "/workflow/design/bin-debug/assets/images/node/start.png";
}
} else {
if (this.nodeOptType == 1) {
imgSrc = "/workflow/design/bin-debug/assets/images/node/end2.png";
} else if (this.nodeOptType == 0) {
imgSrc = "/workflow/design/bin-debug/assets/images/node/end3.png";
} else {
imgSrc = "/workflow/design/bin-debug/assets/images/node/end.png";
}
}
return imgSrc;
}
this.getWHPoint = function () {
if (this.nodetype == 0 || this.nodetype == 3) {
return new Point(113, 113);
} else if (this.nodetype == 1) {
return new Point(110, 100);
} else {
return new Point(110, 70);
}
}
};
var NodeLink = function () {
this.id = 0;
this.text = "";
this.isNew = false;
this.from = 0;
this.to = 0;
this.remindMsg = "";
this.isBuildCode = false;
this.isreject = false;
this.ismustpass = 0;
this.directionfrom = 0;
this.directionto = 0;
this.startDirection = -90;
this.endDirection = 90;
this.points = "";
this.shapetype = "";
this.zIndex = 0;
this.fromRelX = 0;
this.fromRelY = 0;
this.toRelX = 0;
this.toRelY = 0;
this.hasRole = false;
this.hasCondition = false;
this.ispass = false;
};
var Group = function () {
this.id = 0;
this.workflowid = 0;
this.groupName = "";
this.direction = 0;
this.x = 0;
this.y = 0;
this.width = 0;
this.height = 0;
this.isNew = false;;
};
var Point = function(x, y) {
this.x = parseInt(x);
this.y = parseInt(y);
}