@web-utils/component 4.0.13 → 4.0.15
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/address-input/index.mjs +15 -13
- package/card/index.mjs +20 -18
- package/carousel/index.mjs +12 -10
- package/chat/index.mjs +56 -45
- package/chunk-file-uploader/index.mjs +378 -36
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/{ElementTaskConfig.Bko0kgTp.mjs → ElementTaskConfig.AvBOzAni.mjs} +63 -55
- package/chunks/FormItem.Bhsy_O2B.mjs +372 -0
- package/chunks/FyForm.DriwCJ7b.mjs +765 -0
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +92 -0
- package/chunks/SubTablePlus.BH0IIv3X.mjs +270 -0
- package/chunks/TableColumn.BzivvXMF.mjs +337 -0
- package/chunks/{confirmable-mixin.B2TtLAdk.mjs → confirmable-mixin.BFZb6pcK.mjs} +1 -1
- package/chunks/{dataformat.CpqOeGBl.mjs → dataformat.DJoNBlmI.mjs} +6 -6
- package/chunks/{dic.Dkl-leRW.mjs → dic.BinnDitI.mjs} +9 -9
- package/chunks/{event.9aDS6jcw.mjs → event.DSlcqYHL.mjs} +2 -2
- package/chunks/{form-input.CvFdwlEV.mjs → form-input.BtS_J5a2.mjs} +2 -2
- package/chunks/{index.9OxHjTIE.mjs → index.CIfe3UB3.mjs} +2 -2
- package/chunks/{index.B2TRddqf.mjs → index.Cn7aq-Et.mjs} +8 -8
- package/chunks/{init.DAsXSoLW.mjs → init.xOlFpTyZ.mjs} +2 -2
- package/chunks/{util.DqFv_pWg.mjs → util.DI42t5GU.mjs} +22 -22
- package/color-picker/index.mjs +101 -22
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +15 -12
- package/data-card/index.mjs +12 -10
- package/data-card-text/index.mjs +12 -10
- package/data-display/index.mjs +17 -15
- package/data-icons/index.mjs +16 -13
- package/data-imgtext/index.mjs +18 -15
- package/data-operatext/index.mjs +16 -14
- package/data-panel/index.mjs +16 -13
- package/data-pay/index.mjs +20 -16
- package/data-price/index.mjs +16 -14
- package/data-progress/index.mjs +17 -13
- package/data-rotate/index.mjs +15 -12
- package/data-table-picker/index.mjs +18 -15
- package/data-tabs/index.mjs +15 -12
- package/dialog-form/index.mjs +18 -16
- package/dynamic-table/index.mjs +30 -25
- package/editable-progress/index.mjs +11 -9
- package/editable-tree/index.mjs +56 -52
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +23 -22
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +11 -10
- package/flow-designer/index.mjs +1973 -699
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +34 -32
- package/form-cascader/index.mjs +24 -23
- package/form-checkbox/index.mjs +17 -16
- package/form-checkbox-group/index.mjs +23 -20
- package/form-checkbox-group/style.css +1 -1
- package/form-date-picker/index.mjs +20 -18
- package/form-holder/index.mjs +14 -13
- package/form-input/index.mjs +15 -14
- package/form-input-cron-expression/index.mjs +22 -19
- package/form-input-email/index.mjs +16 -15
- package/form-input-id-card/index.mjs +13 -12
- package/form-input-number/index.mjs +17 -16
- package/form-input-phone-number/index.mjs +22 -21
- package/form-input-tag/index.mjs +15 -14
- package/form-input-time/index.mjs +15 -14
- package/form-item/index.mjs +3 -140
- package/form-item-group/index.mjs +31 -28
- package/form-radio-group/index.mjs +28 -27
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +23 -21
- package/form-switch/index.mjs +17 -16
- package/form-table/index.mjs +17 -16
- package/form-table-plus/index.mjs +22 -21
- package/form-textarea/index.mjs +16 -15
- package/form-tree-select/index.mjs +15 -14
- package/form-tree-select-multiple/index.mjs +15 -14
- package/form-view/index.mjs +39 -35
- package/fy-array/index.mjs +37 -33
- package/fy-cascader/index.mjs +17 -16
- package/fy-checkbox/index.mjs +13 -11
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1147 -1123
- package/fy-date/index.mjs +11 -10
- package/fy-draggable/index.mjs +10 -9
- package/fy-dynamic/index.mjs +25 -22
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +15 -638
- package/fy-form-design/index.mjs +1165 -1127
- package/fy-input/index.mjs +14 -12
- package/fy-input-color/index.mjs +15 -13
- package/fy-input-icon/index.mjs +23 -20
- package/fy-input-map/index.mjs +31 -28
- package/fy-input-number/index.mjs +10 -9
- package/fy-input-table/index.mjs +22 -18
- package/fy-input-tree/index.mjs +37 -33
- package/fy-progress/index.mjs +10 -9
- package/fy-radio/index.mjs +16 -15
- package/fy-rate/index.mjs +11 -10
- package/fy-select/index.mjs +29 -25
- package/fy-slider/index.mjs +12 -11
- package/fy-switch/index.mjs +10 -9
- package/fy-tabs/index.mjs +17 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +24 -18
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +76 -74
- package/guide-steps/index.mjs +13 -11
- package/iframe-window/index.mjs +10 -9
- package/image-cropper/index.mjs +30 -28
- package/image-preview/index.mjs +14 -12
- package/index.mjs +72 -72
- package/input-number/index.mjs +14 -13
- package/input-number-range/index.mjs +12 -11
- package/license/index.mjs +1 -1
- package/login/index.mjs +26 -21
- package/nav-bar/index.mjs +10 -9
- package/notice/index.mjs +10 -9
- package/package.json +1 -1
- package/page-index/index.mjs +13 -12
- package/page-index-top/index.mjs +28 -23
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +9 -8
- package/pageable-table/index.mjs +182 -172
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +16 -15
- package/picker-table-view/index.mjs +58 -49
- package/present-view/index.mjs +39 -35
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +22 -20
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +10 -9
- package/split-pane/index.mjs +37 -36
- package/static-pageable-table/index.mjs +13 -11
- package/sub-table/index.mjs +49 -36
- package/sub-table-plus/index.mjs +18 -229
- package/swiper/index.mjs +12 -11
- package/table-column/index.mjs +3 -223
- package/table-view/index.mjs +60 -52
- package/tabs-view/index.mjs +19 -17
- package/tag-render/index.mjs +18 -16
- package/text-ellipsis/index.mjs +10 -9
- package/toolbar/index.mjs +14 -13
- package/toolbar-button/index.mjs +14 -13
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +267 -259
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +24 -21
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
- package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
- package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
- package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
- package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
- package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
- package/chunks/core.0Exl13Mz.mjs +0 -54
- package/chunks/dictionary.DGt59Ir7.mjs +0 -68
- package/chunks/form-item.LWjePsPa.mjs +0 -233
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
- package/chunks/utilSelf.Csq1766E.mjs +0 -48
- package/chunks/utils.DRcxC1Fb.mjs +0 -60
- package/element-listeners/style.css +0 -1
- package/element-multi-instance/style.css +0 -1
package/flow-designer/index.mjs
CHANGED
|
@@ -1,471 +1,1315 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import p from "element-ui/lib/input";
|
|
2
|
+
import { isBlank as Ke, fastClone as E, capitalize as Je, isArray as _e } from "@web-utils/core";
|
|
3
|
+
import { n as w } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
|
+
import I from "element-ui/lib/collapse-item";
|
|
5
|
+
import o from "element-ui/lib/form-item";
|
|
6
|
+
import T from "element-ui/lib/form";
|
|
7
|
+
import l from "element-ui/lib/button";
|
|
8
|
+
import N from "../element-dialog/index.mjs";
|
|
9
|
+
import S from "element-ui/lib/divider";
|
|
10
|
+
import c from "element-ui/lib/table-column";
|
|
11
|
+
import $ from "element-ui/lib/table";
|
|
12
|
+
import u from "element-ui/lib/option";
|
|
13
|
+
import h from "element-ui/lib/select";
|
|
14
|
+
import fe from "element-ui/lib/drawer";
|
|
15
|
+
import y from "element-ui/lib/tooltip";
|
|
16
|
+
import ne from "element-ui/lib/checkbox";
|
|
17
|
+
import H from "element-ui/lib/switch";
|
|
18
|
+
import Ze from "element-ui/lib/collapse";
|
|
19
|
+
import L from "element-ui/lib/tab-pane";
|
|
20
|
+
import He from "element-ui/lib/tabs";
|
|
21
|
+
import { markRaw as ee } from "vue";
|
|
22
|
+
import Le from "../highlight-j-s/index.mjs";
|
|
23
|
+
import W from "element-ui/lib/button-group";
|
|
12
24
|
import "bpmn-js/dist/assets/bpmn-js.css";
|
|
13
25
|
import "bpmn-js/dist/assets/diagram-js.css";
|
|
14
26
|
import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
|
|
15
27
|
import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { isArray as
|
|
24
|
-
import Ce from "../highlight-j-s/index.mjs";
|
|
28
|
+
import We from "bpmn-js/lib/Modeler";
|
|
29
|
+
import Xe from "bpmn-js/lib/features/drilldown";
|
|
30
|
+
import Ye from "bpmn-js-token-simulation";
|
|
31
|
+
import Ee from "x2js";
|
|
32
|
+
import Pe from "highlight.js/lib/core";
|
|
33
|
+
import Qe from "highlight.js/lib/languages/xml";
|
|
34
|
+
import et from "highlight.js/lib/languages/json";
|
|
35
|
+
import { isObject as tt, isFunction as nt, some as B, assign as F, isArray as it, forEach as st } from "min-dash";
|
|
25
36
|
import "../highlight-j-s/style.css";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"connect",
|
|
43
|
-
"create",
|
|
44
|
-
"popupMenu",
|
|
45
|
-
"canvas",
|
|
46
|
-
"rules",
|
|
47
|
-
"translate",
|
|
48
|
-
"elementRegistry"
|
|
49
|
-
];
|
|
50
|
-
G.prototype.getContextPadEntries = function(n) {
|
|
51
|
-
const e = this._contextPad, t = this._modeling, i = this._elementFactory, r = this._connect, a = this._create, p = this._popupMenu, o = this._canvas, y = this._rules, S = this._autoPlace, l = this._translate, s = {};
|
|
52
|
-
if (n.type === "label")
|
|
53
|
-
return s;
|
|
54
|
-
const m = n.businessObject;
|
|
55
|
-
function g(c, v) {
|
|
56
|
-
r.start(c, v);
|
|
57
|
-
}
|
|
58
|
-
function w() {
|
|
59
|
-
t.removeElements([n]);
|
|
60
|
-
}
|
|
61
|
-
function A(c) {
|
|
62
|
-
const b = o.getContainer(), x = e.getPad(c).html, I = b.getBoundingClientRect(), _ = x.getBoundingClientRect(), M = _.top - I.top;
|
|
37
|
+
import { is as X } from "bpmn-js/lib/util/ModelUtil";
|
|
38
|
+
import { isExpanded as rt, isEventSubProcess as at } from "bpmn-js/lib/util/DiUtil";
|
|
39
|
+
import { isAny as ie } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
|
|
40
|
+
import { getChildLanes as ot } from "bpmn-js/lib/features/modeling/util/LaneUtil";
|
|
41
|
+
import { hasPrimaryModifier as lt } from "diagram-js/lib/util/Mouse";
|
|
42
|
+
import $e from "bpmn-js/lib/features/palette/PaletteProvider";
|
|
43
|
+
import ye from "diagram-js/lib/features/auto-place/AutoPlace";
|
|
44
|
+
import { getMid as pt, asTRBL as mt } from "diagram-js/lib/layout/LayoutUtil";
|
|
45
|
+
const ct = {
|
|
46
|
+
name: "ElementOtherConfig",
|
|
47
|
+
props: {
|
|
48
|
+
id: String,
|
|
49
|
+
element: Object,
|
|
50
|
+
bpmnInstances: Object
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
63
53
|
return {
|
|
64
|
-
|
|
65
|
-
y: M + _.height + 5
|
|
54
|
+
documentation: ""
|
|
66
55
|
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
},
|
|
57
|
+
watch: {
|
|
58
|
+
id: {
|
|
59
|
+
immediate: !0,
|
|
60
|
+
handler() {
|
|
61
|
+
if (Ke(this.element))
|
|
62
|
+
this.documentation = "";
|
|
63
|
+
else {
|
|
64
|
+
const {
|
|
65
|
+
businessObject: { documentation: i }
|
|
66
|
+
} = this.element;
|
|
67
|
+
this.documentation = (i == null ? void 0 : i[0].text) || "";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
75
70
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} :
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
updateDocumentation() {
|
|
74
|
+
const { modeling: i } = this.bpmnInstances, {
|
|
75
|
+
businessObject: { documentation: e }
|
|
76
|
+
} = this.element;
|
|
77
|
+
if (e != null && e.length)
|
|
78
|
+
e[0].set("text", this.documentation), i.updateProperties(this.element, { documentation: e });
|
|
79
|
+
else {
|
|
80
|
+
const { bpmnFactory: t } = this.bpmnInstances, n = t.create("bpmn:Documentation", { text: this.documentation });
|
|
81
|
+
i.updateProperties(this.element, { documentation: [n] });
|
|
86
82
|
}
|
|
87
|
-
}
|
|
83
|
+
}
|
|
88
84
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
};
|
|
86
|
+
var ut = function() {
|
|
87
|
+
var e = this, t = e._self._c;
|
|
88
|
+
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(p, { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(n) {
|
|
89
|
+
e.documentation = n;
|
|
90
|
+
}, expression: "documentation" } })], 1)])]);
|
|
91
|
+
}, dt = [], ft = /* @__PURE__ */ w(
|
|
92
|
+
ct,
|
|
93
|
+
ut,
|
|
94
|
+
dt,
|
|
95
|
+
!1,
|
|
96
|
+
null,
|
|
97
|
+
null
|
|
98
|
+
);
|
|
99
|
+
const oe = ft.exports, yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
100
|
+
__proto__: null,
|
|
101
|
+
default: oe
|
|
102
|
+
}, Symbol.toStringTag, { value: "Module" })), bt = {
|
|
103
|
+
name: "ElementProperties",
|
|
104
|
+
inject: {
|
|
105
|
+
prefix: "prefix",
|
|
106
|
+
width: "width"
|
|
107
|
+
},
|
|
108
|
+
props: {
|
|
109
|
+
id: String,
|
|
110
|
+
element: Object,
|
|
111
|
+
bpmnInstances: Object
|
|
112
|
+
},
|
|
113
|
+
data() {
|
|
114
|
+
return {
|
|
115
|
+
elementPropertyList: [],
|
|
116
|
+
propertyForm: {},
|
|
117
|
+
editingPropertyIndex: -1,
|
|
118
|
+
propertyFormModelVisible: !1
|
|
92
119
|
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
className: "bpmn-icon-lane-insert-above",
|
|
100
|
-
title: l("Add Lane above"),
|
|
101
|
-
action: {
|
|
102
|
-
click: function(v, b) {
|
|
103
|
-
t.addLane(b, "top");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}), c.length < 2 && (n.height >= 120 && d(s, {
|
|
108
|
-
"lane-divide-two": {
|
|
109
|
-
group: "lane-divide",
|
|
110
|
-
className: "bpmn-icon-lane-divide-two",
|
|
111
|
-
title: l("Divide into two Lanes"),
|
|
112
|
-
action: {
|
|
113
|
-
click: k(2)
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}), n.height >= 180 && d(s, {
|
|
117
|
-
"lane-divide-three": {
|
|
118
|
-
group: "lane-divide",
|
|
119
|
-
className: "bpmn-icon-lane-divide-three",
|
|
120
|
-
title: l("Divide into three Lanes"),
|
|
121
|
-
action: {
|
|
122
|
-
click: k(3)
|
|
123
|
-
}
|
|
120
|
+
},
|
|
121
|
+
watch: {
|
|
122
|
+
id: {
|
|
123
|
+
immediate: !0,
|
|
124
|
+
handler(i) {
|
|
125
|
+
i != null && i.length && this.resetAttributesList();
|
|
124
126
|
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
resetAttributesList() {
|
|
131
|
+
var i, e, t;
|
|
132
|
+
this.otherExtensionList = [], this.bpmnElementProperties = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => (n.$type !== `${this.prefix}:Properties` && this.otherExtensionList.push(n), n.$type === `${this.prefix}:Properties`))) ?? [], this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((n, s) => n.concat(s.values), []), this.elementPropertyList = E(this.bpmnElementPropertyList ?? []);
|
|
133
|
+
},
|
|
134
|
+
openAttributesForm(i, e) {
|
|
135
|
+
this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} : E(i), this.propertyFormModelVisible = !0, this.$nextTick(() => {
|
|
136
|
+
this.$refs.attributeFormRef && this.$refs.attributeFormRef.clearValidate();
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
removeAttributes(i, e) {
|
|
140
|
+
this.$confirm("确认移除该属性吗?", "提示", {
|
|
141
|
+
confirmButtonText: "确 认",
|
|
142
|
+
cancelButtonText: "取 消"
|
|
143
|
+
}).then(() => {
|
|
144
|
+
this.elementPropertyList.splice(e, 1), this.bpmnElementPropertyList.splice(e, 1);
|
|
145
|
+
const t = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
|
|
146
|
+
values: this.bpmnElementPropertyList
|
|
147
|
+
});
|
|
148
|
+
this.updateElementExtensions(t), this.resetAttributesList();
|
|
149
|
+
}).catch(() => {
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
saveAttribute() {
|
|
153
|
+
const { name: i, value: e } = this.propertyForm;
|
|
154
|
+
if (this.editingPropertyIndex !== -1)
|
|
155
|
+
this.bpmnInstances.modeling.updateModdleProperties(this.element, this.bpmnElementPropertyList[this.editingPropertyIndex], {
|
|
156
|
+
name: i,
|
|
157
|
+
value: e
|
|
158
|
+
});
|
|
159
|
+
else {
|
|
160
|
+
const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name: i, value: e }), n = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
|
|
161
|
+
values: this.bpmnElementPropertyList.concat([t])
|
|
162
|
+
});
|
|
163
|
+
this.updateElementExtensions(n);
|
|
135
164
|
}
|
|
165
|
+
this.propertyFormModelVisible = !1, this.resetAttributesList();
|
|
166
|
+
},
|
|
167
|
+
updateElementExtensions(i) {
|
|
168
|
+
const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
169
|
+
values: this.otherExtensionList.concat([i])
|
|
170
|
+
});
|
|
171
|
+
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
172
|
+
extensionElements: e
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
var ht = function() {
|
|
178
|
+
var e = this, t = e._self._c;
|
|
179
|
+
return t("div", { staticClass: "panel-tab__content" }, [t($, { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
180
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
181
|
+
return e.openAttributesForm(n, s);
|
|
182
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
183
|
+
return e.removeAttributes(n, s);
|
|
184
|
+
} } }, [e._v("移除")])];
|
|
185
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
186
|
+
return e.openAttributesForm(null, -1);
|
|
187
|
+
} } }, [e._v("添加属性")])], 1), t(N, { staticClass: "flow-dialog", attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
188
|
+
e.propertyFormModelVisible = n;
|
|
189
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
190
|
+
return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
|
|
191
|
+
e.propertyFormModelVisible = !1;
|
|
192
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveAttribute } }, [e._v("确 定")])];
|
|
193
|
+
}, proxy: !0 }]) }, [t(T, { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
194
|
+
n.preventDefault();
|
|
195
|
+
} } }, [t(o, { attrs: { label: "属性名:", prop: "name" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(n) {
|
|
196
|
+
e.$set(e.propertyForm, "name", n);
|
|
197
|
+
}, expression: "propertyForm.name" } })], 1), t(o, { attrs: { label: "属性值:", prop: "value" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(n) {
|
|
198
|
+
e.$set(e.propertyForm, "value", n);
|
|
199
|
+
}, expression: "propertyForm.value" } })], 1)], 1)], 1)], 1);
|
|
200
|
+
}, vt = [], gt = /* @__PURE__ */ w(
|
|
201
|
+
bt,
|
|
202
|
+
ht,
|
|
203
|
+
vt,
|
|
204
|
+
!1,
|
|
205
|
+
null,
|
|
206
|
+
null
|
|
207
|
+
);
|
|
208
|
+
const le = gt.exports, xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
209
|
+
__proto__: null,
|
|
210
|
+
default: le
|
|
211
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
212
|
+
function Oe(i, e, t, n) {
|
|
213
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
214
|
+
switch (s.event = e.event, t && (s.id = e.id), e.listenerType) {
|
|
215
|
+
case "scriptListener":
|
|
216
|
+
s.script = St(i, e, n);
|
|
217
|
+
break;
|
|
218
|
+
case "expressionListener":
|
|
219
|
+
s.expression = e.expression;
|
|
220
|
+
break;
|
|
221
|
+
case "delegateExpressionListener":
|
|
222
|
+
s.delegateExpression = e.delegateExpression;
|
|
223
|
+
break;
|
|
224
|
+
default:
|
|
225
|
+
s.class = e.class;
|
|
226
|
+
}
|
|
227
|
+
if (e.fields && (s.fields = e.fields.map((a) => Ft(i, a, n))), t && e.event === "timeout" && e.eventDefinitionType) {
|
|
228
|
+
const a = i.moddle.create("bpmn:FormalExpression", {
|
|
229
|
+
body: e.eventTimeDefinitions
|
|
230
|
+
}), r = i.moddle.create("bpmn:TimerEventDefinition", {
|
|
231
|
+
id: `TimerEventDefinition_${_t(8)}`,
|
|
232
|
+
[`time${e.eventDefinitionType.replace(/^\S/, (m) => m.toUpperCase())}`]: a
|
|
136
233
|
});
|
|
234
|
+
s.eventDefinitions = [r];
|
|
137
235
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
236
|
+
return i.moddle.create(`${n}:${t ? "TaskListener" : "ExecutionListener"}`, s);
|
|
237
|
+
}
|
|
238
|
+
function Ft(i, e, t) {
|
|
239
|
+
const { name: n, fieldType: s, string: a, expression: r } = e, m = s === "string" ? { name: n, string: a } : { name: n, expression: r };
|
|
240
|
+
return i.moddle.create(`${t}:Field`, m);
|
|
241
|
+
}
|
|
242
|
+
function St(i, e, t) {
|
|
243
|
+
const { scriptType: n, scriptFormat: s, value: a, resource: r } = e, m = n === "inlineScript" ? { scriptFormat: s, value: a } : { scriptFormat: s, resource: r };
|
|
244
|
+
return i.moddle.create(`${t}:Script`, m);
|
|
245
|
+
}
|
|
246
|
+
function te(i, e, t) {
|
|
247
|
+
const n = i.moddle.create("bpmn:ExtensionElements", {
|
|
248
|
+
values: t
|
|
249
|
+
});
|
|
250
|
+
i.modeling.updateProperties(e, {
|
|
251
|
+
extensionElements: n
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function _t(i = 8, e) {
|
|
255
|
+
let t = "";
|
|
256
|
+
const n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
257
|
+
for (let s = i; s > 0; --s)
|
|
258
|
+
t += n[Math.floor(Math.random() * n.length)];
|
|
259
|
+
return t;
|
|
260
|
+
}
|
|
261
|
+
const se = (i, e = "body") => i ? i.get(e) : null, Ae = (i, e, t = "body", n) => {
|
|
262
|
+
Et(i, e, { [t]: n });
|
|
263
|
+
}, Et = ({ modeling: i }, e, t) => {
|
|
264
|
+
i.updateProperties(e, t);
|
|
265
|
+
};
|
|
266
|
+
function Me(i) {
|
|
267
|
+
let e = { ...i };
|
|
268
|
+
if (i.script && (e = {
|
|
269
|
+
...i,
|
|
270
|
+
...i.script,
|
|
271
|
+
scriptType: i.script.resource ? "externalScript" : "inlineScript"
|
|
272
|
+
}), i.event === "timeout" && i.eventDefinitions && i.eventDefinitions.length) {
|
|
273
|
+
let t = "";
|
|
274
|
+
for (const n in i.eventDefinitions[0])
|
|
275
|
+
n.indexOf("time") !== -1 && (t = n, e.eventDefinitionType = n.replace("time", "").toLowerCase());
|
|
276
|
+
e.eventTimeDefinitions = i.eventDefinitions[0][t].body;
|
|
277
|
+
}
|
|
278
|
+
return e;
|
|
279
|
+
}
|
|
280
|
+
function De(i) {
|
|
281
|
+
var t;
|
|
282
|
+
let e;
|
|
283
|
+
return i.class && (e = "classListener"), i.expression && (e = "expressionListener"), i.delegateExpression && (e = "delegateExpressionListener"), i.script && (e = "scriptListener"), {
|
|
284
|
+
...E(i),
|
|
285
|
+
...i.script ?? {},
|
|
286
|
+
fields: (t = i.fields) == null ? void 0 : t.map((n) => ({ ...n, fieldType: n.expression ? "expression" : "string" })),
|
|
287
|
+
listenerType: e
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
const Be = {
|
|
291
|
+
classListener: "Java 类",
|
|
292
|
+
expressionListener: "表达式",
|
|
293
|
+
delegateExpressionListener: "代理表达式",
|
|
294
|
+
scriptListener: "脚本"
|
|
295
|
+
}, At = {
|
|
296
|
+
create: "创建",
|
|
297
|
+
assignment: "指派",
|
|
298
|
+
complete: "完成",
|
|
299
|
+
delete: "删除",
|
|
300
|
+
update: "更新",
|
|
301
|
+
timeout: "超时"
|
|
302
|
+
}, ze = {
|
|
303
|
+
string: "字符串",
|
|
304
|
+
expression: "表达式"
|
|
305
|
+
}, Ct = {
|
|
306
|
+
name: "UserTaskListeners",
|
|
307
|
+
inject: {
|
|
308
|
+
prefix: "prefix",
|
|
309
|
+
width: "width"
|
|
310
|
+
},
|
|
311
|
+
props: {
|
|
312
|
+
id: String,
|
|
313
|
+
element: Object,
|
|
314
|
+
bpmnInstances: Object
|
|
315
|
+
},
|
|
316
|
+
data() {
|
|
317
|
+
return {
|
|
318
|
+
elementListenersList: [],
|
|
319
|
+
listenerEventTypeObject: At,
|
|
320
|
+
listenerTypeObject: Be,
|
|
321
|
+
listenerFormModelVisible: !1,
|
|
322
|
+
listenerForm: {},
|
|
323
|
+
fieldTypeObject: ze,
|
|
324
|
+
fieldsListOfListener: [],
|
|
325
|
+
listenerFieldFormModelVisible: !1,
|
|
326
|
+
// 监听器 注入字段表单弹窗 显示状态
|
|
327
|
+
editingListenerIndex: -1,
|
|
328
|
+
// 监听器所在下标,-1 为新增
|
|
329
|
+
editingListenerFieldIndex: -1,
|
|
330
|
+
// 字段所在下标,-1 为新增
|
|
331
|
+
listenerFieldForm: {}
|
|
332
|
+
// 监听器 注入字段 详情表单
|
|
333
|
+
};
|
|
334
|
+
},
|
|
335
|
+
watch: {
|
|
336
|
+
id: {
|
|
337
|
+
immediate: !0,
|
|
338
|
+
async handler(i) {
|
|
339
|
+
i && (await this.$nextTick(), this.resetListenersList());
|
|
189
340
|
}
|
|
190
341
|
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
342
|
+
},
|
|
343
|
+
methods: {
|
|
344
|
+
resetListenersList() {
|
|
345
|
+
var i, e, t;
|
|
346
|
+
this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => n.$type === `${this.prefix}:TaskListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((n) => De(n));
|
|
347
|
+
},
|
|
348
|
+
async openListenerForm(i, e) {
|
|
349
|
+
var t;
|
|
350
|
+
i ? (this.listenerForm = Me(i), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), i && i.fields ? this.fieldsListOfListener = i.fields.map((n) => ({
|
|
351
|
+
...n,
|
|
352
|
+
fieldType: n.string ? "string" : "expression"
|
|
353
|
+
})) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
|
|
354
|
+
},
|
|
355
|
+
// 移除监听器
|
|
356
|
+
async removeListener(i, e) {
|
|
357
|
+
try {
|
|
358
|
+
await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
|
|
359
|
+
} catch {
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
// 保存监听器
|
|
363
|
+
async saveListenerConfig() {
|
|
364
|
+
var t, n, s;
|
|
365
|
+
if (!await this.$refs.listenerFormRef.validate()) return;
|
|
366
|
+
const e = Oe(this.bpmnInstances, this.listenerForm, !0, this.prefix);
|
|
367
|
+
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 = ((s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:TaskListener`)) ?? [], te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
368
|
+
},
|
|
369
|
+
// 打开监听器字段编辑弹窗
|
|
370
|
+
async openListenerFieldForm(i, e) {
|
|
371
|
+
var t;
|
|
372
|
+
this.listenerFieldForm = i ? E(i) : {}, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
|
|
373
|
+
},
|
|
374
|
+
// 保存监听器注入字段
|
|
375
|
+
async saveListenerFiled() {
|
|
376
|
+
await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
|
|
377
|
+
},
|
|
378
|
+
// 移除监听器字段
|
|
379
|
+
async removeListenerField(i, e) {
|
|
380
|
+
try {
|
|
381
|
+
await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
|
|
382
|
+
} catch {
|
|
200
383
|
}
|
|
201
384
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
var Tt = function() {
|
|
388
|
+
var e = this, t = e._self._c;
|
|
389
|
+
return t("div", { staticClass: "panel-tab__content" }, [t($, { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerEventTypeObject[n.event] } }), t(c, { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerTypeObject[n.listenerType] } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
390
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
391
|
+
return e.openListenerForm(n, s);
|
|
392
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
393
|
+
return e.removeListener(n, s);
|
|
394
|
+
} } }, [e._v("移除")])];
|
|
395
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
396
|
+
return e.openListenerForm(null);
|
|
397
|
+
} } }, [e._v("添加监听器")])], 1), t(fe, { 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) {
|
|
398
|
+
e.listenerFormModelVisible = n;
|
|
399
|
+
} } }, [t(T, { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
400
|
+
n.preventDefault();
|
|
401
|
+
} } }, [t(o, { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.event, callback: function(n) {
|
|
402
|
+
e.$set(e.listenerForm, "event", n);
|
|
403
|
+
}, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(n) {
|
|
404
|
+
return t(u, { key: n, attrs: { label: e.listenerEventTypeObject[n], value: n } });
|
|
405
|
+
}), 1)], 1), t(o, { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(n) {
|
|
406
|
+
e.$set(e.listenerForm, "id", n);
|
|
407
|
+
}, expression: "listenerForm.id" } })], 1), t(o, { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.listenerType, callback: function(n) {
|
|
408
|
+
e.$set(e.listenerForm, "listenerType", n);
|
|
409
|
+
}, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(n) {
|
|
410
|
+
return t(u, { key: n, attrs: { label: e.listenerTypeObject[n], value: n } });
|
|
411
|
+
}), 1)], 1), e.listenerForm.listenerType === "classListener" ? t(o, { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(n) {
|
|
412
|
+
e.$set(e.listenerForm, "class", n);
|
|
413
|
+
}, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t(o, { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(n) {
|
|
414
|
+
e.$set(e.listenerForm, "expression", n);
|
|
415
|
+
}, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t(o, { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(n) {
|
|
416
|
+
e.$set(e.listenerForm, "delegateExpression", n);
|
|
417
|
+
}, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t(o, { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(n) {
|
|
418
|
+
e.$set(e.listenerForm, "scriptFormat", n);
|
|
419
|
+
}, expression: "listenerForm.scriptFormat" } })], 1), t(o, { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t(h, { model: { value: e.listenerForm.scriptType, callback: function(n) {
|
|
420
|
+
e.$set(e.listenerForm, "scriptType", n);
|
|
421
|
+
}, expression: "listenerForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t(o, { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(n) {
|
|
422
|
+
e.$set(e.listenerForm, "value", n);
|
|
423
|
+
}, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t(o, { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(n) {
|
|
424
|
+
e.$set(e.listenerForm, "resource", n);
|
|
425
|
+
}, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t(o, { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t(h, { model: { value: e.listenerForm.eventDefinitionType, callback: function(n) {
|
|
426
|
+
e.$set(e.listenerForm, "eventDefinitionType", n);
|
|
427
|
+
}, expression: "listenerForm.eventDefinitionType" } }, [t(u, { attrs: { label: "日期", value: "date" } }), t(u, { attrs: { label: "持续时长", value: "duration" } }), t(u, { attrs: { label: "循环", value: "cycle" } }), t(u, { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t(o, { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(n) {
|
|
428
|
+
e.$set(e.listenerForm, "eventTimeDefinitions", n);
|
|
429
|
+
}, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t(S), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
430
|
+
return e.openListenerFieldForm(null);
|
|
431
|
+
} } }, [e._v("添加字段")])], 1), t($, { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t(c, { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.fieldTypeObject[n.fieldType] } }), t(c, { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => n.string || n.expression } }), t(c, { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
432
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
433
|
+
return e.openListenerFieldForm(n, s);
|
|
434
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
435
|
+
return e.removeListenerField(n, s);
|
|
436
|
+
} } }, [e._v(" 移除 ")])];
|
|
437
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
|
|
438
|
+
e.listenerFormModelVisible = !1;
|
|
439
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t(N, { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
440
|
+
e.listenerFieldFormModelVisible = n;
|
|
441
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
442
|
+
return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
|
|
443
|
+
e.listenerFieldFormModelVisible = !1;
|
|
444
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
|
|
445
|
+
}, proxy: !0 }]) }, [t(T, { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
446
|
+
n.preventDefault();
|
|
447
|
+
} } }, [t(o, { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(n) {
|
|
448
|
+
e.$set(e.listenerFieldForm, "name", n);
|
|
449
|
+
}, expression: "listenerFieldForm.name" } })], 1), t(o, { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerFieldForm.fieldType, callback: function(n) {
|
|
450
|
+
e.$set(e.listenerFieldForm, "fieldType", n);
|
|
451
|
+
}, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(n) {
|
|
452
|
+
return t(u, { key: n, attrs: { label: e.fieldTypeObject[n], value: n } });
|
|
453
|
+
}), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t(o, { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(n) {
|
|
454
|
+
e.$set(e.listenerFieldForm, "string", n);
|
|
455
|
+
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t(o, { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(n) {
|
|
456
|
+
e.$set(e.listenerFieldForm, "expression", n);
|
|
457
|
+
}, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
|
|
458
|
+
}, wt = [], kt = /* @__PURE__ */ w(
|
|
459
|
+
Ct,
|
|
460
|
+
Tt,
|
|
461
|
+
wt,
|
|
462
|
+
!1,
|
|
463
|
+
null,
|
|
464
|
+
null
|
|
465
|
+
);
|
|
466
|
+
const pe = kt.exports, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
467
|
+
__proto__: null,
|
|
468
|
+
default: pe
|
|
469
|
+
}, Symbol.toStringTag, { value: "Module" })), Lt = (i) => ({
|
|
470
|
+
$type: "flowable:ExecutionListener",
|
|
471
|
+
event: i === "draft" ? "start" : i,
|
|
472
|
+
delegateExpression: "${httpInvokeExecutionListener}",
|
|
473
|
+
fields: [],
|
|
474
|
+
listenerType: "delegateExpressionListener"
|
|
475
|
+
}), Pt = (i, e) => [
|
|
476
|
+
{ $type: "flowable:Field", name: "serviceId", string: e.serviceId, fieldType: "string" },
|
|
477
|
+
{
|
|
478
|
+
$type: "flowable:Field",
|
|
479
|
+
name: "url",
|
|
480
|
+
string: `${e != null && e.url ? `/${e.url}` : ""}/flow${Je(i)}`,
|
|
481
|
+
fieldType: "string"
|
|
482
|
+
}
|
|
483
|
+
], $t = {
|
|
484
|
+
name: "ElementListeners",
|
|
485
|
+
inject: {
|
|
486
|
+
prefix: "prefix",
|
|
487
|
+
width: "width",
|
|
488
|
+
context: "context"
|
|
489
|
+
},
|
|
490
|
+
props: {
|
|
491
|
+
id: String,
|
|
492
|
+
element: Object,
|
|
493
|
+
bpmnInstances: Object
|
|
494
|
+
},
|
|
495
|
+
data() {
|
|
496
|
+
return {
|
|
497
|
+
elementListenersList: [],
|
|
498
|
+
// 监听器列表
|
|
499
|
+
listenerForm: {},
|
|
500
|
+
// 监听器详情表单
|
|
501
|
+
listenerFormModelVisible: !1,
|
|
502
|
+
// 监听器 编辑 侧边栏显示状态
|
|
503
|
+
fieldsListOfListener: [],
|
|
504
|
+
listenerFieldForm: {},
|
|
505
|
+
// 监听器 注入字段 详情表单
|
|
506
|
+
listenerFieldFormModelVisible: !1,
|
|
507
|
+
// 监听器 注入字段表单弹窗 显示状态
|
|
508
|
+
editingListenerIndex: -1,
|
|
509
|
+
// 监听器所在下标,-1 为新增
|
|
510
|
+
editingListenerFieldIndex: -1,
|
|
511
|
+
// 字段所在下标,-1 为新增
|
|
512
|
+
listenerTypeObject: Be,
|
|
513
|
+
fieldTypeObject: ze
|
|
514
|
+
};
|
|
515
|
+
},
|
|
516
|
+
computed: {
|
|
517
|
+
apis() {
|
|
518
|
+
var e;
|
|
519
|
+
return (((e = this.context) == null ? void 0 : e.apis) || ["flowDraft", "flowStart", "flowEnd"]).map((t) => {
|
|
520
|
+
var n;
|
|
521
|
+
return `${(n = this.context) != null && n.url ? `/${this.context.url}/` : ""}${t}`;
|
|
522
|
+
}) || [];
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
watch: {
|
|
526
|
+
id: {
|
|
527
|
+
immediate: !0,
|
|
528
|
+
async handler(i) {
|
|
529
|
+
i && (await this.$nextTick(), this.resetListenersList());
|
|
210
530
|
}
|
|
211
531
|
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
532
|
+
},
|
|
533
|
+
methods: {
|
|
534
|
+
resetListenersList() {
|
|
535
|
+
var i, e, t;
|
|
536
|
+
this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => n.$type === `${this.prefix}:ExecutionListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((n) => De(n));
|
|
537
|
+
},
|
|
538
|
+
changeFiledType(i) {
|
|
539
|
+
i === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
|
|
540
|
+
},
|
|
541
|
+
assignListener(i) {
|
|
542
|
+
const e = Lt(i, this.context);
|
|
543
|
+
e.fields = Pt(i, this.context), this.listenerForm = e, this.fieldsListOfListener = e.fields;
|
|
544
|
+
},
|
|
545
|
+
setDefaultFieldValue(i) {
|
|
546
|
+
i !== "url" ? this.$set(this.listenerFieldForm, "string", this.context[i] || "") : this.$set(this.listenerFieldForm, "string", "");
|
|
547
|
+
},
|
|
548
|
+
// 打开 监听器详情 侧边栏
|
|
549
|
+
async openListenerForm(i, e) {
|
|
550
|
+
var t;
|
|
551
|
+
i ? (this.listenerForm = Me(i), this.fieldsListOfListener = i.fields ? i.fields.map((n) => ({ ...n })) : [], this.editingListenerIndex = e) : (this.listenerForm = { fields: [] }, this.fieldsListOfListener = [], this.editingListenerIndex = -1), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
|
|
552
|
+
},
|
|
553
|
+
// 打开监听器字段编辑弹窗
|
|
554
|
+
openListenerFieldForm(i, e) {
|
|
555
|
+
this.listenerFieldForm = i ? E(i) : { fieldType: "string" }, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
|
|
556
|
+
this.$refs.listenerFieldFormRef && this.$refs.listenerFieldFormRef.clearValidate();
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
// 保存监听器注入字段
|
|
560
|
+
async saveListenerFiled() {
|
|
561
|
+
await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
|
|
562
|
+
},
|
|
563
|
+
// 移除监听器字段
|
|
564
|
+
async removeListenerField(i, e) {
|
|
565
|
+
try {
|
|
566
|
+
await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
|
|
567
|
+
} catch {
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
// 移除监听器
|
|
571
|
+
async removeListener(i, e) {
|
|
572
|
+
try {
|
|
573
|
+
await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
|
|
574
|
+
} catch {
|
|
223
575
|
}
|
|
576
|
+
},
|
|
577
|
+
// 保存监听器配置
|
|
578
|
+
async saveListenerConfig() {
|
|
579
|
+
var t, n, s;
|
|
580
|
+
if (!await this.$refs.listenerFormRef.validate()) return;
|
|
581
|
+
const e = Oe(this.bpmnInstances, this.listenerForm, !1, this.prefix);
|
|
582
|
+
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 = ((s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:ExecutionListener`)) ?? [], te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
|
|
224
583
|
}
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
function Y(n, e, t) {
|
|
228
|
-
const i = n.$instanceOf(e);
|
|
229
|
-
let r = !1;
|
|
230
|
-
const a = n.eventDefinitions || [];
|
|
231
|
-
return me(a, function(p) {
|
|
232
|
-
p.$type === t && (r = !0);
|
|
233
|
-
}), i && r;
|
|
234
|
-
}
|
|
235
|
-
const xe = {
|
|
236
|
-
__init__: ["contextPadProvider"],
|
|
237
|
-
contextPadProvider: ["type", G]
|
|
238
|
-
};
|
|
239
|
-
function P(n, e, t, i, r, a, p, o, y) {
|
|
240
|
-
ie.call(this, n, e, t, i, r, a, p, o, y, 2e3), this._create = e, this._elementFactory = t, this._spaceTool = i, this._lassoTool = r, this._handTool = a, this._globalConnect = p, this._moddle = o, this._translate = y;
|
|
241
|
-
}
|
|
242
|
-
const j = function() {
|
|
584
|
+
}
|
|
243
585
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
586
|
+
var Ot = function() {
|
|
587
|
+
var n, s, a;
|
|
588
|
+
var e = this, t = e._self._c;
|
|
589
|
+
return t("div", { staticClass: "panel-tab__content element-listeners" }, [t($, { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t(c, { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => e.listenerTypeObject[r.listenerType] } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: m }) {
|
|
590
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(b) {
|
|
591
|
+
return e.openListenerForm(r, m);
|
|
592
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(b) {
|
|
593
|
+
return e.removeListener(r, m);
|
|
594
|
+
} } }, [e._v("移除")])];
|
|
595
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(r) {
|
|
596
|
+
return e.openListenerForm(null);
|
|
597
|
+
} } }, [e._v("添加监听器")])], 1), t(fe, { staticClass: "flow-drawer element-listeners-drawer", attrs: { visible: e.listenerFormModelVisible, title: "执行监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(r) {
|
|
598
|
+
e.listenerFormModelVisible = r;
|
|
599
|
+
} } }, [t(S), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("监听器类型:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
|
|
600
|
+
return e.assignListener("start");
|
|
601
|
+
} } }, [e._v("开始")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
|
|
602
|
+
return e.assignListener("end");
|
|
603
|
+
} } }, [e._v("结束")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
|
|
604
|
+
return e.assignListener("draft");
|
|
605
|
+
} } }, [e._v("草稿")])], 1), t(T, { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(r) {
|
|
606
|
+
r.preventDefault();
|
|
607
|
+
} } }, [t(o, { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.event, callback: function(r) {
|
|
608
|
+
e.$set(e.listenerForm, "event", r);
|
|
609
|
+
}, expression: "listenerForm.event" } }, [t(u, { attrs: { label: "开始", value: "start" } }), t(u, { attrs: { label: "结束", value: "end" } })], 1)], 1), t(o, { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.listenerType, callback: function(r) {
|
|
610
|
+
e.$set(e.listenerForm, "listenerType", r);
|
|
611
|
+
}, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(r) {
|
|
612
|
+
return t(u, { key: r, attrs: { label: e.listenerTypeObject[r], value: r } });
|
|
613
|
+
}), 1)], 1), e.listenerForm.listenerType === "classListener" ? t(o, { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(r) {
|
|
614
|
+
e.$set(e.listenerForm, "class", r);
|
|
615
|
+
}, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t(o, { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(r) {
|
|
616
|
+
e.$set(e.listenerForm, "expression", r);
|
|
617
|
+
}, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t(o, { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(r) {
|
|
618
|
+
e.$set(e.listenerForm, "delegateExpression", r);
|
|
619
|
+
}, expression: "listenerForm.delegateExpression" } }, e._l(((n = e.context) == null ? void 0 : n.delegateExpressions) || [], function(r) {
|
|
620
|
+
return t(u, { key: r, attrs: { value: r, label: r } });
|
|
621
|
+
}), 1)], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t(o, { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(r) {
|
|
622
|
+
e.$set(e.listenerForm, "scriptFormat", r);
|
|
623
|
+
}, expression: "listenerForm.scriptFormat" } })], 1), t(o, { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t(h, { model: { value: e.listenerForm.scriptType, callback: function(r) {
|
|
624
|
+
e.$set(e.listenerForm, "scriptType", r);
|
|
625
|
+
}, expression: "listenerForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t(o, { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(r) {
|
|
626
|
+
e.$set(e.listenerForm, "value", r);
|
|
627
|
+
}, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t(o, { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(r) {
|
|
628
|
+
e.$set(e.listenerForm, "resource", r);
|
|
629
|
+
}, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e()], 2), t(S), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
|
|
630
|
+
return e.openListenerFieldForm(null);
|
|
631
|
+
} } }, [e._v(" 添加字段 ")])], 1), t($, { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t(c, { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (r) => e.fieldTypeObject[r.fieldType] } }), t(c, { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => r.string || r.expression } }), t(c, { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: m }) {
|
|
632
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(b) {
|
|
633
|
+
return e.openListenerFieldForm(r, m);
|
|
634
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(b) {
|
|
635
|
+
return e.removeListenerField(r, m);
|
|
636
|
+
} } }, [e._v(" 移除 ")])];
|
|
637
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(r) {
|
|
638
|
+
e.listenerFormModelVisible = !1;
|
|
639
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t(N, { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(r) {
|
|
640
|
+
e.listenerFieldFormModelVisible = r;
|
|
641
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
642
|
+
return [t(l, { attrs: { size: "mini" }, on: { click: function(r) {
|
|
643
|
+
e.listenerFieldFormModelVisible = !1;
|
|
644
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
|
|
645
|
+
}, proxy: !0 }]) }, [t(T, { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(r) {
|
|
646
|
+
r.preventDefault();
|
|
647
|
+
} } }, [t(o, { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, on: { input: e.setDefaultFieldValue }, model: { value: e.listenerFieldForm.name, callback: function(r) {
|
|
648
|
+
e.$set(e.listenerFieldForm, "name", r);
|
|
649
|
+
}, expression: "listenerFieldForm.name" } }, e._l(((s = e.context) == null ? void 0 : s.fields) || [], function(r) {
|
|
650
|
+
return t(u, { key: r, attrs: { value: r, label: r } });
|
|
651
|
+
}), 1)], 1), t(o, { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { on: { input: e.changeFiledType }, model: { value: e.listenerFieldForm.fieldType, callback: function(r) {
|
|
652
|
+
e.$set(e.listenerFieldForm, "fieldType", r);
|
|
653
|
+
}, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(r) {
|
|
654
|
+
return t(u, { key: r, attrs: { label: e.fieldTypeObject[r], value: r } });
|
|
655
|
+
}), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t(o, { key: "field-string", staticClass: "element-listeners-field-name", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [e.listenerFieldForm.name === "url" ? t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
|
|
656
|
+
e.$set(e.listenerFieldForm, "string", r);
|
|
657
|
+
}, expression: "listenerFieldForm.string" } }, e._l(e.apis, function(r) {
|
|
658
|
+
return t(u, { key: r, attrs: { value: r, label: r } });
|
|
659
|
+
}), 1) : e.listenerFieldForm.name === "serviceId" ? t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
|
|
660
|
+
e.$set(e.listenerFieldForm, "string", r);
|
|
661
|
+
}, expression: "listenerFieldForm.string" } }, e._l(((a = e.context) == null ? void 0 : a.services) || [], function(r) {
|
|
662
|
+
return t(u, { key: r, attrs: { value: r, label: r } });
|
|
663
|
+
}), 1) : t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
|
|
664
|
+
e.$set(e.listenerFieldForm, "string", r);
|
|
665
|
+
}, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t(o, { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(r) {
|
|
666
|
+
e.$set(e.listenerFieldForm, "expression", r);
|
|
667
|
+
}, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
|
|
668
|
+
}, Mt = [], Dt = /* @__PURE__ */ w(
|
|
669
|
+
$t,
|
|
670
|
+
Ot,
|
|
671
|
+
Mt,
|
|
672
|
+
!1,
|
|
673
|
+
null,
|
|
674
|
+
null
|
|
675
|
+
);
|
|
676
|
+
const me = Dt.exports, Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
677
|
+
__proto__: null,
|
|
678
|
+
default: me
|
|
679
|
+
}, Symbol.toStringTag, { value: "Module" })), zt = {
|
|
680
|
+
name: "ElementMultiInstance",
|
|
681
|
+
inject: {
|
|
682
|
+
prefix: "prefix"
|
|
683
|
+
},
|
|
684
|
+
props: {
|
|
685
|
+
id: String,
|
|
686
|
+
element: Object,
|
|
687
|
+
bpmnInstances: Object
|
|
688
|
+
},
|
|
689
|
+
data() {
|
|
253
690
|
return {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
691
|
+
loopCharacteristics: "",
|
|
692
|
+
// 默认配置,用来覆盖原始不存在的选项,避免报错
|
|
693
|
+
defaultLoopInstanceForm: {
|
|
694
|
+
completionCondition: "",
|
|
695
|
+
loopCardinality: "",
|
|
696
|
+
extensionElements: [],
|
|
697
|
+
asyncAfter: !1,
|
|
698
|
+
asyncBefore: !1,
|
|
699
|
+
exclusive: !1
|
|
700
|
+
},
|
|
701
|
+
loopInstanceForm: {}
|
|
261
702
|
};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}), g = t.createShape({
|
|
270
|
-
type: "bpmn:StartEvent",
|
|
271
|
-
x: 40,
|
|
272
|
-
y: 82,
|
|
273
|
-
parent: m
|
|
274
|
-
});
|
|
275
|
-
e.start(s, [m, g], {
|
|
276
|
-
hints: {
|
|
277
|
-
autoSelect: [g]
|
|
703
|
+
},
|
|
704
|
+
watch: {
|
|
705
|
+
id: {
|
|
706
|
+
immediate: !0,
|
|
707
|
+
handler() {
|
|
708
|
+
const { businessObject: i } = this.element;
|
|
709
|
+
this.getElementLoop(i);
|
|
278
710
|
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
beforeDestroy() {
|
|
714
|
+
this.multiLoopInstance = null;
|
|
715
|
+
},
|
|
716
|
+
methods: {
|
|
717
|
+
getElementLoop(i) {
|
|
718
|
+
var e, t, n, s;
|
|
719
|
+
if (!i.loopCharacteristics) {
|
|
720
|
+
this.loopCharacteristics = "Null", this.loopInstanceForm = {};
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
if (i.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
|
|
724
|
+
this.loopCharacteristics = "StandardLoop", this.loopInstanceForm = {};
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
i.loopCharacteristics.isSequential ? this.loopCharacteristics = "SequentialMultiInstance" : this.loopCharacteristics = "ParallelMultiInstance", this.loopInstanceForm = {
|
|
728
|
+
...this.defaultLoopInstanceForm,
|
|
729
|
+
...i.loopCharacteristics,
|
|
730
|
+
completionCondition: ((t = (e = i.loopCharacteristics) == null ? void 0 : e.completionCondition) == null ? void 0 : t.body) ?? "",
|
|
731
|
+
loopCardinality: ((s = (n = i.loopCharacteristics) == null ? void 0 : n.loopCardinality) == null ? void 0 : s.body) ?? ""
|
|
732
|
+
}, 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);
|
|
733
|
+
},
|
|
734
|
+
changeLoopCharacteristicsType(i) {
|
|
735
|
+
if (i === "Null") {
|
|
736
|
+
this.bpmnInstances.modeling.updateProperties(this.element, { loopCharacteristics: null });
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
if (i === "StandardLoop") {
|
|
740
|
+
const e = this.bpmnInstances.moddle.create("bpmn:StandardLoopCharacteristics");
|
|
741
|
+
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
742
|
+
loopCharacteristics: e
|
|
743
|
+
}), this.multiLoopInstance = null;
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
i === "SequentialMultiInstance" ? this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
|
|
747
|
+
isSequential: !0
|
|
748
|
+
}) : this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics"), this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
749
|
+
loopCharacteristics: this.multiLoopInstance
|
|
750
|
+
});
|
|
751
|
+
},
|
|
752
|
+
// 循环基数
|
|
753
|
+
updateLoopCardinality(i) {
|
|
754
|
+
let e = null;
|
|
755
|
+
i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
756
|
+
loopCardinality: e
|
|
757
|
+
});
|
|
758
|
+
},
|
|
759
|
+
// 完成条件
|
|
760
|
+
updateLoopCondition(i) {
|
|
761
|
+
let e = null;
|
|
762
|
+
i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
763
|
+
completionCondition: e
|
|
764
|
+
});
|
|
765
|
+
},
|
|
766
|
+
// 重试周期
|
|
767
|
+
updateLoopTimeCycle(i) {
|
|
768
|
+
const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
769
|
+
values: [
|
|
770
|
+
this.bpmnInstances.moddle.create(`${this.prefix}:FailedJobRetryTimeCycle`, {
|
|
771
|
+
body: i
|
|
772
|
+
})
|
|
773
|
+
]
|
|
774
|
+
});
|
|
775
|
+
this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
776
|
+
extensionElements: e
|
|
777
|
+
});
|
|
778
|
+
},
|
|
779
|
+
// 直接更新的基础信息
|
|
780
|
+
updateLoopBase() {
|
|
781
|
+
this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
|
|
782
|
+
collection: this.loopInstanceForm.collection || null,
|
|
783
|
+
elementVariable: this.loopInstanceForm.elementVariable || null
|
|
784
|
+
});
|
|
785
|
+
},
|
|
786
|
+
// 各异步状态
|
|
787
|
+
updateLoopAsync(i) {
|
|
788
|
+
const { asyncBefore: e, asyncAfter: t } = this.loopInstanceForm;
|
|
789
|
+
let n = /* @__PURE__ */ Object.create(null);
|
|
790
|
+
!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);
|
|
791
|
+
}
|
|
283
792
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
793
|
+
};
|
|
794
|
+
var Vt = function() {
|
|
795
|
+
var e = this, t = e._self._c;
|
|
796
|
+
return t("div", { staticClass: "panel-tab__content element-multi-instance" }, [t(T, { attrs: { size: "mini", "label-width": "100px" }, nativeOn: { submit: function(n) {
|
|
797
|
+
n.preventDefault();
|
|
798
|
+
} } }, [t(o, { attrs: { label: "回路特性" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
799
|
+
return [e._v(" 回路特性 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
800
|
+
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(" 未知")])])];
|
|
801
|
+
}, proxy: !0 }]) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
802
|
+
}, proxy: !0 }]) }, [t(h, { on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(n) {
|
|
803
|
+
e.loopCharacteristics = n;
|
|
804
|
+
}, expression: "loopCharacteristics" } }, [t(u, { attrs: { label: "并行", value: "ParallelMultiInstance" } }), t(u, { attrs: { label: "串行", value: "SequentialMultiInstance" } }), t(u, { attrs: { label: "循环事件", value: "StandardLoop" } }), t(u, { attrs: { label: "无", value: "Null" } })], 1)], 1), e.loopCharacteristics === "ParallelMultiInstance" || e.loopCharacteristics === "SequentialMultiInstance" ? [t(o, { key: "loopCardinality", attrs: { label: "循环基数" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
805
|
+
return [e._v(" 循环基数 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
806
|
+
return [t("div", [e._v("与任务实例数相对,可不填")])];
|
|
807
|
+
}, proxy: !0 }], null, !1, 3306633709) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
808
|
+
}, proxy: !0 }], null, !1, 3757615878) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(n) {
|
|
809
|
+
e.$set(e.loopInstanceForm, "loopCardinality", n);
|
|
810
|
+
}, expression: "loopInstanceForm.loopCardinality" } })], 1), t(o, { key: "collection", attrs: { label: "集合名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
811
|
+
return [e._v(" 集合变量 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
812
|
+
return [t("p", [e._v("流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("${handlers}")]), e._v(" 就行")])];
|
|
813
|
+
}, proxy: !0 }], null, !1, 2769289721) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
814
|
+
}, proxy: !0 }], null, !1, 3139340263) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(n) {
|
|
815
|
+
e.$set(e.loopInstanceForm, "collection", n);
|
|
816
|
+
}, expression: "loopInstanceForm.collection" } })], 1), t(o, { key: "elementVariable", attrs: { label: "元素名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
817
|
+
return [e._v(" 元素变量 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
818
|
+
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('"值保持一致 ')])];
|
|
819
|
+
}, proxy: !0 }], null, !1, 952223137) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
820
|
+
}, proxy: !0 }], null, !1, 1907746023) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(n) {
|
|
821
|
+
e.$set(e.loopInstanceForm, "elementVariable", n);
|
|
822
|
+
}, expression: "loopInstanceForm.elementVariable" } })], 1), t(o, { key: "completionCondition", attrs: { label: "完成条件" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
823
|
+
return [e._v(" 完成条件 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
824
|
+
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("不填要等所有实例完成才会结束该环节")])];
|
|
825
|
+
}, proxy: !0 }], null, !1, 2952075778) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
826
|
+
}, proxy: !0 }], null, !1, 2319413861) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(n) {
|
|
827
|
+
e.$set(e.loopInstanceForm, "completionCondition", n);
|
|
828
|
+
}, expression: "loopInstanceForm.completionCondition" } })], 1), t(o, { key: "async", attrs: { label: "异步状态" }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
829
|
+
return [e._v(" 异步状态 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
830
|
+
return [t("div", [e._v("目前没用到")])];
|
|
831
|
+
}, proxy: !0 }], null, !1, 1935913218) }, [t("i", { staticClass: "el-icon-info" })])];
|
|
832
|
+
}, proxy: !0 }], null, !1, 474663414) }, [t(ne, { attrs: { label: "异步前" }, on: { change: function(n) {
|
|
833
|
+
return e.updateLoopAsync("asyncBefore");
|
|
834
|
+
} }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(n) {
|
|
835
|
+
e.$set(e.loopInstanceForm, "asyncBefore", n);
|
|
836
|
+
}, expression: "loopInstanceForm.asyncBefore" } }), t(ne, { attrs: { label: "异步后" }, on: { change: function(n) {
|
|
837
|
+
return e.updateLoopAsync("asyncAfter");
|
|
838
|
+
} }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(n) {
|
|
839
|
+
e.$set(e.loopInstanceForm, "asyncAfter", n);
|
|
840
|
+
}, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t(ne, { attrs: { label: "排除" }, on: { change: function(n) {
|
|
841
|
+
return e.updateLoopAsync("exclusive");
|
|
842
|
+
} }, model: { value: e.loopInstanceForm.exclusive, callback: function(n) {
|
|
843
|
+
e.$set(e.loopInstanceForm, "exclusive", n);
|
|
844
|
+
}, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t(o, { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(n) {
|
|
845
|
+
e.$set(e.loopInstanceForm, "timeCycle", n);
|
|
846
|
+
}, expression: "loopInstanceForm.timeCycle" } })], 1) : e._e()] : e._e()], 2)], 1);
|
|
847
|
+
}, Rt = [], jt = /* @__PURE__ */ w(
|
|
848
|
+
zt,
|
|
849
|
+
Vt,
|
|
850
|
+
Rt,
|
|
851
|
+
!1,
|
|
852
|
+
null,
|
|
853
|
+
null
|
|
854
|
+
);
|
|
855
|
+
const ce = jt.exports, Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
856
|
+
__proto__: null,
|
|
857
|
+
default: ce
|
|
858
|
+
}, Symbol.toStringTag, { value: "Module" })), Ut = {
|
|
859
|
+
name: "ElementForm",
|
|
860
|
+
inject: {
|
|
861
|
+
prefix: "prefix",
|
|
862
|
+
width: "width"
|
|
863
|
+
},
|
|
864
|
+
props: {
|
|
865
|
+
id: String,
|
|
866
|
+
element: Object,
|
|
867
|
+
bpmnInstances: Object
|
|
868
|
+
},
|
|
869
|
+
data() {
|
|
870
|
+
return {
|
|
871
|
+
formKey: "",
|
|
872
|
+
businessKey: "",
|
|
873
|
+
optionModelTitle: "",
|
|
874
|
+
fieldList: [],
|
|
875
|
+
formFieldForm: {},
|
|
876
|
+
fieldType: {
|
|
877
|
+
long: "长整型",
|
|
878
|
+
string: "字符串",
|
|
879
|
+
boolean: "布尔类",
|
|
880
|
+
date: "日期类",
|
|
881
|
+
enum: "枚举类",
|
|
882
|
+
custom: "自定义类型"
|
|
883
|
+
},
|
|
884
|
+
formFieldIndex: -1,
|
|
885
|
+
// 编辑中的字段, -1 为新增
|
|
886
|
+
formFieldOptionIndex: -1,
|
|
887
|
+
// 编辑中的字段配置项, -1 为新增
|
|
888
|
+
fieldModelVisible: !1,
|
|
889
|
+
fieldOptionModelVisible: !1,
|
|
890
|
+
fieldOptionForm: {},
|
|
891
|
+
// 当前激活的字段配置项数据
|
|
892
|
+
fieldOptionType: "",
|
|
893
|
+
// 当前激活的字段配置项弹窗 类型
|
|
894
|
+
fieldEnumList: [],
|
|
895
|
+
// 枚举值列表
|
|
896
|
+
fieldConstraintsList: [],
|
|
897
|
+
// 约束条件列表
|
|
898
|
+
fieldPropertiesList: []
|
|
899
|
+
// 绑定属性列表
|
|
900
|
+
};
|
|
901
|
+
},
|
|
902
|
+
watch: {
|
|
903
|
+
id: {
|
|
904
|
+
immediate: !0,
|
|
905
|
+
async handler(i) {
|
|
906
|
+
i && (await this.$nextTick(), this.resetFormList());
|
|
293
907
|
}
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
methods: {
|
|
911
|
+
resetFormList() {
|
|
912
|
+
var i;
|
|
913
|
+
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 = E(this.formData.fields || []), this.updateElementExtensions();
|
|
294
914
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
915
|
+
updateElementFormKey() {
|
|
916
|
+
this.bpmnInstances.modeling.updateProperties(this.element, { formKey: this.formKey });
|
|
917
|
+
},
|
|
918
|
+
updateElementBusinessKey() {
|
|
919
|
+
this.bpmnInstances.modeling.updateModdleProperties(this.element, this.formData, {
|
|
920
|
+
businessKey: this.businessKey
|
|
921
|
+
});
|
|
922
|
+
},
|
|
923
|
+
// 根据类型调整字段type
|
|
924
|
+
changeFieldTypeType(i) {
|
|
925
|
+
this.$set(this.formFieldForm, "type", i === "custom" ? "" : i);
|
|
926
|
+
},
|
|
927
|
+
// 打开字段详情侧边栏
|
|
928
|
+
openFieldForm(i, e) {
|
|
929
|
+
var t, n;
|
|
930
|
+
if (this.formFieldIndex = e, e !== -1) {
|
|
931
|
+
const s = this.formData.fields[e];
|
|
932
|
+
this.formFieldForm = E(i), this.$set(this.formFieldForm, "typeType", this.fieldType[i.type] ? i.type : "custom"), i.type === "enum" && (this.fieldEnumList = E((s == null ? void 0 : s.values) || [])), this.fieldConstraintsList = E(((t = s == null ? void 0 : s.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = E(((n = s == null ? void 0 : s.properties) == null ? void 0 : n.values) || []);
|
|
933
|
+
} else
|
|
934
|
+
this.formFieldForm = {}, this.fieldEnumList = [], this.fieldConstraintsList = [], this.fieldPropertiesList = [];
|
|
935
|
+
this.fieldModelVisible = !0;
|
|
936
|
+
},
|
|
937
|
+
// 打开字段 某个 配置项 弹窗
|
|
938
|
+
openFieldOptionForm(i, e, t) {
|
|
939
|
+
return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "约束条件配置");
|
|
940
|
+
},
|
|
941
|
+
// 保存字段 某个 配置项
|
|
942
|
+
saveFieldOption() {
|
|
943
|
+
this.formFieldOptionIndex === -1 ? (this.fieldOptionType === "property" && this.fieldPropertiesList.push(this.fieldOptionForm), this.fieldOptionType === "constraint" && this.fieldConstraintsList.push(this.fieldOptionForm), this.fieldOptionType === "enum" && this.fieldEnumList.push(this.fieldOptionForm)) : this.fieldOptionType === "property" ? this.fieldPropertiesList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "constraint" ? this.fieldConstraintsList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "enum" && this.fieldEnumList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm), this.fieldOptionModelVisible = !1, this.fieldOptionForm = {};
|
|
944
|
+
},
|
|
945
|
+
// 保存字段配置
|
|
946
|
+
saveField() {
|
|
947
|
+
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 });
|
|
948
|
+
if (n && (a.defaultValue = n), s && (a.datePattern = s), this.fieldPropertiesList && this.fieldPropertiesList.length) {
|
|
949
|
+
const r = this.fieldPropertiesList.map((m) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: m.id, value: m.value }));
|
|
950
|
+
a.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
|
|
951
|
+
values: r
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
if (this.fieldConstraintsList && this.fieldConstraintsList.length) {
|
|
955
|
+
const r = this.fieldConstraintsList.map((m) => this.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: m.name, config: m.config }));
|
|
956
|
+
a.validation = this.bpmnInstances.moddle.create(`${this.prefix}:Validation`, {
|
|
957
|
+
constraints: r
|
|
958
|
+
});
|
|
303
959
|
}
|
|
960
|
+
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;
|
|
304
961
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
click: function(s) {
|
|
311
|
-
i.activateSelection(s);
|
|
312
|
-
}
|
|
962
|
+
// 移除某个 字段的 配置项
|
|
963
|
+
removeFieldOptionItem(i, e, t) {
|
|
964
|
+
if (t === "property") {
|
|
965
|
+
this.fieldPropertiesList.splice(e, 1);
|
|
966
|
+
return;
|
|
313
967
|
}
|
|
968
|
+
if (t === "enum") {
|
|
969
|
+
this.fieldEnumList.splice(e, 1);
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
this.fieldConstraintsList.splice(e, 1);
|
|
314
973
|
},
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
974
|
+
// 移除 字段
|
|
975
|
+
removeField(i, e) {
|
|
976
|
+
this.fieldList.splice(e, 1), this.formData.fields.splice(e, 1), this.updateElementExtensions();
|
|
977
|
+
},
|
|
978
|
+
updateElementExtensions() {
|
|
979
|
+
const i = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
|
|
980
|
+
values: this.otherExtensions.concat(this.formData)
|
|
981
|
+
});
|
|
982
|
+
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
983
|
+
extensionElements: i
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
var qt = function() {
|
|
989
|
+
var e = this, t = e._self._c;
|
|
990
|
+
return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(n) {
|
|
991
|
+
n.preventDefault();
|
|
992
|
+
} } }, [t(o, { attrs: { label: "表单标识" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(n) {
|
|
993
|
+
e.formKey = n;
|
|
994
|
+
}, expression: "formKey" } })], 1), t(o, { attrs: { label: "业务标识" } }, [t(h, { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(n) {
|
|
995
|
+
e.businessKey = n;
|
|
996
|
+
}, expression: "businessKey" } }, [e._l(e.fieldList, function(n) {
|
|
997
|
+
return t(u, { key: n.id, attrs: { value: n.id, label: n.label } });
|
|
998
|
+
}), t(u, { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t(S, [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t($, { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", type: "index", width: "50px" } }), t(c, { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (n) => e.fieldType[n.type] || n.type, "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
999
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1000
|
+
return e.openFieldForm(n, s);
|
|
1001
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1002
|
+
return e.removeField(n, s);
|
|
1003
|
+
} } }, [e._v("移除")])];
|
|
1004
|
+
} }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
|
|
1005
|
+
return e.openFieldForm(null, -1);
|
|
1006
|
+
} } }, [e._v("添加字段")])], 1), t(fe, { 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) {
|
|
1007
|
+
e.fieldModelVisible = n;
|
|
1008
|
+
} } }, [t(T, { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
1009
|
+
n.preventDefault();
|
|
1010
|
+
} } }, [t(o, { attrs: { label: "字段ID" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(n) {
|
|
1011
|
+
e.$set(e.formFieldForm, "id", n);
|
|
1012
|
+
}, expression: "formFieldForm.id" } })], 1), t(o, { attrs: { label: "类型" } }, [t(h, { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(n) {
|
|
1013
|
+
e.$set(e.formFieldForm, "typeType", n);
|
|
1014
|
+
}, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(n, s) {
|
|
1015
|
+
return t(u, { key: s, attrs: { label: n, value: s } });
|
|
1016
|
+
}), 1)], 1), e.formFieldForm.typeType === "custom" ? t(o, { attrs: { label: "类型名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(n) {
|
|
1017
|
+
e.$set(e.formFieldForm, "type", n);
|
|
1018
|
+
}, expression: "formFieldForm.type" } })], 1) : e._e(), t(o, { attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(n) {
|
|
1019
|
+
e.$set(e.formFieldForm, "label", n);
|
|
1020
|
+
}, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t(o, { attrs: { label: "时间格式" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(n) {
|
|
1021
|
+
e.$set(e.formFieldForm, "datePattern", n);
|
|
1022
|
+
}, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t(o, { attrs: { label: "默认值" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(n) {
|
|
1023
|
+
e.$set(e.formFieldForm, "defaultValue", n);
|
|
1024
|
+
}, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t(S, { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1025
|
+
return e.openFieldOptionForm(null, -1, "enum");
|
|
1026
|
+
} } }, [e._v("添加枚举值")])], 1), t($, { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1027
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1028
|
+
return e.openFieldOptionForm(n, s, "enum");
|
|
1029
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1030
|
+
return e.removeFieldOptionItem(n, s, "enum");
|
|
1031
|
+
} } }, [e._v("移除")])];
|
|
1032
|
+
} }], null, !1, 747635382) })], 1)] : e._e(), t(S, { 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(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1033
|
+
return e.openFieldOptionForm(null, -1, "constraint");
|
|
1034
|
+
} } }, [e._v("添加约束")])], 1), t($, { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1035
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1036
|
+
return e.openFieldOptionForm(n, s, "constraint");
|
|
1037
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1038
|
+
return e.removeFieldOptionItem(n, s, "constraint");
|
|
1039
|
+
} } }, [e._v("移除")])];
|
|
1040
|
+
} }]) })], 1), t(S, { 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(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
|
|
1041
|
+
return e.openFieldOptionForm(null, -1, "property");
|
|
1042
|
+
} } }, [e._v("添加属性")])], 1), t($, { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
|
|
1043
|
+
return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1044
|
+
return e.openFieldOptionForm(n, s, "property");
|
|
1045
|
+
} } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
|
|
1046
|
+
return e.removeFieldOptionItem(n, s, "property");
|
|
1047
|
+
} } }, [e._v("移除")])];
|
|
1048
|
+
} }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1049
|
+
e.fieldModelVisible = !1;
|
|
1050
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t(N, { staticClass: "flow-dialog", attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
1051
|
+
e.fieldOptionModelVisible = n;
|
|
1052
|
+
} }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
1053
|
+
return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
|
|
1054
|
+
e.fieldOptionModelVisible = !1;
|
|
1055
|
+
} } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveFieldOption } }, [e._v("确 定")])];
|
|
1056
|
+
}, proxy: !0 }]) }, [t(T, { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
|
|
1057
|
+
n.preventDefault();
|
|
1058
|
+
} } }, [e.fieldOptionType !== "constraint" ? t(o, { key: "option-id", attrs: { label: "编号/ID" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(n) {
|
|
1059
|
+
e.$set(e.fieldOptionForm, "id", n);
|
|
1060
|
+
}, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t(o, { key: "option-name", attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(n) {
|
|
1061
|
+
e.$set(e.fieldOptionForm, "name", n);
|
|
1062
|
+
}, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t(o, { key: "option-config", attrs: { label: "配置" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(n) {
|
|
1063
|
+
e.$set(e.fieldOptionForm, "config", n);
|
|
1064
|
+
}, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t(o, { key: "option-value", attrs: { label: "值" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(n) {
|
|
1065
|
+
e.$set(e.fieldOptionForm, "value", n);
|
|
1066
|
+
}, expression: "fieldOptionForm.value" } })], 1) : e._e()], 1)], 1)], 1);
|
|
1067
|
+
}, Gt = [], Kt = /* @__PURE__ */ w(
|
|
1068
|
+
Ut,
|
|
1069
|
+
qt,
|
|
1070
|
+
Gt,
|
|
1071
|
+
!1,
|
|
1072
|
+
null,
|
|
1073
|
+
null
|
|
1074
|
+
);
|
|
1075
|
+
const ue = Kt.exports, Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1076
|
+
__proto__: null,
|
|
1077
|
+
default: ue
|
|
1078
|
+
}, Symbol.toStringTag, { value: "Module" })), Zt = {
|
|
1079
|
+
name: "FlowCondition",
|
|
1080
|
+
props: {
|
|
1081
|
+
id: String,
|
|
1082
|
+
element: Object,
|
|
1083
|
+
bpmnInstances: Object
|
|
1084
|
+
},
|
|
1085
|
+
data() {
|
|
1086
|
+
return {
|
|
1087
|
+
flowConditionForm: {}
|
|
1088
|
+
};
|
|
1089
|
+
},
|
|
1090
|
+
watch: {
|
|
1091
|
+
id: {
|
|
1092
|
+
immediate: !0,
|
|
1093
|
+
async handler() {
|
|
1094
|
+
await this.$nextTick(), this.resetFlowCondition();
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
beforeDestroy() {
|
|
1099
|
+
this.bpmnElementSource = null, this.bpmnElementSourceRef = null;
|
|
1100
|
+
},
|
|
1101
|
+
methods: {
|
|
1102
|
+
resetFlowCondition() {
|
|
1103
|
+
if (this.bpmnElementSource = this.element.source, this.bpmnElementSourceRef = this.element.businessObject.sourceRef, this.bpmnElementSourceRef && this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id)
|
|
1104
|
+
this.flowConditionForm = { type: "default" };
|
|
1105
|
+
else if (!this.element.businessObject.conditionExpression)
|
|
1106
|
+
this.flowConditionForm = { type: "normal" };
|
|
1107
|
+
else {
|
|
1108
|
+
const i = this.element.businessObject.conditionExpression;
|
|
1109
|
+
if (this.flowConditionForm = { ...i, type: "condition" }, this.flowConditionForm.resource) {
|
|
1110
|
+
this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "externalScript");
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
if (i.language) {
|
|
1114
|
+
this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "inlineScript");
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
this.$set(this.flowConditionForm, "conditionType", "expression");
|
|
323
1118
|
}
|
|
324
1119
|
},
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
"activity-separator": { group: "activity", separator: !0 },
|
|
340
|
-
"create.subprocess-expanded": {
|
|
341
|
-
group: "activity",
|
|
342
|
-
className: "bpmn-icon-subprocess-expanded",
|
|
343
|
-
title: o("Create expanded SubProcess"),
|
|
344
|
-
action: {
|
|
345
|
-
dragstart: S,
|
|
346
|
-
click: S
|
|
1120
|
+
updateFlowType(i) {
|
|
1121
|
+
if (i === "condition") {
|
|
1122
|
+
this.flowConditionRef = this.bpmnInstances.moddle.create("bpmn:FormalExpression"), this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1123
|
+
conditionExpression: this.flowConditionRef
|
|
1124
|
+
});
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
if (i === "default") {
|
|
1128
|
+
this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1129
|
+
conditionExpression: null
|
|
1130
|
+
}), this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
|
|
1131
|
+
default: this.element
|
|
1132
|
+
});
|
|
1133
|
+
return;
|
|
347
1134
|
}
|
|
1135
|
+
this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id && this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
|
|
1136
|
+
default: null
|
|
1137
|
+
}), this.bpmnInstances.modeling.updateProperties(this.element, {
|
|
1138
|
+
conditionExpression: null
|
|
1139
|
+
});
|
|
348
1140
|
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
1141
|
+
updateFlowCondition() {
|
|
1142
|
+
const { conditionType: i, scriptType: e, body: t, resource: n, language: s } = this.flowConditionForm;
|
|
1143
|
+
let a;
|
|
1144
|
+
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 });
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
var Ht = function() {
|
|
1149
|
+
var e = this, t = e._self._c;
|
|
1150
|
+
return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
|
|
1151
|
+
n.preventDefault();
|
|
1152
|
+
} } }, [t(o, { attrs: { label: "流转类型" } }, [t(h, { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(n) {
|
|
1153
|
+
e.$set(e.flowConditionForm, "type", n);
|
|
1154
|
+
}, expression: "flowConditionForm.type" } }, [t(u, { attrs: { label: "普通流转路径", value: "normal" } }), t(u, { attrs: { label: "默认流转路径", value: "default" } }), t(u, { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t(o, { key: "condition", attrs: { label: "条件格式" } }, [t(h, { model: { value: e.flowConditionForm.conditionType, callback: function(n) {
|
|
1155
|
+
e.$set(e.flowConditionForm, "conditionType", n);
|
|
1156
|
+
}, expression: "flowConditionForm.conditionType" } }, [t(u, { attrs: { label: "表达式", value: "expression" } }), t(u, { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t(o, { key: "express", attrs: { label: "表达式" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
|
|
1157
|
+
e.$set(e.flowConditionForm, "body", n);
|
|
1158
|
+
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t(o, { key: "language", attrs: { label: "脚本语言" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(n) {
|
|
1159
|
+
e.$set(e.flowConditionForm, "language", n);
|
|
1160
|
+
}, expression: "flowConditionForm.language" } })], 1), t(o, { key: "scriptType", attrs: { label: "脚本类型" } }, [t(h, { model: { value: e.flowConditionForm.scriptType, callback: function(n) {
|
|
1161
|
+
e.$set(e.flowConditionForm, "scriptType", n);
|
|
1162
|
+
}, expression: "flowConditionForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t(o, { key: "body", attrs: { label: "脚本" } }, [t(p, { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
|
|
1163
|
+
e.$set(e.flowConditionForm, "body", n);
|
|
1164
|
+
}, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t(o, { key: "resource", attrs: { label: "资源地址" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(n) {
|
|
1165
|
+
e.$set(e.flowConditionForm, "resource", n);
|
|
1166
|
+
}, expression: "flowConditionForm.resource" } })], 1) : e._e()] : e._e()], 2)], 1);
|
|
1167
|
+
}, Wt = [], Xt = /* @__PURE__ */ w(
|
|
1168
|
+
Zt,
|
|
1169
|
+
Ht,
|
|
1170
|
+
Wt,
|
|
1171
|
+
!1,
|
|
1172
|
+
null,
|
|
1173
|
+
null
|
|
1174
|
+
);
|
|
1175
|
+
const Ve = Xt.exports, Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1176
|
+
__proto__: null,
|
|
1177
|
+
default: Ve
|
|
1178
|
+
}, Symbol.toStringTag, { value: "Module" })), Qt = {
|
|
1179
|
+
name: "ElementBaseInfo",
|
|
1180
|
+
inject: {
|
|
1181
|
+
prefix: "prefix",
|
|
1182
|
+
width: "width"
|
|
1183
|
+
},
|
|
1184
|
+
props: {
|
|
1185
|
+
id: String,
|
|
1186
|
+
idEditDisabled: {
|
|
1187
|
+
type: Boolean,
|
|
1188
|
+
default: !0
|
|
1189
|
+
},
|
|
1190
|
+
element: Object,
|
|
1191
|
+
bpmnInstances: Object
|
|
1192
|
+
},
|
|
1193
|
+
data() {
|
|
1194
|
+
return {
|
|
1195
|
+
skipExpression: "",
|
|
1196
|
+
requiredComment: null,
|
|
1197
|
+
businessObject: {},
|
|
1198
|
+
attrs: {
|
|
1199
|
+
commentInForm: null,
|
|
1200
|
+
commentOrder: null,
|
|
1201
|
+
commentNodeIds: null,
|
|
1202
|
+
commentLabel: null
|
|
1203
|
+
},
|
|
1204
|
+
nodes: []
|
|
1205
|
+
};
|
|
1206
|
+
},
|
|
1207
|
+
watch: {
|
|
1208
|
+
id: "init"
|
|
1209
|
+
},
|
|
1210
|
+
methods: {
|
|
1211
|
+
init(i) {
|
|
1212
|
+
const e = this.bpmnInstances.elementRegistry.filter((s) => s.type === "bpmn:UserTask");
|
|
1213
|
+
this.nodes = e.map(({ businessObject: { id: s, name: a } }) => ({ label: a, value: s }));
|
|
1214
|
+
const { businessObject: t } = this.element;
|
|
1215
|
+
if (i ? (this.businessObject = E(t), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
|
|
1216
|
+
for (const s in this.attrs) {
|
|
1217
|
+
let a = se(t, `${this.prefix}:${s}`);
|
|
1218
|
+
s === "commentNodeIds" && (a = a ? a.split(",") : []), this.attrs[s] = a;
|
|
1219
|
+
}
|
|
1220
|
+
this.skipExpression = se(t, `${this.prefix}:skipExpression`);
|
|
1221
|
+
let n = se(t, `${this.prefix}:requiredComment`);
|
|
1222
|
+
n || (n = "Y"), this.requiredComment = n;
|
|
1223
|
+
},
|
|
1224
|
+
updateBaseInfo(i) {
|
|
1225
|
+
const { modeling: e } = this.bpmnInstances;
|
|
1226
|
+
if (i === "id") {
|
|
1227
|
+
e.updateProperties(this.element, {
|
|
1228
|
+
id: this.businessObject[i],
|
|
1229
|
+
di: { id: `${this.businessObject[i]}_di` }
|
|
1230
|
+
});
|
|
1231
|
+
return;
|
|
1232
|
+
}
|
|
1233
|
+
if (i === "isExpanded") {
|
|
1234
|
+
e.toggleCollapse(this.element);
|
|
1235
|
+
return;
|
|
356
1236
|
}
|
|
1237
|
+
e.updateProperties(this.element, { [i]: this.businessObject[i] });
|
|
1238
|
+
},
|
|
1239
|
+
updateProp(i, e) {
|
|
1240
|
+
if (i === "commentInForm") {
|
|
1241
|
+
if (!e)
|
|
1242
|
+
for (const t in this.attrs)
|
|
1243
|
+
t !== "commentInForm" && (this.attrs[t] = null, Ae(this.bpmnInstances, this.element, `${this.prefix}:${t}`, this.attrs[t]));
|
|
1244
|
+
} else i === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null;
|
|
1245
|
+
Ae(this.bpmnInstances, this.element, `${this.prefix}:${i}`, e);
|
|
357
1246
|
}
|
|
358
|
-
|
|
359
|
-
}), n;
|
|
360
|
-
};
|
|
361
|
-
P.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "moddle", "translate"];
|
|
362
|
-
P.prototype = new j();
|
|
363
|
-
P.prototype.constructor = P;
|
|
364
|
-
const Ie = {
|
|
365
|
-
__init__: ["customPalette"],
|
|
366
|
-
customPalette: ["type", P]
|
|
367
|
-
};
|
|
368
|
-
function ae(n, e) {
|
|
369
|
-
z.call(this, n, e, 3e3), n.on("autoPlace", 3e3, function(t) {
|
|
370
|
-
const i = t.shape, r = t.source;
|
|
371
|
-
return _e(r, i);
|
|
372
|
-
}), this.append = function(t, i, r) {
|
|
373
|
-
n.fire("autoPlace.start", {
|
|
374
|
-
source: t,
|
|
375
|
-
shape: i
|
|
376
|
-
});
|
|
377
|
-
const a = n.fire("autoPlace", {
|
|
378
|
-
source: t,
|
|
379
|
-
shape: i
|
|
380
|
-
});
|
|
381
|
-
console.log("hints", r, "position", a);
|
|
382
|
-
const p = e.appendShape(t, i, a, t.parent, r);
|
|
383
|
-
return n.fire("autoPlace.end", {
|
|
384
|
-
source: t,
|
|
385
|
-
shape: p
|
|
386
|
-
}), p;
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function Pe(n) {
|
|
390
|
-
return {
|
|
391
|
-
top: n.y,
|
|
392
|
-
right: n.x + (n.width || 0),
|
|
393
|
-
bottom: n.y + (n.height || 0),
|
|
394
|
-
left: n.x
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
function we(n) {
|
|
398
|
-
return {
|
|
399
|
-
x: Math.round(n.x),
|
|
400
|
-
y: Math.round(n.y)
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
function ke(n) {
|
|
404
|
-
return we({
|
|
405
|
-
x: n.x + (n.width || 0) / 2,
|
|
406
|
-
y: n.y + (n.height || 0) / 2
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
function _e(n, e, t) {
|
|
410
|
-
t || (t = {});
|
|
411
|
-
const i = t.defaultDistance || 50, r = ke(n), a = Pe(n);
|
|
412
|
-
return {
|
|
413
|
-
x: r.x,
|
|
414
|
-
y: a.bottom + i + e.height / 2
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
const se = function() {
|
|
1247
|
+
}
|
|
418
1248
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}),
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
},
|
|
1249
|
+
var en = function() {
|
|
1250
|
+
var e = this, t = e._self._c;
|
|
1251
|
+
return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
|
|
1252
|
+
n.preventDefault();
|
|
1253
|
+
} } }, [t(o, { attrs: { label: "ID" } }, [t(p, { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(n) {
|
|
1254
|
+
return e.updateBaseInfo("id");
|
|
1255
|
+
} }, model: { value: e.businessObject.id, callback: function(n) {
|
|
1256
|
+
e.$set(e.businessObject, "id", n);
|
|
1257
|
+
}, expression: "businessObject.id" } })], 1), t(o, { attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, on: { input: function(n) {
|
|
1258
|
+
return e.updateBaseInfo("name");
|
|
1259
|
+
} }, model: { value: e.businessObject.name, callback: function(n) {
|
|
1260
|
+
e.$set(e.businessObject, "name", n);
|
|
1261
|
+
}, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [t(o, { attrs: { label: "跳过表达式" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("skipExpression", n) }, model: { value: e.skipExpression, callback: function(n) {
|
|
1262
|
+
e.skipExpression = n;
|
|
1263
|
+
}, expression: "skipExpression" } })], 1), t(o, { attrs: { label: "意见必填" } }, [t(H, { attrs: { "active-text": "是", "active-value": "Y", "inactive-text": "否", "inactive-value": "N" }, on: { input: (n) => e.updateProp("requiredComment", n) }, model: { value: e.requiredComment, callback: function(n) {
|
|
1264
|
+
e.requiredComment = n;
|
|
1265
|
+
}, expression: "requiredComment" } })], 1), t(o, { attrs: { label: "意见在表单" } }, [t(H, { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (n) => e.updateProp("commentInForm", n) }, model: { value: e.attrs.commentInForm, callback: function(n) {
|
|
1266
|
+
e.$set(e.attrs, "commentInForm", n);
|
|
1267
|
+
}, expression: "attrs.commentInForm" } })], 1), e.attrs.commentInForm ? [t(o, { attrs: { label: "意见名称" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentLabel", n) }, model: { value: e.attrs.commentLabel, callback: function(n) {
|
|
1268
|
+
e.$set(e.attrs, "commentLabel", n);
|
|
1269
|
+
}, expression: "attrs.commentLabel" } })], 1), t(o, { attrs: { label: "意见聚合" } }, [t(h, { attrs: { multiple: "", clearable: "" }, on: { input: (n) => e.updateProp("commentNodeIds", n) }, model: { value: e.attrs.commentNodeIds, callback: function(n) {
|
|
1270
|
+
e.$set(e.attrs, "commentNodeIds", n);
|
|
1271
|
+
}, expression: "attrs.commentNodeIds" } }, e._l(e.nodes, function(n) {
|
|
1272
|
+
return t(u, { key: n.value, attrs: { label: n.label, value: n.value } });
|
|
1273
|
+
}), 1)], 1), t(o, { attrs: { label: "意见排序号" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentOrder", n) }, model: { value: e.attrs.commentOrder, callback: function(n) {
|
|
1274
|
+
e.$set(e.attrs, "commentOrder", n);
|
|
1275
|
+
}, expression: "attrs.commentOrder" } })], 1)] : e._e()] : e._e(), e.businessObject.$type === "bpmn:Process" ? [t(o, { attrs: { label: "版本标签" } }, [t(p, { attrs: { clearable: "" }, on: { input: function(n) {
|
|
1276
|
+
return e.updateBaseInfo("versionTag");
|
|
1277
|
+
} }, model: { value: e.businessObject.versionTag, callback: function(n) {
|
|
1278
|
+
e.$set(e.businessObject, "versionTag", n);
|
|
1279
|
+
}, expression: "businessObject.versionTag" } })], 1), t(o, { attrs: { label: "可执行" } }, [t(H, { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(n) {
|
|
1280
|
+
return e.updateBaseInfo("isExecutable");
|
|
1281
|
+
} }, model: { value: e.businessObject.isExecutable, callback: function(n) {
|
|
1282
|
+
e.$set(e.businessObject, "isExecutable", n);
|
|
1283
|
+
}, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t(o, { attrs: { label: "状态" } }, [t(H, { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(n) {
|
|
1284
|
+
return e.updateBaseInfo("isExpanded");
|
|
1285
|
+
} }, model: { value: e.businessObject.isExpanded, callback: function(n) {
|
|
1286
|
+
e.$set(e.businessObject, "isExpanded", n);
|
|
1287
|
+
}, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
|
|
1288
|
+
}, tn = [], nn = /* @__PURE__ */ w(
|
|
1289
|
+
Qt,
|
|
1290
|
+
en,
|
|
1291
|
+
tn,
|
|
1292
|
+
!1,
|
|
1293
|
+
null,
|
|
1294
|
+
null
|
|
1295
|
+
);
|
|
1296
|
+
const de = nn.exports, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1297
|
+
__proto__: null,
|
|
1298
|
+
default: de
|
|
1299
|
+
}, Symbol.toStringTag, { value: "Module" })), Ce = ["base", "task", "form", "multiInstance"], rn = {
|
|
456
1300
|
name: "PropertiesPanel",
|
|
457
1301
|
componentName: "MyPropertiesPanel",
|
|
458
1302
|
components: {
|
|
459
|
-
UserTaskListeners: () =>
|
|
460
|
-
ElementForm: () =>
|
|
461
|
-
ElementProperties: () =>
|
|
462
|
-
ElementListeners: () =>
|
|
463
|
-
SignalAndMassage: () => import("../chunks/SignalAndMessage.
|
|
464
|
-
FlowCondition: () =>
|
|
465
|
-
ElementMultiInstance: () =>
|
|
466
|
-
ElementTask: () => import("../chunks/ElementTaskConfig.
|
|
467
|
-
ElementOtherConfig: () =>
|
|
468
|
-
ElementBaseInfo: () =>
|
|
1303
|
+
UserTaskListeners: () => Promise.resolve().then(() => It),
|
|
1304
|
+
ElementForm: () => Promise.resolve().then(() => Jt),
|
|
1305
|
+
ElementProperties: () => Promise.resolve().then(() => xt),
|
|
1306
|
+
ElementListeners: () => Promise.resolve().then(() => Bt),
|
|
1307
|
+
SignalAndMassage: () => import("../chunks/SignalAndMessage.BpjOoKhK.mjs"),
|
|
1308
|
+
FlowCondition: () => Promise.resolve().then(() => Yt),
|
|
1309
|
+
ElementMultiInstance: () => Promise.resolve().then(() => Nt),
|
|
1310
|
+
ElementTask: () => import("../chunks/ElementTaskConfig.AvBOzAni.mjs"),
|
|
1311
|
+
ElementOtherConfig: () => Promise.resolve().then(() => yt),
|
|
1312
|
+
ElementBaseInfo: () => Promise.resolve().then(() => sn)
|
|
469
1313
|
},
|
|
470
1314
|
provide() {
|
|
471
1315
|
return {
|
|
@@ -549,18 +1393,18 @@ const Oe = {
|
|
|
549
1393
|
activeTabs: {
|
|
550
1394
|
immediate: !0,
|
|
551
1395
|
handler() {
|
|
552
|
-
this.activeTab = this.isTab ? "base" :
|
|
1396
|
+
this.activeTab = this.isTab ? "base" : Ce;
|
|
553
1397
|
}
|
|
554
1398
|
},
|
|
555
1399
|
elementId: {
|
|
556
1400
|
handler() {
|
|
557
|
-
this.activeTab = this.isTab ? "base" :
|
|
1401
|
+
this.activeTab = this.isTab ? "base" : Ce;
|
|
558
1402
|
}
|
|
559
1403
|
},
|
|
560
1404
|
isTab: {
|
|
561
1405
|
immediate: !0,
|
|
562
|
-
handler(
|
|
563
|
-
|
|
1406
|
+
handler(i) {
|
|
1407
|
+
i ? this.activeTab = "base" : this.activeTab = ["base"];
|
|
564
1408
|
}
|
|
565
1409
|
}
|
|
566
1410
|
},
|
|
@@ -573,7 +1417,7 @@ const Oe = {
|
|
|
573
1417
|
this.timer = setTimeout(() => this.initModels(), 10);
|
|
574
1418
|
return;
|
|
575
1419
|
}
|
|
576
|
-
this.timer && clearTimeout(this.timer), this.bpmnInstances =
|
|
1420
|
+
this.timer && clearTimeout(this.timer), this.bpmnInstances = ee({
|
|
577
1421
|
modeler: this.bpmnModeler,
|
|
578
1422
|
modeling: this.bpmnModeler.get("modeling"),
|
|
579
1423
|
moddle: this.bpmnModeler.get("moddle"),
|
|
@@ -588,100 +1432,100 @@ const Oe = {
|
|
|
588
1432
|
getActiveElement() {
|
|
589
1433
|
this.initFormOnChanged(null), this.bpmnModeler.on("import.done", () => {
|
|
590
1434
|
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), this.initFormOnChanged(null);
|
|
591
|
-
}), this.bpmnModeler.on("selection.changed", ({ newSelection:
|
|
592
|
-
this.initFormOnChanged(
|
|
593
|
-
}), this.bpmnModeler.on("element.changed", ({ element:
|
|
594
|
-
|
|
1435
|
+
}), this.bpmnModeler.on("selection.changed", ({ newSelection: i }) => {
|
|
1436
|
+
this.initFormOnChanged(i[0] || null);
|
|
1437
|
+
}), this.bpmnModeler.on("element.changed", ({ element: i }) => {
|
|
1438
|
+
i && i.id === this.elementId && this.initFormOnChanged(i);
|
|
595
1439
|
});
|
|
596
1440
|
},
|
|
597
1441
|
// 初始化数据
|
|
598
|
-
initFormOnChanged(
|
|
599
|
-
let e =
|
|
600
|
-
e || (e = this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Process") ?? this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Collaboration")), e && (this.element =
|
|
1442
|
+
initFormOnChanged(i) {
|
|
1443
|
+
let e = i;
|
|
1444
|
+
e || (e = this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Process") ?? this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Collaboration")), e && (this.element = ee(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");
|
|
601
1445
|
}
|
|
602
1446
|
}
|
|
603
1447
|
};
|
|
604
|
-
var
|
|
605
|
-
var
|
|
1448
|
+
var an = function() {
|
|
1449
|
+
var n, s;
|
|
606
1450
|
var e = this, t = e._self._c;
|
|
607
1451
|
return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(a) {
|
|
608
1452
|
e.isPanelVisible = !0;
|
|
609
1453
|
} } }, [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(a) {
|
|
610
1454
|
a.stopPropagation(), e.isPanelVisible = !e.isPanelVisible;
|
|
611
|
-
} } }), e._v(" " + e._s(e.isPanelVisible ? (
|
|
1455
|
+
} } }), e._v(" " + e._s(e.isPanelVisible ? (s = (n = e.element) == null ? void 0 : n.businessObject) == null ? void 0 : s.name : "") + " ")]), e.panelType === "tab" ? t(He, { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
|
|
612
1456
|
e.activeTab = a;
|
|
613
|
-
}, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(
|
|
614
|
-
return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(
|
|
1457
|
+
}, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(L, { attrs: { label: "常规", name: "base", lazy: "" } }, [t(de, { 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(L, { attrs: { label: "消息与信号", name: "message", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t(L, { attrs: { label: "流转条件", name: "condition", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
|
|
1458
|
+
return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(L, { key: "form", attrs: { label: "表单", name: "form", lazy: "" } }, [t(ue, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
|
|
615
1459
|
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("task") ? e._t("task", function() {
|
|
616
|
-
return [e.elementType.indexOf("Task") !== -1 ? t(
|
|
617
|
-
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(
|
|
1460
|
+
return [e.elementType.indexOf("Task") !== -1 ? t(L, { key: "task", attrs: { label: "任务", name: "task", lazy: "" } }, [t("ElementTask", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
|
|
1461
|
+
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(L, { key: "multiInstance", attrs: { label: "多实例", name: "multiInstance", lazy: "" } }, [t(ce, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t(L, { key: "listeners", attrs: { label: "执行监听器", name: "listeners", lazy: "" } }, [t(me, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t(L, { key: "taskListeners", attrs: { label: "任务监听器", name: "taskListeners", lazy: "" } }, [t(pe, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t(L, { key: "extensions", attrs: { label: "扩展属性", name: "extensions", lazy: "" } }, [t(le, { 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(L, { key: "other", attrs: { label: "其他", name: "other", lazy: "" } }, [t(oe, { 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) : t(Ze, { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
|
|
618
1462
|
e.activeTab = a;
|
|
619
|
-
}, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(
|
|
1463
|
+
}, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(I, { attrs: { name: "base" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
620
1464
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-info" }), e._v("常规")])];
|
|
621
|
-
}, proxy: !0 }], null, !1, 2621733365) }, [t(
|
|
1465
|
+
}, proxy: !0 }], null, !1, 2621733365) }, [t(de, { 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(I, { key: "message", attrs: { name: "message" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
622
1466
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-comment" }), e._v("消息与信号")])];
|
|
623
|
-
}, proxy: !0 }], null, !1, 2715634709) }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t(
|
|
1467
|
+
}, proxy: !0 }], null, !1, 2715634709) }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t(I, { key: "condition", attrs: { name: "condition" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
624
1468
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("流转条件")])];
|
|
625
|
-
}, proxy: !0 }], null, !1, 2203010800) }, [t(
|
|
626
|
-
return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(
|
|
1469
|
+
}, proxy: !0 }], null, !1, 2203010800) }, [t(Ve, { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
|
|
1470
|
+
return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(I, { key: "form", attrs: { name: "form" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
627
1471
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-order" }), e._v("表单")])];
|
|
628
|
-
}, proxy: !0 }], null, !1, 1341048650) }, [t(
|
|
1472
|
+
}, proxy: !0 }], null, !1, 1341048650) }, [t(ue, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
|
|
629
1473
|
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("task") ? e._t("task", function() {
|
|
630
|
-
return [e.elementType.indexOf("Task") !== -1 ? t(
|
|
1474
|
+
return [e.elementType.indexOf("Task") !== -1 ? t(I, { key: "task", attrs: { name: "task" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
631
1475
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-claim" }), e._v("任务")])];
|
|
632
1476
|
}, proxy: !0 }], null, !1, 2144785833) }, [t("ElementTask", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
|
|
633
|
-
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(
|
|
1477
|
+
}, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(I, { key: "multiInstance", attrs: { name: "multiInstance" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
634
1478
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-help" }), e._v("多实例")])];
|
|
635
|
-
}, proxy: !0 }], null, !1, 1253501895) }, [t(
|
|
636
|
-
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("执行监听器"), t(
|
|
1479
|
+
}, proxy: !0 }], null, !1, 1253501895) }, [t(ce, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t(I, { key: "listeners", attrs: { name: "listeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
1480
|
+
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("执行监听器"), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
637
1481
|
return [t("p", [e._v("发送和退回时会触发")])];
|
|
638
1482
|
}, proxy: !0 }], null, !1, 635466666) }, [t("i", { staticClass: "el-icon-info" })])], 1)];
|
|
639
|
-
}, proxy: !0 }], null, !1, 579687766) }, [t(
|
|
640
|
-
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("任务监听器"), t(
|
|
1483
|
+
}, proxy: !0 }], null, !1, 579687766) }, [t(me, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t(I, { key: "taskListeners", attrs: { name: "taskListeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
1484
|
+
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("任务监听器"), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
641
1485
|
return [t("p", [e._v("任务实例的创建、指派、完成、删除、更新、超时会触发")])];
|
|
642
1486
|
}, proxy: !0 }], null, !1, 1260848675) }, [t("i", { staticClass: "el-icon-info" })])], 1)];
|
|
643
|
-
}, proxy: !0 }], null, !1, 1038413081) }, [t(
|
|
1487
|
+
}, proxy: !0 }], null, !1, 1038413081) }, [t(pe, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t(I, { key: "extensions", attrs: { name: "extensions" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
644
1488
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-circle-plus" }), e._v("扩展属性")])];
|
|
645
|
-
}, proxy: !0 }], null, !1, 1854866151) }, [t(
|
|
1489
|
+
}, proxy: !0 }], null, !1, 1854866151) }, [t(le, { 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(I, { key: "other", attrs: { name: "other" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
646
1490
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("其他")])];
|
|
647
|
-
}, proxy: !0 }], null, !1, 520255146) }, [t(
|
|
648
|
-
},
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
1491
|
+
}, proxy: !0 }], null, !1, 520255146) }, [t(oe, { 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);
|
|
1492
|
+
}, on = [], ln = /* @__PURE__ */ w(
|
|
1493
|
+
rn,
|
|
1494
|
+
an,
|
|
1495
|
+
on,
|
|
652
1496
|
!1,
|
|
653
1497
|
null,
|
|
654
1498
|
null
|
|
655
1499
|
);
|
|
656
|
-
const
|
|
1500
|
+
const Re = ln.exports, pn = (i, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
|
|
657
1501
|
<bpmn2:definitions
|
|
658
1502
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
659
1503
|
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
660
1504
|
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
|
661
1505
|
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
|
|
662
1506
|
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
|
663
|
-
id="diagram_${
|
|
1507
|
+
id="diagram_${i}"
|
|
664
1508
|
targetNamespace="${{
|
|
665
1509
|
activiti: "http://activiti.org/bpmn",
|
|
666
1510
|
camunda: "http://bpmn.io/schema/bpmn",
|
|
667
1511
|
flowable: "http://flowable.org/bpmn"
|
|
668
1512
|
}[t]}">
|
|
669
|
-
<bpmn2:process id="${
|
|
1513
|
+
<bpmn2:process id="${i}" name="${e}" isExecutable="true">
|
|
670
1514
|
</bpmn2:process>
|
|
671
1515
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
672
|
-
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${
|
|
1516
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${i}">
|
|
673
1517
|
</bpmndi:BPMNPlane>
|
|
674
1518
|
</bpmndi:BPMNDiagram>
|
|
675
1519
|
</bpmn2:definitions>`);
|
|
676
|
-
function
|
|
1520
|
+
function mn(i) {
|
|
677
1521
|
return function(e, t) {
|
|
678
|
-
return t = t || {}, e =
|
|
679
|
-
let a = t[
|
|
680
|
-
return
|
|
1522
|
+
return t = t || {}, e = i[e] || e, e.replace(/{([^}]+)}/g, function(n, s) {
|
|
1523
|
+
let a = t[s];
|
|
1524
|
+
return i[t[s]] !== null && i[t[s]] !== void 0 && (a = i[t[s]]), a || `{${s}}`;
|
|
681
1525
|
});
|
|
682
1526
|
};
|
|
683
1527
|
}
|
|
684
|
-
const
|
|
1528
|
+
const cn = {
|
|
685
1529
|
// 添加部分
|
|
686
1530
|
"Append EndEvent": "追加结束事件",
|
|
687
1531
|
"Append Gateway": "追加网关",
|
|
@@ -921,7 +1765,7 @@ const Ue = {
|
|
|
921
1765
|
Data: "数据",
|
|
922
1766
|
TextAnnotation: "文本说明",
|
|
923
1767
|
Tasks: "任务"
|
|
924
|
-
},
|
|
1768
|
+
}, be = [
|
|
925
1769
|
{
|
|
926
1770
|
name: "commentInForm",
|
|
927
1771
|
isAttr: !0,
|
|
@@ -947,7 +1791,7 @@ const Ue = {
|
|
|
947
1791
|
isAttr: !0,
|
|
948
1792
|
type: "String"
|
|
949
1793
|
}
|
|
950
|
-
],
|
|
1794
|
+
], Te = {
|
|
951
1795
|
name: "Camunda",
|
|
952
1796
|
uri: "http://camunda.org/schema/1.0/bpmn",
|
|
953
1797
|
prefix: "camunda",
|
|
@@ -1269,7 +2113,7 @@ const Ue = {
|
|
|
1269
2113
|
isAttr: !0,
|
|
1270
2114
|
type: "String"
|
|
1271
2115
|
},
|
|
1272
|
-
...
|
|
2116
|
+
...be
|
|
1273
2117
|
]
|
|
1274
2118
|
},
|
|
1275
2119
|
{
|
|
@@ -1948,7 +2792,7 @@ const Ue = {
|
|
|
1948
2792
|
}
|
|
1949
2793
|
],
|
|
1950
2794
|
emumerations: []
|
|
1951
|
-
},
|
|
2795
|
+
}, we = {
|
|
1952
2796
|
name: "Activiti",
|
|
1953
2797
|
uri: "http://activiti.org/bpmn",
|
|
1954
2798
|
prefix: "activiti",
|
|
@@ -2283,7 +3127,7 @@ const Ue = {
|
|
|
2283
3127
|
isAttr: !0,
|
|
2284
3128
|
type: "String"
|
|
2285
3129
|
},
|
|
2286
|
-
...
|
|
3130
|
+
...be
|
|
2287
3131
|
]
|
|
2288
3132
|
},
|
|
2289
3133
|
{
|
|
@@ -2933,7 +3777,7 @@ const Ue = {
|
|
|
2933
3777
|
}
|
|
2934
3778
|
],
|
|
2935
3779
|
emumerations: []
|
|
2936
|
-
},
|
|
3780
|
+
}, ke = {
|
|
2937
3781
|
name: "Flowable",
|
|
2938
3782
|
uri: "http://flowable.org/bpmn",
|
|
2939
3783
|
prefix: "flowable",
|
|
@@ -3256,7 +4100,7 @@ const Ue = {
|
|
|
3256
4100
|
isAttr: !0,
|
|
3257
4101
|
type: "String"
|
|
3258
4102
|
},
|
|
3259
|
-
...
|
|
4103
|
+
...be
|
|
3260
4104
|
]
|
|
3261
4105
|
},
|
|
3262
4106
|
{
|
|
@@ -4160,157 +5004,157 @@ const Ue = {
|
|
|
4160
5004
|
]
|
|
4161
5005
|
}
|
|
4162
5006
|
]
|
|
4163
|
-
},
|
|
4164
|
-
function
|
|
5007
|
+
}, un = "*";
|
|
5008
|
+
function z(i) {
|
|
4165
5009
|
const e = this;
|
|
4166
|
-
|
|
4167
|
-
const
|
|
4168
|
-
return e.canCopyProperty(
|
|
5010
|
+
i.on("moddleCopy.canCopyProperty", function(t) {
|
|
5011
|
+
const n = t.property, s = t.parent;
|
|
5012
|
+
return e.canCopyProperty(n, s);
|
|
4169
5013
|
});
|
|
4170
5014
|
}
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
if (
|
|
5015
|
+
z.$inject = ["eventBus"];
|
|
5016
|
+
z.prototype.canCopyProperty = function(i, e) {
|
|
5017
|
+
if (tt(i) && !dn(i, e) || D(i, "camunda:InputOutput") && !this.canHostInputOutput(e) || je(i, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || D(i, "camunda:In") && !this.canHostIn(e))
|
|
4174
5018
|
return !1;
|
|
4175
5019
|
};
|
|
4176
|
-
|
|
4177
|
-
if (
|
|
5020
|
+
z.prototype.canHostInputOutput = function(i) {
|
|
5021
|
+
if (C(i, "camunda:Connector"))
|
|
4178
5022
|
return !0;
|
|
4179
|
-
const t =
|
|
4180
|
-
return !(!t ||
|
|
5023
|
+
const t = C(i, "bpmn:FlowNode");
|
|
5024
|
+
return !(!t || je(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || D(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
|
|
4181
5025
|
};
|
|
4182
|
-
|
|
4183
|
-
const e =
|
|
4184
|
-
return
|
|
5026
|
+
z.prototype.canHostConnector = function(i) {
|
|
5027
|
+
const e = C(i, "camunda:ServiceTaskLike");
|
|
5028
|
+
return D(e, "bpmn:MessageEventDefinition") ? C(i, "bpmn:IntermediateThrowEvent") || C(i, "bpmn:EndEvent") : !0;
|
|
4185
5029
|
};
|
|
4186
|
-
|
|
4187
|
-
return
|
|
5030
|
+
z.prototype.canHostIn = function(i) {
|
|
5031
|
+
return C(i, "bpmn:CallActivity") ? !0 : C(i, "bpmn:SignalEventDefinition") ? C(i, "bpmn:IntermediateThrowEvent") || C(i, "bpmn:EndEvent") : !0;
|
|
4188
5032
|
};
|
|
4189
|
-
function
|
|
4190
|
-
return
|
|
5033
|
+
function D(i, e) {
|
|
5034
|
+
return i && nt(i.$instanceOf) && i.$instanceOf(e);
|
|
4191
5035
|
}
|
|
4192
|
-
function
|
|
4193
|
-
return
|
|
4194
|
-
return
|
|
5036
|
+
function je(i, e) {
|
|
5037
|
+
return B(e, function(t) {
|
|
5038
|
+
return D(i, t);
|
|
4195
5039
|
});
|
|
4196
5040
|
}
|
|
4197
|
-
function
|
|
5041
|
+
function C(i, e) {
|
|
4198
5042
|
if (!e)
|
|
4199
|
-
return
|
|
4200
|
-
if (
|
|
4201
|
-
return
|
|
4202
|
-
if (
|
|
4203
|
-
return
|
|
5043
|
+
return i.$parent;
|
|
5044
|
+
if (D(i, e))
|
|
5045
|
+
return i;
|
|
5046
|
+
if (i.$parent)
|
|
5047
|
+
return C(i.$parent, e);
|
|
4204
5048
|
}
|
|
4205
|
-
function
|
|
4206
|
-
const t =
|
|
4207
|
-
return !
|
|
4208
|
-
return
|
|
5049
|
+
function dn(i, e) {
|
|
5050
|
+
const t = i.$type && i.$model.getTypeDescriptor(i.$type), n = t && t.meta && t.meta.allowedIn;
|
|
5051
|
+
return !n || fn(n) ? !0 : B(n, function(s) {
|
|
5052
|
+
return C(e, s);
|
|
4209
5053
|
});
|
|
4210
5054
|
}
|
|
4211
|
-
function
|
|
4212
|
-
return
|
|
5055
|
+
function fn(i) {
|
|
5056
|
+
return i.indexOf(un) !== -1;
|
|
4213
5057
|
}
|
|
4214
|
-
const
|
|
5058
|
+
const yn = {
|
|
4215
5059
|
__init__: ["camundaModdleExtension"],
|
|
4216
|
-
camundaModdleExtension: ["type",
|
|
4217
|
-
},
|
|
5060
|
+
camundaModdleExtension: ["type", z]
|
|
5061
|
+
}, bn = {
|
|
4218
5062
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
4219
5063
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
4220
5064
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
4221
5065
|
};
|
|
4222
|
-
function
|
|
4223
|
-
return
|
|
5066
|
+
function he(i, e) {
|
|
5067
|
+
return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
|
|
4224
5068
|
}
|
|
4225
|
-
function
|
|
4226
|
-
return
|
|
5069
|
+
function hn(i) {
|
|
5070
|
+
return i && i.length;
|
|
4227
5071
|
}
|
|
4228
|
-
function
|
|
4229
|
-
return
|
|
4230
|
-
return
|
|
5072
|
+
function Y(i, e) {
|
|
5073
|
+
return hn(i) && B(i, function(t) {
|
|
5074
|
+
return he(t, e);
|
|
4231
5075
|
});
|
|
4232
5076
|
}
|
|
4233
|
-
function
|
|
4234
|
-
return
|
|
4235
|
-
return
|
|
5077
|
+
function vn(i, e) {
|
|
5078
|
+
return B(e, function(t) {
|
|
5079
|
+
return he(i, t);
|
|
4236
5080
|
});
|
|
4237
5081
|
}
|
|
4238
|
-
function
|
|
4239
|
-
const
|
|
4240
|
-
return
|
|
5082
|
+
function re(i, e, t) {
|
|
5083
|
+
const n = e.name, s = bn[n.replace(/activiti:/, "")];
|
|
5084
|
+
return n === i && vn(t, s);
|
|
4241
5085
|
}
|
|
4242
|
-
function
|
|
4243
|
-
|
|
5086
|
+
function ve(i) {
|
|
5087
|
+
i.on(
|
|
4244
5088
|
"property.clone",
|
|
4245
5089
|
function(e) {
|
|
4246
|
-
const t = e.newElement,
|
|
4247
|
-
this.canCloneProperty(t,
|
|
5090
|
+
const t = e.newElement, n = e.propertyDescriptor;
|
|
5091
|
+
this.canCloneProperty(t, n);
|
|
4248
5092
|
},
|
|
4249
5093
|
this
|
|
4250
5094
|
);
|
|
4251
5095
|
}
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
if (
|
|
4255
|
-
return
|
|
4256
|
-
if (
|
|
4257
|
-
return
|
|
5096
|
+
ve.$inject = ["eventBus"];
|
|
5097
|
+
ve.prototype.canCloneProperty = function(i, e) {
|
|
5098
|
+
if (re("activiti:FailedJobRetryTimeCycle", e, i))
|
|
5099
|
+
return Y(i.eventDefinitions, "bpmn:TimerEventDefinition") || Y(i.eventDefinitions, "bpmn:SignalEventDefinition") || he(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
5100
|
+
if (re("activiti:Connector", e, i) || re("activiti:Field", e, i))
|
|
5101
|
+
return Y(i.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
4258
5102
|
};
|
|
4259
|
-
const
|
|
5103
|
+
const gn = {
|
|
4260
5104
|
__init__: ["ActivitiModdleExtension"],
|
|
4261
|
-
ActivitiModdleExtension: ["type",
|
|
4262
|
-
},
|
|
5105
|
+
ActivitiModdleExtension: ["type", ve]
|
|
5106
|
+
}, xn = {
|
|
4263
5107
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
4264
5108
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
4265
5109
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
4266
5110
|
};
|
|
4267
|
-
function
|
|
4268
|
-
return
|
|
5111
|
+
function ge(i, e) {
|
|
5112
|
+
return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
|
|
4269
5113
|
}
|
|
4270
|
-
function
|
|
4271
|
-
return
|
|
5114
|
+
function Fn(i) {
|
|
5115
|
+
return i && i.length;
|
|
4272
5116
|
}
|
|
4273
|
-
function
|
|
4274
|
-
return
|
|
4275
|
-
return
|
|
5117
|
+
function Q(i, e) {
|
|
5118
|
+
return Fn(i) && B(i, function(t) {
|
|
5119
|
+
return ge(t, e);
|
|
4276
5120
|
});
|
|
4277
5121
|
}
|
|
4278
|
-
function
|
|
4279
|
-
return
|
|
4280
|
-
return
|
|
5122
|
+
function Sn(i, e) {
|
|
5123
|
+
return B(e, function(t) {
|
|
5124
|
+
return ge(i, t);
|
|
4281
5125
|
});
|
|
4282
5126
|
}
|
|
4283
|
-
function
|
|
4284
|
-
const
|
|
4285
|
-
return
|
|
5127
|
+
function ae(i, e, t) {
|
|
5128
|
+
const n = e.name, s = xn[n.replace(/flowable:/, "")];
|
|
5129
|
+
return n === i && Sn(t, s);
|
|
4286
5130
|
}
|
|
4287
|
-
function
|
|
4288
|
-
|
|
5131
|
+
function xe(i) {
|
|
5132
|
+
i.on(
|
|
4289
5133
|
"property.clone",
|
|
4290
5134
|
function(e) {
|
|
4291
|
-
const t = e.newElement,
|
|
4292
|
-
this.canCloneProperty(t,
|
|
5135
|
+
const t = e.newElement, n = e.propertyDescriptor;
|
|
5136
|
+
this.canCloneProperty(t, n);
|
|
4293
5137
|
},
|
|
4294
5138
|
this
|
|
4295
5139
|
);
|
|
4296
5140
|
}
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
if (
|
|
4300
|
-
return
|
|
4301
|
-
if (
|
|
4302
|
-
return
|
|
5141
|
+
xe.$inject = ["eventBus"];
|
|
5142
|
+
xe.prototype.canCloneProperty = function(i, e) {
|
|
5143
|
+
if (ae("flowable:FailedJobRetryTimeCycle", e, i))
|
|
5144
|
+
return Q(i.eventDefinitions, "bpmn:TimerEventDefinition") || Q(i.eventDefinitions, "bpmn:SignalEventDefinition") || ge(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
5145
|
+
if (ae("flowable:Connector", e, i) || ae("flowable:Field", e, i))
|
|
5146
|
+
return Q(i.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
4303
5147
|
};
|
|
4304
|
-
const
|
|
5148
|
+
const _n = {
|
|
4305
5149
|
__init__: ["FlowableModdleExtension"],
|
|
4306
|
-
FlowableModdleExtension: ["type",
|
|
5150
|
+
FlowableModdleExtension: ["type", xe]
|
|
4307
5151
|
};
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
const
|
|
5152
|
+
Pe.registerLanguage("xml", Qe);
|
|
5153
|
+
Pe.registerLanguage("json", et);
|
|
5154
|
+
const En = {
|
|
4311
5155
|
name: "ProcessDesigner",
|
|
4312
5156
|
components: {
|
|
4313
|
-
HighlightJS:
|
|
5157
|
+
HighlightJS: Le
|
|
4314
5158
|
},
|
|
4315
5159
|
componentName: "MyProcessDesigner",
|
|
4316
5160
|
props: {
|
|
@@ -4356,12 +5200,12 @@ const tt = {
|
|
|
4356
5200
|
headerButtonSize: {
|
|
4357
5201
|
type: String,
|
|
4358
5202
|
default: "small",
|
|
4359
|
-
validator: (
|
|
5203
|
+
validator: (i) => ["default", "medium", "small", "mini"].indexOf(i) !== -1
|
|
4360
5204
|
},
|
|
4361
5205
|
headerButtonType: {
|
|
4362
5206
|
type: String,
|
|
4363
5207
|
default: "primary",
|
|
4364
|
-
validator: (
|
|
5208
|
+
validator: (i) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(i) !== -1
|
|
4365
5209
|
},
|
|
4366
5210
|
extendTypes: Array
|
|
4367
5211
|
},
|
|
@@ -4378,32 +5222,32 @@ const tt = {
|
|
|
4378
5222
|
},
|
|
4379
5223
|
computed: {
|
|
4380
5224
|
additionalModules() {
|
|
4381
|
-
const
|
|
5225
|
+
const i = [];
|
|
4382
5226
|
if (this.onlyCustomizeAddi)
|
|
4383
|
-
return
|
|
4384
|
-
|
|
5227
|
+
return _e(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
|
|
5228
|
+
_e(this.additionalModel) ? i.push(...this.additionalModel) : this.additionalModel && i.push(this.additionalModel);
|
|
4385
5229
|
const e = {
|
|
4386
|
-
translate: ["value",
|
|
5230
|
+
translate: ["value", mn(this.translations || cn)]
|
|
4387
5231
|
};
|
|
4388
|
-
return
|
|
5232
|
+
return i.push(e), this.simulation && i.push(Ye), i.push(Xe), this.prefix === "camunda" && i.push(yn), this.prefix === "flowable" && i.push(_n), this.prefix === "activiti" && i.push(gn), i;
|
|
4389
5233
|
},
|
|
4390
5234
|
moddleExtensions() {
|
|
4391
|
-
const
|
|
5235
|
+
const i = {};
|
|
4392
5236
|
if (this.onlyCustomizeModdle)
|
|
4393
5237
|
return this.moddleExtension || null;
|
|
4394
5238
|
if (this.moddleExtension)
|
|
4395
5239
|
for (const e in this.moddleExtension)
|
|
4396
|
-
|
|
4397
|
-
return this.prefix === "activiti" && (
|
|
4398
|
-
...
|
|
4399
|
-
types: [...
|
|
4400
|
-
}), this.prefix === "flowable" && (
|
|
4401
|
-
...
|
|
4402
|
-
types: [...
|
|
4403
|
-
}), this.prefix === "camunda" && (
|
|
4404
|
-
...
|
|
4405
|
-
types: [...
|
|
4406
|
-
}),
|
|
5240
|
+
i[e] = this.moddleExtension[e];
|
|
5241
|
+
return this.prefix === "activiti" && (i.activiti = {
|
|
5242
|
+
...we,
|
|
5243
|
+
types: [...we.types, ...this.extendTypes || []]
|
|
5244
|
+
}), this.prefix === "flowable" && (i.flowable = {
|
|
5245
|
+
...ke,
|
|
5246
|
+
types: [...ke.types, ...this.extendTypes || []]
|
|
5247
|
+
}), this.prefix === "camunda" && (i.camunda = {
|
|
5248
|
+
...Te,
|
|
5249
|
+
types: [...Te.types, ...this.extendTypes || []]
|
|
5250
|
+
}), i;
|
|
4407
5251
|
}
|
|
4408
5252
|
},
|
|
4409
5253
|
mounted() {
|
|
@@ -4413,8 +5257,8 @@ const tt = {
|
|
|
4413
5257
|
},
|
|
4414
5258
|
methods: {
|
|
4415
5259
|
initBpmnModeler() {
|
|
4416
|
-
this.bpmnModeler || (this.bpmnModeler =
|
|
4417
|
-
new
|
|
5260
|
+
this.bpmnModeler || (this.bpmnModeler = ee(
|
|
5261
|
+
new We({
|
|
4418
5262
|
container: this.$refs["bpmn-canvas"],
|
|
4419
5263
|
keyboard: this.keyboard ? { bindTo: document } : null,
|
|
4420
5264
|
additionalModules: this.additionalModules,
|
|
@@ -4424,34 +5268,34 @@ const tt = {
|
|
|
4424
5268
|
), this.$emit("init-finished", this.bpmnModeler), this.initModelListeners());
|
|
4425
5269
|
},
|
|
4426
5270
|
initModelListeners() {
|
|
4427
|
-
const
|
|
5271
|
+
const i = this.bpmnModeler.get("eventBus"), e = this;
|
|
4428
5272
|
this.events.forEach((t) => {
|
|
4429
|
-
|
|
4430
|
-
const
|
|
4431
|
-
e.$emit(
|
|
5273
|
+
i.on(t, (n) => {
|
|
5274
|
+
const s = t.replace(/\./g, "-"), a = n ? n.element : null;
|
|
5275
|
+
e.$emit(s, a, n);
|
|
4432
5276
|
});
|
|
4433
|
-
}),
|
|
5277
|
+
}), i.on("commandStack.changed", async (t) => {
|
|
4434
5278
|
try {
|
|
4435
5279
|
this.recoverable = this.bpmnModeler.get("commandStack").canRedo(), this.revocable = this.bpmnModeler.get("commandStack").canUndo();
|
|
4436
|
-
const { xml:
|
|
4437
|
-
this.$emit("commandStack-changed", t), this.$emit("input",
|
|
4438
|
-
} catch (
|
|
4439
|
-
console.error(`[Process Designer Warn]: ${
|
|
5280
|
+
const { xml: n } = await this.bpmnModeler.saveXML({ format: !0 });
|
|
5281
|
+
this.$emit("commandStack-changed", t), this.$emit("input", n), this.$emit("change", n);
|
|
5282
|
+
} catch (n) {
|
|
5283
|
+
console.error(`[Process Designer Warn]: ${n.message || n}`);
|
|
4440
5284
|
}
|
|
4441
5285
|
}), this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox: t }) => {
|
|
4442
5286
|
this.$emit("canvas-viewbox-changed", { viewbox: t });
|
|
4443
|
-
const { scale:
|
|
4444
|
-
this.defaultZoom = Math.floor(
|
|
5287
|
+
const { scale: n } = t;
|
|
5288
|
+
this.defaultZoom = Math.floor(n * 100) / 100;
|
|
4445
5289
|
});
|
|
4446
5290
|
},
|
|
4447
5291
|
/* 创建新的流程图 */
|
|
4448
|
-
async createNewDiagram(
|
|
4449
|
-
const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
5292
|
+
async createNewDiagram(i) {
|
|
5293
|
+
const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, n = i || pn(e, t, this.prefix);
|
|
4450
5294
|
try {
|
|
4451
|
-
const { warnings:
|
|
4452
|
-
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"),
|
|
4453
|
-
} catch (
|
|
4454
|
-
console.error(`[Process Designer Warn]: ${(
|
|
5295
|
+
const { warnings: s } = await this.bpmnModeler.importXML(n);
|
|
5296
|
+
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), s != null && s.length;
|
|
5297
|
+
} catch (s) {
|
|
5298
|
+
console.error(`[Process Designer Warn]: ${(s == null ? void 0 : s.message) || s}`);
|
|
4455
5299
|
}
|
|
4456
5300
|
},
|
|
4457
5301
|
// 下载流程图到本地
|
|
@@ -4459,46 +5303,46 @@ const tt = {
|
|
|
4459
5303
|
* @param {string} type
|
|
4460
5304
|
* @param {*} name
|
|
4461
5305
|
*/
|
|
4462
|
-
async downloadProcess(
|
|
5306
|
+
async downloadProcess(i, e = "diagram") {
|
|
4463
5307
|
try {
|
|
4464
|
-
const { err:
|
|
4465
|
-
|
|
4466
|
-
const a = new
|
|
4467
|
-
if (e =
|
|
4468
|
-
const { href:
|
|
4469
|
-
t(
|
|
5308
|
+
const { err: n, xml: s } = await this.bpmnModeler.saveXML();
|
|
5309
|
+
n && console.error(`[Process Designer Warn ]: ${n.message || n}`);
|
|
5310
|
+
const a = new Ee(), { definitions: r } = a.xml2js(s);
|
|
5311
|
+
if (e = r.process._name || e, i === "xml" || i === "bpmn") {
|
|
5312
|
+
const { href: m, filename: b } = this.setEncoded(i.toUpperCase(), e, s);
|
|
5313
|
+
t(m, b);
|
|
4470
5314
|
} else {
|
|
4471
|
-
const { err:
|
|
4472
|
-
if (
|
|
4473
|
-
return console.error(
|
|
4474
|
-
const { href:
|
|
4475
|
-
t(
|
|
4476
|
-
}
|
|
4477
|
-
} catch (
|
|
4478
|
-
console.error(`[Process Designer Warn ]: ${
|
|
5315
|
+
const { err: m, svg: b } = await this.bpmnModeler.saveSVG();
|
|
5316
|
+
if (m)
|
|
5317
|
+
return console.error(m);
|
|
5318
|
+
const { href: P, filename: f } = this.setEncoded("SVG", e, b);
|
|
5319
|
+
t(P, f);
|
|
5320
|
+
}
|
|
5321
|
+
} catch (n) {
|
|
5322
|
+
console.error(`[Process Designer Warn ]: ${n.message || n}`);
|
|
4479
5323
|
}
|
|
4480
|
-
function t(
|
|
4481
|
-
if (
|
|
5324
|
+
function t(n, s) {
|
|
5325
|
+
if (n && s) {
|
|
4482
5326
|
const a = document.createElement("a");
|
|
4483
|
-
a.download =
|
|
5327
|
+
a.download = s, a.href = n, a.click(), URL.revokeObjectURL(a.href);
|
|
4484
5328
|
}
|
|
4485
5329
|
}
|
|
4486
5330
|
},
|
|
4487
5331
|
// 根据所需类型进行转码并返回下载地址
|
|
4488
|
-
setEncoded(
|
|
4489
|
-
const
|
|
5332
|
+
setEncoded(i, e = "diagram", t) {
|
|
5333
|
+
const n = encodeURIComponent(t);
|
|
4490
5334
|
return {
|
|
4491
|
-
filename: `${e}.${
|
|
4492
|
-
href: `data:application/${
|
|
5335
|
+
filename: `${e}.${i}`,
|
|
5336
|
+
href: `data:application/${i === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${n}`,
|
|
4493
5337
|
data: t
|
|
4494
5338
|
};
|
|
4495
5339
|
},
|
|
4496
5340
|
// 加载本地文件
|
|
4497
5341
|
importLocalFile() {
|
|
4498
|
-
const
|
|
5342
|
+
const i = this, e = this.$refs.refFile.files[0], t = new FileReader();
|
|
4499
5343
|
t.readAsText(e), t.onload = function() {
|
|
4500
|
-
const
|
|
4501
|
-
|
|
5344
|
+
const n = this.result;
|
|
5345
|
+
i.createNewDiagram(n);
|
|
4502
5346
|
};
|
|
4503
5347
|
},
|
|
4504
5348
|
/* ------------------------------------------------ refs methods ------------------------------------------------------ */
|
|
@@ -4512,8 +5356,8 @@ const tt = {
|
|
|
4512
5356
|
this.downloadProcess("svg");
|
|
4513
5357
|
},
|
|
4514
5358
|
processSimulation() {
|
|
4515
|
-
var
|
|
4516
|
-
this.simulationStatus = !this.simulationStatus, this.simulation && ((
|
|
5359
|
+
var i;
|
|
5360
|
+
this.simulationStatus = !this.simulationStatus, this.simulation && ((i = this.bpmnModeler) == null || i.get("toggleMode").toggleMode());
|
|
4517
5361
|
},
|
|
4518
5362
|
processRedo() {
|
|
4519
5363
|
this.bpmnModeler.get("commandStack").redo();
|
|
@@ -4521,24 +5365,24 @@ const tt = {
|
|
|
4521
5365
|
processUndo() {
|
|
4522
5366
|
this.bpmnModeler.get("commandStack").undo();
|
|
4523
5367
|
},
|
|
4524
|
-
processZoomIn(
|
|
4525
|
-
const e = Math.floor(this.defaultZoom * 100 +
|
|
5368
|
+
processZoomIn(i = 0.1) {
|
|
5369
|
+
const e = Math.floor(this.defaultZoom * 100 + i * 100) / 100;
|
|
4526
5370
|
if (e > 4)
|
|
4527
5371
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
|
|
4528
5372
|
this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
|
|
4529
5373
|
},
|
|
4530
|
-
processZoomOut(
|
|
4531
|
-
const e = Math.floor(this.defaultZoom * 100 -
|
|
5374
|
+
processZoomOut(i = 0.1) {
|
|
5375
|
+
const e = Math.floor(this.defaultZoom * 100 - i * 100) / 100;
|
|
4532
5376
|
if (e < 0.2)
|
|
4533
5377
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
|
|
4534
5378
|
this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
|
|
4535
5379
|
},
|
|
4536
|
-
processZoomTo(
|
|
4537
|
-
if (
|
|
5380
|
+
processZoomTo(i = 1) {
|
|
5381
|
+
if (i < 0.2)
|
|
4538
5382
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
|
|
4539
|
-
if (
|
|
5383
|
+
if (i > 4)
|
|
4540
5384
|
throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
|
|
4541
|
-
this.defaultZoom =
|
|
5385
|
+
this.defaultZoom = i, this.bpmnModeler.get("canvas").zoom(i);
|
|
4542
5386
|
},
|
|
4543
5387
|
processReZoom() {
|
|
4544
5388
|
this.defaultZoom = 1, this.bpmnModeler.get("canvas").zoom("fit-viewport", "auto");
|
|
@@ -4546,9 +5390,9 @@ const tt = {
|
|
|
4546
5390
|
processRestart() {
|
|
4547
5391
|
this.recoverable = !1, this.revocable = !1, this.createNewDiagram(null);
|
|
4548
5392
|
},
|
|
4549
|
-
elementsAlign(
|
|
4550
|
-
const e = this.bpmnModeler.get("alignElements"),
|
|
4551
|
-
if (!
|
|
5393
|
+
elementsAlign(i) {
|
|
5394
|
+
const e = this.bpmnModeler.get("alignElements"), n = this.bpmnModeler.get("selection").get();
|
|
5395
|
+
if (!n || n.length <= 1) {
|
|
4552
5396
|
this.$message.warning("请按住 Shift 键选择多个元素对齐");
|
|
4553
5397
|
return;
|
|
4554
5398
|
}
|
|
@@ -4556,77 +5400,507 @@ const tt = {
|
|
|
4556
5400
|
confirmButtonText: "确定",
|
|
4557
5401
|
cancelButtonText: "取消",
|
|
4558
5402
|
type: "warning"
|
|
4559
|
-
}).then(() => e.trigger(
|
|
5403
|
+
}).then(() => e.trigger(n, i));
|
|
4560
5404
|
},
|
|
4561
5405
|
/* ----------------------------- 方法结束 --------------------------------- */
|
|
4562
5406
|
previewProcessXML() {
|
|
4563
|
-
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml:
|
|
4564
|
-
this.previewResult =
|
|
5407
|
+
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: i }) => {
|
|
5408
|
+
this.previewResult = i, this.previewType = "xml", this.previewModelVisible = !0;
|
|
4565
5409
|
});
|
|
4566
5410
|
},
|
|
4567
5411
|
previewProcessJson() {
|
|
4568
|
-
const
|
|
5412
|
+
const i = new Ee();
|
|
4569
5413
|
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: e }) => {
|
|
4570
|
-
const { definitions: t } =
|
|
5414
|
+
const { definitions: t } = i.xml2js(e);
|
|
4571
5415
|
t ? this.previewResult = JSON.stringify(t, null, 4) : this.previewResult = "", this.previewType = "json", this.previewModelVisible = !0;
|
|
4572
5416
|
});
|
|
4573
5417
|
}
|
|
4574
5418
|
}
|
|
4575
5419
|
};
|
|
4576
|
-
var
|
|
5420
|
+
var An = function() {
|
|
4577
5421
|
var e = this, t = e._self._c;
|
|
4578
5422
|
return t("div", { staticClass: "my-process-designer" }, [t("div", { staticClass: "my-process-designer__header" }, [e._t("control-header", function() {
|
|
4579
|
-
return [t(
|
|
5423
|
+
return [t(W, { key: "file-control" }, [e._t("toolbar-buttons"), e.simulation ? t(y, { attrs: { effect: "light", content: "导入流程" } }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-folder-opened" }, on: { click: function(n) {
|
|
4580
5424
|
return e.$refs.refFile.click();
|
|
4581
|
-
} } }, [e._v(" 导入 ")])], 1) : e._e(), t(
|
|
4582
|
-
return [t(
|
|
5425
|
+
} } }, [e._v(" 导入 ")])], 1) : e._e(), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
5426
|
+
return [t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
4583
5427
|
return e.downloadProcessAsXml();
|
|
4584
|
-
} } }, [e._v("下载为XML文件")]), t("br"), t(
|
|
5428
|
+
} } }, [e._v("下载为XML文件")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
4585
5429
|
return e.downloadProcessAsSvg();
|
|
4586
|
-
} } }, [e._v("下载为SVG文件")]), t("br"), t(
|
|
5430
|
+
} } }, [e._v("下载为SVG文件")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
|
|
4587
5431
|
return e.downloadProcessAsBpmn();
|
|
4588
5432
|
} } }, [e._v("下载为BPMN文件")])];
|
|
4589
|
-
}, proxy: !0 }]) }, [t(
|
|
4590
|
-
return [t(
|
|
4591
|
-
}, proxy: !0 }]) }, [t(
|
|
5433
|
+
}, proxy: !0 }]) }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-download" } }, [e._v("下载")])], 1), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
5434
|
+
return [t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessXML } }, [e._v("预览XML")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessJson } }, [e._v("预览JSON")])];
|
|
5435
|
+
}, proxy: !0 }]) }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-view" } }, [e._v("预览")])], 1), e.simulation ? t(y, { attrs: { effect: "light", content: e.simulationStatus ? "退出模拟" : "开启模拟" } }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-cpu" }, on: { click: e.processSimulation } }, [e._v(" 模拟 ")])], 1) : e._e()], 2), t(W, { key: "align-control" }, [t(y, { attrs: { effect: "light", content: "向左对齐" } }, [t(l, { staticClass: "align align-left", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4592
5436
|
return e.elementsAlign("left");
|
|
4593
|
-
} } })], 1), t(
|
|
5437
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "向右对齐" } }, [t(l, { staticClass: "align align-right", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4594
5438
|
return e.elementsAlign("right");
|
|
4595
|
-
} } })], 1), t(
|
|
5439
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "向上对齐" } }, [t(l, { staticClass: "align align-top", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4596
5440
|
return e.elementsAlign("top");
|
|
4597
|
-
} } })], 1), t(
|
|
5441
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "向下对齐" } }, [t(l, { staticClass: "align align-bottom", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4598
5442
|
return e.elementsAlign("bottom");
|
|
4599
|
-
} } })], 1), t(
|
|
5443
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "水平居中" } }, [t(l, { staticClass: "align align-center", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4600
5444
|
return e.elementsAlign("center");
|
|
4601
|
-
} } })], 1), t(
|
|
5445
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "垂直居中" } }, [t(l, { staticClass: "align align-middle", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
|
|
4602
5446
|
return e.elementsAlign("middle");
|
|
4603
|
-
} } })], 1)], 1), t(
|
|
5447
|
+
} } })], 1)], 1), t(W, { key: "scale-control" }, [t(y, { attrs: { effect: "light", content: "缩小视图" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom < 0.2, icon: "el-icon-zoom-out" }, on: { click: function(n) {
|
|
4604
5448
|
return e.processZoomOut();
|
|
4605
|
-
} } })], 1), t(
|
|
5449
|
+
} } })], 1), t(l, { attrs: { size: e.headerButtonSize } }, [e._v(e._s(`${Math.floor(e.defaultZoom * 10 * 10)}%`))]), t(y, { attrs: { effect: "light", content: "放大视图" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom > 4, icon: "el-icon-zoom-in" }, on: { click: function(n) {
|
|
4606
5450
|
return e.processZoomIn();
|
|
4607
|
-
} } })], 1), t(
|
|
5451
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "重置视图并居中" } }, [t(l, { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(n) {
|
|
4608
5452
|
return e.processReZoom();
|
|
4609
|
-
} } })], 1)], 1), t(
|
|
5453
|
+
} } })], 1)], 1), t(W, { key: "stack-control" }, [t(y, { attrs: { effect: "light", content: "撤销" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: !e.revocable, icon: "el-icon-refresh-left" }, on: { click: function(n) {
|
|
4610
5454
|
return e.processUndo();
|
|
4611
|
-
} } })], 1), t(
|
|
5455
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "恢复" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(n) {
|
|
4612
5456
|
return e.processRedo();
|
|
4613
|
-
} } })], 1), t(
|
|
4614
|
-
}), 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(
|
|
4615
|
-
e.previewModelVisible =
|
|
4616
|
-
} } }, [t(
|
|
4617
|
-
},
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
5457
|
+
} } })], 1), t(y, { attrs: { effect: "light", content: "重新绘制" } }, [t(l, { attrs: { size: e.headerButtonSize, icon: "el-icon-refresh" }, on: { click: e.processRestart } })], 1)], 1)];
|
|
5458
|
+
}), 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(N, { staticClass: "flow-dialog", attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(n) {
|
|
5459
|
+
e.previewModelVisible = n;
|
|
5460
|
+
} } }, [t(Le, { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
|
|
5461
|
+
}, Cn = [], Tn = /* @__PURE__ */ w(
|
|
5462
|
+
En,
|
|
5463
|
+
An,
|
|
5464
|
+
Cn,
|
|
4621
5465
|
!1,
|
|
4622
5466
|
null,
|
|
4623
5467
|
null
|
|
4624
5468
|
);
|
|
4625
|
-
const
|
|
5469
|
+
const Ne = Tn.exports;
|
|
5470
|
+
function Fe(i, e, t, n, s, a, r, m, b, P, f, d, v) {
|
|
5471
|
+
i = i || {}, n.registerProvider(this), this._contextPad = n, this._modeling = s, this._elementFactory = a, this._connect = r, this._create = m, this._popupMenu = b, this._canvas = P, this._rules = f, this._translate = d, i.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(A) {
|
|
5472
|
+
const O = A.context.shape;
|
|
5473
|
+
if (!lt(A) || !n.isOpen(O))
|
|
5474
|
+
return;
|
|
5475
|
+
const g = n.getEntries(O);
|
|
5476
|
+
g.replace && g.replace.action.click(A, O);
|
|
5477
|
+
});
|
|
5478
|
+
}
|
|
5479
|
+
Fe.$inject = [
|
|
5480
|
+
"config.contextPad",
|
|
5481
|
+
"injector",
|
|
5482
|
+
"eventBus",
|
|
5483
|
+
"contextPad",
|
|
5484
|
+
"modeling",
|
|
5485
|
+
"elementFactory",
|
|
5486
|
+
"connect",
|
|
5487
|
+
"create",
|
|
5488
|
+
"popupMenu",
|
|
5489
|
+
"canvas",
|
|
5490
|
+
"rules",
|
|
5491
|
+
"translate",
|
|
5492
|
+
"elementRegistry"
|
|
5493
|
+
];
|
|
5494
|
+
Fe.prototype.getContextPadEntries = function(i) {
|
|
5495
|
+
const e = this._contextPad, t = this._modeling, n = this._elementFactory, s = this._connect, a = this._create, r = this._popupMenu, m = this._canvas, b = this._rules, P = this._autoPlace, f = this._translate, d = {};
|
|
5496
|
+
if (i.type === "label")
|
|
5497
|
+
return d;
|
|
5498
|
+
const v = i.businessObject;
|
|
5499
|
+
function A(x, k) {
|
|
5500
|
+
s.start(x, k);
|
|
5501
|
+
}
|
|
5502
|
+
function U() {
|
|
5503
|
+
t.removeElements([i]);
|
|
5504
|
+
}
|
|
5505
|
+
function O(x) {
|
|
5506
|
+
const _ = m.getContainer(), V = e.getPad(x).html, R = _.getBoundingClientRect(), G = V.getBoundingClientRect(), K = G.top - R.top;
|
|
5507
|
+
return {
|
|
5508
|
+
x: G.left - R.left,
|
|
5509
|
+
y: K + G.height + 5
|
|
5510
|
+
};
|
|
5511
|
+
}
|
|
5512
|
+
function g(x, k, _, V) {
|
|
5513
|
+
typeof _ != "string" && (V = _, _ = f("Append {type}", { type: x.replace(/^bpmn:/, "") }));
|
|
5514
|
+
function R(K, J) {
|
|
5515
|
+
const Z = n.createShape(F({ type: x }, V));
|
|
5516
|
+
a.start(K, Z, {
|
|
5517
|
+
source: J
|
|
5518
|
+
});
|
|
5519
|
+
}
|
|
5520
|
+
return {
|
|
5521
|
+
group: "model",
|
|
5522
|
+
className: k,
|
|
5523
|
+
title: _,
|
|
5524
|
+
action: {
|
|
5525
|
+
dragstart: R,
|
|
5526
|
+
click: P ? function(K, J) {
|
|
5527
|
+
const Z = n.createShape(F({ type: x }, V));
|
|
5528
|
+
P.append(J, Z);
|
|
5529
|
+
} : R
|
|
5530
|
+
}
|
|
5531
|
+
};
|
|
5532
|
+
}
|
|
5533
|
+
function q(x) {
|
|
5534
|
+
return function(k, _) {
|
|
5535
|
+
t.splitLane(_, x), e.open(_, !0);
|
|
5536
|
+
};
|
|
5537
|
+
}
|
|
5538
|
+
if (ie(v, ["bpmn:Lane", "bpmn:Participant"]) && rt(v)) {
|
|
5539
|
+
const x = ot(i);
|
|
5540
|
+
F(d, {
|
|
5541
|
+
"lane-insert-above": {
|
|
5542
|
+
group: "lane-insert-above",
|
|
5543
|
+
className: "bpmn-icon-lane-insert-above",
|
|
5544
|
+
title: f("Add Lane above"),
|
|
5545
|
+
action: {
|
|
5546
|
+
click: function(k, _) {
|
|
5547
|
+
t.addLane(_, "top");
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
}), x.length < 2 && (i.height >= 120 && F(d, {
|
|
5552
|
+
"lane-divide-two": {
|
|
5553
|
+
group: "lane-divide",
|
|
5554
|
+
className: "bpmn-icon-lane-divide-two",
|
|
5555
|
+
title: f("Divide into two Lanes"),
|
|
5556
|
+
action: {
|
|
5557
|
+
click: q(2)
|
|
5558
|
+
}
|
|
5559
|
+
}
|
|
5560
|
+
}), i.height >= 180 && F(d, {
|
|
5561
|
+
"lane-divide-three": {
|
|
5562
|
+
group: "lane-divide",
|
|
5563
|
+
className: "bpmn-icon-lane-divide-three",
|
|
5564
|
+
title: f("Divide into three Lanes"),
|
|
5565
|
+
action: {
|
|
5566
|
+
click: q(3)
|
|
5567
|
+
}
|
|
5568
|
+
}
|
|
5569
|
+
})), F(d, {
|
|
5570
|
+
"lane-insert-below": {
|
|
5571
|
+
group: "lane-insert-below",
|
|
5572
|
+
className: "bpmn-icon-lane-insert-below",
|
|
5573
|
+
title: f("Add Lane below"),
|
|
5574
|
+
action: {
|
|
5575
|
+
click: function(k, _) {
|
|
5576
|
+
t.addLane(_, "bottom");
|
|
5577
|
+
}
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
});
|
|
5581
|
+
}
|
|
5582
|
+
X(v, "bpmn:FlowNode") && (X(v, "bpmn:EventBasedGateway") ? F(d, {
|
|
5583
|
+
"append.receive-task": g("bpmn:ReceiveTask", "bpmn-icon-receive-task", f("Append ReceiveTask")),
|
|
5584
|
+
"append.message-intermediate-event": g(
|
|
5585
|
+
"bpmn:IntermediateCatchEvent",
|
|
5586
|
+
"bpmn-icon-intermediate-event-catch-message",
|
|
5587
|
+
f("Append MessageIntermediateCatchEvent"),
|
|
5588
|
+
{ eventDefinitionType: "bpmn:MessageEventDefinition" }
|
|
5589
|
+
),
|
|
5590
|
+
"append.timer-intermediate-event": g(
|
|
5591
|
+
"bpmn:IntermediateCatchEvent",
|
|
5592
|
+
"bpmn-icon-intermediate-event-catch-timer",
|
|
5593
|
+
f("Append TimerIntermediateCatchEvent"),
|
|
5594
|
+
{ eventDefinitionType: "bpmn:TimerEventDefinition" }
|
|
5595
|
+
),
|
|
5596
|
+
"append.condition-intermediate-event": g(
|
|
5597
|
+
"bpmn:IntermediateCatchEvent",
|
|
5598
|
+
"bpmn-icon-intermediate-event-catch-condition",
|
|
5599
|
+
f("Append ConditionIntermediateCatchEvent"),
|
|
5600
|
+
{ eventDefinitionType: "bpmn:ConditionalEventDefinition" }
|
|
5601
|
+
),
|
|
5602
|
+
"append.signal-intermediate-event": g(
|
|
5603
|
+
"bpmn:IntermediateCatchEvent",
|
|
5604
|
+
"bpmn-icon-intermediate-event-catch-signal",
|
|
5605
|
+
f("Append SignalIntermediateCatchEvent"),
|
|
5606
|
+
{ eventDefinitionType: "bpmn:SignalEventDefinition" }
|
|
5607
|
+
)
|
|
5608
|
+
}) : Ie(v, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? F(d, {
|
|
5609
|
+
"append.compensation-activity": g("bpmn:Task", "bpmn-icon-task", f("Append compensation activity"), {
|
|
5610
|
+
isForCompensation: !0
|
|
5611
|
+
})
|
|
5612
|
+
}) : !X(v, "bpmn:EndEvent") && !v.isForCompensation && !Ie(v, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !at(v) && F(d, {
|
|
5613
|
+
"append.end-event": g("bpmn:EndEvent", "bpmn-icon-end-event-none", f("Append EndEvent")),
|
|
5614
|
+
"append.gateway": g("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", f("Append Gateway")),
|
|
5615
|
+
"append.append-task": g("bpmn:UserTask", "bpmn-icon-user-task", f("Append Task")),
|
|
5616
|
+
"append.intermediate-event": g(
|
|
5617
|
+
"bpmn:IntermediateThrowEvent",
|
|
5618
|
+
"bpmn-icon-intermediate-event-none",
|
|
5619
|
+
f("Append Intermediate/Boundary Event")
|
|
5620
|
+
)
|
|
5621
|
+
})), r.isEmpty(i, "bpmn-replace") || F(d, {
|
|
5622
|
+
replace: {
|
|
5623
|
+
group: "edit",
|
|
5624
|
+
className: "bpmn-icon-screw-wrench",
|
|
5625
|
+
title: f("Change type"),
|
|
5626
|
+
action: {
|
|
5627
|
+
click: function(x, k) {
|
|
5628
|
+
const _ = F(O(k), {
|
|
5629
|
+
cursor: { x: x.x, y: x.y }
|
|
5630
|
+
});
|
|
5631
|
+
r.open(k, "bpmn-replace", _);
|
|
5632
|
+
}
|
|
5633
|
+
}
|
|
5634
|
+
}
|
|
5635
|
+
}), ie(v, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && F(d, {
|
|
5636
|
+
"append.text-annotation": g("bpmn:TextAnnotation", "bpmn-icon-text-annotation"),
|
|
5637
|
+
connect: {
|
|
5638
|
+
group: "connect",
|
|
5639
|
+
className: "bpmn-icon-connection-multi",
|
|
5640
|
+
title: f(`Connect using ${v.isForCompensation ? "" : "Sequence/MessageFlow or "}Association`),
|
|
5641
|
+
action: {
|
|
5642
|
+
click: A,
|
|
5643
|
+
dragstart: A
|
|
5644
|
+
}
|
|
5645
|
+
}
|
|
5646
|
+
}), ie(v, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && F(d, {
|
|
5647
|
+
connect: {
|
|
5648
|
+
group: "connect",
|
|
5649
|
+
className: "bpmn-icon-connection-multi",
|
|
5650
|
+
title: f("Connect using DataInputAssociation"),
|
|
5651
|
+
action: {
|
|
5652
|
+
click: A,
|
|
5653
|
+
dragstart: A
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
}), X(v, "bpmn:Group") && F(d, {
|
|
5657
|
+
"append.text-annotation": g("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
|
|
5658
|
+
});
|
|
5659
|
+
let M = b.allowed("elements.delete", { elements: [i] });
|
|
5660
|
+
return it(M) && (M = M[0] === i), M && F(d, {
|
|
5661
|
+
delete: {
|
|
5662
|
+
group: "edit",
|
|
5663
|
+
className: "bpmn-icon-trash",
|
|
5664
|
+
title: f("Remove"),
|
|
5665
|
+
action: {
|
|
5666
|
+
click: U
|
|
5667
|
+
}
|
|
5668
|
+
}
|
|
5669
|
+
}), d;
|
|
5670
|
+
};
|
|
5671
|
+
function Ie(i, e, t) {
|
|
5672
|
+
const n = i.$instanceOf(e);
|
|
5673
|
+
let s = !1;
|
|
5674
|
+
const a = i.eventDefinitions || [];
|
|
5675
|
+
return st(a, function(r) {
|
|
5676
|
+
r.$type === t && (s = !0);
|
|
5677
|
+
}), n && s;
|
|
5678
|
+
}
|
|
5679
|
+
const wn = {
|
|
5680
|
+
__init__: ["contextPadProvider"],
|
|
5681
|
+
contextPadProvider: ["type", Fe]
|
|
5682
|
+
};
|
|
5683
|
+
function j(i, e, t, n, s, a, r, m, b) {
|
|
5684
|
+
$e.call(this, i, e, t, n, s, a, r, m, b, 2e3), this._create = e, this._elementFactory = t, this._spaceTool = n, this._lassoTool = s, this._handTool = a, this._globalConnect = r, this._moddle = m, this._translate = b;
|
|
5685
|
+
}
|
|
5686
|
+
const Se = function() {
|
|
5687
|
+
};
|
|
5688
|
+
Se.prototype = $e.prototype;
|
|
5689
|
+
Se.prototype.getPaletteEntries = function() {
|
|
5690
|
+
const i = {}, e = this._create, t = this._elementFactory, n = this._spaceTool, s = this._lassoTool, a = this._handTool, r = this._globalConnect, m = this._translate;
|
|
5691
|
+
function b(d, v, A, U, O) {
|
|
5692
|
+
function g(M) {
|
|
5693
|
+
const x = t.createShape(F({ type: d }, O));
|
|
5694
|
+
d === "bpmn:UserTask" && (x.businessObject.candidateUsers = "${handlers}"), e.start(M, x);
|
|
5695
|
+
}
|
|
5696
|
+
const q = d.replace(/^bpmn:/, "");
|
|
5697
|
+
return {
|
|
5698
|
+
group: v,
|
|
5699
|
+
className: A,
|
|
5700
|
+
title: U || m("Create {type}", { type: q }),
|
|
5701
|
+
action: {
|
|
5702
|
+
dragstart: g,
|
|
5703
|
+
click: g
|
|
5704
|
+
}
|
|
5705
|
+
};
|
|
5706
|
+
}
|
|
5707
|
+
function P(d) {
|
|
5708
|
+
const v = t.createShape({
|
|
5709
|
+
type: "bpmn:SubProcess",
|
|
5710
|
+
x: 0,
|
|
5711
|
+
y: 0,
|
|
5712
|
+
isExpanded: !0
|
|
5713
|
+
}), A = t.createShape({
|
|
5714
|
+
type: "bpmn:StartEvent",
|
|
5715
|
+
x: 40,
|
|
5716
|
+
y: 82,
|
|
5717
|
+
parent: v
|
|
5718
|
+
});
|
|
5719
|
+
e.start(d, [v, A], {
|
|
5720
|
+
hints: {
|
|
5721
|
+
autoSelect: [A]
|
|
5722
|
+
}
|
|
5723
|
+
});
|
|
5724
|
+
}
|
|
5725
|
+
function f(d) {
|
|
5726
|
+
e.start(d, t.createParticipantShape());
|
|
5727
|
+
}
|
|
5728
|
+
return F(i, {
|
|
5729
|
+
"hand-tool": {
|
|
5730
|
+
group: "tools",
|
|
5731
|
+
className: "bpmn-icon-hand-tool",
|
|
5732
|
+
title: m("Activate the hand tool"),
|
|
5733
|
+
action: {
|
|
5734
|
+
click: function(d) {
|
|
5735
|
+
a.activateHand(d);
|
|
5736
|
+
}
|
|
5737
|
+
}
|
|
5738
|
+
},
|
|
5739
|
+
"lasso-tool": {
|
|
5740
|
+
group: "tools",
|
|
5741
|
+
className: "bpmn-icon-lasso-tool",
|
|
5742
|
+
title: m("Activate the lasso tool"),
|
|
5743
|
+
action: {
|
|
5744
|
+
click: function(d) {
|
|
5745
|
+
s.activateSelection(d);
|
|
5746
|
+
}
|
|
5747
|
+
}
|
|
5748
|
+
},
|
|
5749
|
+
"space-tool": {
|
|
5750
|
+
group: "tools",
|
|
5751
|
+
className: "bpmn-icon-space-tool",
|
|
5752
|
+
title: m("Activate the create/remove space tool"),
|
|
5753
|
+
action: {
|
|
5754
|
+
click: function(d) {
|
|
5755
|
+
n.activateSelection(d);
|
|
5756
|
+
}
|
|
5757
|
+
}
|
|
5758
|
+
},
|
|
5759
|
+
"global-connect-tool": {
|
|
5760
|
+
group: "tools",
|
|
5761
|
+
className: "bpmn-icon-connection-multi",
|
|
5762
|
+
title: m("Activate the global connect tool"),
|
|
5763
|
+
action: {
|
|
5764
|
+
click: function(d) {
|
|
5765
|
+
r.toggle(d);
|
|
5766
|
+
}
|
|
5767
|
+
}
|
|
5768
|
+
},
|
|
5769
|
+
"tool-separator": { group: "tools", separator: !0 },
|
|
5770
|
+
"create.start-event": b("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", m("Create StartEvent")),
|
|
5771
|
+
"create.intermediate-event": b(
|
|
5772
|
+
"bpmn:IntermediateThrowEvent",
|
|
5773
|
+
"event",
|
|
5774
|
+
"bpmn-icon-intermediate-event-none",
|
|
5775
|
+
m("Create Intermediate/Boundary Event")
|
|
5776
|
+
),
|
|
5777
|
+
"create.user-task": b("bpmn:UserTask", "activity", "bpmn-icon-user-task", m("Create User Task")),
|
|
5778
|
+
"create.exclusive-gateway": b("bpmn:ExclusiveGateway", "activity", "bpmn-icon-gateway-none", m("Create Gateway")),
|
|
5779
|
+
"create.end-event": b("bpmn:EndEvent", "activity", "bpmn-icon-end-event-none", m("Create EndEvent")),
|
|
5780
|
+
// 'create.sql-task': createAction('user:MySql', 'activity', 'bpmn-icon-mysql', 'MySQL 节点'),
|
|
5781
|
+
// 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
|
|
5782
|
+
// 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
|
|
5783
|
+
"activity-separator": { group: "activity", separator: !0 },
|
|
5784
|
+
"create.subprocess-expanded": {
|
|
5785
|
+
group: "activity",
|
|
5786
|
+
className: "bpmn-icon-subprocess-expanded",
|
|
5787
|
+
title: m("Create expanded SubProcess"),
|
|
5788
|
+
action: {
|
|
5789
|
+
dragstart: P,
|
|
5790
|
+
click: P
|
|
5791
|
+
}
|
|
5792
|
+
},
|
|
5793
|
+
"create.participant-expanded": {
|
|
5794
|
+
group: "collaboration",
|
|
5795
|
+
className: "bpmn-icon-participant",
|
|
5796
|
+
title: m("Create Pool/Participant"),
|
|
5797
|
+
action: {
|
|
5798
|
+
dragstart: f,
|
|
5799
|
+
click: f
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
// 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
|
|
5803
|
+
}), i;
|
|
5804
|
+
};
|
|
5805
|
+
j.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "moddle", "translate"];
|
|
5806
|
+
j.prototype = new Se();
|
|
5807
|
+
j.prototype.constructor = j;
|
|
5808
|
+
const kn = {
|
|
5809
|
+
__init__: ["customPalette"],
|
|
5810
|
+
customPalette: ["type", j]
|
|
5811
|
+
};
|
|
5812
|
+
function Ue(i, e) {
|
|
5813
|
+
ye.call(this, i, e, 3e3), i.on("autoPlace", 3e3, function(t) {
|
|
5814
|
+
const n = t.shape, s = t.source;
|
|
5815
|
+
return $n(s, n);
|
|
5816
|
+
}), this.append = function(t, n, s) {
|
|
5817
|
+
i.fire("autoPlace.start", {
|
|
5818
|
+
source: t,
|
|
5819
|
+
shape: n
|
|
5820
|
+
});
|
|
5821
|
+
const a = i.fire("autoPlace", {
|
|
5822
|
+
source: t,
|
|
5823
|
+
shape: n
|
|
5824
|
+
});
|
|
5825
|
+
console.log("hints", s, "position", a);
|
|
5826
|
+
const r = e.appendShape(t, n, a, t.parent, s);
|
|
5827
|
+
return i.fire("autoPlace.end", {
|
|
5828
|
+
source: t,
|
|
5829
|
+
shape: r
|
|
5830
|
+
}), r;
|
|
5831
|
+
};
|
|
5832
|
+
}
|
|
5833
|
+
function In(i) {
|
|
5834
|
+
return {
|
|
5835
|
+
top: i.y,
|
|
5836
|
+
right: i.x + (i.width || 0),
|
|
5837
|
+
bottom: i.y + (i.height || 0),
|
|
5838
|
+
left: i.x
|
|
5839
|
+
};
|
|
5840
|
+
}
|
|
5841
|
+
function Ln(i) {
|
|
5842
|
+
return {
|
|
5843
|
+
x: Math.round(i.x),
|
|
5844
|
+
y: Math.round(i.y)
|
|
5845
|
+
};
|
|
5846
|
+
}
|
|
5847
|
+
function Pn(i) {
|
|
5848
|
+
return Ln({
|
|
5849
|
+
x: i.x + (i.width || 0) / 2,
|
|
5850
|
+
y: i.y + (i.height || 0) / 2
|
|
5851
|
+
});
|
|
5852
|
+
}
|
|
5853
|
+
function $n(i, e, t) {
|
|
5854
|
+
t || (t = {});
|
|
5855
|
+
const n = t.defaultDistance || 50, s = Pn(i), a = In(i);
|
|
5856
|
+
return {
|
|
5857
|
+
x: s.x,
|
|
5858
|
+
y: a.bottom + n + e.height / 2
|
|
5859
|
+
};
|
|
5860
|
+
}
|
|
5861
|
+
const qe = function() {
|
|
5862
|
+
};
|
|
5863
|
+
qe.prototype = ye.prototype;
|
|
5864
|
+
Ue.prototype = new qe();
|
|
5865
|
+
Ue.prototype.constructor = ye;
|
|
5866
|
+
const On = 200, Mn = 100;
|
|
5867
|
+
function Ge(i, e, t) {
|
|
5868
|
+
i.on("autoPlace", Mn, function(n) {
|
|
5869
|
+
const s = n.shape, a = n.source;
|
|
5870
|
+
return Dn(a, s);
|
|
5871
|
+
}), i.on("autoPlace.end", function(n) {
|
|
5872
|
+
t.scrollToElement(n.shape);
|
|
5873
|
+
}), this.append = function(n, s, a) {
|
|
5874
|
+
i.fire("autoPlace.start", {
|
|
5875
|
+
source: n,
|
|
5876
|
+
shape: s
|
|
5877
|
+
});
|
|
5878
|
+
const r = i.fire("autoPlace", {
|
|
5879
|
+
source: n,
|
|
5880
|
+
shape: s
|
|
5881
|
+
}), m = e.appendShape(n, s, r, n.parent, a);
|
|
5882
|
+
return i.fire("autoPlace.end", {
|
|
5883
|
+
source: n,
|
|
5884
|
+
shape: m
|
|
5885
|
+
}), m;
|
|
5886
|
+
};
|
|
5887
|
+
}
|
|
5888
|
+
Ge.$inject = ["eventBus", "modeling", "canvas"];
|
|
5889
|
+
function Dn(i, e) {
|
|
5890
|
+
const t = On, n = pt(i);
|
|
5891
|
+
return {
|
|
5892
|
+
x: mt(i).right + t + e.width / 2,
|
|
5893
|
+
y: n.y
|
|
5894
|
+
};
|
|
5895
|
+
}
|
|
5896
|
+
const Bn = {
|
|
5897
|
+
__init__: ["autoPlaceSelectionBehavior"],
|
|
5898
|
+
autoPlace: ["type", Ge]
|
|
5899
|
+
}, zn = {
|
|
4626
5900
|
name: "FlowDesigner",
|
|
4627
5901
|
components: {
|
|
4628
|
-
PropertiesPanel:
|
|
4629
|
-
ProcessDesigner:
|
|
5902
|
+
PropertiesPanel: Re,
|
|
5903
|
+
ProcessDesigner: Ne
|
|
4630
5904
|
},
|
|
4631
5905
|
props: {
|
|
4632
5906
|
/**
|
|
@@ -4668,42 +5942,42 @@ const at = rt.exports, st = {
|
|
|
4668
5942
|
labelVisible: !1,
|
|
4669
5943
|
prefix: "flowable",
|
|
4670
5944
|
headerButtonSize: "mini",
|
|
4671
|
-
additionalModel:
|
|
5945
|
+
additionalModel: ee([wn, kn, Bn])
|
|
4672
5946
|
}
|
|
4673
5947
|
};
|
|
4674
5948
|
},
|
|
4675
5949
|
methods: {
|
|
4676
|
-
initModeler(
|
|
4677
|
-
this.modeler =
|
|
5950
|
+
initModeler(i) {
|
|
5951
|
+
this.modeler = i;
|
|
4678
5952
|
},
|
|
4679
5953
|
async refresh() {
|
|
4680
5954
|
await this.$nextTick(), await this.$refs.processDesigner.createNewDiagram(this.value);
|
|
4681
5955
|
}
|
|
4682
5956
|
}
|
|
4683
5957
|
};
|
|
4684
|
-
var
|
|
5958
|
+
var Vn = function() {
|
|
4685
5959
|
var e = this, t = e._self._c;
|
|
4686
|
-
return t("div", { staticClass: "flow-designer" }, [t(
|
|
5960
|
+
return t("div", { staticClass: "flow-designer" }, [t(Ne, e._b({ key: `designer-${e.reloadIndex}`, ref: "processDesigner", attrs: { value: e.value, "extend-types": e.extendTypes, options: {
|
|
4687
5961
|
taskResizingEnabled: !0,
|
|
4688
5962
|
eventResizingEnabled: !0
|
|
4689
|
-
}, keyboard: "" }, on: { input: (
|
|
5963
|
+
}, keyboard: "" }, on: { input: (n) => e.$emit("input", n), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
|
|
4690
5964
|
return [e._t("toolbar-buttons", null, { modeler: e.modeler })];
|
|
4691
|
-
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t(
|
|
4692
|
-
return [e._t("task", null, { id:
|
|
4693
|
-
} }, { key: "form", fn: function({ id:
|
|
4694
|
-
return [e._t("form", null, { id:
|
|
4695
|
-
} }, { key: "extend", fn: function({ id:
|
|
4696
|
-
return [e._t("extend", null, { id:
|
|
5965
|
+
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t(Re, { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "panel-type": e.panelType, "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 }) {
|
|
5966
|
+
return [e._t("task", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
5967
|
+
} }, { key: "form", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
|
|
5968
|
+
return [e._t("form", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
5969
|
+
} }, { key: "extend", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
|
|
5970
|
+
return [e._t("extend", null, { id: n, bpmnInstances: s, element: a, type: r })];
|
|
4697
5971
|
} }], null, !0) }) : e._e()], 1);
|
|
4698
|
-
},
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
5972
|
+
}, Rn = [], jn = /* @__PURE__ */ w(
|
|
5973
|
+
zn,
|
|
5974
|
+
Vn,
|
|
5975
|
+
Rn,
|
|
4702
5976
|
!1,
|
|
4703
5977
|
null,
|
|
4704
5978
|
null
|
|
4705
5979
|
);
|
|
4706
|
-
const
|
|
5980
|
+
const Pi = jn.exports;
|
|
4707
5981
|
export {
|
|
4708
|
-
|
|
5982
|
+
Pi as default
|
|
4709
5983
|
};
|