@web-utils/component 3.4.2 → 3.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/element-dialog/index.mjs +12 -10
- package/emulate-form/index.mjs +25 -0
- package/flow-designer/index.mjs +929 -900
- package/flow-designer/style.css +1 -1
- package/index.mjs +453 -450
- package/package.json +1 -1
- package/web-types.json +5 -1
package/flow-designer/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var Se = Object.defineProperty, Te = Object.defineProperties;
|
|
2
|
+
var Ce = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var te = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ie = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ne = (i, e, t) => e in i ? Se(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, d = (i, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, T = (
|
|
13
|
-
var c = (
|
|
7
|
+
Ie.call(e, t) && ne(i, t, e[t]);
|
|
8
|
+
if (te)
|
|
9
|
+
for (var t of te(e))
|
|
10
|
+
ke.call(e, t) && ne(i, t, e[t]);
|
|
11
|
+
return i;
|
|
12
|
+
}, T = (i, e) => Te(i, Ce(e));
|
|
13
|
+
var c = (i, e, t) => new Promise((n, s) => {
|
|
14
14
|
var a = (p) => {
|
|
15
15
|
try {
|
|
16
16
|
o(t.next(p));
|
|
@@ -23,43 +23,44 @@ var c = (n, e, t) => new Promise((i, s) => {
|
|
|
23
23
|
} catch (E) {
|
|
24
24
|
s(E);
|
|
25
25
|
}
|
|
26
|
-
}, o = (p) => p.done ?
|
|
27
|
-
o((t = t.apply(
|
|
26
|
+
}, o = (p) => p.done ? n(p.value) : Promise.resolve(p.value).then(a, r);
|
|
27
|
+
o((t = t.apply(i, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { assign as y, isArray as
|
|
30
|
-
import { is as
|
|
31
|
-
import { isExpanded as
|
|
32
|
-
import { isAny as
|
|
33
|
-
import { getChildLanes as
|
|
34
|
-
import { hasPrimaryModifier as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import { getMid as
|
|
38
|
-
import { fastClone as
|
|
29
|
+
import { assign as y, isArray as _e, forEach as Ae, isObject as we, isFunction as $e, some as _ } from "min-dash";
|
|
30
|
+
import { is as V } from "bpmn-js/lib/util/ModelUtil";
|
|
31
|
+
import { isExpanded as Le, isEventSubProcess as Oe } from "bpmn-js/lib/util/DiUtil";
|
|
32
|
+
import { isAny as G } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
|
|
33
|
+
import { getChildLanes as Pe } from "bpmn-js/lib/features/modeling/util/LaneUtil";
|
|
34
|
+
import { hasPrimaryModifier as Me } from "diagram-js/lib/util/Mouse";
|
|
35
|
+
import ue from "bpmn-js/lib/features/palette/PaletteProvider";
|
|
36
|
+
import J from "diagram-js/lib/features/auto-place/AutoPlace";
|
|
37
|
+
import { getMid as De, asTRBL as Be } from "diagram-js/lib/layout/LayoutUtil";
|
|
38
|
+
import { fastClone as v, isBlank as Re, capitalize as Ve, isArray as ie } from "@web-utils/core";
|
|
39
39
|
import { n as h } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
40
|
+
import { markRaw as N } from "vue";
|
|
40
41
|
import "bpmn-js/dist/assets/bpmn-js.css";
|
|
41
42
|
import "bpmn-js/dist/assets/diagram-js.css";
|
|
42
43
|
import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
|
|
43
44
|
import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
45
|
+
import je from "bpmn-js/lib/Modeler";
|
|
46
|
+
import ze from "bpmn-js/lib/features/drilldown/index.js";
|
|
47
|
+
import Ne from "bpmn-js-token-simulation";
|
|
48
|
+
import se from "x2js";
|
|
49
|
+
import de from "highlight.js/lib/core";
|
|
50
|
+
import Ue from "highlight.js/lib/languages/xml";
|
|
51
|
+
import Ge from "highlight.js/lib/languages/json";
|
|
52
|
+
import qe from "../highlight-j-s/index.mjs";
|
|
52
53
|
import "../highlight-j-s/style.css";
|
|
53
|
-
function
|
|
54
|
-
|
|
54
|
+
function Z(i, e, t, n, s, a, r, o, p, E, m, l, u) {
|
|
55
|
+
i = i || {}, n.registerProvider(this), this._contextPad = n, this._modeling = s, this._elementFactory = a, this._connect = r, this._create = o, this._popupMenu = p, this._canvas = E, this._rules = m, this._translate = l, i.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(F) {
|
|
55
56
|
const C = F.context.shape;
|
|
56
|
-
if (!
|
|
57
|
+
if (!Me(F) || !n.isOpen(C))
|
|
57
58
|
return;
|
|
58
|
-
const f =
|
|
59
|
+
const f = n.getEntries(C);
|
|
59
60
|
f.replace && f.replace.action.click(F, C);
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
Z.$inject = [
|
|
63
64
|
"config.contextPad",
|
|
64
65
|
"injector",
|
|
65
66
|
"eventBus",
|
|
@@ -74,64 +75,64 @@ J.$inject = [
|
|
|
74
75
|
"translate",
|
|
75
76
|
"elementRegistry"
|
|
76
77
|
];
|
|
77
|
-
|
|
78
|
-
const e = this._contextPad, t = this._modeling,
|
|
79
|
-
if (
|
|
78
|
+
Z.prototype.getContextPadEntries = function(i) {
|
|
79
|
+
const e = this._contextPad, t = this._modeling, n = this._elementFactory, s = this._connect, a = this._create, r = this._popupMenu, o = this._canvas, p = this._rules, E = this._autoPlace, m = this._translate, l = {};
|
|
80
|
+
if (i.type === "label")
|
|
80
81
|
return l;
|
|
81
|
-
const u =
|
|
82
|
+
const u = i.businessObject;
|
|
82
83
|
function F(b, S) {
|
|
83
84
|
s.start(b, S);
|
|
84
85
|
}
|
|
85
86
|
function O() {
|
|
86
|
-
t.removeElements([
|
|
87
|
+
t.removeElements([i]);
|
|
87
88
|
}
|
|
88
89
|
function C(b) {
|
|
89
|
-
const
|
|
90
|
+
const g = o.getContainer(), w = e.getPad(b).html, $ = g.getBoundingClientRect(), M = w.getBoundingClientRect(), D = M.top - $.top;
|
|
90
91
|
return {
|
|
91
92
|
x: M.left - $.left,
|
|
92
93
|
y: D + M.height + 5
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
|
-
function f(b, S,
|
|
96
|
-
typeof
|
|
96
|
+
function f(b, S, g, w) {
|
|
97
|
+
typeof g != "string" && (w = g, g = m("Append {type}", { type: b.replace(/^bpmn:/, "") }));
|
|
97
98
|
function $(D, B) {
|
|
98
|
-
const
|
|
99
|
-
a.start(D,
|
|
99
|
+
const R = n.createShape(y({ type: b }, w));
|
|
100
|
+
a.start(D, R, {
|
|
100
101
|
source: B
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
return {
|
|
104
105
|
group: "model",
|
|
105
106
|
className: S,
|
|
106
|
-
title:
|
|
107
|
+
title: g,
|
|
107
108
|
action: {
|
|
108
109
|
dragstart: $,
|
|
109
110
|
click: E ? function(D, B) {
|
|
110
|
-
const
|
|
111
|
-
E.append(B,
|
|
111
|
+
const R = n.createShape(y({ type: b }, w));
|
|
112
|
+
E.append(B, R);
|
|
112
113
|
} : $
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
117
|
function P(b) {
|
|
117
|
-
return function(S,
|
|
118
|
-
t.splitLane(
|
|
118
|
+
return function(S, g) {
|
|
119
|
+
t.splitLane(g, b), e.open(g, !0);
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
|
-
if (
|
|
122
|
-
const b =
|
|
122
|
+
if (G(u, ["bpmn:Lane", "bpmn:Participant"]) && Le(u)) {
|
|
123
|
+
const b = Pe(i);
|
|
123
124
|
y(l, {
|
|
124
125
|
"lane-insert-above": {
|
|
125
126
|
group: "lane-insert-above",
|
|
126
127
|
className: "bpmn-icon-lane-insert-above",
|
|
127
128
|
title: m("Add Lane above"),
|
|
128
129
|
action: {
|
|
129
|
-
click: function(S,
|
|
130
|
-
t.addLane(
|
|
130
|
+
click: function(S, g) {
|
|
131
|
+
t.addLane(g, "top");
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
}), b.length < 2 && (
|
|
135
|
+
}), b.length < 2 && (i.height >= 120 && y(l, {
|
|
135
136
|
"lane-divide-two": {
|
|
136
137
|
group: "lane-divide",
|
|
137
138
|
className: "bpmn-icon-lane-divide-two",
|
|
@@ -140,7 +141,7 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
140
141
|
click: P(2)
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
}),
|
|
144
|
+
}), i.height >= 180 && y(l, {
|
|
144
145
|
"lane-divide-three": {
|
|
145
146
|
group: "lane-divide",
|
|
146
147
|
className: "bpmn-icon-lane-divide-three",
|
|
@@ -155,14 +156,14 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
155
156
|
className: "bpmn-icon-lane-insert-below",
|
|
156
157
|
title: m("Add Lane below"),
|
|
157
158
|
action: {
|
|
158
|
-
click: function(S,
|
|
159
|
-
t.addLane(
|
|
159
|
+
click: function(S, g) {
|
|
160
|
+
t.addLane(g, "bottom");
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
|
-
|
|
166
|
+
V(u, "bpmn:FlowNode") && (V(u, "bpmn:EventBasedGateway") ? y(l, {
|
|
166
167
|
"append.receive-task": f("bpmn:ReceiveTask", "bpmn-icon-receive-task", m("Append ReceiveTask")),
|
|
167
168
|
"append.message-intermediate-event": f(
|
|
168
169
|
"bpmn:IntermediateCatchEvent",
|
|
@@ -188,11 +189,11 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
188
189
|
m("Append SignalIntermediateCatchEvent"),
|
|
189
190
|
{ eventDefinitionType: "bpmn:SignalEventDefinition" }
|
|
190
191
|
)
|
|
191
|
-
}) :
|
|
192
|
+
}) : re(u, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? y(l, {
|
|
192
193
|
"append.compensation-activity": f("bpmn:Task", "bpmn-icon-task", m("Append compensation activity"), {
|
|
193
194
|
isForCompensation: !0
|
|
194
195
|
})
|
|
195
|
-
}) : !
|
|
196
|
+
}) : !V(u, "bpmn:EndEvent") && !u.isForCompensation && !re(u, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !Oe(u) && y(l, {
|
|
196
197
|
"append.end-event": f("bpmn:EndEvent", "bpmn-icon-end-event-none", m("Append EndEvent")),
|
|
197
198
|
"append.gateway": f("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", m("Append Gateway")),
|
|
198
199
|
"append.append-task": f("bpmn:UserTask", "bpmn-icon-user-task", m("Append Task")),
|
|
@@ -201,21 +202,21 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
201
202
|
"bpmn-icon-intermediate-event-none",
|
|
202
203
|
m("Append Intermediate/Boundary Event")
|
|
203
204
|
)
|
|
204
|
-
})), r.isEmpty(
|
|
205
|
+
})), r.isEmpty(i, "bpmn-replace") || y(l, {
|
|
205
206
|
replace: {
|
|
206
207
|
group: "edit",
|
|
207
208
|
className: "bpmn-icon-screw-wrench",
|
|
208
209
|
title: m("Change type"),
|
|
209
210
|
action: {
|
|
210
211
|
click: function(b, S) {
|
|
211
|
-
const
|
|
212
|
+
const g = y(C(S), {
|
|
212
213
|
cursor: { x: b.x, y: b.y }
|
|
213
214
|
});
|
|
214
|
-
r.open(S, "bpmn-replace",
|
|
215
|
+
r.open(S, "bpmn-replace", g);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
}),
|
|
219
|
+
}), G(u, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && y(l, {
|
|
219
220
|
"append.text-annotation": f("bpmn:TextAnnotation", "bpmn-icon-text-annotation"),
|
|
220
221
|
connect: {
|
|
221
222
|
group: "connect",
|
|
@@ -226,7 +227,7 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
226
227
|
dragstart: F
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
|
-
}),
|
|
230
|
+
}), G(u, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && y(l, {
|
|
230
231
|
connect: {
|
|
231
232
|
group: "connect",
|
|
232
233
|
className: "bpmn-icon-connection-multi",
|
|
@@ -236,11 +237,11 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
236
237
|
dragstart: F
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
|
-
}),
|
|
240
|
+
}), V(u, "bpmn:Group") && y(l, {
|
|
240
241
|
"append.text-annotation": f("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
|
|
241
242
|
});
|
|
242
|
-
let
|
|
243
|
-
return
|
|
243
|
+
let I = p.allowed("elements.delete", { elements: [i] });
|
|
244
|
+
return _e(I) && (I = I[0] === i), I && y(l, {
|
|
244
245
|
delete: {
|
|
245
246
|
group: "edit",
|
|
246
247
|
className: "bpmn-icon-trash",
|
|
@@ -251,30 +252,30 @@ J.prototype.getContextPadEntries = function(n) {
|
|
|
251
252
|
}
|
|
252
253
|
}), l;
|
|
253
254
|
};
|
|
254
|
-
function
|
|
255
|
-
const
|
|
255
|
+
function re(i, e, t) {
|
|
256
|
+
const n = i.$instanceOf(e);
|
|
256
257
|
let s = !1;
|
|
257
|
-
const a =
|
|
258
|
-
return
|
|
258
|
+
const a = i.eventDefinitions || [];
|
|
259
|
+
return Ae(a, function(r) {
|
|
259
260
|
r.$type === t && (s = !0);
|
|
260
|
-
}),
|
|
261
|
+
}), n && s;
|
|
261
262
|
}
|
|
262
|
-
const
|
|
263
|
+
const Ke = {
|
|
263
264
|
__init__: ["contextPadProvider"],
|
|
264
|
-
contextPadProvider: ["type",
|
|
265
|
+
contextPadProvider: ["type", Z]
|
|
265
266
|
};
|
|
266
|
-
function L(
|
|
267
|
-
|
|
267
|
+
function L(i, e, t, n, s, a, r, o, p) {
|
|
268
|
+
ue.call(this, i, e, t, n, s, a, r, o, p, 2e3), this._create = e, this._elementFactory = t, this._spaceTool = n, this._lassoTool = s, this._handTool = a, this._globalConnect = r, this._moddle = o, this._translate = p;
|
|
268
269
|
}
|
|
269
|
-
const
|
|
270
|
+
const H = function() {
|
|
270
271
|
};
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
const
|
|
272
|
+
H.prototype = ue.prototype;
|
|
273
|
+
H.prototype.getPaletteEntries = function() {
|
|
274
|
+
const i = {}, e = this._create, t = this._elementFactory, n = this._spaceTool, s = this._lassoTool, a = this._handTool, r = this._globalConnect, o = this._translate;
|
|
274
275
|
function p(l, u, F, O, C) {
|
|
275
|
-
function f(
|
|
276
|
+
function f(I) {
|
|
276
277
|
const b = t.createShape(y({ type: l }, C));
|
|
277
|
-
l === "bpmn:UserTask" && (b.businessObject.candidateUsers = "${handlers}"), e.start(
|
|
278
|
+
l === "bpmn:UserTask" && (b.businessObject.candidateUsers = "${handlers}"), e.start(I, b);
|
|
278
279
|
}
|
|
279
280
|
const P = l.replace(/^bpmn:/, "");
|
|
280
281
|
return {
|
|
@@ -308,7 +309,7 @@ Z.prototype.getPaletteEntries = function() {
|
|
|
308
309
|
function m(l) {
|
|
309
310
|
e.start(l, t.createParticipantShape());
|
|
310
311
|
}
|
|
311
|
-
return y(
|
|
312
|
+
return y(i, {
|
|
312
313
|
"hand-tool": {
|
|
313
314
|
group: "tools",
|
|
314
315
|
className: "bpmn-icon-hand-tool",
|
|
@@ -335,7 +336,7 @@ Z.prototype.getPaletteEntries = function() {
|
|
|
335
336
|
title: o("Activate the create/remove space tool"),
|
|
336
337
|
action: {
|
|
337
338
|
click: function(l) {
|
|
338
|
-
|
|
339
|
+
n.activateSelection(l);
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
342
|
},
|
|
@@ -383,108 +384,108 @@ Z.prototype.getPaletteEntries = function() {
|
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
// 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
|
|
386
|
-
}),
|
|
387
|
+
}), i;
|
|
387
388
|
};
|
|
388
389
|
L.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "moddle", "translate"];
|
|
389
|
-
L.prototype = new
|
|
390
|
+
L.prototype = new H();
|
|
390
391
|
L.prototype.constructor = L;
|
|
391
|
-
const
|
|
392
|
+
const Je = {
|
|
392
393
|
__init__: ["customPalette"],
|
|
393
394
|
customPalette: ["type", L]
|
|
394
395
|
};
|
|
395
|
-
function
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
return
|
|
399
|
-
}), this.append = function(t,
|
|
400
|
-
|
|
396
|
+
function fe(i, e) {
|
|
397
|
+
J.call(this, i, e, 3e3), i.on("autoPlace", 3e3, function(t) {
|
|
398
|
+
const n = t.shape, s = t.source;
|
|
399
|
+
return Xe(s, n);
|
|
400
|
+
}), this.append = function(t, n, s) {
|
|
401
|
+
i.fire("autoPlace.start", {
|
|
401
402
|
source: t,
|
|
402
|
-
shape:
|
|
403
|
+
shape: n
|
|
403
404
|
});
|
|
404
|
-
const a =
|
|
405
|
+
const a = i.fire("autoPlace", {
|
|
405
406
|
source: t,
|
|
406
|
-
shape:
|
|
407
|
+
shape: n
|
|
407
408
|
});
|
|
408
409
|
console.log("hints", s, "position", a);
|
|
409
|
-
const r = e.appendShape(t,
|
|
410
|
-
return
|
|
410
|
+
const r = e.appendShape(t, n, a, t.parent, s);
|
|
411
|
+
return i.fire("autoPlace.end", {
|
|
411
412
|
source: t,
|
|
412
413
|
shape: r
|
|
413
414
|
}), r;
|
|
414
415
|
};
|
|
415
416
|
}
|
|
416
|
-
function
|
|
417
|
+
function Ze(i) {
|
|
417
418
|
return {
|
|
418
|
-
top:
|
|
419
|
-
right:
|
|
420
|
-
bottom:
|
|
421
|
-
left:
|
|
419
|
+
top: i.y,
|
|
420
|
+
right: i.x + (i.width || 0),
|
|
421
|
+
bottom: i.y + (i.height || 0),
|
|
422
|
+
left: i.x
|
|
422
423
|
};
|
|
423
424
|
}
|
|
424
|
-
function
|
|
425
|
+
function He(i) {
|
|
425
426
|
return {
|
|
426
|
-
x: Math.round(
|
|
427
|
-
y: Math.round(
|
|
427
|
+
x: Math.round(i.x),
|
|
428
|
+
y: Math.round(i.y)
|
|
428
429
|
};
|
|
429
430
|
}
|
|
430
|
-
function
|
|
431
|
-
return
|
|
432
|
-
x:
|
|
433
|
-
y:
|
|
431
|
+
function We(i) {
|
|
432
|
+
return He({
|
|
433
|
+
x: i.x + (i.width || 0) / 2,
|
|
434
|
+
y: i.y + (i.height || 0) / 2
|
|
434
435
|
});
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
+
function Xe(i, e, t) {
|
|
437
438
|
t || (t = {});
|
|
438
|
-
const
|
|
439
|
+
const n = t.defaultDistance || 50, s = We(i), a = Ze(i);
|
|
439
440
|
return {
|
|
440
441
|
x: s.x,
|
|
441
|
-
y: a.bottom +
|
|
442
|
+
y: a.bottom + n + e.height / 2
|
|
442
443
|
};
|
|
443
444
|
}
|
|
444
|
-
const
|
|
445
|
+
const be = function() {
|
|
445
446
|
};
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
function
|
|
451
|
-
|
|
452
|
-
const s =
|
|
453
|
-
return
|
|
454
|
-
}),
|
|
455
|
-
t.scrollToElement(
|
|
456
|
-
}), this.append = function(
|
|
457
|
-
|
|
458
|
-
source:
|
|
447
|
+
be.prototype = J.prototype;
|
|
448
|
+
fe.prototype = new be();
|
|
449
|
+
fe.prototype.constructor = J;
|
|
450
|
+
const Ye = 200, Qe = 100;
|
|
451
|
+
function ye(i, e, t) {
|
|
452
|
+
i.on("autoPlace", Qe, function(n) {
|
|
453
|
+
const s = n.shape, a = n.source;
|
|
454
|
+
return et(a, s);
|
|
455
|
+
}), i.on("autoPlace.end", function(n) {
|
|
456
|
+
t.scrollToElement(n.shape);
|
|
457
|
+
}), this.append = function(n, s, a) {
|
|
458
|
+
i.fire("autoPlace.start", {
|
|
459
|
+
source: n,
|
|
459
460
|
shape: s
|
|
460
461
|
});
|
|
461
|
-
const r =
|
|
462
|
-
source:
|
|
462
|
+
const r = i.fire("autoPlace", {
|
|
463
|
+
source: n,
|
|
463
464
|
shape: s
|
|
464
|
-
}), o = e.appendShape(
|
|
465
|
-
return
|
|
466
|
-
source:
|
|
465
|
+
}), o = e.appendShape(n, s, r, n.parent, a);
|
|
466
|
+
return i.fire("autoPlace.end", {
|
|
467
|
+
source: n,
|
|
467
468
|
shape: o
|
|
468
469
|
}), o;
|
|
469
470
|
};
|
|
470
471
|
}
|
|
471
|
-
|
|
472
|
-
function
|
|
473
|
-
const t =
|
|
472
|
+
ye.$inject = ["eventBus", "modeling", "canvas"];
|
|
473
|
+
function et(i, e) {
|
|
474
|
+
const t = Ye, n = De(i);
|
|
474
475
|
return {
|
|
475
|
-
x:
|
|
476
|
-
y:
|
|
476
|
+
x: Be(i).right + t + e.width / 2,
|
|
477
|
+
y: n.y
|
|
477
478
|
};
|
|
478
479
|
}
|
|
479
|
-
const
|
|
480
|
+
const tt = {
|
|
480
481
|
__init__: ["autoPlaceSelectionBehavior"],
|
|
481
|
-
autoPlace: ["type",
|
|
482
|
+
autoPlace: ["type", ye]
|
|
482
483
|
};
|
|
483
|
-
function
|
|
484
|
+
function he(i, e, t, n) {
|
|
484
485
|
const s = /* @__PURE__ */ Object.create(null);
|
|
485
486
|
switch (s.event = e.event, t && (s.id = e.id), e.listenerType) {
|
|
486
487
|
case "scriptListener":
|
|
487
|
-
s.script =
|
|
488
|
+
s.script = it(i, e, n);
|
|
488
489
|
break;
|
|
489
490
|
case "expressionListener":
|
|
490
491
|
s.expression = e.expression;
|
|
@@ -495,45 +496,45 @@ function be(n, e, t, i) {
|
|
|
495
496
|
default:
|
|
496
497
|
s.class = e.class;
|
|
497
498
|
}
|
|
498
|
-
if (e.fields && (s.fields = e.fields.map((a) =>
|
|
499
|
-
const a =
|
|
499
|
+
if (e.fields && (s.fields = e.fields.map((a) => nt(i, a, n))), t && e.event === "timeout" && e.eventDefinitionType) {
|
|
500
|
+
const a = i.moddle.create("bpmn:FormalExpression", {
|
|
500
501
|
body: e.eventTimeDefinitions
|
|
501
|
-
}), r =
|
|
502
|
-
id: `TimerEventDefinition_${
|
|
502
|
+
}), r = i.moddle.create("bpmn:TimerEventDefinition", {
|
|
503
|
+
id: `TimerEventDefinition_${st(8)}`,
|
|
503
504
|
[`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: a
|
|
504
505
|
});
|
|
505
506
|
s.eventDefinitions = [r];
|
|
506
507
|
}
|
|
507
|
-
return
|
|
508
|
+
return i.moddle.create(`${n}:${t ? "TaskListener" : "ExecutionListener"}`, s);
|
|
508
509
|
}
|
|
509
|
-
function
|
|
510
|
-
const { name:
|
|
511
|
-
return
|
|
510
|
+
function nt(i, e, t) {
|
|
511
|
+
const { name: n, fieldType: s, string: a, expression: r } = e, o = s === "string" ? { name: n, string: a } : { name: n, expression: r };
|
|
512
|
+
return i.moddle.create(`${t}:Field`, o);
|
|
512
513
|
}
|
|
513
|
-
function
|
|
514
|
-
const { scriptType:
|
|
515
|
-
return
|
|
514
|
+
function it(i, e, t) {
|
|
515
|
+
const { scriptType: n, scriptFormat: s, value: a, resource: r } = e, o = n === "inlineScript" ? { scriptFormat: s, value: a } : { scriptFormat: s, resource: r };
|
|
516
|
+
return i.moddle.create(`${t}:Script`, o);
|
|
516
517
|
}
|
|
517
|
-
function U(
|
|
518
|
-
const
|
|
518
|
+
function U(i, e, t) {
|
|
519
|
+
const n = i.moddle.create("bpmn:ExtensionElements", {
|
|
519
520
|
values: t
|
|
520
521
|
});
|
|
521
|
-
|
|
522
|
-
extensionElements:
|
|
522
|
+
i.modeling.updateProperties(e, {
|
|
523
|
+
extensionElements: n
|
|
523
524
|
});
|
|
524
525
|
}
|
|
525
|
-
function
|
|
526
|
+
function st(i = 8, e) {
|
|
526
527
|
let t = "";
|
|
527
|
-
const
|
|
528
|
-
for (let s =
|
|
529
|
-
t +=
|
|
528
|
+
const n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
529
|
+
for (let s = i; s > 0; --s)
|
|
530
|
+
t += n[Math.floor(Math.random() * n.length)];
|
|
530
531
|
return t;
|
|
531
532
|
}
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
},
|
|
533
|
+
const ae = (i, e = "body") => i ? i.get(e) : null, oe = (i, e, t = "body", n) => {
|
|
534
|
+
rt(i, e, { [t]: n });
|
|
535
|
+
}, rt = ({ modeling: i }, e, t) => {
|
|
536
|
+
i.updateProperties(e, t);
|
|
537
|
+
}, at = {
|
|
537
538
|
name: "ElementBaseInfo",
|
|
538
539
|
inject: {
|
|
539
540
|
prefix: "prefix",
|
|
@@ -554,81 +555,97 @@ const re = (n, e = "body") => n ? n.get(e) : null, it = (n, e, t = "body", i) =>
|
|
|
554
555
|
businessObject: {},
|
|
555
556
|
attrs: {
|
|
556
557
|
commentInForm: null,
|
|
557
|
-
commentOrder: null
|
|
558
|
-
|
|
558
|
+
commentOrder: null,
|
|
559
|
+
commentNodeIds: null,
|
|
560
|
+
commentLabel: null
|
|
561
|
+
},
|
|
562
|
+
nodes: []
|
|
559
563
|
};
|
|
560
564
|
},
|
|
561
565
|
watch: {
|
|
562
566
|
id: "init"
|
|
563
567
|
},
|
|
564
568
|
methods: {
|
|
565
|
-
init(
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
569
|
+
init(i) {
|
|
570
|
+
const e = this.bpmnInstances.elementRegistry.filter((n) => n.type === "bpmn:UserTask");
|
|
571
|
+
this.nodes = e.map(({ businessObject: { id: n, name: s } }) => ({ label: s, value: n }));
|
|
572
|
+
const { businessObject: t } = this.element;
|
|
573
|
+
if (i ? (this.businessObject = v(t), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
|
|
574
|
+
for (const n in this.attrs) {
|
|
575
|
+
let s = ae(t, `${this.prefix}:${n}`);
|
|
576
|
+
n === "commentNodeIds" && (s = s ? s.split(",") : []), this.attrs[n] = s;
|
|
577
|
+
}
|
|
578
|
+
this.skipExpression = ae(t, `${this.prefix}:skipExpression`);
|
|
579
|
+
},
|
|
580
|
+
updateBaseInfo(i) {
|
|
573
581
|
const { modeling: e } = this.bpmnInstances;
|
|
574
|
-
if (
|
|
582
|
+
if (i === "id") {
|
|
575
583
|
e.updateProperties(this.element, {
|
|
576
|
-
id: this.businessObject[
|
|
577
|
-
di: { id: `${this.businessObject[
|
|
584
|
+
id: this.businessObject[i],
|
|
585
|
+
di: { id: `${this.businessObject[i]}_di` }
|
|
578
586
|
});
|
|
579
587
|
return;
|
|
580
588
|
}
|
|
581
|
-
if (
|
|
589
|
+
if (i === "isExpanded") {
|
|
582
590
|
e.toggleCollapse(this.element);
|
|
583
591
|
return;
|
|
584
592
|
}
|
|
585
|
-
e.updateProperties(this.element, { [
|
|
593
|
+
e.updateProperties(this.element, { [i]: this.businessObject[i] });
|
|
586
594
|
},
|
|
587
|
-
updateProp(
|
|
588
|
-
|
|
595
|
+
updateProp(i, e) {
|
|
596
|
+
if (i === "commentInForm" && !e)
|
|
597
|
+
for (const t in this.attrs)
|
|
598
|
+
t !== "commentInForm" && (this.attrs[t] = null, oe(this.bpmnInstances, this.element, `${this.prefix}:${t}`, this.attrs[t]));
|
|
599
|
+
i === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null, oe(this.bpmnInstances, this.element, `${this.prefix}:${i}`, e);
|
|
589
600
|
}
|
|
590
601
|
}
|
|
591
602
|
};
|
|
592
|
-
var
|
|
603
|
+
var ot = function() {
|
|
593
604
|
var e = this, t = e._self._c;
|
|
594
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(
|
|
595
|
-
|
|
596
|
-
} } }, [t("ElFormItem", { attrs: { label: "ID" } }, [t("ElInput", { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(
|
|
605
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
|
|
606
|
+
n.preventDefault();
|
|
607
|
+
} } }, [t("ElFormItem", { attrs: { label: "ID" } }, [t("ElInput", { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(n) {
|
|
597
608
|
return e.updateBaseInfo("id");
|
|
598
|
-
} }, model: { value: e.businessObject.id, callback: function(
|
|
599
|
-
e.$set(e.businessObject, "id",
|
|
600
|
-
}, expression: "businessObject.id" } })], 1), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(
|
|
609
|
+
} }, model: { value: e.businessObject.id, callback: function(n) {
|
|
610
|
+
e.$set(e.businessObject, "id", n);
|
|
611
|
+
}, expression: "businessObject.id" } })], 1), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
|
|
601
612
|
return e.updateBaseInfo("name");
|
|
602
|
-
} }, model: { value: e.businessObject.name, callback: function(
|
|
603
|
-
e.$set(e.businessObject, "name",
|
|
604
|
-
}, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [t("ElFormItem", { attrs: { label: "跳过表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (
|
|
605
|
-
e.skipExpression =
|
|
606
|
-
}, expression: "skipExpression" } })], 1), t("ElFormItem", { attrs: { label: "意见在表单" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (
|
|
607
|
-
e.$set(e.attrs, "commentInForm",
|
|
608
|
-
}, expression: "attrs.commentInForm" } })], 1), t("ElFormItem", { attrs: { label: "
|
|
609
|
-
e.$set(e.attrs, "
|
|
610
|
-
}, expression: "attrs.
|
|
613
|
+
} }, model: { value: e.businessObject.name, callback: function(n) {
|
|
614
|
+
e.$set(e.businessObject, "name", n);
|
|
615
|
+
}, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [t("ElFormItem", { attrs: { label: "跳过表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("skipExpression", n) }, model: { value: e.skipExpression, callback: function(n) {
|
|
616
|
+
e.skipExpression = n;
|
|
617
|
+
}, expression: "skipExpression" } })], 1), t("ElFormItem", { attrs: { label: "意见在表单" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (n) => e.updateProp("commentInForm", n) }, model: { value: e.attrs.commentInForm, callback: function(n) {
|
|
618
|
+
e.$set(e.attrs, "commentInForm", n);
|
|
619
|
+
}, expression: "attrs.commentInForm" } })], 1), e.attrs.commentInForm ? [t("ElFormItem", { attrs: { label: "意见名称" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentLabel", n) }, model: { value: e.attrs.commentLabel, callback: function(n) {
|
|
620
|
+
e.$set(e.attrs, "commentLabel", n);
|
|
621
|
+
}, expression: "attrs.commentLabel" } })], 1), t("ElFormItem", { attrs: { label: "意见聚合" } }, [t("ElSelect", { attrs: { multiple: "", clearable: "" }, on: { input: (n) => e.updateProp("commentNodeIds", n) }, model: { value: e.attrs.commentNodeIds, callback: function(n) {
|
|
622
|
+
e.$set(e.attrs, "commentNodeIds", n);
|
|
623
|
+
}, expression: "attrs.commentNodeIds" } }, e._l(e.nodes, function(n) {
|
|
624
|
+
return t("ElOption", { key: n.value, attrs: { label: n.label, value: n.value } });
|
|
625
|
+
}), 1)], 1), t("ElFormItem", { attrs: { label: "意见排序号" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentOrder", n) }, model: { value: e.attrs.commentOrder, callback: function(n) {
|
|
626
|
+
e.$set(e.attrs, "commentOrder", n);
|
|
627
|
+
}, expression: "attrs.commentOrder" } })], 1)] : e._e()] : e._e(), e.businessObject.$type === "bpmn:Process" ? [t("ElFormItem", { attrs: { label: "版本标签" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
|
|
611
628
|
return e.updateBaseInfo("versionTag");
|
|
612
|
-
} }, model: { value: e.businessObject.versionTag, callback: function(
|
|
613
|
-
e.$set(e.businessObject, "versionTag",
|
|
614
|
-
}, expression: "businessObject.versionTag" } })], 1), t("ElFormItem", { attrs: { label: "可执行" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(
|
|
629
|
+
} }, model: { value: e.businessObject.versionTag, callback: function(n) {
|
|
630
|
+
e.$set(e.businessObject, "versionTag", n);
|
|
631
|
+
}, expression: "businessObject.versionTag" } })], 1), t("ElFormItem", { attrs: { label: "可执行" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(n) {
|
|
615
632
|
return e.updateBaseInfo("isExecutable");
|
|
616
|
-
} }, model: { value: e.businessObject.isExecutable, callback: function(
|
|
617
|
-
e.$set(e.businessObject, "isExecutable",
|
|
618
|
-
}, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t("ElFormItem", { attrs: { label: "状态" } }, [t("ElSwitch", { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(
|
|
633
|
+
} }, model: { value: e.businessObject.isExecutable, callback: function(n) {
|
|
634
|
+
e.$set(e.businessObject, "isExecutable", n);
|
|
635
|
+
}, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t("ElFormItem", { attrs: { label: "状态" } }, [t("ElSwitch", { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(n) {
|
|
619
636
|
return e.updateBaseInfo("isExpanded");
|
|
620
|
-
} }, model: { value: e.businessObject.isExpanded, callback: function(
|
|
621
|
-
e.$set(e.businessObject, "isExpanded",
|
|
637
|
+
} }, model: { value: e.businessObject.isExpanded, callback: function(n) {
|
|
638
|
+
e.$set(e.businessObject, "isExpanded", n);
|
|
622
639
|
}, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
|
|
623
|
-
},
|
|
624
|
-
rt,
|
|
640
|
+
}, lt = [], pt = /* @__PURE__ */ h(
|
|
625
641
|
at,
|
|
626
642
|
ot,
|
|
643
|
+
lt,
|
|
627
644
|
!1,
|
|
628
645
|
null,
|
|
629
646
|
null
|
|
630
647
|
);
|
|
631
|
-
const
|
|
648
|
+
const mt = pt.exports, ct = {
|
|
632
649
|
name: "ElementOtherConfig",
|
|
633
650
|
props: {
|
|
634
651
|
id: String,
|
|
@@ -644,45 +661,45 @@ const pt = lt.exports, mt = {
|
|
|
644
661
|
id: {
|
|
645
662
|
immediate: !0,
|
|
646
663
|
handler() {
|
|
647
|
-
if (
|
|
664
|
+
if (Re(this.element))
|
|
648
665
|
this.documentation = "";
|
|
649
666
|
else {
|
|
650
667
|
const {
|
|
651
|
-
businessObject: { documentation:
|
|
668
|
+
businessObject: { documentation: i }
|
|
652
669
|
} = this.element;
|
|
653
|
-
this.documentation = (
|
|
670
|
+
this.documentation = (i == null ? void 0 : i[0].text) || "";
|
|
654
671
|
}
|
|
655
672
|
}
|
|
656
673
|
}
|
|
657
674
|
},
|
|
658
675
|
methods: {
|
|
659
676
|
updateDocumentation() {
|
|
660
|
-
const { modeling:
|
|
677
|
+
const { modeling: i } = this.bpmnInstances, {
|
|
661
678
|
businessObject: { documentation: e }
|
|
662
679
|
} = this.element;
|
|
663
680
|
if (e != null && e.length)
|
|
664
|
-
e[0].set("text", this.documentation),
|
|
681
|
+
e[0].set("text", this.documentation), i.updateProperties(this.element, { documentation: e });
|
|
665
682
|
else {
|
|
666
|
-
const { bpmnFactory: t } = this.bpmnInstances,
|
|
667
|
-
|
|
683
|
+
const { bpmnFactory: t } = this.bpmnInstances, n = t.create("bpmn:Documentation", { text: this.documentation });
|
|
684
|
+
i.updateProperties(this.element, { documentation: [n] });
|
|
668
685
|
}
|
|
669
686
|
}
|
|
670
687
|
}
|
|
671
688
|
};
|
|
672
|
-
var
|
|
689
|
+
var ut = function() {
|
|
673
690
|
var e = this, t = e._self._c;
|
|
674
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "element-property input-property" }, [t("div", { staticClass: "element-property__label" }, [e._v("元素文档:")]), t("div", { staticClass: "element-property__value" }, [t("ElInput", { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(
|
|
675
|
-
e.documentation =
|
|
691
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "element-property input-property" }, [t("div", { staticClass: "element-property__label" }, [e._v("元素文档:")]), t("div", { staticClass: "element-property__value" }, [t("ElInput", { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(n) {
|
|
692
|
+
e.documentation = n;
|
|
676
693
|
}, expression: "documentation" } })], 1)])]);
|
|
677
|
-
},
|
|
678
|
-
mt,
|
|
694
|
+
}, dt = [], ft = /* @__PURE__ */ h(
|
|
679
695
|
ct,
|
|
680
696
|
ut,
|
|
697
|
+
dt,
|
|
681
698
|
!1,
|
|
682
699
|
null,
|
|
683
700
|
null
|
|
684
701
|
);
|
|
685
|
-
const
|
|
702
|
+
const bt = ft.exports, yt = {
|
|
686
703
|
name: "UserTask",
|
|
687
704
|
props: {
|
|
688
705
|
id: String,
|
|
@@ -713,60 +730,60 @@ const ft = dt.exports, bt = {
|
|
|
713
730
|
},
|
|
714
731
|
methods: {
|
|
715
732
|
resetTaskForm() {
|
|
716
|
-
const { businessObject:
|
|
733
|
+
const { businessObject: i } = this.element;
|
|
717
734
|
for (const e in this.defaultTaskForm) {
|
|
718
735
|
let t;
|
|
719
|
-
["candidateUsers", "candidateGroups"].includes(e) ? t =
|
|
736
|
+
["candidateUsers", "candidateGroups"].includes(e) ? t = i[e] ? i[e].split(",") : [] : t = i[e] || this.defaultTaskForm[e], this.$set(this.userTaskForm, e, t);
|
|
720
737
|
}
|
|
721
738
|
},
|
|
722
|
-
updateElementTask(
|
|
739
|
+
updateElementTask(i) {
|
|
723
740
|
const e = {};
|
|
724
|
-
|
|
741
|
+
i === "candidateUsers" || i === "candidateGroups" ? e[i] = this.userTaskForm[i] && this.userTaskForm[i].length ? this.userTaskForm[i].join() : null : e[i] = this.userTaskForm[i] || null, this.bpmnInstances.modeling.updateProperties(this.element, e);
|
|
725
742
|
}
|
|
726
743
|
}
|
|
727
744
|
};
|
|
728
|
-
var
|
|
745
|
+
var ht = function() {
|
|
729
746
|
var e = this, t = e._self._c;
|
|
730
|
-
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "处理用户" } }, [t("ElSelect", { on: { change: function(
|
|
747
|
+
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "处理用户" } }, [t("ElSelect", { on: { change: function(n) {
|
|
731
748
|
return e.updateElementTask("assignee");
|
|
732
|
-
} }, model: { value: e.userTaskForm.assignee, callback: function(
|
|
733
|
-
e.$set(e.userTaskForm, "assignee",
|
|
734
|
-
}, expression: "userTaskForm.assignee" } }, e._l(e.mockData, function(
|
|
735
|
-
return t("ElOption", { key: `ass-${
|
|
736
|
-
}), 1)], 1), t("ElFormItem", { attrs: { label: "候选用户" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(
|
|
749
|
+
} }, model: { value: e.userTaskForm.assignee, callback: function(n) {
|
|
750
|
+
e.$set(e.userTaskForm, "assignee", n);
|
|
751
|
+
}, expression: "userTaskForm.assignee" } }, e._l(e.mockData, function(n) {
|
|
752
|
+
return t("ElOption", { key: `ass-${n}`, attrs: { label: `用户${n}`, value: `user${n}` } });
|
|
753
|
+
}), 1)], 1), t("ElFormItem", { attrs: { label: "候选用户" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(n) {
|
|
737
754
|
return e.updateElementTask("candidateUsers");
|
|
738
|
-
} }, model: { value: e.userTaskForm.candidateUsers, callback: function(
|
|
739
|
-
e.$set(e.userTaskForm, "candidateUsers",
|
|
740
|
-
}, expression: "userTaskForm.candidateUsers" } }, e._l(e.mockData, function(
|
|
741
|
-
return t("ElOption", { key: `user-${
|
|
742
|
-
}), 1)], 1), t("ElFormItem", { attrs: { label: "候选分组" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(
|
|
755
|
+
} }, model: { value: e.userTaskForm.candidateUsers, callback: function(n) {
|
|
756
|
+
e.$set(e.userTaskForm, "candidateUsers", n);
|
|
757
|
+
}, expression: "userTaskForm.candidateUsers" } }, e._l(e.mockData, function(n) {
|
|
758
|
+
return t("ElOption", { key: `user-${n}`, attrs: { label: `用户${n}`, value: `user${n}` } });
|
|
759
|
+
}), 1)], 1), t("ElFormItem", { attrs: { label: "候选分组" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(n) {
|
|
743
760
|
return e.updateElementTask("candidateGroups");
|
|
744
|
-
} }, model: { value: e.userTaskForm.candidateGroups, callback: function(
|
|
745
|
-
e.$set(e.userTaskForm, "candidateGroups",
|
|
746
|
-
}, expression: "userTaskForm.candidateGroups" } }, e._l(e.mockData, function(
|
|
747
|
-
return t("ElOption", { key: `ass-${
|
|
748
|
-
}), 1)], 1), t("ElFormItem", { attrs: { label: "到期时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(
|
|
761
|
+
} }, model: { value: e.userTaskForm.candidateGroups, callback: function(n) {
|
|
762
|
+
e.$set(e.userTaskForm, "candidateGroups", n);
|
|
763
|
+
}, expression: "userTaskForm.candidateGroups" } }, e._l(e.mockData, function(n) {
|
|
764
|
+
return t("ElOption", { key: `ass-${n}`, attrs: { label: `分组${n}`, value: `group${n}` } });
|
|
765
|
+
}), 1)], 1), t("ElFormItem", { attrs: { label: "到期时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
|
|
749
766
|
return e.updateElementTask("dueDate");
|
|
750
|
-
} }, model: { value: e.userTaskForm.dueDate, callback: function(
|
|
751
|
-
e.$set(e.userTaskForm, "dueDate",
|
|
752
|
-
}, expression: "userTaskForm.dueDate" } })], 1), t("ElFormItem", { attrs: { label: "跟踪时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(
|
|
767
|
+
} }, model: { value: e.userTaskForm.dueDate, callback: function(n) {
|
|
768
|
+
e.$set(e.userTaskForm, "dueDate", n);
|
|
769
|
+
}, expression: "userTaskForm.dueDate" } })], 1), t("ElFormItem", { attrs: { label: "跟踪时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
|
|
753
770
|
return e.updateElementTask("followUpDate");
|
|
754
|
-
} }, model: { value: e.userTaskForm.followUpDate, callback: function(
|
|
755
|
-
e.$set(e.userTaskForm, "followUpDate",
|
|
756
|
-
}, expression: "userTaskForm.followUpDate" } })], 1), t("ElFormItem", { attrs: { label: "优先级" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(
|
|
771
|
+
} }, model: { value: e.userTaskForm.followUpDate, callback: function(n) {
|
|
772
|
+
e.$set(e.userTaskForm, "followUpDate", n);
|
|
773
|
+
}, expression: "userTaskForm.followUpDate" } })], 1), t("ElFormItem", { attrs: { label: "优先级" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
|
|
757
774
|
return e.updateElementTask("priority");
|
|
758
|
-
} }, model: { value: e.userTaskForm.priority, callback: function(
|
|
759
|
-
e.$set(e.userTaskForm, "priority",
|
|
775
|
+
} }, model: { value: e.userTaskForm.priority, callback: function(n) {
|
|
776
|
+
e.$set(e.userTaskForm, "priority", n);
|
|
760
777
|
}, expression: "userTaskForm.priority" } })], 1)], 1);
|
|
761
|
-
},
|
|
762
|
-
bt,
|
|
778
|
+
}, gt = [], vt = /* @__PURE__ */ h(
|
|
763
779
|
yt,
|
|
764
780
|
ht,
|
|
781
|
+
gt,
|
|
765
782
|
!1,
|
|
766
783
|
null,
|
|
767
784
|
null
|
|
768
785
|
);
|
|
769
|
-
const
|
|
786
|
+
const Et = vt.exports, Ft = {
|
|
770
787
|
name: "ScriptTask",
|
|
771
788
|
props: {
|
|
772
789
|
id: String,
|
|
@@ -794,57 +811,57 @@ const gt = vt.exports, Et = {
|
|
|
794
811
|
},
|
|
795
812
|
methods: {
|
|
796
813
|
resetTaskForm() {
|
|
797
|
-
var
|
|
814
|
+
var i;
|
|
798
815
|
for (const e in this.defaultTaskForm) {
|
|
799
|
-
const t = ((
|
|
816
|
+
const t = ((i = this.element) == null ? void 0 : i.businessObject[e]) || this.defaultTaskForm[e];
|
|
800
817
|
this.$set(this.scriptTaskForm, e, t);
|
|
801
818
|
}
|
|
802
819
|
this.$set(this.scriptTaskForm, "scriptType", this.scriptTaskForm.script ? "inline" : "external");
|
|
803
820
|
},
|
|
804
821
|
updateElementTask() {
|
|
805
|
-
const
|
|
806
|
-
|
|
822
|
+
const i = /* @__PURE__ */ Object.create(null);
|
|
823
|
+
i.scriptFormat = this.scriptTaskForm.scriptFormat || null, i.resultVariable = this.scriptTaskForm.resultVariable || null, this.scriptTaskForm.scriptType === "inline" ? (i.script = this.scriptTaskForm.script || null, i.resource = null) : (i.resource = this.scriptTaskForm.resource || null, i.script = null), this.bpmnInstances.modeling.updateProperties(this.element, i);
|
|
807
824
|
}
|
|
808
825
|
}
|
|
809
826
|
};
|
|
810
|
-
var
|
|
827
|
+
var xt = function() {
|
|
811
828
|
var e = this, t = e._self._c;
|
|
812
|
-
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "脚本格式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(
|
|
829
|
+
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "脚本格式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
|
|
813
830
|
return e.updateElementTask();
|
|
814
|
-
}, change: function(
|
|
831
|
+
}, change: function(n) {
|
|
815
832
|
return e.updateElementTask();
|
|
816
|
-
} }, model: { value: e.scriptTaskForm.scriptFormat, callback: function(
|
|
817
|
-
e.$set(e.scriptTaskForm, "scriptFormat",
|
|
818
|
-
}, expression: "scriptTaskForm.scriptFormat" } })], 1), t("ElFormItem", { attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.scriptTaskForm.scriptType, callback: function(
|
|
819
|
-
e.$set(e.scriptTaskForm, "scriptType",
|
|
820
|
-
}, expression: "scriptTaskForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inline" } }), t("ElOption", { attrs: { label: "外部资源", value: "external" } })], 1)], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "inline", expression: "scriptTaskForm.scriptType === 'inline'" }], attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", resize: "vertical", autosize: { minRows: 2, maxRows: 4 }, clearable: "" }, on: { input: function(
|
|
833
|
+
} }, model: { value: e.scriptTaskForm.scriptFormat, callback: function(n) {
|
|
834
|
+
e.$set(e.scriptTaskForm, "scriptFormat", n);
|
|
835
|
+
}, expression: "scriptTaskForm.scriptFormat" } })], 1), t("ElFormItem", { attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.scriptTaskForm.scriptType, callback: function(n) {
|
|
836
|
+
e.$set(e.scriptTaskForm, "scriptType", n);
|
|
837
|
+
}, expression: "scriptTaskForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inline" } }), t("ElOption", { attrs: { label: "外部资源", value: "external" } })], 1)], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "inline", expression: "scriptTaskForm.scriptType === 'inline'" }], attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", resize: "vertical", autosize: { minRows: 2, maxRows: 4 }, clearable: "" }, on: { input: function(n) {
|
|
821
838
|
return e.updateElementTask();
|
|
822
|
-
}, change: function(
|
|
839
|
+
}, change: function(n) {
|
|
823
840
|
return e.updateElementTask();
|
|
824
|
-
} }, model: { value: e.scriptTaskForm.script, callback: function(
|
|
825
|
-
e.$set(e.scriptTaskForm, "script",
|
|
826
|
-
}, expression: "scriptTaskForm.script" } })], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "external", expression: "scriptTaskForm.scriptType === 'external'" }], attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(
|
|
841
|
+
} }, model: { value: e.scriptTaskForm.script, callback: function(n) {
|
|
842
|
+
e.$set(e.scriptTaskForm, "script", n);
|
|
843
|
+
}, expression: "scriptTaskForm.script" } })], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "external", expression: "scriptTaskForm.scriptType === 'external'" }], attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
|
|
827
844
|
return e.updateElementTask();
|
|
828
|
-
}, change: function(
|
|
845
|
+
}, change: function(n) {
|
|
829
846
|
return e.updateElementTask();
|
|
830
|
-
} }, model: { value: e.scriptTaskForm.resource, callback: function(
|
|
831
|
-
e.$set(e.scriptTaskForm, "resource",
|
|
832
|
-
}, expression: "scriptTaskForm.resource" } })], 1), t("ElFormItem", { attrs: { label: "结果变量" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(
|
|
847
|
+
} }, model: { value: e.scriptTaskForm.resource, callback: function(n) {
|
|
848
|
+
e.$set(e.scriptTaskForm, "resource", n);
|
|
849
|
+
}, expression: "scriptTaskForm.resource" } })], 1), t("ElFormItem", { attrs: { label: "结果变量" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
|
|
833
850
|
return e.updateElementTask();
|
|
834
|
-
}, change: function(
|
|
851
|
+
}, change: function(n) {
|
|
835
852
|
return e.updateElementTask();
|
|
836
|
-
} }, model: { value: e.scriptTaskForm.resultVariable, callback: function(
|
|
837
|
-
e.$set(e.scriptTaskForm, "resultVariable",
|
|
853
|
+
} }, model: { value: e.scriptTaskForm.resultVariable, callback: function(n) {
|
|
854
|
+
e.$set(e.scriptTaskForm, "resultVariable", n);
|
|
838
855
|
}, expression: "scriptTaskForm.resultVariable" } })], 1)], 1);
|
|
839
|
-
},
|
|
840
|
-
Et,
|
|
856
|
+
}, St = [], Tt = /* @__PURE__ */ h(
|
|
841
857
|
Ft,
|
|
842
858
|
xt,
|
|
859
|
+
St,
|
|
843
860
|
!1,
|
|
844
861
|
null,
|
|
845
862
|
null
|
|
846
863
|
);
|
|
847
|
-
const
|
|
864
|
+
const Ct = Tt.exports, It = {
|
|
848
865
|
name: "ReceiveTask",
|
|
849
866
|
props: {
|
|
850
867
|
id: String,
|
|
@@ -868,14 +885,14 @@ const Tt = St.exports, Ct = {
|
|
|
868
885
|
}
|
|
869
886
|
},
|
|
870
887
|
created() {
|
|
871
|
-
this.bpmnMessageRefsMap = /* @__PURE__ */ Object.create(null), this.bpmnRootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.bpmnRootElements.filter((
|
|
872
|
-
this.bpmnMessageRefsMap[
|
|
888
|
+
this.bpmnMessageRefsMap = /* @__PURE__ */ Object.create(null), this.bpmnRootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.bpmnRootElements.filter((i) => i.$type === "bpmn:Message").forEach((i) => {
|
|
889
|
+
this.bpmnMessageRefsMap[i.id] = i, this.$set(this.messageMap, i.id, i.name);
|
|
873
890
|
}), this.$set(this.messageMap, "-1", "无");
|
|
874
891
|
},
|
|
875
892
|
methods: {
|
|
876
893
|
getBindMessage() {
|
|
877
|
-
var
|
|
878
|
-
this.bindMessageId = ((e = (
|
|
894
|
+
var i, e;
|
|
895
|
+
this.bindMessageId = ((e = (i = this.element.businessObject) == null ? void 0 : i.messageRef) == null ? void 0 : e.id) || "-1";
|
|
879
896
|
},
|
|
880
897
|
openMessageModel() {
|
|
881
898
|
this.messageModelVisible = !0, this.newMessageForm = {};
|
|
@@ -885,46 +902,46 @@ const Tt = St.exports, Ct = {
|
|
|
885
902
|
this.$message.error("该消息已存在,请修改id后重新保存");
|
|
886
903
|
return;
|
|
887
904
|
}
|
|
888
|
-
const
|
|
889
|
-
this.bpmnRootElements.push(
|
|
905
|
+
const i = this.bpmnInstances.moddle.create("bpmn:Message", this.newMessageForm);
|
|
906
|
+
this.bpmnRootElements.push(i), this.$set(this.messageMap, this.newMessageForm.id, this.newMessageForm.name), this.bpmnMessageRefsMap[this.newMessageForm.id] = i, this.messageModelVisible = !1;
|
|
890
907
|
},
|
|
891
|
-
updateTaskMessage(
|
|
892
|
-
|
|
908
|
+
updateTaskMessage(i) {
|
|
909
|
+
i === "-1" ? this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
893
910
|
messageRef: null
|
|
894
911
|
}) : this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
895
|
-
messageRef: this.bpmnMessageRefsMap[
|
|
912
|
+
messageRef: this.bpmnMessageRefsMap[i]
|
|
896
913
|
});
|
|
897
914
|
}
|
|
898
915
|
}
|
|
899
916
|
};
|
|
900
917
|
var kt = function() {
|
|
901
918
|
var e = this, t = e._self._c;
|
|
902
|
-
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "消息实例" } }, [t("div", { staticStyle: { display: "flex", "flex-wrap": "nowrap", "align-items": "center", "justify-content": "space-between" } }, [t("ElSelect", { on: { change: e.updateTaskMessage }, model: { value: e.bindMessageId, callback: function(
|
|
903
|
-
e.bindMessageId =
|
|
904
|
-
}, expression: "bindMessageId" } }, e._l(Object.keys(e.messageMap), function(
|
|
905
|
-
return t("ElOption", { key:
|
|
906
|
-
}), 1), t("ElButton", { staticStyle: { "margin-left": "8px" }, attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: e.openMessageModel } })], 1)]), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.messageModelVisible, "close-on-click-modal": !1, title: "创建新消息", width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
907
|
-
e.messageModelVisible =
|
|
919
|
+
return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "消息实例" } }, [t("div", { staticStyle: { display: "flex", "flex-wrap": "nowrap", "align-items": "center", "justify-content": "space-between" } }, [t("ElSelect", { on: { change: e.updateTaskMessage }, model: { value: e.bindMessageId, callback: function(n) {
|
|
920
|
+
e.bindMessageId = n;
|
|
921
|
+
}, expression: "bindMessageId" } }, e._l(Object.keys(e.messageMap), function(n) {
|
|
922
|
+
return t("ElOption", { key: n, attrs: { value: n, label: e.messageMap[n] } });
|
|
923
|
+
}), 1), t("ElButton", { staticStyle: { "margin-left": "8px" }, attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: e.openMessageModel } })], 1)]), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.messageModelVisible, "close-on-click-modal": !1, title: "创建新消息", width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
924
|
+
e.messageModelVisible = n;
|
|
908
925
|
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
909
926
|
return [t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.createNewMessage } }, [e._v("确 认")])];
|
|
910
|
-
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.newMessageForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(
|
|
911
|
-
|
|
912
|
-
} } }, [t("ElFormItem", { attrs: { label: "消息ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.id, callback: function(
|
|
913
|
-
e.$set(e.newMessageForm, "id",
|
|
914
|
-
}, expression: "newMessageForm.id" } })], 1), t("ElFormItem", { attrs: { label: "消息名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.name, callback: function(
|
|
915
|
-
e.$set(e.newMessageForm, "name",
|
|
927
|
+
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.newMessageForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
|
|
928
|
+
n.preventDefault();
|
|
929
|
+
} } }, [t("ElFormItem", { attrs: { label: "消息ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.id, callback: function(n) {
|
|
930
|
+
e.$set(e.newMessageForm, "id", n);
|
|
931
|
+
}, expression: "newMessageForm.id" } })], 1), t("ElFormItem", { attrs: { label: "消息名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.name, callback: function(n) {
|
|
932
|
+
e.$set(e.newMessageForm, "name", n);
|
|
916
933
|
}, expression: "newMessageForm.name" } })], 1)], 1)], 1)], 1);
|
|
917
|
-
},
|
|
918
|
-
Ct,
|
|
919
|
-
kt,
|
|
934
|
+
}, _t = [], At = /* @__PURE__ */ h(
|
|
920
935
|
It,
|
|
936
|
+
kt,
|
|
937
|
+
_t,
|
|
921
938
|
!1,
|
|
922
939
|
null,
|
|
923
940
|
null
|
|
924
941
|
);
|
|
925
|
-
const
|
|
942
|
+
const wt = At.exports, $t = {
|
|
926
943
|
name: "ElementTaskConfig",
|
|
927
|
-
components: { UserTask:
|
|
944
|
+
components: { UserTask: Et, ScriptTask: Ct, ReceiveTask: wt },
|
|
928
945
|
props: {
|
|
929
946
|
id: String,
|
|
930
947
|
element: Object,
|
|
@@ -956,8 +973,8 @@ const At = _t.exports, wt = {
|
|
|
956
973
|
id: {
|
|
957
974
|
immediate: !0,
|
|
958
975
|
handler() {
|
|
959
|
-
var
|
|
960
|
-
this.taskConfigForm.asyncBefore = (e = (
|
|
976
|
+
var i, e, t, n, s, a;
|
|
977
|
+
this.taskConfigForm.asyncBefore = (e = (i = this.element) == null ? void 0 : i.businessObject) == null ? void 0 : e.asyncBefore, this.taskConfigForm.asyncAfter = (n = (t = this.element) == null ? void 0 : t.businessObject) == null ? void 0 : n.asyncAfter, this.taskConfigForm.exclusive = (a = (s = this.element) == null ? void 0 : s.businessObject) == null ? void 0 : a.exclusive;
|
|
961
978
|
}
|
|
962
979
|
},
|
|
963
980
|
type: {
|
|
@@ -973,26 +990,26 @@ const At = _t.exports, wt = {
|
|
|
973
990
|
}
|
|
974
991
|
}
|
|
975
992
|
};
|
|
976
|
-
var
|
|
993
|
+
var Lt = function() {
|
|
977
994
|
var e = this, t = e._self._c;
|
|
978
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(
|
|
979
|
-
|
|
980
|
-
} } }, [t("ElFormItem", { attrs: { label: "异步延续" } }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncBefore, callback: function(
|
|
981
|
-
e.$set(e.taskConfigForm, "asyncBefore",
|
|
982
|
-
}, expression: "taskConfigForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncAfter, callback: function(
|
|
983
|
-
e.$set(e.taskConfigForm, "asyncAfter",
|
|
984
|
-
}, expression: "taskConfigForm.asyncAfter" } }), e.taskConfigForm.asyncAfter || e.taskConfigForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.exclusive, callback: function(
|
|
985
|
-
e.$set(e.taskConfigForm, "exclusive",
|
|
995
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
|
|
996
|
+
n.preventDefault();
|
|
997
|
+
} } }, [t("ElFormItem", { attrs: { label: "异步延续" } }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncBefore, callback: function(n) {
|
|
998
|
+
e.$set(e.taskConfigForm, "asyncBefore", n);
|
|
999
|
+
}, expression: "taskConfigForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncAfter, callback: function(n) {
|
|
1000
|
+
e.$set(e.taskConfigForm, "asyncAfter", n);
|
|
1001
|
+
}, expression: "taskConfigForm.asyncAfter" } }), e.taskConfigForm.asyncAfter || e.taskConfigForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.exclusive, callback: function(n) {
|
|
1002
|
+
e.$set(e.taskConfigForm, "exclusive", n);
|
|
986
1003
|
}, expression: "taskConfigForm.exclusive" } }) : e._e()], 1), t(e.witchTaskComponent, e._b({ tag: "Component" }, "Component", e.$props, !1))], 1)], 1);
|
|
987
|
-
},
|
|
988
|
-
wt,
|
|
1004
|
+
}, Ot = [], Pt = /* @__PURE__ */ h(
|
|
989
1005
|
$t,
|
|
990
1006
|
Lt,
|
|
1007
|
+
Ot,
|
|
991
1008
|
!1,
|
|
992
1009
|
null,
|
|
993
1010
|
null
|
|
994
1011
|
);
|
|
995
|
-
const
|
|
1012
|
+
const Mt = Pt.exports, Dt = {
|
|
996
1013
|
name: "ElementMultiInstance",
|
|
997
1014
|
inject: {
|
|
998
1015
|
prefix: "prefix"
|
|
@@ -1021,8 +1038,8 @@ const Pt = Ot.exports, Mt = {
|
|
|
1021
1038
|
id: {
|
|
1022
1039
|
immediate: !0,
|
|
1023
1040
|
handler() {
|
|
1024
|
-
const { businessObject:
|
|
1025
|
-
this.getElementLoop(
|
|
1041
|
+
const { businessObject: i } = this.element;
|
|
1042
|
+
this.getElementLoop(i);
|
|
1026
1043
|
}
|
|
1027
1044
|
}
|
|
1028
1045
|
},
|
|
@@ -1030,59 +1047,59 @@ const Pt = Ot.exports, Mt = {
|
|
|
1030
1047
|
this.multiLoopInstance = null;
|
|
1031
1048
|
},
|
|
1032
1049
|
methods: {
|
|
1033
|
-
getElementLoop(
|
|
1034
|
-
var e, t,
|
|
1035
|
-
if (!
|
|
1050
|
+
getElementLoop(i) {
|
|
1051
|
+
var e, t, n, s, a, r;
|
|
1052
|
+
if (!i.loopCharacteristics) {
|
|
1036
1053
|
this.loopCharacteristics = "Null", this.loopInstanceForm = {};
|
|
1037
1054
|
return;
|
|
1038
1055
|
}
|
|
1039
|
-
if (
|
|
1056
|
+
if (i.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
|
|
1040
1057
|
this.loopCharacteristics = "StandardLoop", this.loopInstanceForm = {};
|
|
1041
1058
|
return;
|
|
1042
1059
|
}
|
|
1043
|
-
|
|
1044
|
-
completionCondition: (
|
|
1045
|
-
loopCardinality: (r = (a = (s =
|
|
1046
|
-
}), this.multiLoopInstance = this.element.businessObject.loopCharacteristics,
|
|
1060
|
+
i.loopCharacteristics.isSequential ? this.loopCharacteristics = "SequentialMultiInstance" : this.loopCharacteristics = "ParallelMultiInstance", this.loopInstanceForm = T(d(d({}, this.defaultLoopInstanceForm), i.loopCharacteristics), {
|
|
1061
|
+
completionCondition: (n = (t = (e = i.loopCharacteristics) == null ? void 0 : e.completionCondition) == null ? void 0 : t.body) != null ? n : "",
|
|
1062
|
+
loopCardinality: (r = (a = (s = i.loopCharacteristics) == null ? void 0 : s.loopCardinality) == null ? void 0 : a.body) != null ? r : ""
|
|
1063
|
+
}), this.multiLoopInstance = this.element.businessObject.loopCharacteristics, i.loopCharacteristics.extensionElements && i.loopCharacteristics.extensionElements.values && i.loopCharacteristics.extensionElements.values.length && this.$set(this.loopInstanceForm, "timeCycle", i.loopCharacteristics.extensionElements.values[0].body);
|
|
1047
1064
|
},
|
|
1048
|
-
changeLoopCharacteristicsType(
|
|
1049
|
-
if (
|
|
1065
|
+
changeLoopCharacteristicsType(i) {
|
|
1066
|
+
if (i === "Null") {
|
|
1050
1067
|
this.bpmnInstances.modeling.updateProperties(this.element, { loopCharacteristics: null });
|
|
1051
1068
|
return;
|
|
1052
1069
|
}
|
|
1053
|
-
if (
|
|
1070
|
+
if (i === "StandardLoop") {
|
|
1054
1071
|
const e = this.bpmnInstances.moddle.create("bpmn:StandardLoopCharacteristics");
|
|
1055
1072
|
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1056
1073
|
loopCharacteristics: e
|
|
1057
1074
|
}), this.multiLoopInstance = null;
|
|
1058
1075
|
return;
|
|
1059
1076
|
}
|
|
1060
|
-
|
|
1077
|
+
i === "SequentialMultiInstance" ? this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
|
|
1061
1078
|
isSequential: !0
|
|
1062
1079
|
}) : this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics"), this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1063
1080
|
loopCharacteristics: this.multiLoopInstance
|
|
1064
1081
|
});
|
|
1065
1082
|
},
|
|
1066
1083
|
// 循环基数
|
|
1067
|
-
updateLoopCardinality(
|
|
1084
|
+
updateLoopCardinality(i) {
|
|
1068
1085
|
let e = null;
|
|
1069
|
-
|
|
1086
|
+
i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
1070
1087
|
loopCardinality: e
|
|
1071
1088
|
});
|
|
1072
1089
|
},
|
|
1073
1090
|
// 完成条件
|
|
1074
|
-
updateLoopCondition(
|
|
1091
|
+
updateLoopCondition(i) {
|
|
1075
1092
|
let e = null;
|
|
1076
|
-
|
|
1093
|
+
i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
1077
1094
|
completionCondition: e
|
|
1078
1095
|
});
|
|
1079
1096
|
},
|
|
1080
1097
|
// 重试周期
|
|
1081
|
-
updateLoopTimeCycle(
|
|
1098
|
+
updateLoopTimeCycle(i) {
|
|
1082
1099
|
const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
1083
1100
|
values: [
|
|
1084
1101
|
this.bpmnInstances.moddle.create(`${this.prefix}:FailedJobRetryTimeCycle`, {
|
|
1085
|
-
body:
|
|
1102
|
+
body: i
|
|
1086
1103
|
})
|
|
1087
1104
|
]
|
|
1088
1105
|
});
|
|
@@ -1098,75 +1115,75 @@ const Pt = Ot.exports, Mt = {
|
|
|
1098
1115
|
});
|
|
1099
1116
|
},
|
|
1100
1117
|
// 各异步状态
|
|
1101
|
-
updateLoopAsync(
|
|
1118
|
+
updateLoopAsync(i) {
|
|
1102
1119
|
const { asyncBefore: e, asyncAfter: t } = this.loopInstanceForm;
|
|
1103
|
-
let
|
|
1104
|
-
!e && !t ? (this.$set(this.loopInstanceForm, "exclusive", !1),
|
|
1120
|
+
let n = /* @__PURE__ */ Object.create(null);
|
|
1121
|
+
!e && !t ? (this.$set(this.loopInstanceForm, "exclusive", !1), n = { asyncBefore: !1, asyncAfter: !1, exclusive: !1, extensionElements: null }) : n[i] = this.loopInstanceForm[i], this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, n);
|
|
1105
1122
|
}
|
|
1106
1123
|
}
|
|
1107
1124
|
};
|
|
1108
|
-
var
|
|
1125
|
+
var Bt = function() {
|
|
1109
1126
|
var e = this, t = e._self._c;
|
|
1110
|
-
return t("div", { staticClass: "panel-tab__content element-multi-instance" }, [t("ElForm", { attrs: { size: "mini", "label-width": "100px" }, nativeOn: { submit: function(
|
|
1111
|
-
|
|
1127
|
+
return t("div", { staticClass: "panel-tab__content element-multi-instance" }, [t("ElForm", { attrs: { size: "mini", "label-width": "100px" }, nativeOn: { submit: function(n) {
|
|
1128
|
+
n.preventDefault();
|
|
1112
1129
|
} } }, [t("ElFormItem", { attrs: { label: "回路特性" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1113
1130
|
return [e._v(" 回路特性 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1114
1131
|
return [t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("并行")]), e._v(" 一次性创建所有任务实例")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("串行")]), e._v(" 完成一个任务实例再创建一个任务实例,直到环节完成")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("循环事件")]), e._v(" 未知")])])];
|
|
1115
1132
|
}, proxy: !0 }]) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1116
|
-
}, proxy: !0 }]) }, [t("ElSelect", { on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(
|
|
1117
|
-
e.loopCharacteristics =
|
|
1133
|
+
}, proxy: !0 }]) }, [t("ElSelect", { on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(n) {
|
|
1134
|
+
e.loopCharacteristics = n;
|
|
1118
1135
|
}, expression: "loopCharacteristics" } }, [t("ElOption", { attrs: { label: "并行", value: "ParallelMultiInstance" } }), t("ElOption", { attrs: { label: "串行", value: "SequentialMultiInstance" } }), t("ElOption", { attrs: { label: "循环事件", value: "StandardLoop" } }), t("ElOption", { attrs: { label: "无", value: "Null" } })], 1)], 1), e.loopCharacteristics === "ParallelMultiInstance" || e.loopCharacteristics === "SequentialMultiInstance" ? [t("ElFormItem", { key: "loopCardinality", attrs: { label: "循环基数" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1119
1136
|
return [e._v(" 循环基数 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1120
1137
|
return [t("div", [e._v("与任务实例数相对,可不填")])];
|
|
1121
1138
|
}, proxy: !0 }], null, !1, 3306633709) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1122
|
-
}, proxy: !0 }], null, !1, 3757615878) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(
|
|
1123
|
-
e.$set(e.loopInstanceForm, "loopCardinality",
|
|
1139
|
+
}, proxy: !0 }], null, !1, 3757615878) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(n) {
|
|
1140
|
+
e.$set(e.loopInstanceForm, "loopCardinality", n);
|
|
1124
1141
|
}, expression: "loopInstanceForm.loopCardinality" } })], 1), t("ElFormItem", { key: "collection", attrs: { label: "集合名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1125
1142
|
return [e._v(" 集合变量 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1126
1143
|
return [t("p", [e._v("流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("${handlers}")]), e._v(" 就行")])];
|
|
1127
1144
|
}, proxy: !0 }], null, !1, 2769289721) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1128
|
-
}, proxy: !0 }], null, !1, 3139340263) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(
|
|
1129
|
-
e.$set(e.loopInstanceForm, "collection",
|
|
1145
|
+
}, proxy: !0 }], null, !1, 3139340263) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(n) {
|
|
1146
|
+
e.$set(e.loopInstanceForm, "collection", n);
|
|
1130
1147
|
}, expression: "loopInstanceForm.collection" } })], 1), t("ElFormItem", { key: "elementVariable", attrs: { label: "元素名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1131
1148
|
return [e._v(" 元素变量 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1132
1149
|
return [t("p", [e._v(" 流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("handler")]), e._v(' 就行,注意与"'), t("span", { staticClass: "flow-tips-keyword" }, [e._v("处理人")]), e._v('"中的"'), t("span", { staticClass: "flow-tips-keyword" }, [e._v("分配人员")]), e._v('"值保持一致 ')])];
|
|
1133
1150
|
}, proxy: !0 }], null, !1, 952223137) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1134
|
-
}, proxy: !0 }], null, !1, 1907746023) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(
|
|
1135
|
-
e.$set(e.loopInstanceForm, "elementVariable",
|
|
1151
|
+
}, proxy: !0 }], null, !1, 1907746023) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(n) {
|
|
1152
|
+
e.$set(e.loopInstanceForm, "elementVariable", n);
|
|
1136
1153
|
}, expression: "loopInstanceForm.elementVariable" } })], 1), t("ElFormItem", { key: "completionCondition", attrs: { label: "完成条件" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1137
1154
|
return [e._v(" 完成条件 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1138
1155
|
return [t("p", { staticClass: "flow-tips-title" }, [e._v("特殊流程变量:")]), t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfInstances")]), e._v(" 总实例数")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfCompletedInstances")]), e._v(" 已完成的实例数")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfActiveInstances")]), e._v(" 未完成实例数")])]), t("p", { staticClass: "flow-tips-title" }, [e._v("示例:")]), t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances/nrOfInstances >= 1}")]), e._v(":所有实例完成结束该环节 ")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances/nrOfInstances >= 0.5}")]), e._v(":50%实例完成结束该环节 ")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances >= 1}")]), e._v(":有一个实例完成结束该环节")])]), t("p", { staticClass: "flow-tips-title" }, [e._v("不填要等所有实例完成才会结束该环节")])];
|
|
1139
1156
|
}, proxy: !0 }], null, !1, 2952075778) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1140
|
-
}, proxy: !0 }], null, !1, 2319413861) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(
|
|
1141
|
-
e.$set(e.loopInstanceForm, "completionCondition",
|
|
1157
|
+
}, proxy: !0 }], null, !1, 2319413861) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(n) {
|
|
1158
|
+
e.$set(e.loopInstanceForm, "completionCondition", n);
|
|
1142
1159
|
}, expression: "loopInstanceForm.completionCondition" } })], 1), t("ElFormItem", { key: "async", attrs: { label: "异步状态" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1143
1160
|
return [e._v(" 异步状态 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
1144
1161
|
return [t("div", [e._v("目前没用到")])];
|
|
1145
1162
|
}, proxy: !0 }], null, !1, 1935913218) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
1146
|
-
}, proxy: !0 }], null, !1, 474663414) }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: function(
|
|
1163
|
+
}, proxy: !0 }], null, !1, 474663414) }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: function(n) {
|
|
1147
1164
|
return e.updateLoopAsync("asyncBefore");
|
|
1148
|
-
} }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(
|
|
1149
|
-
e.$set(e.loopInstanceForm, "asyncBefore",
|
|
1150
|
-
}, expression: "loopInstanceForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: function(
|
|
1165
|
+
} }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(n) {
|
|
1166
|
+
e.$set(e.loopInstanceForm, "asyncBefore", n);
|
|
1167
|
+
}, expression: "loopInstanceForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: function(n) {
|
|
1151
1168
|
return e.updateLoopAsync("asyncAfter");
|
|
1152
|
-
} }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(
|
|
1153
|
-
e.$set(e.loopInstanceForm, "asyncAfter",
|
|
1154
|
-
}, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: function(
|
|
1169
|
+
} }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(n) {
|
|
1170
|
+
e.$set(e.loopInstanceForm, "asyncAfter", n);
|
|
1171
|
+
}, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: function(n) {
|
|
1155
1172
|
return e.updateLoopAsync("exclusive");
|
|
1156
|
-
} }, model: { value: e.loopInstanceForm.exclusive, callback: function(
|
|
1157
|
-
e.$set(e.loopInstanceForm, "exclusive",
|
|
1158
|
-
}, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElFormItem", { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(
|
|
1159
|
-
e.$set(e.loopInstanceForm, "timeCycle",
|
|
1173
|
+
} }, model: { value: e.loopInstanceForm.exclusive, callback: function(n) {
|
|
1174
|
+
e.$set(e.loopInstanceForm, "exclusive", n);
|
|
1175
|
+
}, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElFormItem", { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(n) {
|
|
1176
|
+
e.$set(e.loopInstanceForm, "timeCycle", n);
|
|
1160
1177
|
}, expression: "loopInstanceForm.timeCycle" } })], 1) : e._e()] : e._e()], 2)], 1);
|
|
1161
|
-
},
|
|
1162
|
-
Mt,
|
|
1178
|
+
}, Rt = [], Vt = /* @__PURE__ */ h(
|
|
1163
1179
|
Dt,
|
|
1164
1180
|
Bt,
|
|
1181
|
+
Rt,
|
|
1165
1182
|
!1,
|
|
1166
1183
|
null,
|
|
1167
1184
|
null
|
|
1168
1185
|
);
|
|
1169
|
-
const
|
|
1186
|
+
const jt = Vt.exports, zt = {
|
|
1170
1187
|
name: "FlowCondition",
|
|
1171
1188
|
props: {
|
|
1172
1189
|
id: String,
|
|
@@ -1198,26 +1215,26 @@ const Rt = Vt.exports, jt = {
|
|
|
1198
1215
|
else if (!this.element.businessObject.conditionExpression)
|
|
1199
1216
|
this.flowConditionForm = { type: "normal" };
|
|
1200
1217
|
else {
|
|
1201
|
-
const
|
|
1202
|
-
if (this.flowConditionForm = T(d({},
|
|
1218
|
+
const i = this.element.businessObject.conditionExpression;
|
|
1219
|
+
if (this.flowConditionForm = T(d({}, i), { type: "condition" }), this.flowConditionForm.resource) {
|
|
1203
1220
|
this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "externalScript");
|
|
1204
1221
|
return;
|
|
1205
1222
|
}
|
|
1206
|
-
if (
|
|
1223
|
+
if (i.language) {
|
|
1207
1224
|
this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "inlineScript");
|
|
1208
1225
|
return;
|
|
1209
1226
|
}
|
|
1210
1227
|
this.$set(this.flowConditionForm, "conditionType", "expression");
|
|
1211
1228
|
}
|
|
1212
1229
|
},
|
|
1213
|
-
updateFlowType(
|
|
1214
|
-
if (
|
|
1230
|
+
updateFlowType(i) {
|
|
1231
|
+
if (i === "condition") {
|
|
1215
1232
|
this.flowConditionRef = this.bpmnInstances.moddle.create("bpmn:FormalExpression"), this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1216
1233
|
conditionExpression: this.flowConditionRef
|
|
1217
1234
|
});
|
|
1218
1235
|
return;
|
|
1219
1236
|
}
|
|
1220
|
-
if (
|
|
1237
|
+
if (i === "default") {
|
|
1221
1238
|
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1222
1239
|
conditionExpression: null
|
|
1223
1240
|
}), this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
|
|
@@ -1232,40 +1249,40 @@ const Rt = Vt.exports, jt = {
|
|
|
1232
1249
|
});
|
|
1233
1250
|
},
|
|
1234
1251
|
updateFlowCondition() {
|
|
1235
|
-
const { conditionType:
|
|
1252
|
+
const { conditionType: i, scriptType: e, body: t, resource: n, language: s } = this.flowConditionForm;
|
|
1236
1253
|
let a;
|
|
1237
|
-
|
|
1254
|
+
i === "expression" ? a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t }) : e === "inlineScript" ? (a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t, language: s }), this.$set(this.flowConditionForm, "resource", "")) : (this.$set(this.flowConditionForm, "body", ""), a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { resource: n, language: s })), this.bpmnInstances.modeling.updateProperties(this.element, { conditionExpression: a });
|
|
1238
1255
|
}
|
|
1239
1256
|
}
|
|
1240
1257
|
};
|
|
1241
|
-
var
|
|
1258
|
+
var Nt = function() {
|
|
1242
1259
|
var e = this, t = e._self._c;
|
|
1243
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(
|
|
1244
|
-
|
|
1245
|
-
} } }, [t("ElFormItem", { attrs: { label: "流转类型" } }, [t("ElSelect", { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(
|
|
1246
|
-
e.$set(e.flowConditionForm, "type",
|
|
1247
|
-
}, expression: "flowConditionForm.type" } }, [t("ElOption", { attrs: { label: "普通流转路径", value: "normal" } }), t("ElOption", { attrs: { label: "默认流转路径", value: "default" } }), t("ElOption", { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t("ElFormItem", { key: "condition", attrs: { label: "条件格式" } }, [t("ElSelect", { model: { value: e.flowConditionForm.conditionType, callback: function(
|
|
1248
|
-
e.$set(e.flowConditionForm, "conditionType",
|
|
1249
|
-
}, expression: "flowConditionForm.conditionType" } }, [t("ElOption", { attrs: { label: "表达式", value: "expression" } }), t("ElOption", { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t("ElFormItem", { key: "express", attrs: { label: "表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(
|
|
1250
|
-
e.$set(e.flowConditionForm, "body",
|
|
1251
|
-
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t("ElFormItem", { key: "language", attrs: { label: "脚本语言" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(
|
|
1252
|
-
e.$set(e.flowConditionForm, "language",
|
|
1253
|
-
}, expression: "flowConditionForm.language" } })], 1), t("ElFormItem", { key: "scriptType", attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.flowConditionForm.scriptType, callback: function(
|
|
1254
|
-
e.$set(e.flowConditionForm, "scriptType",
|
|
1255
|
-
}, expression: "flowConditionForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "body", attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(
|
|
1256
|
-
e.$set(e.flowConditionForm, "body",
|
|
1257
|
-
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t("ElFormItem", { key: "resource", attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(
|
|
1258
|
-
e.$set(e.flowConditionForm, "resource",
|
|
1260
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
1261
|
+
n.preventDefault();
|
|
1262
|
+
} } }, [t("ElFormItem", { attrs: { label: "流转类型" } }, [t("ElSelect", { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(n) {
|
|
1263
|
+
e.$set(e.flowConditionForm, "type", n);
|
|
1264
|
+
}, expression: "flowConditionForm.type" } }, [t("ElOption", { attrs: { label: "普通流转路径", value: "normal" } }), t("ElOption", { attrs: { label: "默认流转路径", value: "default" } }), t("ElOption", { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t("ElFormItem", { key: "condition", attrs: { label: "条件格式" } }, [t("ElSelect", { model: { value: e.flowConditionForm.conditionType, callback: function(n) {
|
|
1265
|
+
e.$set(e.flowConditionForm, "conditionType", n);
|
|
1266
|
+
}, expression: "flowConditionForm.conditionType" } }, [t("ElOption", { attrs: { label: "表达式", value: "expression" } }), t("ElOption", { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t("ElFormItem", { key: "express", attrs: { label: "表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
|
|
1267
|
+
e.$set(e.flowConditionForm, "body", n);
|
|
1268
|
+
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t("ElFormItem", { key: "language", attrs: { label: "脚本语言" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(n) {
|
|
1269
|
+
e.$set(e.flowConditionForm, "language", n);
|
|
1270
|
+
}, expression: "flowConditionForm.language" } })], 1), t("ElFormItem", { key: "scriptType", attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.flowConditionForm.scriptType, callback: function(n) {
|
|
1271
|
+
e.$set(e.flowConditionForm, "scriptType", n);
|
|
1272
|
+
}, expression: "flowConditionForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "body", attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
|
|
1273
|
+
e.$set(e.flowConditionForm, "body", n);
|
|
1274
|
+
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t("ElFormItem", { key: "resource", attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(n) {
|
|
1275
|
+
e.$set(e.flowConditionForm, "resource", n);
|
|
1259
1276
|
}, expression: "flowConditionForm.resource" } })], 1) : e._e()] : e._e()], 2)], 1);
|
|
1260
|
-
}, Ut = [],
|
|
1261
|
-
jt,
|
|
1277
|
+
}, Ut = [], Gt = /* @__PURE__ */ h(
|
|
1262
1278
|
zt,
|
|
1279
|
+
Nt,
|
|
1263
1280
|
Ut,
|
|
1264
1281
|
!1,
|
|
1265
1282
|
null,
|
|
1266
1283
|
null
|
|
1267
1284
|
);
|
|
1268
|
-
const
|
|
1285
|
+
const qt = Gt.exports, Kt = {
|
|
1269
1286
|
name: "SignalAndMessage",
|
|
1270
1287
|
props: {
|
|
1271
1288
|
bpmnInstances: Object
|
|
@@ -1289,114 +1306,114 @@ const Gt = Nt.exports, qt = {
|
|
|
1289
1306
|
},
|
|
1290
1307
|
methods: {
|
|
1291
1308
|
initDataList() {
|
|
1292
|
-
this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((
|
|
1293
|
-
|
|
1309
|
+
this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((i) => {
|
|
1310
|
+
i.$type === "bpmn:Message" && (this.messageIdMap[i.id] = !0, this.messageList.push(d({}, i))), i.$type === "bpmn:Signal" && (this.signalIdMap[i.id] = !0, this.signalList.push(d({}, i)));
|
|
1294
1311
|
});
|
|
1295
1312
|
},
|
|
1296
|
-
openModel(
|
|
1297
|
-
this.modelType =
|
|
1313
|
+
openModel(i) {
|
|
1314
|
+
this.modelType = i, this.modelObjectForm = {}, this.modelVisible = !0;
|
|
1298
1315
|
},
|
|
1299
1316
|
addNewObject() {
|
|
1300
1317
|
if (this.modelType === "message") {
|
|
1301
1318
|
if (this.messageIdMap[this.modelObjectForm.id])
|
|
1302
1319
|
return this.$message.error("该消息已存在,请修改id后重新保存");
|
|
1303
|
-
const
|
|
1304
|
-
this.rootElements.push(
|
|
1320
|
+
const i = this.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
|
|
1321
|
+
this.rootElements.push(i);
|
|
1305
1322
|
} else {
|
|
1306
1323
|
if (this.signalIdMap[this.modelObjectForm.id])
|
|
1307
1324
|
return this.$message.error("该信号已存在,请修改id后重新保存");
|
|
1308
|
-
const
|
|
1309
|
-
this.rootElements.push(
|
|
1325
|
+
const i = this.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
|
|
1326
|
+
this.rootElements.push(i);
|
|
1310
1327
|
}
|
|
1311
1328
|
this.modelVisible = !1, this.initDataList();
|
|
1312
1329
|
}
|
|
1313
1330
|
}
|
|
1314
1331
|
};
|
|
1315
|
-
var
|
|
1332
|
+
var Jt = function() {
|
|
1316
1333
|
var e = this, t = e._self._c;
|
|
1317
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(
|
|
1334
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
1318
1335
|
return e.openModel("message");
|
|
1319
|
-
} } }, [e._v("创建新消息")])], 1), t("ElTable", { attrs: { data: e.messageList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(
|
|
1336
|
+
} } }, [e._v("创建新消息")])], 1), t("ElTable", { attrs: { data: e.messageList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
1320
1337
|
return e.openModel("signal");
|
|
1321
|
-
} } }, [e._v("创建新信号")])], 1), t("ElTable", { attrs: { data: e.signalList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
1322
|
-
e.modelVisible =
|
|
1338
|
+
} } }, [e._v("创建新信号")])], 1), t("ElTable", { attrs: { data: e.signalList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
1339
|
+
e.modelVisible = n;
|
|
1323
1340
|
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
1324
|
-
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
1341
|
+
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1325
1342
|
e.modelVisible = !1;
|
|
1326
1343
|
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.addNewObject } }, [e._v("保 存")])];
|
|
1327
|
-
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(
|
|
1328
|
-
|
|
1329
|
-
} } }, [t("ElFormItem", { attrs: { label: e.modelConfig.idLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(
|
|
1330
|
-
e.$set(e.modelObjectForm, "id",
|
|
1331
|
-
}, expression: "modelObjectForm.id" } })], 1), t("ElFormItem", { attrs: { label: e.modelConfig.nameLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(
|
|
1332
|
-
e.$set(e.modelObjectForm, "name",
|
|
1344
|
+
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
|
|
1345
|
+
n.preventDefault();
|
|
1346
|
+
} } }, [t("ElFormItem", { attrs: { label: e.modelConfig.idLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(n) {
|
|
1347
|
+
e.$set(e.modelObjectForm, "id", n);
|
|
1348
|
+
}, expression: "modelObjectForm.id" } })], 1), t("ElFormItem", { attrs: { label: e.modelConfig.nameLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(n) {
|
|
1349
|
+
e.$set(e.modelObjectForm, "name", n);
|
|
1333
1350
|
}, expression: "modelObjectForm.name" } })], 1)], 1)], 1)], 1);
|
|
1334
|
-
},
|
|
1335
|
-
var
|
|
1336
|
-
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }),
|
|
1351
|
+
}, Zt = [function() {
|
|
1352
|
+
var i = this, e = i._self._c;
|
|
1353
|
+
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("消息列表")]);
|
|
1337
1354
|
}, function() {
|
|
1338
|
-
var
|
|
1339
|
-
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }),
|
|
1340
|
-
}],
|
|
1341
|
-
qt,
|
|
1355
|
+
var i = this, e = i._self._c;
|
|
1356
|
+
return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("信号列表")]);
|
|
1357
|
+
}], Ht = /* @__PURE__ */ h(
|
|
1342
1358
|
Kt,
|
|
1343
1359
|
Jt,
|
|
1360
|
+
Zt,
|
|
1344
1361
|
!1,
|
|
1345
1362
|
null,
|
|
1346
1363
|
null
|
|
1347
1364
|
);
|
|
1348
|
-
const
|
|
1349
|
-
function
|
|
1350
|
-
let e = d({},
|
|
1351
|
-
if (
|
|
1352
|
-
scriptType:
|
|
1353
|
-
})),
|
|
1365
|
+
const Wt = Ht.exports;
|
|
1366
|
+
function ge(i) {
|
|
1367
|
+
let e = d({}, i);
|
|
1368
|
+
if (i.script && (e = T(d(d({}, i), i.script), {
|
|
1369
|
+
scriptType: i.script.resource ? "externalScript" : "inlineScript"
|
|
1370
|
+
})), i.event === "timeout" && i.eventDefinitions && i.eventDefinitions.length) {
|
|
1354
1371
|
let t = "";
|
|
1355
|
-
for (const
|
|
1356
|
-
|
|
1357
|
-
e.eventTimeDefinitions =
|
|
1372
|
+
for (const n in i.eventDefinitions[0])
|
|
1373
|
+
n.indexOf("time") !== -1 && (t = n, e.eventDefinitionType = n.replace("time", "").toLowerCase());
|
|
1374
|
+
e.eventTimeDefinitions = i.eventDefinitions[0][t].body;
|
|
1358
1375
|
}
|
|
1359
1376
|
return e;
|
|
1360
1377
|
}
|
|
1361
|
-
function
|
|
1362
|
-
var t,
|
|
1378
|
+
function ve(i) {
|
|
1379
|
+
var t, n;
|
|
1363
1380
|
let e;
|
|
1364
|
-
return
|
|
1365
|
-
fields: (
|
|
1381
|
+
return i.class && (e = "classListener"), i.expression && (e = "expressionListener"), i.delegateExpression && (e = "delegateExpressionListener"), i.script && (e = "scriptListener"), T(d(d({}, v(i)), (t = i.script) != null ? t : {}), {
|
|
1382
|
+
fields: (n = i.fields) == null ? void 0 : n.map((s) => T(d({}, s), { fieldType: s.expression ? "expression" : "string" })),
|
|
1366
1383
|
listenerType: e
|
|
1367
1384
|
});
|
|
1368
1385
|
}
|
|
1369
|
-
const
|
|
1386
|
+
const Ee = {
|
|
1370
1387
|
classListener: "Java 类",
|
|
1371
1388
|
expressionListener: "表达式",
|
|
1372
1389
|
delegateExpressionListener: "代理表达式",
|
|
1373
1390
|
scriptListener: "脚本"
|
|
1374
|
-
},
|
|
1391
|
+
}, Xt = {
|
|
1375
1392
|
create: "创建",
|
|
1376
1393
|
assignment: "指派",
|
|
1377
1394
|
complete: "完成",
|
|
1378
1395
|
delete: "删除",
|
|
1379
1396
|
update: "更新",
|
|
1380
1397
|
timeout: "超时"
|
|
1381
|
-
},
|
|
1398
|
+
}, Fe = {
|
|
1382
1399
|
string: "字符串",
|
|
1383
1400
|
expression: "表达式"
|
|
1384
|
-
},
|
|
1401
|
+
}, Yt = (i) => ({
|
|
1385
1402
|
$type: "flowable:ExecutionListener",
|
|
1386
|
-
event:
|
|
1403
|
+
event: i === "draft" ? "start" : i,
|
|
1387
1404
|
// eslint-disable-next-line no-template-curly-in-string
|
|
1388
1405
|
delegateExpression: "${httpInvokeExecutionListener}",
|
|
1389
1406
|
fields: [],
|
|
1390
1407
|
listenerType: "delegateExpressionListener"
|
|
1391
|
-
}),
|
|
1408
|
+
}), Qt = (i, e) => [
|
|
1392
1409
|
{ $type: "flowable:Field", name: "serviceId", string: e.serviceId, fieldType: "string" },
|
|
1393
1410
|
{
|
|
1394
1411
|
$type: "flowable:Field",
|
|
1395
1412
|
name: "url",
|
|
1396
|
-
string: `${e != null && e.url ? `/${e.url}` : ""}/flow${
|
|
1413
|
+
string: `${e != null && e.url ? `/${e.url}` : ""}/flow${Ve(i)}`,
|
|
1397
1414
|
fieldType: "string"
|
|
1398
1415
|
}
|
|
1399
|
-
],
|
|
1416
|
+
], en = {
|
|
1400
1417
|
name: "ElementListeners",
|
|
1401
1418
|
inject: {
|
|
1402
1419
|
prefix: "prefix",
|
|
@@ -1425,54 +1442,54 @@ const ve = {
|
|
|
1425
1442
|
// 监听器所在下标,-1 为新增
|
|
1426
1443
|
editingListenerFieldIndex: -1,
|
|
1427
1444
|
// 字段所在下标,-1 为新增
|
|
1428
|
-
listenerTypeObject:
|
|
1429
|
-
fieldTypeObject:
|
|
1445
|
+
listenerTypeObject: Ee,
|
|
1446
|
+
fieldTypeObject: Fe
|
|
1430
1447
|
};
|
|
1431
1448
|
},
|
|
1432
1449
|
computed: {
|
|
1433
1450
|
apis() {
|
|
1434
1451
|
var e;
|
|
1435
1452
|
return (((e = this.context) == null ? void 0 : e.apis) || ["flowDraft", "flowStart", "flowEnd"]).map((t) => {
|
|
1436
|
-
var
|
|
1437
|
-
return `${(
|
|
1453
|
+
var n;
|
|
1454
|
+
return `${(n = this.context) != null && n.url ? `/${this.context.url}/` : ""}${t}`;
|
|
1438
1455
|
}) || [];
|
|
1439
1456
|
}
|
|
1440
1457
|
},
|
|
1441
1458
|
watch: {
|
|
1442
1459
|
id: {
|
|
1443
1460
|
immediate: !0,
|
|
1444
|
-
handler(
|
|
1461
|
+
handler(i) {
|
|
1445
1462
|
return c(this, null, function* () {
|
|
1446
|
-
|
|
1463
|
+
i && (yield this.$nextTick(), this.resetListenersList());
|
|
1447
1464
|
});
|
|
1448
1465
|
}
|
|
1449
1466
|
}
|
|
1450
1467
|
},
|
|
1451
1468
|
methods: {
|
|
1452
1469
|
resetListenersList() {
|
|
1453
|
-
var
|
|
1454
|
-
this.otherExtensionList = [], this.bpmnElementListeners = (
|
|
1470
|
+
var i, e, t, n;
|
|
1471
|
+
this.otherExtensionList = [], this.bpmnElementListeners = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((s) => s.$type === `${this.prefix}:ExecutionListener`)) != null ? n : [], this.elementListenersList = this.bpmnElementListeners.map((s) => ve(s));
|
|
1455
1472
|
},
|
|
1456
|
-
changeFiledType(
|
|
1457
|
-
|
|
1473
|
+
changeFiledType(i) {
|
|
1474
|
+
i === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
|
|
1458
1475
|
},
|
|
1459
|
-
assignListener(
|
|
1460
|
-
const e =
|
|
1461
|
-
e.fields =
|
|
1476
|
+
assignListener(i) {
|
|
1477
|
+
const e = Yt(i, this.context);
|
|
1478
|
+
e.fields = Qt(i, this.context), this.listenerForm = e, this.fieldsListOfListener = e.fields;
|
|
1462
1479
|
},
|
|
1463
|
-
setDefaultFieldValue(
|
|
1464
|
-
|
|
1480
|
+
setDefaultFieldValue(i) {
|
|
1481
|
+
i !== "url" ? this.$set(this.listenerFieldForm, "string", this.context[i] || "") : this.$set(this.listenerFieldForm, "string", "");
|
|
1465
1482
|
},
|
|
1466
1483
|
// 打开 监听器详情 侧边栏
|
|
1467
|
-
openListenerForm(
|
|
1484
|
+
openListenerForm(i, e) {
|
|
1468
1485
|
return c(this, null, function* () {
|
|
1469
1486
|
var t;
|
|
1470
|
-
|
|
1487
|
+
i ? (this.listenerForm = ge(i), this.fieldsListOfListener = i.fields ? i.fields.map((n) => d({}, n)) : [], this.editingListenerIndex = e) : (this.listenerForm = { fields: [] }, this.fieldsListOfListener = [], this.editingListenerIndex = -1), this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
|
|
1471
1488
|
});
|
|
1472
1489
|
},
|
|
1473
1490
|
// 打开监听器字段编辑弹窗
|
|
1474
|
-
openListenerFieldForm(
|
|
1475
|
-
this.listenerFieldForm =
|
|
1491
|
+
openListenerFieldForm(i, e) {
|
|
1492
|
+
this.listenerFieldForm = i ? v(i) : { fieldType: "string" }, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
|
|
1476
1493
|
this.$refs.listenerFieldFormRef && this.$refs.listenerFieldFormRef.clearValidate();
|
|
1477
1494
|
});
|
|
1478
1495
|
},
|
|
@@ -1483,7 +1500,7 @@ const ve = {
|
|
|
1483
1500
|
});
|
|
1484
1501
|
},
|
|
1485
1502
|
// 移除监听器字段
|
|
1486
|
-
removeListenerField(
|
|
1503
|
+
removeListenerField(i, e) {
|
|
1487
1504
|
return c(this, null, function* () {
|
|
1488
1505
|
try {
|
|
1489
1506
|
yield this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
|
|
@@ -1492,7 +1509,7 @@ const ve = {
|
|
|
1492
1509
|
});
|
|
1493
1510
|
},
|
|
1494
1511
|
// 移除监听器
|
|
1495
|
-
removeListener(
|
|
1512
|
+
removeListener(i, e) {
|
|
1496
1513
|
return c(this, null, function* () {
|
|
1497
1514
|
try {
|
|
1498
1515
|
yield this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), U(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
|
|
@@ -1503,16 +1520,16 @@ const ve = {
|
|
|
1503
1520
|
// 保存监听器配置
|
|
1504
1521
|
saveListenerConfig() {
|
|
1505
1522
|
return c(this, null, function* () {
|
|
1506
|
-
var t,
|
|
1523
|
+
var t, n, s, a;
|
|
1507
1524
|
if (!(yield this.$refs.listenerFormRef.validate())) return;
|
|
1508
|
-
const e =
|
|
1509
|
-
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (a = (s = (
|
|
1525
|
+
const e = he(this.bpmnInstances, this.listenerForm, !1, this.prefix);
|
|
1526
|
+
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (a = (s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((r) => r.$type !== `${this.prefix}:ExecutionListener`)) != null ? a : [], U(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
1510
1527
|
});
|
|
1511
1528
|
}
|
|
1512
1529
|
}
|
|
1513
1530
|
};
|
|
1514
|
-
var
|
|
1515
|
-
var
|
|
1531
|
+
var tn = function() {
|
|
1532
|
+
var n, s, a;
|
|
1516
1533
|
var e = this, t = e._self._c;
|
|
1517
1534
|
return t("div", { staticClass: "panel-tab__content element-listeners" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => e.listenerTypeObject[r.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: o }) {
|
|
1518
1535
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(p) {
|
|
@@ -1544,7 +1561,7 @@ var en = function() {
|
|
|
1544
1561
|
e.$set(e.listenerForm, "expression", r);
|
|
1545
1562
|
}, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(r) {
|
|
1546
1563
|
e.$set(e.listenerForm, "delegateExpression", r);
|
|
1547
|
-
}, expression: "listenerForm.delegateExpression" } }, e._l(((
|
|
1564
|
+
}, expression: "listenerForm.delegateExpression" } }, e._l(((n = e.context) == null ? void 0 : n.delegateExpressions) || [], function(r) {
|
|
1548
1565
|
return t("ElOption", { key: r, attrs: { value: r, label: r } });
|
|
1549
1566
|
}), 1)], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(r) {
|
|
1550
1567
|
e.$set(e.listenerForm, "scriptFormat", r);
|
|
@@ -1593,15 +1610,15 @@ var en = function() {
|
|
|
1593
1610
|
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(r) {
|
|
1594
1611
|
e.$set(e.listenerFieldForm, "expression", r);
|
|
1595
1612
|
}, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
|
|
1596
|
-
},
|
|
1597
|
-
Qt,
|
|
1613
|
+
}, nn = [], sn = /* @__PURE__ */ h(
|
|
1598
1614
|
en,
|
|
1599
1615
|
tn,
|
|
1616
|
+
nn,
|
|
1600
1617
|
!1,
|
|
1601
1618
|
null,
|
|
1602
1619
|
null
|
|
1603
1620
|
);
|
|
1604
|
-
const
|
|
1621
|
+
const rn = sn.exports, an = {
|
|
1605
1622
|
name: "ElementProperties",
|
|
1606
1623
|
inject: {
|
|
1607
1624
|
prefix: "prefix",
|
|
@@ -1623,22 +1640,22 @@ const sn = nn.exports, rn = {
|
|
|
1623
1640
|
watch: {
|
|
1624
1641
|
id: {
|
|
1625
1642
|
immediate: !0,
|
|
1626
|
-
handler(
|
|
1627
|
-
|
|
1643
|
+
handler(i) {
|
|
1644
|
+
i && i.length && this.resetAttributesList();
|
|
1628
1645
|
}
|
|
1629
1646
|
}
|
|
1630
1647
|
},
|
|
1631
1648
|
methods: {
|
|
1632
1649
|
resetAttributesList() {
|
|
1633
|
-
var
|
|
1634
|
-
this.otherExtensionList = [], this.bpmnElementProperties = (
|
|
1650
|
+
var i, e, t, n, s;
|
|
1651
|
+
this.otherExtensionList = [], this.bpmnElementProperties = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((a) => (a.$type !== `${this.prefix}:Properties` && this.otherExtensionList.push(a), a.$type === `${this.prefix}:Properties`))) != null ? n : [], this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((a, r) => a.concat(r.values), []), this.elementPropertyList = v((s = this.bpmnElementPropertyList) != null ? s : []);
|
|
1635
1652
|
},
|
|
1636
|
-
openAttributesForm(
|
|
1637
|
-
this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} :
|
|
1653
|
+
openAttributesForm(i, e) {
|
|
1654
|
+
this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} : v(i), this.propertyFormModelVisible = !0, this.$nextTick(() => {
|
|
1638
1655
|
this.$refs.attributeFormRef && this.$refs.attributeFormRef.clearValidate();
|
|
1639
1656
|
});
|
|
1640
1657
|
},
|
|
1641
|
-
removeAttributes(
|
|
1658
|
+
removeAttributes(i, e) {
|
|
1642
1659
|
this.$confirm("确认移除该属性吗?", "提示", {
|
|
1643
1660
|
confirmButtonText: "确 认",
|
|
1644
1661
|
cancelButtonText: "取 消"
|
|
@@ -1652,23 +1669,23 @@ const sn = nn.exports, rn = {
|
|
|
1652
1669
|
});
|
|
1653
1670
|
},
|
|
1654
1671
|
saveAttribute() {
|
|
1655
|
-
const { name:
|
|
1672
|
+
const { name: i, value: e } = this.propertyForm;
|
|
1656
1673
|
if (this.editingPropertyIndex !== -1)
|
|
1657
1674
|
this.bpmnInstances.modeling.updateModdleProperties(this.element, this.bpmnElementPropertyList[this.editingPropertyIndex], {
|
|
1658
|
-
name:
|
|
1675
|
+
name: i,
|
|
1659
1676
|
value: e
|
|
1660
1677
|
});
|
|
1661
1678
|
else {
|
|
1662
|
-
const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name:
|
|
1679
|
+
const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name: i, value: e }), n = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
|
|
1663
1680
|
values: this.bpmnElementPropertyList.concat([t])
|
|
1664
1681
|
});
|
|
1665
|
-
this.updateElementExtensions(
|
|
1682
|
+
this.updateElementExtensions(n);
|
|
1666
1683
|
}
|
|
1667
1684
|
this.propertyFormModelVisible = !1, this.resetAttributesList();
|
|
1668
1685
|
},
|
|
1669
|
-
updateElementExtensions(
|
|
1686
|
+
updateElementExtensions(i) {
|
|
1670
1687
|
const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
1671
|
-
values: this.otherExtensionList.concat([
|
|
1688
|
+
values: this.otherExtensionList.concat([i])
|
|
1672
1689
|
});
|
|
1673
1690
|
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1674
1691
|
extensionElements: e
|
|
@@ -1676,38 +1693,38 @@ const sn = nn.exports, rn = {
|
|
|
1676
1693
|
}
|
|
1677
1694
|
}
|
|
1678
1695
|
};
|
|
1679
|
-
var
|
|
1696
|
+
var on = function() {
|
|
1680
1697
|
var e = this, t = e._self._c;
|
|
1681
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row:
|
|
1698
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1682
1699
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1683
|
-
return e.openAttributesForm(
|
|
1700
|
+
return e.openAttributesForm(n, s);
|
|
1684
1701
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1685
|
-
return e.removeAttributes(
|
|
1702
|
+
return e.removeAttributes(n, s);
|
|
1686
1703
|
} } }, [e._v("移除")])];
|
|
1687
|
-
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(
|
|
1704
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
1688
1705
|
return e.openAttributesForm(null, -1);
|
|
1689
|
-
} } }, [e._v("添加属性")])], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
1690
|
-
e.propertyFormModelVisible =
|
|
1706
|
+
} } }, [e._v("添加属性")])], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
1707
|
+
e.propertyFormModelVisible = n;
|
|
1691
1708
|
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
1692
|
-
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
1709
|
+
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1693
1710
|
e.propertyFormModelVisible = !1;
|
|
1694
1711
|
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveAttribute } }, [e._v("确 定")])];
|
|
1695
|
-
}, proxy: !0 }]) }, [t("ElForm", { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(
|
|
1696
|
-
|
|
1697
|
-
} } }, [t("ElFormItem", { attrs: { label: "属性名:", prop: "name" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(
|
|
1698
|
-
e.$set(e.propertyForm, "name",
|
|
1699
|
-
}, expression: "propertyForm.name" } })], 1), t("ElFormItem", { attrs: { label: "属性值:", prop: "value" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(
|
|
1700
|
-
e.$set(e.propertyForm, "value",
|
|
1712
|
+
}, proxy: !0 }]) }, [t("ElForm", { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
1713
|
+
n.preventDefault();
|
|
1714
|
+
} } }, [t("ElFormItem", { attrs: { label: "属性名:", prop: "name" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(n) {
|
|
1715
|
+
e.$set(e.propertyForm, "name", n);
|
|
1716
|
+
}, expression: "propertyForm.name" } })], 1), t("ElFormItem", { attrs: { label: "属性值:", prop: "value" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(n) {
|
|
1717
|
+
e.$set(e.propertyForm, "value", n);
|
|
1701
1718
|
}, expression: "propertyForm.value" } })], 1)], 1)], 1)], 1);
|
|
1702
|
-
},
|
|
1703
|
-
rn,
|
|
1719
|
+
}, ln = [], pn = /* @__PURE__ */ h(
|
|
1704
1720
|
an,
|
|
1705
1721
|
on,
|
|
1722
|
+
ln,
|
|
1706
1723
|
!1,
|
|
1707
1724
|
null,
|
|
1708
1725
|
null
|
|
1709
1726
|
);
|
|
1710
|
-
const
|
|
1727
|
+
const mn = pn.exports, cn = {
|
|
1711
1728
|
name: "ElementForm",
|
|
1712
1729
|
inject: {
|
|
1713
1730
|
prefix: "prefix",
|
|
@@ -1754,17 +1771,17 @@ const pn = ln.exports, mn = {
|
|
|
1754
1771
|
watch: {
|
|
1755
1772
|
id: {
|
|
1756
1773
|
immediate: !0,
|
|
1757
|
-
handler(
|
|
1774
|
+
handler(i) {
|
|
1758
1775
|
return c(this, null, function* () {
|
|
1759
|
-
|
|
1776
|
+
i && (yield this.$nextTick(), this.resetFormList());
|
|
1760
1777
|
});
|
|
1761
1778
|
}
|
|
1762
1779
|
}
|
|
1763
1780
|
},
|
|
1764
1781
|
methods: {
|
|
1765
1782
|
resetFormList() {
|
|
1766
|
-
var
|
|
1767
|
-
this.formKey = this.element.businessObject.formKey, this.elExtensionElements = this.element.businessObject.get("extensionElements") || this.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] }), this.formData = ((
|
|
1783
|
+
var i;
|
|
1784
|
+
this.formKey = this.element.businessObject.formKey, this.elExtensionElements = this.element.businessObject.get("extensionElements") || this.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] }), this.formData = ((i = this.elExtensionElements.values.filter((e) => e.$type === `${this.prefix}:FormData`)) == null ? void 0 : i[0]) || this.bpmnInstances.moddle.create(`${this.prefix}:FormData`, { fields: [] }), this.businessKey = this.formData.businessKey, this.otherExtensions = this.elExtensionElements.values.filter((e) => e.$type !== `${this.prefix}:FormData`), this.fieldList = v(this.formData.fields || []), this.updateElementExtensions();
|
|
1768
1785
|
},
|
|
1769
1786
|
updateElementFormKey() {
|
|
1770
1787
|
this.bpmnInstances.modeling.updateProperties(this.element, { formKey: this.formKey });
|
|
@@ -1775,22 +1792,22 @@ const pn = ln.exports, mn = {
|
|
|
1775
1792
|
});
|
|
1776
1793
|
},
|
|
1777
1794
|
// 根据类型调整字段type
|
|
1778
|
-
changeFieldTypeType(
|
|
1779
|
-
this.$set(this.formFieldForm, "type",
|
|
1795
|
+
changeFieldTypeType(i) {
|
|
1796
|
+
this.$set(this.formFieldForm, "type", i === "custom" ? "" : i);
|
|
1780
1797
|
},
|
|
1781
1798
|
// 打开字段详情侧边栏
|
|
1782
|
-
openFieldForm(
|
|
1783
|
-
var t,
|
|
1799
|
+
openFieldForm(i, e) {
|
|
1800
|
+
var t, n;
|
|
1784
1801
|
if (this.formFieldIndex = e, e !== -1) {
|
|
1785
1802
|
const s = this.formData.fields[e];
|
|
1786
|
-
this.formFieldForm =
|
|
1803
|
+
this.formFieldForm = v(i), this.$set(this.formFieldForm, "typeType", this.fieldType[i.type] ? i.type : "custom"), i.type === "enum" && (this.fieldEnumList = v((s == null ? void 0 : s.values) || [])), this.fieldConstraintsList = v(((t = s == null ? void 0 : s.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = v(((n = s == null ? void 0 : s.properties) == null ? void 0 : n.values) || []);
|
|
1787
1804
|
} else
|
|
1788
1805
|
this.formFieldForm = {}, this.fieldEnumList = [], this.fieldConstraintsList = [], this.fieldPropertiesList = [];
|
|
1789
1806
|
this.fieldModelVisible = !0;
|
|
1790
1807
|
},
|
|
1791
1808
|
// 打开字段 某个 配置项 弹窗
|
|
1792
|
-
openFieldOptionForm(
|
|
1793
|
-
return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm =
|
|
1809
|
+
openFieldOptionForm(i, e, t) {
|
|
1810
|
+
return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "约束条件配置");
|
|
1794
1811
|
},
|
|
1795
1812
|
// 保存字段 某个 配置项
|
|
1796
1813
|
saveFieldOption() {
|
|
@@ -1798,8 +1815,8 @@ const pn = ln.exports, mn = {
|
|
|
1798
1815
|
},
|
|
1799
1816
|
// 保存字段配置
|
|
1800
1817
|
saveField() {
|
|
1801
|
-
const { id:
|
|
1802
|
-
if (
|
|
1818
|
+
const { id: i, type: e, label: t, defaultValue: n, datePattern: s } = this.formFieldForm, a = this.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id: i, type: e, label: t });
|
|
1819
|
+
if (n && (a.defaultValue = n), s && (a.datePattern = s), this.fieldPropertiesList && this.fieldPropertiesList.length) {
|
|
1803
1820
|
const r = this.fieldPropertiesList.map((o) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: o.id, value: o.value }));
|
|
1804
1821
|
a.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
|
|
1805
1822
|
values: r
|
|
@@ -1814,7 +1831,7 @@ const pn = ln.exports, mn = {
|
|
|
1814
1831
|
this.fieldEnumList && this.fieldEnumList.length && (a.values = this.fieldEnumList.map((r) => this.bpmnInstances.moddle.create(`${this.prefix}:Value`, { name: r.name, id: r.id }))), this.formFieldIndex === -1 ? (this.fieldList.push(this.formFieldForm), this.formData.fields.push(a)) : (this.fieldList.splice(this.formFieldIndex, 1, this.formFieldForm), this.formData.fields.splice(this.formFieldIndex, 1, a)), this.updateElementExtensions(), this.fieldModelVisible = !1;
|
|
1815
1832
|
},
|
|
1816
1833
|
// 移除某个 字段的 配置项
|
|
1817
|
-
removeFieldOptionItem(
|
|
1834
|
+
removeFieldOptionItem(i, e, t) {
|
|
1818
1835
|
if (t === "property") {
|
|
1819
1836
|
this.fieldPropertiesList.splice(e, 1);
|
|
1820
1837
|
return;
|
|
@@ -1826,107 +1843,107 @@ const pn = ln.exports, mn = {
|
|
|
1826
1843
|
this.fieldConstraintsList.splice(e, 1);
|
|
1827
1844
|
},
|
|
1828
1845
|
// 移除 字段
|
|
1829
|
-
removeField(
|
|
1846
|
+
removeField(i, e) {
|
|
1830
1847
|
this.fieldList.splice(e, 1), this.formData.fields.splice(e, 1), this.updateElementExtensions();
|
|
1831
1848
|
},
|
|
1832
1849
|
updateElementExtensions() {
|
|
1833
|
-
const
|
|
1850
|
+
const i = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
1834
1851
|
values: this.otherExtensions.concat(this.formData)
|
|
1835
1852
|
});
|
|
1836
1853
|
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1837
|
-
extensionElements:
|
|
1854
|
+
extensionElements: i
|
|
1838
1855
|
});
|
|
1839
1856
|
}
|
|
1840
1857
|
}
|
|
1841
1858
|
};
|
|
1842
|
-
var
|
|
1859
|
+
var un = function() {
|
|
1843
1860
|
var e = this, t = e._self._c;
|
|
1844
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(
|
|
1845
|
-
|
|
1846
|
-
} } }, [t("ElFormItem", { attrs: { label: "表单标识" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(
|
|
1847
|
-
e.formKey =
|
|
1848
|
-
}, expression: "formKey" } })], 1), t("ElFormItem", { attrs: { label: "业务标识" } }, [t("ElSelect", { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(
|
|
1849
|
-
e.businessKey =
|
|
1850
|
-
}, expression: "businessKey" } }, [e._l(e.fieldList, function(
|
|
1851
|
-
return t("ElOption", { key:
|
|
1852
|
-
}), t("ElOption", { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t("ElDivider", [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t("ElTable", { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", type: "index", width: "50px" } }), t("ElTableColumn", { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (
|
|
1861
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(n) {
|
|
1862
|
+
n.preventDefault();
|
|
1863
|
+
} } }, [t("ElFormItem", { attrs: { label: "表单标识" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(n) {
|
|
1864
|
+
e.formKey = n;
|
|
1865
|
+
}, expression: "formKey" } })], 1), t("ElFormItem", { attrs: { label: "业务标识" } }, [t("ElSelect", { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(n) {
|
|
1866
|
+
e.businessKey = n;
|
|
1867
|
+
}, expression: "businessKey" } }, [e._l(e.fieldList, function(n) {
|
|
1868
|
+
return t("ElOption", { key: n.id, attrs: { value: n.id, label: n.label } });
|
|
1869
|
+
}), t("ElOption", { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t("ElDivider", [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t("ElTable", { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", type: "index", width: "50px" } }), t("ElTableColumn", { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (n) => e.fieldType[n.type] || n.type, "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1853
1870
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1854
|
-
return e.openFieldForm(
|
|
1871
|
+
return e.openFieldForm(n, s);
|
|
1855
1872
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1856
|
-
return e.removeField(
|
|
1873
|
+
return e.removeField(n, s);
|
|
1857
1874
|
} } }, [e._v("移除")])];
|
|
1858
|
-
} }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(
|
|
1875
|
+
} }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
1859
1876
|
return e.openFieldForm(null, -1);
|
|
1860
|
-
} } }, [e._v("添加字段")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.fieldModelVisible, title: "字段配置", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
1861
|
-
e.fieldModelVisible =
|
|
1862
|
-
} } }, [t("ElForm", { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(
|
|
1863
|
-
|
|
1864
|
-
} } }, [t("ElFormItem", { attrs: { label: "字段ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(
|
|
1865
|
-
e.$set(e.formFieldForm, "id",
|
|
1866
|
-
}, expression: "formFieldForm.id" } })], 1), t("ElFormItem", { attrs: { label: "类型" } }, [t("ElSelect", { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(
|
|
1867
|
-
e.$set(e.formFieldForm, "typeType",
|
|
1868
|
-
}, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(
|
|
1869
|
-
return t("ElOption", { key: s, attrs: { label:
|
|
1870
|
-
}), 1)], 1), e.formFieldForm.typeType === "custom" ? t("ElFormItem", { attrs: { label: "类型名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(
|
|
1871
|
-
e.$set(e.formFieldForm, "type",
|
|
1872
|
-
}, expression: "formFieldForm.type" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(
|
|
1873
|
-
e.$set(e.formFieldForm, "label",
|
|
1874
|
-
}, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t("ElFormItem", { attrs: { label: "时间格式" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(
|
|
1875
|
-
e.$set(e.formFieldForm, "datePattern",
|
|
1876
|
-
}, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "默认值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(
|
|
1877
|
-
e.$set(e.formFieldForm, "defaultValue",
|
|
1878
|
-
}, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t("ElDivider", { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(
|
|
1877
|
+
} } }, [e._v("添加字段")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.fieldModelVisible, title: "字段配置", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
1878
|
+
e.fieldModelVisible = n;
|
|
1879
|
+
} } }, [t("ElForm", { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
1880
|
+
n.preventDefault();
|
|
1881
|
+
} } }, [t("ElFormItem", { attrs: { label: "字段ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(n) {
|
|
1882
|
+
e.$set(e.formFieldForm, "id", n);
|
|
1883
|
+
}, expression: "formFieldForm.id" } })], 1), t("ElFormItem", { attrs: { label: "类型" } }, [t("ElSelect", { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(n) {
|
|
1884
|
+
e.$set(e.formFieldForm, "typeType", n);
|
|
1885
|
+
}, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(n, s) {
|
|
1886
|
+
return t("ElOption", { key: s, attrs: { label: n, value: s } });
|
|
1887
|
+
}), 1)], 1), e.formFieldForm.typeType === "custom" ? t("ElFormItem", { attrs: { label: "类型名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(n) {
|
|
1888
|
+
e.$set(e.formFieldForm, "type", n);
|
|
1889
|
+
}, expression: "formFieldForm.type" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(n) {
|
|
1890
|
+
e.$set(e.formFieldForm, "label", n);
|
|
1891
|
+
}, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t("ElFormItem", { attrs: { label: "时间格式" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(n) {
|
|
1892
|
+
e.$set(e.formFieldForm, "datePattern", n);
|
|
1893
|
+
}, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "默认值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(n) {
|
|
1894
|
+
e.$set(e.formFieldForm, "defaultValue", n);
|
|
1895
|
+
}, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t("ElDivider", { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1879
1896
|
return e.openFieldOptionForm(null, -1, "enum");
|
|
1880
|
-
} } }, [e._v("添加枚举值")])], 1), t("ElTable", { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row:
|
|
1897
|
+
} } }, [e._v("添加枚举值")])], 1), t("ElTable", { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1881
1898
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1882
|
-
return e.openFieldOptionForm(
|
|
1899
|
+
return e.openFieldOptionForm(n, s, "enum");
|
|
1883
1900
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1884
|
-
return e.removeFieldOptionItem(
|
|
1901
|
+
return e.removeFieldOptionItem(n, s, "enum");
|
|
1885
1902
|
} } }, [e._v("移除")])];
|
|
1886
|
-
} }], null, !1, 747635382) })], 1)] : e._e(), t("ElDivider", { key: "validation-divider" }), t("p", { key: "validation-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("约束条件列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(
|
|
1903
|
+
} }], null, !1, 747635382) })], 1)] : e._e(), t("ElDivider", { key: "validation-divider" }), t("p", { key: "validation-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("约束条件列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1887
1904
|
return e.openFieldOptionForm(null, -1, "constraint");
|
|
1888
|
-
} } }, [e._v("添加约束")])], 1), t("ElTable", { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row:
|
|
1905
|
+
} } }, [e._v("添加约束")])], 1), t("ElTable", { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1889
1906
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1890
|
-
return e.openFieldOptionForm(
|
|
1907
|
+
return e.openFieldOptionForm(n, s, "constraint");
|
|
1891
1908
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1892
|
-
return e.removeFieldOptionItem(
|
|
1909
|
+
return e.removeFieldOptionItem(n, s, "constraint");
|
|
1893
1910
|
} } }, [e._v("移除")])];
|
|
1894
|
-
} }]) })], 1), t("ElDivider", { key: "property-divider" }), t("p", { key: "property-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("字段属性列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(
|
|
1911
|
+
} }]) })], 1), t("ElDivider", { key: "property-divider" }), t("p", { key: "property-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("字段属性列表:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1895
1912
|
return e.openFieldOptionForm(null, -1, "property");
|
|
1896
|
-
} } }, [e._v("添加属性")])], 1), t("ElTable", { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row:
|
|
1913
|
+
} } }, [e._v("添加属性")])], 1), t("ElTable", { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1897
1914
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1898
|
-
return e.openFieldOptionForm(
|
|
1915
|
+
return e.openFieldOptionForm(n, s, "property");
|
|
1899
1916
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1900
|
-
return e.removeFieldOptionItem(
|
|
1917
|
+
return e.removeFieldOptionItem(n, s, "property");
|
|
1901
1918
|
} } }, [e._v("移除")])];
|
|
1902
|
-
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
1919
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1903
1920
|
e.fieldModelVisible = !1;
|
|
1904
|
-
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
1905
|
-
e.fieldOptionModelVisible =
|
|
1921
|
+
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t("ElementDialog", { staticClass: "flow-dialog", attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
1922
|
+
e.fieldOptionModelVisible = n;
|
|
1906
1923
|
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
1907
|
-
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
1924
|
+
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1908
1925
|
e.fieldOptionModelVisible = !1;
|
|
1909
1926
|
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveFieldOption } }, [e._v("确 定")])];
|
|
1910
|
-
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(
|
|
1911
|
-
|
|
1912
|
-
} } }, [e.fieldOptionType !== "constraint" ? t("ElFormItem", { key: "option-id", attrs: { label: "编号/ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(
|
|
1913
|
-
e.$set(e.fieldOptionForm, "id",
|
|
1914
|
-
}, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t("ElFormItem", { key: "option-name", attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(
|
|
1915
|
-
e.$set(e.fieldOptionForm, "name",
|
|
1916
|
-
}, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t("ElFormItem", { key: "option-config", attrs: { label: "配置" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(
|
|
1917
|
-
e.$set(e.fieldOptionForm, "config",
|
|
1918
|
-
}, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t("ElFormItem", { key: "option-value", attrs: { label: "值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(
|
|
1919
|
-
e.$set(e.fieldOptionForm, "value",
|
|
1927
|
+
}, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
1928
|
+
n.preventDefault();
|
|
1929
|
+
} } }, [e.fieldOptionType !== "constraint" ? t("ElFormItem", { key: "option-id", attrs: { label: "编号/ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(n) {
|
|
1930
|
+
e.$set(e.fieldOptionForm, "id", n);
|
|
1931
|
+
}, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t("ElFormItem", { key: "option-name", attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(n) {
|
|
1932
|
+
e.$set(e.fieldOptionForm, "name", n);
|
|
1933
|
+
}, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t("ElFormItem", { key: "option-config", attrs: { label: "配置" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(n) {
|
|
1934
|
+
e.$set(e.fieldOptionForm, "config", n);
|
|
1935
|
+
}, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t("ElFormItem", { key: "option-value", attrs: { label: "值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(n) {
|
|
1936
|
+
e.$set(e.fieldOptionForm, "value", n);
|
|
1920
1937
|
}, expression: "fieldOptionForm.value" } })], 1) : e._e()], 1)], 1)], 1);
|
|
1921
|
-
},
|
|
1922
|
-
mn,
|
|
1938
|
+
}, dn = [], fn = /* @__PURE__ */ h(
|
|
1923
1939
|
cn,
|
|
1924
1940
|
un,
|
|
1941
|
+
dn,
|
|
1925
1942
|
!1,
|
|
1926
1943
|
null,
|
|
1927
1944
|
null
|
|
1928
1945
|
);
|
|
1929
|
-
const
|
|
1946
|
+
const bn = fn.exports, yn = {
|
|
1930
1947
|
name: "UserTaskListeners",
|
|
1931
1948
|
inject: {
|
|
1932
1949
|
prefix: "prefix",
|
|
@@ -1940,11 +1957,11 @@ const fn = dn.exports, bn = {
|
|
|
1940
1957
|
data() {
|
|
1941
1958
|
return {
|
|
1942
1959
|
elementListenersList: [],
|
|
1943
|
-
listenerEventTypeObject:
|
|
1944
|
-
listenerTypeObject:
|
|
1960
|
+
listenerEventTypeObject: Xt,
|
|
1961
|
+
listenerTypeObject: Ee,
|
|
1945
1962
|
listenerFormModelVisible: !1,
|
|
1946
1963
|
listenerForm: {},
|
|
1947
|
-
fieldTypeObject:
|
|
1964
|
+
fieldTypeObject: Fe,
|
|
1948
1965
|
fieldsListOfListener: [],
|
|
1949
1966
|
listenerFieldFormModelVisible: !1,
|
|
1950
1967
|
// 监听器 注入字段表单弹窗 显示状态
|
|
@@ -1959,28 +1976,28 @@ const fn = dn.exports, bn = {
|
|
|
1959
1976
|
watch: {
|
|
1960
1977
|
id: {
|
|
1961
1978
|
immediate: !0,
|
|
1962
|
-
handler(
|
|
1979
|
+
handler(i) {
|
|
1963
1980
|
return c(this, null, function* () {
|
|
1964
|
-
|
|
1981
|
+
i && (yield this.$nextTick(), this.resetListenersList());
|
|
1965
1982
|
});
|
|
1966
1983
|
}
|
|
1967
1984
|
}
|
|
1968
1985
|
},
|
|
1969
1986
|
methods: {
|
|
1970
1987
|
resetListenersList() {
|
|
1971
|
-
var
|
|
1972
|
-
this.otherExtensionList = [], this.bpmnElementListeners = (
|
|
1988
|
+
var i, e, t, n;
|
|
1989
|
+
this.otherExtensionList = [], this.bpmnElementListeners = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((s) => s.$type === `${this.prefix}:TaskListener`)) != null ? n : [], this.elementListenersList = this.bpmnElementListeners.map((s) => ve(s));
|
|
1973
1990
|
},
|
|
1974
|
-
openListenerForm(
|
|
1991
|
+
openListenerForm(i, e) {
|
|
1975
1992
|
return c(this, null, function* () {
|
|
1976
1993
|
var t;
|
|
1977
|
-
|
|
1978
|
-
fieldType:
|
|
1994
|
+
i ? (this.listenerForm = ge(i), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), i && i.fields ? this.fieldsListOfListener = i.fields.map((n) => T(d({}, n), {
|
|
1995
|
+
fieldType: n.string ? "string" : "expression"
|
|
1979
1996
|
})) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
|
|
1980
1997
|
});
|
|
1981
1998
|
},
|
|
1982
1999
|
// 移除监听器
|
|
1983
|
-
removeListener(
|
|
2000
|
+
removeListener(i, e) {
|
|
1984
2001
|
return c(this, null, function* () {
|
|
1985
2002
|
try {
|
|
1986
2003
|
yield this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), U(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
|
|
@@ -1991,17 +2008,17 @@ const fn = dn.exports, bn = {
|
|
|
1991
2008
|
// 保存监听器
|
|
1992
2009
|
saveListenerConfig() {
|
|
1993
2010
|
return c(this, null, function* () {
|
|
1994
|
-
var t,
|
|
2011
|
+
var t, n, s, a;
|
|
1995
2012
|
if (!(yield this.$refs.listenerFormRef.validate())) return;
|
|
1996
|
-
const e =
|
|
1997
|
-
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (a = (s = (
|
|
2013
|
+
const e = he(this.bpmnInstances, this.listenerForm, !0, this.prefix);
|
|
2014
|
+
this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = (a = (s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((r) => r.$type !== `${this.prefix}:TaskListener`)) != null ? a : [], U(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
1998
2015
|
});
|
|
1999
2016
|
},
|
|
2000
2017
|
// 打开监听器字段编辑弹窗
|
|
2001
|
-
openListenerFieldForm(
|
|
2018
|
+
openListenerFieldForm(i, e) {
|
|
2002
2019
|
return c(this, null, function* () {
|
|
2003
2020
|
var t;
|
|
2004
|
-
this.listenerFieldForm =
|
|
2021
|
+
this.listenerFieldForm = i ? v(i) : {}, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
|
|
2005
2022
|
});
|
|
2006
2023
|
},
|
|
2007
2024
|
// 保存监听器注入字段
|
|
@@ -2011,7 +2028,7 @@ const fn = dn.exports, bn = {
|
|
|
2011
2028
|
});
|
|
2012
2029
|
},
|
|
2013
2030
|
// 移除监听器字段
|
|
2014
|
-
removeListenerField(
|
|
2031
|
+
removeListenerField(i, e) {
|
|
2015
2032
|
return c(this, null, function* () {
|
|
2016
2033
|
try {
|
|
2017
2034
|
yield this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
|
|
@@ -2021,99 +2038,99 @@ const fn = dn.exports, bn = {
|
|
|
2021
2038
|
}
|
|
2022
2039
|
}
|
|
2023
2040
|
};
|
|
2024
|
-
var
|
|
2041
|
+
var hn = function() {
|
|
2025
2042
|
var e = this, t = e._self._c;
|
|
2026
|
-
return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (
|
|
2043
|
+
return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerEventTypeObject[n.event] } }), t("ElTableColumn", { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerTypeObject[n.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
2027
2044
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
2028
|
-
return e.openListenerForm(
|
|
2045
|
+
return e.openListenerForm(n, s);
|
|
2029
2046
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
2030
|
-
return e.removeListener(
|
|
2047
|
+
return e.removeListener(n, s);
|
|
2031
2048
|
} } }, [e._v("移除")])];
|
|
2032
|
-
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(
|
|
2049
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
2033
2050
|
return e.openListenerForm(null);
|
|
2034
|
-
} } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "任务监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
2035
|
-
e.listenerFormModelVisible =
|
|
2036
|
-
} } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(
|
|
2037
|
-
|
|
2038
|
-
} } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(
|
|
2039
|
-
e.$set(e.listenerForm, "event",
|
|
2040
|
-
}, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(
|
|
2041
|
-
return t("ElOption", { key:
|
|
2042
|
-
}), 1)], 1), t("ElFormItem", { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(
|
|
2043
|
-
e.$set(e.listenerForm, "id",
|
|
2044
|
-
}, expression: "listenerForm.id" } })], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(
|
|
2045
|
-
e.$set(e.listenerForm, "listenerType",
|
|
2046
|
-
}, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(
|
|
2047
|
-
return t("ElOption", { key:
|
|
2048
|
-
}), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(
|
|
2049
|
-
e.$set(e.listenerForm, "class",
|
|
2050
|
-
}, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(
|
|
2051
|
-
e.$set(e.listenerForm, "expression",
|
|
2052
|
-
}, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(
|
|
2053
|
-
e.$set(e.listenerForm, "delegateExpression",
|
|
2054
|
-
}, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(
|
|
2055
|
-
e.$set(e.listenerForm, "scriptFormat",
|
|
2056
|
-
}, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(
|
|
2057
|
-
e.$set(e.listenerForm, "scriptType",
|
|
2058
|
-
}, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(
|
|
2059
|
-
e.$set(e.listenerForm, "value",
|
|
2060
|
-
}, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(
|
|
2061
|
-
e.$set(e.listenerForm, "resource",
|
|
2062
|
-
}, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t("ElFormItem", { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t("ElSelect", { model: { value: e.listenerForm.eventDefinitionType, callback: function(
|
|
2063
|
-
e.$set(e.listenerForm, "eventDefinitionType",
|
|
2064
|
-
}, expression: "listenerForm.eventDefinitionType" } }, [t("ElOption", { attrs: { label: "日期", value: "date" } }), t("ElOption", { attrs: { label: "持续时长", value: "duration" } }), t("ElOption", { attrs: { label: "循环", value: "cycle" } }), t("ElOption", { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t("ElFormItem", { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(
|
|
2065
|
-
e.$set(e.listenerForm, "eventTimeDefinitions",
|
|
2066
|
-
}, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(
|
|
2051
|
+
} } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "任务监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
2052
|
+
e.listenerFormModelVisible = n;
|
|
2053
|
+
} } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
2054
|
+
n.preventDefault();
|
|
2055
|
+
} } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(n) {
|
|
2056
|
+
e.$set(e.listenerForm, "event", n);
|
|
2057
|
+
}, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(n) {
|
|
2058
|
+
return t("ElOption", { key: n, attrs: { label: e.listenerEventTypeObject[n], value: n } });
|
|
2059
|
+
}), 1)], 1), t("ElFormItem", { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(n) {
|
|
2060
|
+
e.$set(e.listenerForm, "id", n);
|
|
2061
|
+
}, expression: "listenerForm.id" } })], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(n) {
|
|
2062
|
+
e.$set(e.listenerForm, "listenerType", n);
|
|
2063
|
+
}, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(n) {
|
|
2064
|
+
return t("ElOption", { key: n, attrs: { label: e.listenerTypeObject[n], value: n } });
|
|
2065
|
+
}), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(n) {
|
|
2066
|
+
e.$set(e.listenerForm, "class", n);
|
|
2067
|
+
}, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(n) {
|
|
2068
|
+
e.$set(e.listenerForm, "expression", n);
|
|
2069
|
+
}, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(n) {
|
|
2070
|
+
e.$set(e.listenerForm, "delegateExpression", n);
|
|
2071
|
+
}, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(n) {
|
|
2072
|
+
e.$set(e.listenerForm, "scriptFormat", n);
|
|
2073
|
+
}, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(n) {
|
|
2074
|
+
e.$set(e.listenerForm, "scriptType", n);
|
|
2075
|
+
}, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(n) {
|
|
2076
|
+
e.$set(e.listenerForm, "value", n);
|
|
2077
|
+
}, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(n) {
|
|
2078
|
+
e.$set(e.listenerForm, "resource", n);
|
|
2079
|
+
}, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t("ElFormItem", { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t("ElSelect", { model: { value: e.listenerForm.eventDefinitionType, callback: function(n) {
|
|
2080
|
+
e.$set(e.listenerForm, "eventDefinitionType", n);
|
|
2081
|
+
}, expression: "listenerForm.eventDefinitionType" } }, [t("ElOption", { attrs: { label: "日期", value: "date" } }), t("ElOption", { attrs: { label: "持续时长", value: "duration" } }), t("ElOption", { attrs: { label: "循环", value: "cycle" } }), t("ElOption", { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t("ElFormItem", { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(n) {
|
|
2082
|
+
e.$set(e.listenerForm, "eventTimeDefinitions", n);
|
|
2083
|
+
}, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
2067
2084
|
return e.openListenerFieldForm(null);
|
|
2068
|
-
} } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (
|
|
2085
|
+
} } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.fieldTypeObject[n.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => n.string || n.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
2069
2086
|
return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
2070
|
-
return e.openListenerFieldForm(
|
|
2087
|
+
return e.openListenerFieldForm(n, s);
|
|
2071
2088
|
} } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
2072
|
-
return e.removeListenerField(
|
|
2089
|
+
return e.removeListenerField(n, s);
|
|
2073
2090
|
} } }, [e._v(" 移除 ")])];
|
|
2074
|
-
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
2091
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
2075
2092
|
e.listenerFormModelVisible = !1;
|
|
2076
|
-
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(
|
|
2077
|
-
e.listenerFieldFormModelVisible =
|
|
2093
|
+
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
2094
|
+
e.listenerFieldFormModelVisible = n;
|
|
2078
2095
|
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
2079
|
-
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(
|
|
2096
|
+
return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
|
|
2080
2097
|
e.listenerFieldFormModelVisible = !1;
|
|
2081
2098
|
} } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
|
|
2082
|
-
}, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(
|
|
2083
|
-
|
|
2084
|
-
} } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(
|
|
2085
|
-
e.$set(e.listenerFieldForm, "name",
|
|
2086
|
-
}, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerFieldForm.fieldType, callback: function(
|
|
2087
|
-
e.$set(e.listenerFieldForm, "fieldType",
|
|
2088
|
-
}, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(
|
|
2089
|
-
return t("ElOption", { key:
|
|
2090
|
-
}), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(
|
|
2091
|
-
e.$set(e.listenerFieldForm, "string",
|
|
2092
|
-
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(
|
|
2093
|
-
e.$set(e.listenerFieldForm, "expression",
|
|
2099
|
+
}, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
2100
|
+
n.preventDefault();
|
|
2101
|
+
} } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(n) {
|
|
2102
|
+
e.$set(e.listenerFieldForm, "name", n);
|
|
2103
|
+
}, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerFieldForm.fieldType, callback: function(n) {
|
|
2104
|
+
e.$set(e.listenerFieldForm, "fieldType", n);
|
|
2105
|
+
}, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(n) {
|
|
2106
|
+
return t("ElOption", { key: n, attrs: { label: e.fieldTypeObject[n], value: n } });
|
|
2107
|
+
}), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(n) {
|
|
2108
|
+
e.$set(e.listenerFieldForm, "string", n);
|
|
2109
|
+
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(n) {
|
|
2110
|
+
e.$set(e.listenerFieldForm, "expression", n);
|
|
2094
2111
|
}, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
|
|
2095
|
-
},
|
|
2096
|
-
bn,
|
|
2112
|
+
}, gn = [], vn = /* @__PURE__ */ h(
|
|
2097
2113
|
yn,
|
|
2098
2114
|
hn,
|
|
2115
|
+
gn,
|
|
2099
2116
|
!1,
|
|
2100
2117
|
null,
|
|
2101
2118
|
null
|
|
2102
2119
|
);
|
|
2103
|
-
const
|
|
2120
|
+
const En = vn.exports, le = ["base", "task", "form", "multiInstance"], Fn = {
|
|
2104
2121
|
name: "PropertiesPanel",
|
|
2105
2122
|
componentName: "MyPropertiesPanel",
|
|
2106
2123
|
components: {
|
|
2107
|
-
UserTaskListeners:
|
|
2108
|
-
ElementForm:
|
|
2109
|
-
ElementProperties:
|
|
2110
|
-
ElementListeners:
|
|
2111
|
-
SignalAndMassage:
|
|
2112
|
-
FlowCondition:
|
|
2113
|
-
ElementMultiInstance:
|
|
2114
|
-
ElementTask:
|
|
2115
|
-
ElementOtherConfig:
|
|
2116
|
-
ElementBaseInfo:
|
|
2124
|
+
UserTaskListeners: En,
|
|
2125
|
+
ElementForm: bn,
|
|
2126
|
+
ElementProperties: mn,
|
|
2127
|
+
ElementListeners: rn,
|
|
2128
|
+
SignalAndMassage: Wt,
|
|
2129
|
+
FlowCondition: qt,
|
|
2130
|
+
ElementMultiInstance: jt,
|
|
2131
|
+
ElementTask: Mt,
|
|
2132
|
+
ElementOtherConfig: bt,
|
|
2133
|
+
ElementBaseInfo: mt
|
|
2117
2134
|
},
|
|
2118
2135
|
provide() {
|
|
2119
2136
|
return {
|
|
@@ -2191,12 +2208,12 @@ const gn = vn.exports, ae = ["base", "task", "form", "multiInstance"], En = {
|
|
|
2191
2208
|
activeTabs: {
|
|
2192
2209
|
immediate: !0,
|
|
2193
2210
|
handler() {
|
|
2194
|
-
this.activeTab =
|
|
2211
|
+
this.activeTab = le;
|
|
2195
2212
|
}
|
|
2196
2213
|
},
|
|
2197
2214
|
elementId: {
|
|
2198
2215
|
handler() {
|
|
2199
|
-
this.activeTab =
|
|
2216
|
+
this.activeTab = le;
|
|
2200
2217
|
}
|
|
2201
2218
|
}
|
|
2202
2219
|
},
|
|
@@ -2209,7 +2226,7 @@ const gn = vn.exports, ae = ["base", "task", "form", "multiInstance"], En = {
|
|
|
2209
2226
|
this.timer = setTimeout(() => this.initModels(), 10);
|
|
2210
2227
|
return;
|
|
2211
2228
|
}
|
|
2212
|
-
this.timer && clearTimeout(this.timer), this.bpmnInstances =
|
|
2229
|
+
this.timer && clearTimeout(this.timer), this.bpmnInstances = N({
|
|
2213
2230
|
modeler: this.bpmnModeler,
|
|
2214
2231
|
modeling: this.bpmnModeler.get("modeling"),
|
|
2215
2232
|
moddle: this.bpmnModeler.get("moddle"),
|
|
@@ -2224,28 +2241,28 @@ const gn = vn.exports, ae = ["base", "task", "form", "multiInstance"], En = {
|
|
|
2224
2241
|
getActiveElement() {
|
|
2225
2242
|
this.initFormOnChanged(null), this.bpmnModeler.on("import.done", () => {
|
|
2226
2243
|
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), this.initFormOnChanged(null);
|
|
2227
|
-
}), this.bpmnModeler.on("selection.changed", ({ newSelection:
|
|
2228
|
-
this.initFormOnChanged(
|
|
2229
|
-
}), this.bpmnModeler.on("element.changed", ({ element:
|
|
2230
|
-
|
|
2244
|
+
}), this.bpmnModeler.on("selection.changed", ({ newSelection: i }) => {
|
|
2245
|
+
this.initFormOnChanged(i[0] || null);
|
|
2246
|
+
}), this.bpmnModeler.on("element.changed", ({ element: i }) => {
|
|
2247
|
+
i && i.id === this.elementId && this.initFormOnChanged(i);
|
|
2231
2248
|
});
|
|
2232
2249
|
},
|
|
2233
2250
|
// 初始化数据
|
|
2234
|
-
initFormOnChanged(
|
|
2251
|
+
initFormOnChanged(i) {
|
|
2235
2252
|
var t;
|
|
2236
|
-
let e =
|
|
2237
|
-
e || (e = (t = this.bpmnInstances.elementRegistry.find((
|
|
2253
|
+
let e = i;
|
|
2254
|
+
e || (e = (t = this.bpmnInstances.elementRegistry.find((n) => n.type === "bpmn:Process")) != null ? t : this.bpmnInstances.elementRegistry.find((n) => n.type === "bpmn:Collaboration")), e && (this.element = N(e), this.elementId = e.id, this.elementType = e.type.split(":")[1] || "", this.conditionFormVisible = !!(this.elementType === "SequenceFlow" && e.source && e.source.type.indexOf("StartEvent") === -1), this.formVisible = this.elementType === "UserTask");
|
|
2238
2255
|
}
|
|
2239
2256
|
}
|
|
2240
2257
|
};
|
|
2241
|
-
var
|
|
2258
|
+
var xn = function() {
|
|
2242
2259
|
var e = this, t = e._self._c;
|
|
2243
|
-
return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(
|
|
2260
|
+
return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(n) {
|
|
2244
2261
|
e.isPanelVisible = !0;
|
|
2245
|
-
} } }, [t("div", { staticStyle: { height: "40px", "line-height": "40px" } }, [t("i", { class: ["open-properties-handel", e.isPanelVisible ? "el-icon-caret-right" : "el-icon-caret-left"], on: { click: function(
|
|
2246
|
-
|
|
2247
|
-
} } })]), t("ElCollapse", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(
|
|
2248
|
-
e.activeTab =
|
|
2262
|
+
} } }, [t("div", { staticStyle: { height: "40px", "line-height": "40px" } }, [t("i", { class: ["open-properties-handel", e.isPanelVisible ? "el-icon-caret-right" : "el-icon-caret-left"], on: { click: function(n) {
|
|
2263
|
+
n.stopPropagation(), e.isPanelVisible = !e.isPanelVisible;
|
|
2264
|
+
} } })]), t("ElCollapse", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(n) {
|
|
2265
|
+
e.activeTab = n;
|
|
2249
2266
|
}, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t("ElCollapseItem", { attrs: { name: "base" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
2250
2267
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-info" }), e._v("常规")])];
|
|
2251
2268
|
}, proxy: !0 }], null, !1, 2621733365) }, [t("ElementBaseInfo", { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("message")) && e.elementType === "Process" ? t("ElCollapseItem", { key: "message", attrs: { name: "message" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
@@ -2275,43 +2292,43 @@ var Fn = function() {
|
|
|
2275
2292
|
}, proxy: !0 }], null, !1, 1854866151) }, [t("ElementProperties", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("other") ? t("ElCollapseItem", { key: "other", attrs: { name: "other" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
2276
2293
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("其他")])];
|
|
2277
2294
|
}, proxy: !0 }], null, !1, 520255146) }, [t("ElementOtherConfig", { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extend") ? e._t("extend", null, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e()], 2)], 1);
|
|
2278
|
-
},
|
|
2279
|
-
En,
|
|
2295
|
+
}, Sn = [], Tn = /* @__PURE__ */ h(
|
|
2280
2296
|
Fn,
|
|
2281
2297
|
xn,
|
|
2298
|
+
Sn,
|
|
2282
2299
|
!1,
|
|
2283
2300
|
null,
|
|
2284
2301
|
null
|
|
2285
2302
|
);
|
|
2286
|
-
const
|
|
2303
|
+
const Cn = Tn.exports, In = (i, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
|
|
2287
2304
|
<bpmn2:definitions
|
|
2288
2305
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
2289
2306
|
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
2290
2307
|
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
|
2291
2308
|
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
|
|
2292
2309
|
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
|
2293
|
-
id="diagram_${
|
|
2310
|
+
id="diagram_${i}"
|
|
2294
2311
|
targetNamespace="${{
|
|
2295
2312
|
activiti: "http://activiti.org/bpmn",
|
|
2296
2313
|
camunda: "http://bpmn.io/schema/bpmn",
|
|
2297
2314
|
flowable: "http://flowable.org/bpmn"
|
|
2298
2315
|
}[t]}">
|
|
2299
|
-
<bpmn2:process id="${
|
|
2316
|
+
<bpmn2:process id="${i}" name="${e}" isExecutable="true">
|
|
2300
2317
|
</bpmn2:process>
|
|
2301
2318
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
2302
|
-
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${
|
|
2319
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${i}">
|
|
2303
2320
|
</bpmndi:BPMNPlane>
|
|
2304
2321
|
</bpmndi:BPMNDiagram>
|
|
2305
2322
|
</bpmn2:definitions>`);
|
|
2306
|
-
function kn(
|
|
2323
|
+
function kn(i) {
|
|
2307
2324
|
return function(e, t) {
|
|
2308
|
-
return t = t || {}, e =
|
|
2325
|
+
return t = t || {}, e = i[e] || e, e.replace(/{([^}]+)}/g, function(n, s) {
|
|
2309
2326
|
let a = t[s];
|
|
2310
|
-
return
|
|
2327
|
+
return i[t[s]] !== null && i[t[s]] !== void 0 && (a = i[t[s]]), a || `{${s}}`;
|
|
2311
2328
|
});
|
|
2312
2329
|
};
|
|
2313
2330
|
}
|
|
2314
|
-
const
|
|
2331
|
+
const _n = {
|
|
2315
2332
|
// 添加部分
|
|
2316
2333
|
"Append EndEvent": "追加结束事件",
|
|
2317
2334
|
"Append Gateway": "追加网关",
|
|
@@ -2559,7 +2576,7 @@ const In = {
|
|
|
2559
2576
|
Data: "数据",
|
|
2560
2577
|
TextAnnotation: "文本说明",
|
|
2561
2578
|
Tasks: "任务"
|
|
2562
|
-
},
|
|
2579
|
+
}, W = [
|
|
2563
2580
|
{
|
|
2564
2581
|
name: "commentInForm",
|
|
2565
2582
|
isAttr: !0,
|
|
@@ -2569,8 +2586,18 @@ const In = {
|
|
|
2569
2586
|
name: "commentOrder",
|
|
2570
2587
|
isAttr: !0,
|
|
2571
2588
|
type: "Number"
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
name: "commentNodeIds",
|
|
2592
|
+
isAttr: !0,
|
|
2593
|
+
type: "String"
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
name: "commentLabel",
|
|
2597
|
+
isAttr: !0,
|
|
2598
|
+
type: "String"
|
|
2572
2599
|
}
|
|
2573
|
-
],
|
|
2600
|
+
], pe = {
|
|
2574
2601
|
name: "Camunda",
|
|
2575
2602
|
uri: "http://camunda.org/schema/1.0/bpmn",
|
|
2576
2603
|
prefix: "camunda",
|
|
@@ -2892,7 +2919,7 @@ const In = {
|
|
|
2892
2919
|
isAttr: !0,
|
|
2893
2920
|
type: "String"
|
|
2894
2921
|
},
|
|
2895
|
-
...
|
|
2922
|
+
...W
|
|
2896
2923
|
]
|
|
2897
2924
|
},
|
|
2898
2925
|
{
|
|
@@ -3571,7 +3598,7 @@ const In = {
|
|
|
3571
3598
|
}
|
|
3572
3599
|
],
|
|
3573
3600
|
emumerations: []
|
|
3574
|
-
},
|
|
3601
|
+
}, me = {
|
|
3575
3602
|
name: "Activiti",
|
|
3576
3603
|
uri: "http://activiti.org/bpmn",
|
|
3577
3604
|
prefix: "activiti",
|
|
@@ -3906,7 +3933,7 @@ const In = {
|
|
|
3906
3933
|
isAttr: !0,
|
|
3907
3934
|
type: "String"
|
|
3908
3935
|
},
|
|
3909
|
-
...
|
|
3936
|
+
...W
|
|
3910
3937
|
]
|
|
3911
3938
|
},
|
|
3912
3939
|
{
|
|
@@ -4556,7 +4583,7 @@ const In = {
|
|
|
4556
4583
|
}
|
|
4557
4584
|
],
|
|
4558
4585
|
emumerations: []
|
|
4559
|
-
},
|
|
4586
|
+
}, ce = {
|
|
4560
4587
|
name: "Flowable",
|
|
4561
4588
|
uri: "http://flowable.org/bpmn",
|
|
4562
4589
|
prefix: "flowable",
|
|
@@ -4879,7 +4906,7 @@ const In = {
|
|
|
4879
4906
|
isAttr: !0,
|
|
4880
4907
|
type: "String"
|
|
4881
4908
|
},
|
|
4882
|
-
...
|
|
4909
|
+
...W
|
|
4883
4910
|
]
|
|
4884
4911
|
},
|
|
4885
4912
|
{
|
|
@@ -5783,157 +5810,157 @@ const In = {
|
|
|
5783
5810
|
]
|
|
5784
5811
|
}
|
|
5785
5812
|
]
|
|
5786
|
-
},
|
|
5787
|
-
function A(
|
|
5813
|
+
}, An = "*";
|
|
5814
|
+
function A(i) {
|
|
5788
5815
|
const e = this;
|
|
5789
|
-
|
|
5790
|
-
const
|
|
5791
|
-
return e.canCopyProperty(
|
|
5816
|
+
i.on("moddleCopy.canCopyProperty", function(t) {
|
|
5817
|
+
const n = t.property, s = t.parent;
|
|
5818
|
+
return e.canCopyProperty(n, s);
|
|
5792
5819
|
});
|
|
5793
5820
|
}
|
|
5794
5821
|
A.$inject = ["eventBus"];
|
|
5795
|
-
A.prototype.canCopyProperty = function(
|
|
5796
|
-
if (
|
|
5822
|
+
A.prototype.canCopyProperty = function(i, e) {
|
|
5823
|
+
if (we(i) && !wn(i, e) || k(i, "camunda:InputOutput") && !this.canHostInputOutput(e) || xe(i, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || k(i, "camunda:In") && !this.canHostIn(e))
|
|
5797
5824
|
return !1;
|
|
5798
5825
|
};
|
|
5799
|
-
A.prototype.canHostInputOutput = function(
|
|
5800
|
-
if (x(
|
|
5826
|
+
A.prototype.canHostInputOutput = function(i) {
|
|
5827
|
+
if (x(i, "camunda:Connector"))
|
|
5801
5828
|
return !0;
|
|
5802
|
-
const t = x(
|
|
5803
|
-
return !(!t ||
|
|
5829
|
+
const t = x(i, "bpmn:FlowNode");
|
|
5830
|
+
return !(!t || xe(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || k(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
|
|
5804
5831
|
};
|
|
5805
|
-
A.prototype.canHostConnector = function(
|
|
5806
|
-
const e = x(
|
|
5807
|
-
return
|
|
5832
|
+
A.prototype.canHostConnector = function(i) {
|
|
5833
|
+
const e = x(i, "camunda:ServiceTaskLike");
|
|
5834
|
+
return k(e, "bpmn:MessageEventDefinition") ? x(i, "bpmn:IntermediateThrowEvent") || x(i, "bpmn:EndEvent") : !0;
|
|
5808
5835
|
};
|
|
5809
|
-
A.prototype.canHostIn = function(
|
|
5810
|
-
return x(
|
|
5836
|
+
A.prototype.canHostIn = function(i) {
|
|
5837
|
+
return x(i, "bpmn:CallActivity") ? !0 : x(i, "bpmn:SignalEventDefinition") ? x(i, "bpmn:IntermediateThrowEvent") || x(i, "bpmn:EndEvent") : !0;
|
|
5811
5838
|
};
|
|
5812
|
-
function
|
|
5813
|
-
return
|
|
5839
|
+
function k(i, e) {
|
|
5840
|
+
return i && $e(i.$instanceOf) && i.$instanceOf(e);
|
|
5814
5841
|
}
|
|
5815
|
-
function
|
|
5842
|
+
function xe(i, e) {
|
|
5816
5843
|
return _(e, function(t) {
|
|
5817
|
-
return
|
|
5844
|
+
return k(i, t);
|
|
5818
5845
|
});
|
|
5819
5846
|
}
|
|
5820
|
-
function x(
|
|
5847
|
+
function x(i, e) {
|
|
5821
5848
|
if (!e)
|
|
5822
|
-
return
|
|
5823
|
-
if (
|
|
5824
|
-
return
|
|
5825
|
-
if (
|
|
5826
|
-
return x(
|
|
5849
|
+
return i.$parent;
|
|
5850
|
+
if (k(i, e))
|
|
5851
|
+
return i;
|
|
5852
|
+
if (i.$parent)
|
|
5853
|
+
return x(i.$parent, e);
|
|
5827
5854
|
}
|
|
5828
|
-
function
|
|
5829
|
-
const t =
|
|
5830
|
-
return !
|
|
5855
|
+
function wn(i, e) {
|
|
5856
|
+
const t = i.$type && i.$model.getTypeDescriptor(i.$type), n = t && t.meta && t.meta.allowedIn;
|
|
5857
|
+
return !n || $n(n) ? !0 : _(n, function(s) {
|
|
5831
5858
|
return x(e, s);
|
|
5832
5859
|
});
|
|
5833
5860
|
}
|
|
5834
|
-
function
|
|
5835
|
-
return
|
|
5861
|
+
function $n(i) {
|
|
5862
|
+
return i.indexOf(An) !== -1;
|
|
5836
5863
|
}
|
|
5837
|
-
const
|
|
5864
|
+
const Ln = {
|
|
5838
5865
|
__init__: ["camundaModdleExtension"],
|
|
5839
5866
|
camundaModdleExtension: ["type", A]
|
|
5840
|
-
},
|
|
5867
|
+
}, On = {
|
|
5841
5868
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
5842
5869
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
5843
5870
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
5844
5871
|
};
|
|
5845
|
-
function
|
|
5846
|
-
return
|
|
5872
|
+
function X(i, e) {
|
|
5873
|
+
return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
|
|
5847
5874
|
}
|
|
5848
|
-
function
|
|
5849
|
-
return
|
|
5875
|
+
function Pn(i) {
|
|
5876
|
+
return i && i.length;
|
|
5850
5877
|
}
|
|
5851
|
-
function j(
|
|
5852
|
-
return
|
|
5853
|
-
return
|
|
5878
|
+
function j(i, e) {
|
|
5879
|
+
return Pn(i) && _(i, function(t) {
|
|
5880
|
+
return X(t, e);
|
|
5854
5881
|
});
|
|
5855
5882
|
}
|
|
5856
|
-
function
|
|
5883
|
+
function Mn(i, e) {
|
|
5857
5884
|
return _(e, function(t) {
|
|
5858
|
-
return
|
|
5885
|
+
return X(i, t);
|
|
5859
5886
|
});
|
|
5860
5887
|
}
|
|
5861
|
-
function
|
|
5862
|
-
const
|
|
5863
|
-
return
|
|
5888
|
+
function q(i, e, t) {
|
|
5889
|
+
const n = e.name, s = On[n.replace(/activiti:/, "")];
|
|
5890
|
+
return n === i && Mn(t, s);
|
|
5864
5891
|
}
|
|
5865
|
-
function
|
|
5866
|
-
|
|
5892
|
+
function Y(i) {
|
|
5893
|
+
i.on(
|
|
5867
5894
|
"property.clone",
|
|
5868
5895
|
function(e) {
|
|
5869
|
-
const t = e.newElement,
|
|
5870
|
-
this.canCloneProperty(t,
|
|
5896
|
+
const t = e.newElement, n = e.propertyDescriptor;
|
|
5897
|
+
this.canCloneProperty(t, n);
|
|
5871
5898
|
},
|
|
5872
5899
|
this
|
|
5873
5900
|
);
|
|
5874
5901
|
}
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
if (
|
|
5878
|
-
return j(
|
|
5879
|
-
if (
|
|
5880
|
-
return j(
|
|
5902
|
+
Y.$inject = ["eventBus"];
|
|
5903
|
+
Y.prototype.canCloneProperty = function(i, e) {
|
|
5904
|
+
if (q("activiti:FailedJobRetryTimeCycle", e, i))
|
|
5905
|
+
return j(i.eventDefinitions, "bpmn:TimerEventDefinition") || j(i.eventDefinitions, "bpmn:SignalEventDefinition") || X(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
5906
|
+
if (q("activiti:Connector", e, i) || q("activiti:Field", e, i))
|
|
5907
|
+
return j(i.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
5881
5908
|
};
|
|
5882
|
-
const
|
|
5909
|
+
const Dn = {
|
|
5883
5910
|
__init__: ["ActivitiModdleExtension"],
|
|
5884
|
-
ActivitiModdleExtension: ["type",
|
|
5885
|
-
},
|
|
5911
|
+
ActivitiModdleExtension: ["type", Y]
|
|
5912
|
+
}, Bn = {
|
|
5886
5913
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
5887
5914
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
5888
5915
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
5889
5916
|
};
|
|
5890
|
-
function
|
|
5891
|
-
return
|
|
5917
|
+
function Q(i, e) {
|
|
5918
|
+
return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
|
|
5892
5919
|
}
|
|
5893
|
-
function
|
|
5894
|
-
return
|
|
5920
|
+
function Rn(i) {
|
|
5921
|
+
return i && i.length;
|
|
5895
5922
|
}
|
|
5896
|
-
function z(
|
|
5897
|
-
return
|
|
5898
|
-
return
|
|
5923
|
+
function z(i, e) {
|
|
5924
|
+
return Rn(i) && _(i, function(t) {
|
|
5925
|
+
return Q(t, e);
|
|
5899
5926
|
});
|
|
5900
5927
|
}
|
|
5901
|
-
function Vn(
|
|
5928
|
+
function Vn(i, e) {
|
|
5902
5929
|
return _(e, function(t) {
|
|
5903
|
-
return
|
|
5930
|
+
return Q(i, t);
|
|
5904
5931
|
});
|
|
5905
5932
|
}
|
|
5906
|
-
function
|
|
5907
|
-
const
|
|
5908
|
-
return
|
|
5933
|
+
function K(i, e, t) {
|
|
5934
|
+
const n = e.name, s = Bn[n.replace(/flowable:/, "")];
|
|
5935
|
+
return n === i && Vn(t, s);
|
|
5909
5936
|
}
|
|
5910
|
-
function
|
|
5911
|
-
|
|
5937
|
+
function ee(i) {
|
|
5938
|
+
i.on(
|
|
5912
5939
|
"property.clone",
|
|
5913
5940
|
function(e) {
|
|
5914
|
-
const t = e.newElement,
|
|
5915
|
-
this.canCloneProperty(t,
|
|
5941
|
+
const t = e.newElement, n = e.propertyDescriptor;
|
|
5942
|
+
this.canCloneProperty(t, n);
|
|
5916
5943
|
},
|
|
5917
5944
|
this
|
|
5918
5945
|
);
|
|
5919
5946
|
}
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
if (
|
|
5923
|
-
return z(
|
|
5924
|
-
if (
|
|
5925
|
-
return z(
|
|
5947
|
+
ee.$inject = ["eventBus"];
|
|
5948
|
+
ee.prototype.canCloneProperty = function(i, e) {
|
|
5949
|
+
if (K("flowable:FailedJobRetryTimeCycle", e, i))
|
|
5950
|
+
return z(i.eventDefinitions, "bpmn:TimerEventDefinition") || z(i.eventDefinitions, "bpmn:SignalEventDefinition") || Q(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
5951
|
+
if (K("flowable:Connector", e, i) || K("flowable:Field", e, i))
|
|
5952
|
+
return z(i.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
5926
5953
|
};
|
|
5927
|
-
const
|
|
5954
|
+
const jn = {
|
|
5928
5955
|
__init__: ["FlowableModdleExtension"],
|
|
5929
|
-
FlowableModdleExtension: ["type",
|
|
5956
|
+
FlowableModdleExtension: ["type", ee]
|
|
5930
5957
|
};
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
const
|
|
5958
|
+
de.registerLanguage("xml", Ue);
|
|
5959
|
+
de.registerLanguage("json", Ge);
|
|
5960
|
+
const zn = {
|
|
5934
5961
|
name: "ProcessDesigner",
|
|
5935
5962
|
components: {
|
|
5936
|
-
HighlightJS:
|
|
5963
|
+
HighlightJS: qe
|
|
5937
5964
|
},
|
|
5938
5965
|
componentName: "MyProcessDesigner",
|
|
5939
5966
|
props: {
|
|
@@ -5979,12 +6006,12 @@ const jn = {
|
|
|
5979
6006
|
headerButtonSize: {
|
|
5980
6007
|
type: String,
|
|
5981
6008
|
default: "small",
|
|
5982
|
-
validator: (
|
|
6009
|
+
validator: (i) => ["default", "medium", "small", "mini"].indexOf(i) !== -1
|
|
5983
6010
|
},
|
|
5984
6011
|
headerButtonType: {
|
|
5985
6012
|
type: String,
|
|
5986
6013
|
default: "primary",
|
|
5987
|
-
validator: (
|
|
6014
|
+
validator: (i) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(i) !== -1
|
|
5988
6015
|
},
|
|
5989
6016
|
extendTypes: Array
|
|
5990
6017
|
},
|
|
@@ -6001,29 +6028,29 @@ const jn = {
|
|
|
6001
6028
|
},
|
|
6002
6029
|
computed: {
|
|
6003
6030
|
additionalModules() {
|
|
6004
|
-
const
|
|
6031
|
+
const i = [];
|
|
6005
6032
|
if (this.onlyCustomizeAddi)
|
|
6006
|
-
return
|
|
6007
|
-
|
|
6033
|
+
return ie(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
|
|
6034
|
+
ie(this.additionalModel) ? i.push(...this.additionalModel) : this.additionalModel && i.push(this.additionalModel);
|
|
6008
6035
|
const e = {
|
|
6009
|
-
translate: ["value", kn(this.translations ||
|
|
6036
|
+
translate: ["value", kn(this.translations || _n)]
|
|
6010
6037
|
};
|
|
6011
|
-
return
|
|
6038
|
+
return i.push(e), this.simulation && i.push(Ne), i.push(ze), this.prefix === "camunda" && i.push(Ln), this.prefix === "flowable" && i.push(jn), this.prefix === "activiti" && i.push(Dn), i;
|
|
6012
6039
|
},
|
|
6013
6040
|
moddleExtensions() {
|
|
6014
|
-
const
|
|
6041
|
+
const i = {};
|
|
6015
6042
|
if (this.onlyCustomizeModdle)
|
|
6016
6043
|
return this.moddleExtension || null;
|
|
6017
6044
|
if (this.moddleExtension)
|
|
6018
6045
|
for (const e in this.moddleExtension)
|
|
6019
|
-
|
|
6020
|
-
return this.prefix === "activiti" && (
|
|
6021
|
-
types: [...
|
|
6022
|
-
})), this.prefix === "flowable" && (
|
|
6046
|
+
i[e] = this.moddleExtension[e];
|
|
6047
|
+
return this.prefix === "activiti" && (i.activiti = T(d({}, me), {
|
|
6048
|
+
types: [...me.types, ...this.extendTypes || []]
|
|
6049
|
+
})), this.prefix === "flowable" && (i.flowable = T(d({}, ce), {
|
|
6050
|
+
types: [...ce.types, ...this.extendTypes || []]
|
|
6051
|
+
})), this.prefix === "camunda" && (i.camunda = T(d({}, pe), {
|
|
6023
6052
|
types: [...pe.types, ...this.extendTypes || []]
|
|
6024
|
-
})),
|
|
6025
|
-
types: [...oe.types, ...this.extendTypes || []]
|
|
6026
|
-
})), n;
|
|
6053
|
+
})), i;
|
|
6027
6054
|
}
|
|
6028
6055
|
},
|
|
6029
6056
|
mounted() {
|
|
@@ -6033,40 +6060,42 @@ const jn = {
|
|
|
6033
6060
|
},
|
|
6034
6061
|
methods: {
|
|
6035
6062
|
initBpmnModeler() {
|
|
6036
|
-
this.bpmnModeler || (this.bpmnModeler =
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6063
|
+
this.bpmnModeler || (this.bpmnModeler = N(
|
|
6064
|
+
new je(d({
|
|
6065
|
+
container: this.$refs["bpmn-canvas"],
|
|
6066
|
+
keyboard: this.keyboard ? { bindTo: document } : null,
|
|
6067
|
+
additionalModules: this.additionalModules,
|
|
6068
|
+
moddleExtensions: this.moddleExtensions
|
|
6069
|
+
}, this.options))
|
|
6070
|
+
), this.$emit("init-finished", this.bpmnModeler), this.initModelListeners());
|
|
6042
6071
|
},
|
|
6043
6072
|
initModelListeners() {
|
|
6044
|
-
const
|
|
6073
|
+
const i = this.bpmnModeler.get("eventBus"), e = this;
|
|
6045
6074
|
this.events.forEach((t) => {
|
|
6046
|
-
|
|
6047
|
-
const s = t.replace(/\./g, "-"), a =
|
|
6048
|
-
e.$emit(s, a,
|
|
6075
|
+
i.on(t, function(n) {
|
|
6076
|
+
const s = t.replace(/\./g, "-"), a = n ? n.element : null;
|
|
6077
|
+
e.$emit(s, a, n);
|
|
6049
6078
|
});
|
|
6050
|
-
}),
|
|
6079
|
+
}), i.on("commandStack.changed", (t) => c(this, null, function* () {
|
|
6051
6080
|
try {
|
|
6052
6081
|
this.recoverable = this.bpmnModeler.get("commandStack").canRedo(), this.revocable = this.bpmnModeler.get("commandStack").canUndo();
|
|
6053
|
-
const { xml:
|
|
6054
|
-
this.$emit("commandStack-changed", t), this.$emit("input",
|
|
6055
|
-
} catch (
|
|
6056
|
-
console.error(`[Process Designer Warn]: ${
|
|
6082
|
+
const { xml: n } = yield this.bpmnModeler.saveXML({ format: !0 });
|
|
6083
|
+
this.$emit("commandStack-changed", t), this.$emit("input", n), this.$emit("change", n);
|
|
6084
|
+
} catch (n) {
|
|
6085
|
+
console.error(`[Process Designer Warn]: ${n.message || n}`);
|
|
6057
6086
|
}
|
|
6058
6087
|
})), this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox: t }) => {
|
|
6059
6088
|
this.$emit("canvas-viewbox-changed", { viewbox: t });
|
|
6060
|
-
const { scale:
|
|
6061
|
-
this.defaultZoom = Math.floor(
|
|
6089
|
+
const { scale: n } = t;
|
|
6090
|
+
this.defaultZoom = Math.floor(n * 100) / 100;
|
|
6062
6091
|
});
|
|
6063
6092
|
},
|
|
6064
6093
|
/* 创建新的流程图 */
|
|
6065
|
-
createNewDiagram(
|
|
6094
|
+
createNewDiagram(i) {
|
|
6066
6095
|
return c(this, null, function* () {
|
|
6067
|
-
const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
6096
|
+
const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, n = i || In(e, t, this.prefix);
|
|
6068
6097
|
try {
|
|
6069
|
-
const { warnings: s } = yield this.bpmnModeler.importXML(
|
|
6098
|
+
const { warnings: s } = yield this.bpmnModeler.importXML(n);
|
|
6070
6099
|
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), s != null && s.length;
|
|
6071
6100
|
} catch (s) {
|
|
6072
6101
|
console.error(`[Process Designer Warn]: ${(s == null ? void 0 : s.message) || s}`);
|
|
@@ -6078,14 +6107,14 @@ const jn = {
|
|
|
6078
6107
|
* @param {string} type
|
|
6079
6108
|
* @param {*} name
|
|
6080
6109
|
*/
|
|
6081
|
-
downloadProcess(
|
|
6110
|
+
downloadProcess(i, e = "diagram") {
|
|
6082
6111
|
return c(this, null, function* () {
|
|
6083
6112
|
try {
|
|
6084
|
-
const { err:
|
|
6085
|
-
|
|
6086
|
-
const a = new
|
|
6087
|
-
if (e = r.process._name || e,
|
|
6088
|
-
const { href: o, filename: p } = this.setEncoded(
|
|
6113
|
+
const { err: n, xml: s } = yield this.bpmnModeler.saveXML();
|
|
6114
|
+
n && console.error(`[Process Designer Warn ]: ${n.message || n}`);
|
|
6115
|
+
const a = new se(), { definitions: r } = a.xml2js(s);
|
|
6116
|
+
if (e = r.process._name || e, i === "xml" || i === "bpmn") {
|
|
6117
|
+
const { href: o, filename: p } = this.setEncoded(i.toUpperCase(), e, s);
|
|
6089
6118
|
t(o, p);
|
|
6090
6119
|
} else {
|
|
6091
6120
|
const { err: o, svg: p } = yield this.bpmnModeler.saveSVG();
|
|
@@ -6094,32 +6123,32 @@ const jn = {
|
|
|
6094
6123
|
const { href: E, filename: m } = this.setEncoded("SVG", e, p);
|
|
6095
6124
|
t(E, m);
|
|
6096
6125
|
}
|
|
6097
|
-
} catch (
|
|
6098
|
-
console.error(`[Process Designer Warn ]: ${
|
|
6126
|
+
} catch (n) {
|
|
6127
|
+
console.error(`[Process Designer Warn ]: ${n.message || n}`);
|
|
6099
6128
|
}
|
|
6100
|
-
function t(
|
|
6101
|
-
if (
|
|
6129
|
+
function t(n, s) {
|
|
6130
|
+
if (n && s) {
|
|
6102
6131
|
const a = document.createElement("a");
|
|
6103
|
-
a.download = s, a.href =
|
|
6132
|
+
a.download = s, a.href = n, a.click(), URL.revokeObjectURL(a.href);
|
|
6104
6133
|
}
|
|
6105
6134
|
}
|
|
6106
6135
|
});
|
|
6107
6136
|
},
|
|
6108
6137
|
// 根据所需类型进行转码并返回下载地址
|
|
6109
|
-
setEncoded(
|
|
6110
|
-
const
|
|
6138
|
+
setEncoded(i, e = "diagram", t) {
|
|
6139
|
+
const n = encodeURIComponent(t);
|
|
6111
6140
|
return {
|
|
6112
|
-
filename: `${e}.${
|
|
6113
|
-
href: `data:application/${
|
|
6141
|
+
filename: `${e}.${i}`,
|
|
6142
|
+
href: `data:application/${i === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${n}`,
|
|
6114
6143
|
data: t
|
|
6115
6144
|
};
|
|
6116
6145
|
},
|
|
6117
6146
|
// 加载本地文件
|
|
6118
6147
|
importLocalFile() {
|
|
6119
|
-
const
|
|
6148
|
+
const i = this, e = this.$refs.refFile.files[0], t = new FileReader();
|
|
6120
6149
|
t.readAsText(e), t.onload = function() {
|
|
6121
|
-
const
|
|
6122
|
-
|
|
6150
|
+
const n = this.result;
|
|
6151
|
+
i.createNewDiagram(n);
|
|
6123
6152
|
};
|
|
6124
6153
|
},
|
|
6125
6154
|
/* ------------------------------------------------ refs methods ------------------------------------------------------ */
|
|
@@ -6141,24 +6170,24 @@ const jn = {
|
|
|
6141
6170
|
processUndo() {
|
|
6142
6171
|
this.bpmnModeler.get("commandStack").undo();
|
|
6143
6172
|
},
|
|
6144
|
-
processZoomIn(
|
|
6145
|
-
const e = Math.floor(this.defaultZoom * 100 +
|
|
6173
|
+
processZoomIn(i = 0.1) {
|
|
6174
|
+
const e = Math.floor(this.defaultZoom * 100 + i * 100) / 100;
|
|
6146
6175
|
if (e > 4)
|
|
6147
6176
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
|
|
6148
6177
|
this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
|
|
6149
6178
|
},
|
|
6150
|
-
processZoomOut(
|
|
6151
|
-
const e = Math.floor(this.defaultZoom * 100 -
|
|
6179
|
+
processZoomOut(i = 0.1) {
|
|
6180
|
+
const e = Math.floor(this.defaultZoom * 100 - i * 100) / 100;
|
|
6152
6181
|
if (e < 0.2)
|
|
6153
6182
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
|
|
6154
6183
|
this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
|
|
6155
6184
|
},
|
|
6156
|
-
processZoomTo(
|
|
6157
|
-
if (
|
|
6185
|
+
processZoomTo(i = 1) {
|
|
6186
|
+
if (i < 0.2)
|
|
6158
6187
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
|
|
6159
|
-
if (
|
|
6188
|
+
if (i > 4)
|
|
6160
6189
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
|
|
6161
|
-
this.defaultZoom =
|
|
6190
|
+
this.defaultZoom = i, this.bpmnModeler.get("canvas").zoom(i);
|
|
6162
6191
|
},
|
|
6163
6192
|
processReZoom() {
|
|
6164
6193
|
this.defaultZoom = 1, this.bpmnModeler.get("canvas").zoom("fit-viewport", "auto");
|
|
@@ -6166,9 +6195,9 @@ const jn = {
|
|
|
6166
6195
|
processRestart() {
|
|
6167
6196
|
this.recoverable = !1, this.revocable = !1, this.createNewDiagram(null);
|
|
6168
6197
|
},
|
|
6169
|
-
elementsAlign(
|
|
6170
|
-
const e = this.bpmnModeler.get("alignElements"),
|
|
6171
|
-
if (!
|
|
6198
|
+
elementsAlign(i) {
|
|
6199
|
+
const e = this.bpmnModeler.get("alignElements"), n = this.bpmnModeler.get("selection").get();
|
|
6200
|
+
if (!n || n.length <= 1) {
|
|
6172
6201
|
this.$message.warning("请按住 Shift 键选择多个元素对齐");
|
|
6173
6202
|
return;
|
|
6174
6203
|
}
|
|
@@ -6176,77 +6205,77 @@ const jn = {
|
|
|
6176
6205
|
confirmButtonText: "确定",
|
|
6177
6206
|
cancelButtonText: "取消",
|
|
6178
6207
|
type: "warning"
|
|
6179
|
-
}).then(() => e.trigger(
|
|
6208
|
+
}).then(() => e.trigger(n, i));
|
|
6180
6209
|
},
|
|
6181
6210
|
/* ----------------------------- 方法结束 --------------------------------- */
|
|
6182
6211
|
previewProcessXML() {
|
|
6183
|
-
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml:
|
|
6184
|
-
this.previewResult =
|
|
6212
|
+
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: i }) => {
|
|
6213
|
+
this.previewResult = i, this.previewType = "xml", this.previewModelVisible = !0;
|
|
6185
6214
|
});
|
|
6186
6215
|
},
|
|
6187
6216
|
previewProcessJson() {
|
|
6188
|
-
const
|
|
6217
|
+
const i = new se();
|
|
6189
6218
|
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: e }) => {
|
|
6190
|
-
const { definitions: t } =
|
|
6219
|
+
const { definitions: t } = i.xml2js(e);
|
|
6191
6220
|
t ? this.previewResult = JSON.stringify(t, null, 4) : this.previewResult = "", this.previewType = "json", this.previewModelVisible = !0;
|
|
6192
6221
|
});
|
|
6193
6222
|
}
|
|
6194
6223
|
}
|
|
6195
6224
|
};
|
|
6196
|
-
var
|
|
6225
|
+
var Nn = function() {
|
|
6197
6226
|
var e = this, t = e._self._c;
|
|
6198
6227
|
return t("div", { staticClass: "my-process-designer" }, [t("div", { staticClass: "my-process-designer__header" }, [e._t("control-header", function() {
|
|
6199
|
-
return [t("ElButtonGroup", { key: "file-control" }, [e._t("toolbar-buttons"), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: "导入流程" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-folder-opened" }, on: { click: function(
|
|
6228
|
+
return [t("ElButtonGroup", { key: "file-control" }, [e._t("toolbar-buttons"), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: "导入流程" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-folder-opened" }, on: { click: function(n) {
|
|
6200
6229
|
return e.$refs.refFile.click();
|
|
6201
6230
|
} } }, [e._v(" 导入 ")])], 1) : e._e(), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
6202
|
-
return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(
|
|
6231
|
+
return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
6203
6232
|
return e.downloadProcessAsXml();
|
|
6204
|
-
} } }, [e._v("下载为XML文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(
|
|
6233
|
+
} } }, [e._v("下载为XML文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
6205
6234
|
return e.downloadProcessAsSvg();
|
|
6206
|
-
} } }, [e._v("下载为SVG文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(
|
|
6235
|
+
} } }, [e._v("下载为SVG文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
6207
6236
|
return e.downloadProcessAsBpmn();
|
|
6208
6237
|
} } }, [e._v("下载为BPMN文件")])];
|
|
6209
6238
|
}, proxy: !0 }]) }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-download" } }, [e._v("下载")])], 1), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
6210
6239
|
return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessXML } }, [e._v("预览XML")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessJson } }, [e._v("预览JSON")])];
|
|
6211
|
-
}, proxy: !0 }]) }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-view" } }, [e._v("预览")])], 1), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: e.simulationStatus ? "退出模拟" : "开启模拟" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-cpu" }, on: { click: e.processSimulation } }, [e._v(" 模拟 ")])], 1) : e._e()], 2), t("ElButtonGroup", { key: "align-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "向左对齐" } }, [t("ElButton", { staticClass: "align align-left", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6240
|
+
}, proxy: !0 }]) }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-view" } }, [e._v("预览")])], 1), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: e.simulationStatus ? "退出模拟" : "开启模拟" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-cpu" }, on: { click: e.processSimulation } }, [e._v(" 模拟 ")])], 1) : e._e()], 2), t("ElButtonGroup", { key: "align-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "向左对齐" } }, [t("ElButton", { staticClass: "align align-left", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6212
6241
|
return e.elementsAlign("left");
|
|
6213
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向右对齐" } }, [t("ElButton", { staticClass: "align align-right", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6242
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向右对齐" } }, [t("ElButton", { staticClass: "align align-right", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6214
6243
|
return e.elementsAlign("right");
|
|
6215
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向上对齐" } }, [t("ElButton", { staticClass: "align align-top", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6244
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向上对齐" } }, [t("ElButton", { staticClass: "align align-top", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6216
6245
|
return e.elementsAlign("top");
|
|
6217
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向下对齐" } }, [t("ElButton", { staticClass: "align align-bottom", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6246
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向下对齐" } }, [t("ElButton", { staticClass: "align align-bottom", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6218
6247
|
return e.elementsAlign("bottom");
|
|
6219
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "水平居中" } }, [t("ElButton", { staticClass: "align align-center", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6248
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "水平居中" } }, [t("ElButton", { staticClass: "align align-center", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6220
6249
|
return e.elementsAlign("center");
|
|
6221
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "垂直居中" } }, [t("ElButton", { staticClass: "align align-middle", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(
|
|
6250
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "垂直居中" } }, [t("ElButton", { staticClass: "align align-middle", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
6222
6251
|
return e.elementsAlign("middle");
|
|
6223
|
-
} } })], 1)], 1), t("ElButtonGroup", { key: "scale-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "缩小视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom < 0.2, icon: "el-icon-zoom-out" }, on: { click: function(
|
|
6252
|
+
} } })], 1)], 1), t("ElButtonGroup", { key: "scale-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "缩小视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom < 0.2, icon: "el-icon-zoom-out" }, on: { click: function(n) {
|
|
6224
6253
|
return e.processZoomOut();
|
|
6225
|
-
} } })], 1), t("ElButton", { attrs: { size: e.headerButtonSize } }, [e._v(e._s(`${Math.floor(e.defaultZoom * 10 * 10)}%`))]), t("ElTooltip", { attrs: { effect: "light", content: "放大视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom > 4, icon: "el-icon-zoom-in" }, on: { click: function(
|
|
6254
|
+
} } })], 1), t("ElButton", { attrs: { size: e.headerButtonSize } }, [e._v(e._s(`${Math.floor(e.defaultZoom * 10 * 10)}%`))]), t("ElTooltip", { attrs: { effect: "light", content: "放大视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom > 4, icon: "el-icon-zoom-in" }, on: { click: function(n) {
|
|
6226
6255
|
return e.processZoomIn();
|
|
6227
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重置视图并居中" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(
|
|
6256
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重置视图并居中" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(n) {
|
|
6228
6257
|
return e.processReZoom();
|
|
6229
|
-
} } })], 1)], 1), t("ElButtonGroup", { key: "stack-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "撤销" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.revocable, icon: "el-icon-refresh-left" }, on: { click: function(
|
|
6258
|
+
} } })], 1)], 1), t("ElButtonGroup", { key: "stack-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "撤销" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.revocable, icon: "el-icon-refresh-left" }, on: { click: function(n) {
|
|
6230
6259
|
return e.processUndo();
|
|
6231
|
-
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "恢复" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(
|
|
6260
|
+
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "恢复" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(n) {
|
|
6232
6261
|
return e.processRedo();
|
|
6233
6262
|
} } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重新绘制" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-refresh" }, on: { click: e.processRestart } })], 1)], 1)];
|
|
6234
|
-
}), t("input", { ref: "refFile", staticStyle: { display: "none" }, attrs: { id: "files", type: "file", accept: ".xml, .bpmn" }, on: { change: e.importLocalFile } })], 2), t("div", { staticClass: "my-process-designer__container" }, [t("div", { ref: "bpmn-canvas", staticClass: "my-process-designer__canvas flow-background-image" })]), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(
|
|
6235
|
-
e.previewModelVisible =
|
|
6263
|
+
}), t("input", { ref: "refFile", staticStyle: { display: "none" }, attrs: { id: "files", type: "file", accept: ".xml, .bpmn" }, on: { change: e.importLocalFile } })], 2), t("div", { staticClass: "my-process-designer__container" }, [t("div", { ref: "bpmn-canvas", staticClass: "my-process-designer__canvas flow-background-image" })]), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
6264
|
+
e.previewModelVisible = n;
|
|
6236
6265
|
} } }, [t("HighlightJS", { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
|
|
6237
|
-
}, Un = [],
|
|
6238
|
-
jn,
|
|
6266
|
+
}, Un = [], Gn = /* @__PURE__ */ h(
|
|
6239
6267
|
zn,
|
|
6268
|
+
Nn,
|
|
6240
6269
|
Un,
|
|
6241
6270
|
!1,
|
|
6242
6271
|
null,
|
|
6243
6272
|
null
|
|
6244
6273
|
);
|
|
6245
|
-
const
|
|
6274
|
+
const qn = Gn.exports, Kn = {
|
|
6246
6275
|
name: "FlowDesigner",
|
|
6247
6276
|
components: {
|
|
6248
|
-
PropertiesPanel:
|
|
6249
|
-
ProcessDesigner:
|
|
6277
|
+
PropertiesPanel: Cn,
|
|
6278
|
+
ProcessDesigner: qn
|
|
6250
6279
|
},
|
|
6251
6280
|
props: {
|
|
6252
6281
|
/**
|
|
@@ -6285,13 +6314,13 @@ const Gn = Nn.exports, qn = {
|
|
|
6285
6314
|
labelVisible: !1,
|
|
6286
6315
|
prefix: "flowable",
|
|
6287
6316
|
headerButtonSize: "mini",
|
|
6288
|
-
additionalModel: [
|
|
6317
|
+
additionalModel: N([Ke, Je, tt])
|
|
6289
6318
|
}
|
|
6290
6319
|
};
|
|
6291
6320
|
},
|
|
6292
6321
|
methods: {
|
|
6293
|
-
initModeler(
|
|
6294
|
-
this.modeler =
|
|
6322
|
+
initModeler(i) {
|
|
6323
|
+
this.modeler = i;
|
|
6295
6324
|
},
|
|
6296
6325
|
refresh() {
|
|
6297
6326
|
return c(this, null, function* () {
|
|
@@ -6300,29 +6329,29 @@ const Gn = Nn.exports, qn = {
|
|
|
6300
6329
|
}
|
|
6301
6330
|
}
|
|
6302
6331
|
};
|
|
6303
|
-
var
|
|
6332
|
+
var Jn = function() {
|
|
6304
6333
|
var e = this, t = e._self._c;
|
|
6305
6334
|
return t("div", { staticClass: "flow-designer" }, [t("ProcessDesigner", e._b({ key: `designer-${e.reloadIndex}`, ref: "processDesigner", attrs: { value: e.value, "extend-types": e.extendTypes, options: {
|
|
6306
6335
|
taskResizingEnabled: !0,
|
|
6307
6336
|
eventResizingEnabled: !0
|
|
6308
|
-
}, keyboard: "" }, on: { input: (
|
|
6337
|
+
}, keyboard: "" }, on: { input: (n) => e.$emit("input", n), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
|
|
6309
6338
|
return [e._t("toolbar-buttons", null, { modeler: e.modeler })];
|
|
6310
|
-
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "use-tabs": e.useTabs, "bpmn-modeler": e.modeler, context: e.context, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id:
|
|
6311
|
-
return [e._t("task", null, { id:
|
|
6312
|
-
} }, { key: "form", fn: function({ id:
|
|
6313
|
-
return [e._t("form", null, { id:
|
|
6314
|
-
} }, { key: "extend", fn: function({ id:
|
|
6315
|
-
return [e._t("extend", null, { id:
|
|
6339
|
+
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "use-tabs": e.useTabs, "bpmn-modeler": e.modeler, context: e.context, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
|
|
6340
|
+
return [e._t("task", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
6341
|
+
} }, { key: "form", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
|
|
6342
|
+
return [e._t("form", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
6343
|
+
} }, { key: "extend", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
|
|
6344
|
+
return [e._t("extend", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
6316
6345
|
} }], null, !0) }) : e._e()], 1);
|
|
6317
|
-
},
|
|
6318
|
-
qn,
|
|
6346
|
+
}, Zn = [], Hn = /* @__PURE__ */ h(
|
|
6319
6347
|
Kn,
|
|
6320
6348
|
Jn,
|
|
6349
|
+
Zn,
|
|
6321
6350
|
!1,
|
|
6322
6351
|
null,
|
|
6323
6352
|
null
|
|
6324
6353
|
);
|
|
6325
|
-
const
|
|
6354
|
+
const xi = Hn.exports;
|
|
6326
6355
|
export {
|
|
6327
|
-
|
|
6356
|
+
xi as default
|
|
6328
6357
|
};
|