service-flow-designer 1.1.3 → 1.1.5
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/dist/es/designer/common/components/file-upload.css +7 -0
- package/dist/es/designer/common/components/file-upload.vue.d.ts +20 -0
- package/dist/es/designer/common/components/file-upload.vue.js +7 -0
- package/dist/es/designer/common/components/file-upload.vue2.js +99 -0
- package/dist/es/designer/common/components/json-view/index.d.ts +4 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue.d.ts +36 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue.js +61 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue2.js +4 -0
- package/dist/es/designer/common/components/json-view/json-view.vue.d.ts +32 -0
- package/dist/es/designer/common/components/json-view/json-view.vue.js +142 -0
- package/dist/es/designer/common/components/json-view/json-view.vue2.js +4 -0
- package/dist/es/designer/common/components/value-set-input/index.d.ts +3 -0
- package/dist/es/designer/common/components/value-set-input/index.js +4 -0
- package/dist/es/designer/common/components/value-set-input/option.d.ts +12 -0
- package/dist/es/designer/common/components/value-set-input/option.js +62 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.css +14 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.d.ts +145 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.js +7 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +420 -0
- package/dist/es/designer/common/types/common-type.d.ts +18 -0
- package/dist/es/designer/common/types/select.d.ts +7 -0
- package/dist/es/designer/common/util/node-util.d.ts +27 -0
- package/dist/es/designer/common/util/node-util.js +56 -0
- package/dist/es/designer/desginer-index.css +23 -3
- package/dist/es/designer/desginer-index.vue.d.ts +13 -1
- package/dist/es/designer/desginer-index.vue.js +1 -1
- package/dist/es/designer/desginer-index.vue2.js +94 -10
- package/dist/es/designer/flow/edge/CustomLine.d.ts +25 -0
- package/dist/es/designer/flow/edge/CustomLine.js +49 -0
- package/dist/es/designer/service-flow-view/flow-tool-util.d.ts +2 -0
- package/dist/es/designer/service-flow-view/flow-tool-util.js +44 -0
- package/dist/es/designer/service-flow-view/flow-util.d.ts +53 -0
- package/dist/es/designer/service-flow-view/flow-util.js +111 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.css +130 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue.d.ts +33 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue2.js +188 -0
- package/dist/es/designer/service-flow-view/service-node-config.css +10 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue.d.ts +49 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue2.js +139 -0
- package/dist/es/designer/service-flow-view/service-params.vue.d.ts +18 -0
- package/dist/es/designer/service-flow-view/service-params.vue.js +387 -0
- package/dist/es/designer/service-flow-view/service-params.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-result.vue.d.ts +18 -0
- package/dist/es/designer/service-flow-view/service-result.vue.js +274 -0
- package/dist/es/designer/service-flow-view/service-result.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue.d.ts +16 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue.js +309 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue.d.ts +47 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue.js +440 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-update-log.css +5 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue.d.ts +41 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue2.js +205 -0
- package/dist/es/designer/service-flow-view/view-index.css +102 -0
- package/dist/es/designer/service-flow-view/view-index.vue.d.ts +40 -0
- package/dist/es/designer/service-flow-view/view-index.vue.js +7 -0
- package/dist/es/designer/service-flow-view/view-index.vue2.js +347 -0
- package/dist/es/designer/service-panel/component-panel.css +66 -0
- package/dist/es/designer/service-panel/component-panel.vue.d.ts +6 -0
- package/dist/es/designer/service-panel/component-panel.vue.js +7 -0
- package/dist/es/designer/service-panel/component-panel.vue2.js +87 -0
- package/dist/es/designer/service-panel/service-list.css +36 -0
- package/dist/es/designer/service-panel/service-list.vue.d.ts +22 -0
- package/dist/es/designer/service-panel/service-list.vue.js +7 -0
- package/dist/es/designer/service-panel/service-list.vue2.js +341 -0
- package/dist/es/designer/service-panel/service-panel.css +41 -0
- package/dist/es/designer/service-panel/service-panel.vue.d.ts +35 -0
- package/dist/es/designer/service-panel/service-panel.vue.js +7 -0
- package/dist/es/designer/service-panel/service-panel.vue2.js +80 -0
- package/dist/es/stores/page-store.d.ts +23 -0
- package/dist/es/stores/page-store.js +79 -0
- package/dist/lib/designer/common/components/file-upload.css +7 -0
- package/dist/lib/designer/common/components/file-upload.vue.d.ts +20 -0
- package/dist/lib/designer/common/components/file-upload.vue.js +6 -0
- package/dist/lib/designer/common/components/file-upload.vue2.js +98 -0
- package/dist/lib/designer/common/components/json-view/index.d.ts +4 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue.d.ts +36 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue.js +60 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue2.js +3 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue.d.ts +32 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue.js +141 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue2.js +3 -0
- package/dist/lib/designer/common/components/value-set-input/index.d.ts +3 -0
- package/dist/lib/designer/common/components/value-set-input/index.js +3 -0
- package/dist/lib/designer/common/components/value-set-input/option.d.ts +12 -0
- package/dist/lib/designer/common/components/value-set-input/option.js +62 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.css +14 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue.d.ts +145 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue.js +6 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue2.js +419 -0
- package/dist/lib/designer/common/types/common-type.d.ts +18 -0
- package/dist/lib/designer/common/types/select.d.ts +7 -0
- package/dist/lib/designer/common/util/node-util.d.ts +27 -0
- package/dist/lib/designer/common/util/node-util.js +56 -0
- package/dist/lib/designer/desginer-index.css +23 -3
- package/dist/lib/designer/desginer-index.vue.d.ts +13 -1
- package/dist/lib/designer/desginer-index.vue.js +1 -1
- package/dist/lib/designer/desginer-index.vue2.js +93 -9
- package/dist/lib/designer/flow/edge/CustomLine.d.ts +25 -0
- package/dist/lib/designer/flow/edge/CustomLine.js +48 -0
- package/dist/lib/designer/service-flow-view/flow-tool-util.d.ts +2 -0
- package/dist/lib/designer/service-flow-view/flow-tool-util.js +44 -0
- package/dist/lib/designer/service-flow-view/flow-util.d.ts +53 -0
- package/dist/lib/designer/service-flow-view/flow-util.js +111 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.css +130 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue.d.ts +33 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue2.js +187 -0
- package/dist/lib/designer/service-flow-view/service-node-config.css +10 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue.d.ts +49 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue2.js +138 -0
- package/dist/lib/designer/service-flow-view/service-params.vue.d.ts +18 -0
- package/dist/lib/designer/service-flow-view/service-params.vue.js +386 -0
- package/dist/lib/designer/service-flow-view/service-params.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-result.vue.d.ts +18 -0
- package/dist/lib/designer/service-flow-view/service-result.vue.js +273 -0
- package/dist/lib/designer/service-flow-view/service-result.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue.d.ts +16 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue.js +308 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue.d.ts +47 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue.js +439 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-update-log.css +5 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue.d.ts +41 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue2.js +204 -0
- package/dist/lib/designer/service-flow-view/view-index.css +102 -0
- package/dist/lib/designer/service-flow-view/view-index.vue.d.ts +40 -0
- package/dist/lib/designer/service-flow-view/view-index.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/view-index.vue2.js +346 -0
- package/dist/lib/designer/service-panel/component-panel.css +66 -0
- package/dist/lib/designer/service-panel/component-panel.vue.d.ts +6 -0
- package/dist/lib/designer/service-panel/component-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/component-panel.vue2.js +86 -0
- package/dist/lib/designer/service-panel/service-list.css +36 -0
- package/dist/lib/designer/service-panel/service-list.vue.d.ts +22 -0
- package/dist/lib/designer/service-panel/service-list.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-list.vue2.js +340 -0
- package/dist/lib/designer/service-panel/service-panel.css +41 -0
- package/dist/lib/designer/service-panel/service-panel.vue.d.ts +35 -0
- package/dist/lib/designer/service-panel/service-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-panel.vue2.js +79 -0
- package/dist/lib/stores/page-store.d.ts +23 -0
- package/dist/lib/stores/page-store.js +79 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as LogicFlow } from '@logicflow/core';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
|
+
cloneService: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: () => void;
|
|
7
|
+
};
|
|
8
|
+
lf: {
|
|
9
|
+
type: typeof LogicFlow;
|
|
10
|
+
default: () => void;
|
|
11
|
+
};
|
|
12
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"show-service-log": (...args: any[]) => void;
|
|
14
|
+
"save-sevice": (...args: any[]) => void;
|
|
15
|
+
"show-json": (...args: any[]) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
cloneService: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
default: () => void;
|
|
20
|
+
};
|
|
21
|
+
lf: {
|
|
22
|
+
type: typeof LogicFlow;
|
|
23
|
+
default: () => void;
|
|
24
|
+
};
|
|
25
|
+
}>> & {
|
|
26
|
+
"onShow-service-log"?: (...args: any[]) => any;
|
|
27
|
+
"onSave-sevice"?: (...args: any[]) => any;
|
|
28
|
+
"onShow-json"?: (...args: any[]) => any;
|
|
29
|
+
}, {
|
|
30
|
+
lf: LogicFlow;
|
|
31
|
+
cloneService: Record<string, any>;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./service-flow-tool.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const serviceFlowTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fdc6ec07"]]);
|
|
5
|
+
export {
|
|
6
|
+
serviceFlowTool as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, vShow, Fragment, renderList, unref, createBlock, withCtx, normalizeClass, pushScopeId, popScopeId } from "vue";
|
|
2
|
+
import { View, CaretRight, Check } from "@element-plus/icons-vue";
|
|
3
|
+
import { customControl } from "./flow-util.js";
|
|
4
|
+
import { customControlClick } from "./flow-tool-util.js";
|
|
5
|
+
import LogicFlow from "@logicflow/core";
|
|
6
|
+
import "codemirror";
|
|
7
|
+
import "@codemirror/lang-json";
|
|
8
|
+
import "@codemirror/state";
|
|
9
|
+
import "@uiw/codemirror-themes-all";
|
|
10
|
+
import _sfc_main$1 from "../common/components/json-view/json-view-dialog.vue.js";
|
|
11
|
+
import _sfc_main$2 from "./service-test/service-test.vue.js";
|
|
12
|
+
const _withScopeId = (n) => (pushScopeId("data-v-fdc6ec07"), n = n(), popScopeId(), n);
|
|
13
|
+
const _hoisted_1 = { class: "amb-design-tool" };
|
|
14
|
+
const _hoisted_2 = { style: { "top": "-5px", "margin-left": "10px", "position": "relative" } };
|
|
15
|
+
const _hoisted_3 = { style: { "float": "right" } };
|
|
16
|
+
const _hoisted_4 = ["onClick"];
|
|
17
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "查看JSON", -1));
|
|
18
|
+
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "日志", -1));
|
|
19
|
+
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "测试", -1));
|
|
20
|
+
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "保存", -1));
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
__name: "service-flow-tool",
|
|
23
|
+
props: {
|
|
24
|
+
cloneService: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => {
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
lf: {
|
|
30
|
+
type: LogicFlow,
|
|
31
|
+
default: () => {
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["show-service-log", "save-sevice", "show-json"],
|
|
36
|
+
setup(__props, { emit: __emit }) {
|
|
37
|
+
const emits = __emit;
|
|
38
|
+
const props = __props;
|
|
39
|
+
const clickControlType = ref("");
|
|
40
|
+
const jsonDialogVisible = ref(false);
|
|
41
|
+
const testDialogVisble = ref(false);
|
|
42
|
+
const jsonObject = ref({});
|
|
43
|
+
const controlClick = (item) => {
|
|
44
|
+
if (!props.lf) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
customControlClick(props.lf, item);
|
|
48
|
+
};
|
|
49
|
+
const showJson = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
jsonDialogVisible.value = true;
|
|
52
|
+
jsonObject.value = JSON.parse(JSON.stringify(props.cloneService));
|
|
53
|
+
jsonObject.value.flow = (_a = props.lf) == null ? void 0 : _a.getGraphData();
|
|
54
|
+
emits("show-json");
|
|
55
|
+
};
|
|
56
|
+
const showTestDialog = () => {
|
|
57
|
+
testDialogVisble.value = !testDialogVisble.value;
|
|
58
|
+
};
|
|
59
|
+
const showServiceLog = () => {
|
|
60
|
+
emits("show-service-log", {});
|
|
61
|
+
};
|
|
62
|
+
const saveService = () => {
|
|
63
|
+
emits("save-sevice");
|
|
64
|
+
};
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
const _component_el_input = resolveComponent("el-input");
|
|
67
|
+
const _component_el_divider = resolveComponent("el-divider");
|
|
68
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
69
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
70
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
71
|
+
withDirectives(createElementVNode("span", _hoisted_2, [
|
|
72
|
+
createVNode(_component_el_input, {
|
|
73
|
+
placeholder: "",
|
|
74
|
+
modelValue: __props.cloneService.name,
|
|
75
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.cloneService.name = $event),
|
|
76
|
+
style: { "width": "150px" }
|
|
77
|
+
}, null, 8, ["modelValue"])
|
|
78
|
+
], 512), [
|
|
79
|
+
[vShow, __props.cloneService.code]
|
|
80
|
+
]),
|
|
81
|
+
withDirectives(createElementVNode("span", _hoisted_3, [
|
|
82
|
+
createVNode(_component_el_divider, {
|
|
83
|
+
direction: "vertical",
|
|
84
|
+
class: "amb-design-tool-split"
|
|
85
|
+
}),
|
|
86
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(customControl), (item) => {
|
|
87
|
+
return openBlock(), createBlock(_component_el_tooltip, {
|
|
88
|
+
class: "box-item",
|
|
89
|
+
effect: "dark",
|
|
90
|
+
content: item.desc,
|
|
91
|
+
placement: "top"
|
|
92
|
+
}, {
|
|
93
|
+
default: withCtx(() => [
|
|
94
|
+
createElementVNode("label", {
|
|
95
|
+
class: normalizeClass(["control-item", item.type === clickControlType.value ? "control-item-click" : ""]),
|
|
96
|
+
onClick: ($event) => controlClick(item)
|
|
97
|
+
}, [
|
|
98
|
+
createElementVNode("i", {
|
|
99
|
+
class: normalizeClass(item.class)
|
|
100
|
+
}, null, 2)
|
|
101
|
+
], 10, _hoisted_4)
|
|
102
|
+
]),
|
|
103
|
+
_: 2
|
|
104
|
+
}, 1032, ["content"]);
|
|
105
|
+
}), 256)),
|
|
106
|
+
createVNode(_component_el_divider, {
|
|
107
|
+
direction: "vertical",
|
|
108
|
+
class: "amb-design-tool-split"
|
|
109
|
+
}),
|
|
110
|
+
createElementVNode("label", {
|
|
111
|
+
class: "amb-page-type",
|
|
112
|
+
onClick: showJson
|
|
113
|
+
}, [
|
|
114
|
+
createVNode(_component_el_icon, { size: 18 }, {
|
|
115
|
+
default: withCtx(() => [
|
|
116
|
+
createVNode(unref(View))
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}),
|
|
120
|
+
_hoisted_5
|
|
121
|
+
]),
|
|
122
|
+
createElementVNode("label", {
|
|
123
|
+
class: "amb-page-type",
|
|
124
|
+
onClick: showServiceLog
|
|
125
|
+
}, [
|
|
126
|
+
createVNode(_component_el_icon, { size: 18 }, {
|
|
127
|
+
default: withCtx(() => [
|
|
128
|
+
createVNode(unref(View))
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
}),
|
|
132
|
+
_hoisted_6
|
|
133
|
+
]),
|
|
134
|
+
createVNode(_component_el_divider, {
|
|
135
|
+
direction: "vertical",
|
|
136
|
+
class: "amb-design-tool-split"
|
|
137
|
+
}),
|
|
138
|
+
createElementVNode("label", {
|
|
139
|
+
class: "amb-page-type",
|
|
140
|
+
onClick: showTestDialog
|
|
141
|
+
}, [
|
|
142
|
+
createVNode(_component_el_icon, { size: 18 }, {
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createVNode(unref(CaretRight))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}),
|
|
148
|
+
_hoisted_7
|
|
149
|
+
]),
|
|
150
|
+
createVNode(_component_el_divider, {
|
|
151
|
+
direction: "vertical",
|
|
152
|
+
class: "amb-design-tool-split"
|
|
153
|
+
}),
|
|
154
|
+
createElementVNode("label", {
|
|
155
|
+
class: "amb-page-type",
|
|
156
|
+
onClick: saveService
|
|
157
|
+
}, [
|
|
158
|
+
createVNode(_component_el_icon, { size: 18 }, {
|
|
159
|
+
default: withCtx(() => [
|
|
160
|
+
createVNode(unref(Check))
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}),
|
|
164
|
+
_hoisted_8
|
|
165
|
+
])
|
|
166
|
+
], 512), [
|
|
167
|
+
[vShow, __props.cloneService.code]
|
|
168
|
+
]),
|
|
169
|
+
createVNode(unref(_sfc_main$1), {
|
|
170
|
+
modelValue: jsonDialogVisible.value,
|
|
171
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => jsonDialogVisible.value = $event),
|
|
172
|
+
"json-object": jsonObject.value,
|
|
173
|
+
"append-to-body": true
|
|
174
|
+
}, null, 8, ["modelValue", "json-object"]),
|
|
175
|
+
createVNode(_sfc_main$2, {
|
|
176
|
+
modelValue: testDialogVisble.value,
|
|
177
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => testDialogVisble.value = $event),
|
|
178
|
+
"append-to-body": true,
|
|
179
|
+
cloneService: __props.cloneService,
|
|
180
|
+
lf: __props.lf
|
|
181
|
+
}, null, 8, ["modelValue", "cloneService", "lf"])
|
|
182
|
+
]);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
export {
|
|
187
|
+
_sfc_main as default
|
|
188
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare function onNodeClick(model: any): void;
|
|
2
|
+
declare function onBlankClick(): void;
|
|
3
|
+
declare function onDeleteNode(): void;
|
|
4
|
+
declare function closeDrawer(): void;
|
|
5
|
+
declare function onLogicChange(): void;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<{
|
|
7
|
+
service: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
currentNode: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
default: () => {};
|
|
14
|
+
};
|
|
15
|
+
logicFlowInstance: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
default: () => {};
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
onBlankClick: typeof onBlankClick;
|
|
21
|
+
onNodeClick: typeof onNodeClick;
|
|
22
|
+
onLogicChange: typeof onLogicChange;
|
|
23
|
+
onDeleteNode: typeof onDeleteNode;
|
|
24
|
+
closeDrawer: typeof closeDrawer;
|
|
25
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
onConfigChange: (...args: any[]) => void;
|
|
27
|
+
"update:currentNode": (...args: any[]) => void;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
29
|
+
service: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
currentNode: {
|
|
34
|
+
type: ObjectConstructor;
|
|
35
|
+
default: () => {};
|
|
36
|
+
};
|
|
37
|
+
logicFlowInstance: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
default: () => {};
|
|
40
|
+
};
|
|
41
|
+
}>> & {
|
|
42
|
+
onOnConfigChange?: (...args: any[]) => any;
|
|
43
|
+
"onUpdate:currentNode"?: (...args: any[]) => any;
|
|
44
|
+
}, {
|
|
45
|
+
logicFlowInstance: Record<string, any>;
|
|
46
|
+
service: Record<string, any>;
|
|
47
|
+
currentNode: Record<string, any>;
|
|
48
|
+
}, {}>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./service-node-config.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const serviceNodeConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-516e355a"]]);
|
|
5
|
+
export {
|
|
6
|
+
serviceNodeConfig as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, toDisplayString, resolveDynamicComponent } from "vue";
|
|
2
|
+
const _hoisted_1 = ["id"];
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "service-node-config",
|
|
5
|
+
props: {
|
|
6
|
+
service: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => {
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
currentNode: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
logicFlowInstance: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["onConfigChange", "update:currentNode"],
|
|
26
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const properties = ref({});
|
|
29
|
+
const drawerVisible = ref(false);
|
|
30
|
+
const logicNodeType = ref({});
|
|
31
|
+
const configComponentRef = ref();
|
|
32
|
+
const drawerConfig = ref({ withHeader: true, drawerWidth: "" });
|
|
33
|
+
const emits = __emit;
|
|
34
|
+
let serviceNodeTypeData = { configComponent: null, drawerWidth: "50%" };
|
|
35
|
+
function onNodeClick(model) {
|
|
36
|
+
if (!["start", "end"].includes(model.data.type))
|
|
37
|
+
;
|
|
38
|
+
else {
|
|
39
|
+
updateNodeValue();
|
|
40
|
+
closeDrawer();
|
|
41
|
+
}
|
|
42
|
+
properties.value = model.data.properties;
|
|
43
|
+
}
|
|
44
|
+
function onBlankClick() {
|
|
45
|
+
if (drawerVisible.value) {
|
|
46
|
+
updateNodeValue();
|
|
47
|
+
closeDrawer();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function onDeleteNode() {
|
|
51
|
+
closeDrawer();
|
|
52
|
+
}
|
|
53
|
+
function closeDrawer() {
|
|
54
|
+
drawerVisible.value = false;
|
|
55
|
+
emits("update:currentNode", null);
|
|
56
|
+
}
|
|
57
|
+
function onLogicChange() {
|
|
58
|
+
closeDrawer();
|
|
59
|
+
}
|
|
60
|
+
function updateNodeValue() {
|
|
61
|
+
console.log(" 关闭配置窗口时时自动赋值", props.currentNode);
|
|
62
|
+
if (configComponentRef.value.hasOwnProperty("onClose") && typeof configComponentRef.value.onClose === "function") {
|
|
63
|
+
configComponentRef.value.onClose();
|
|
64
|
+
}
|
|
65
|
+
if (!["start", "end"].includes(props.currentNode.type)) {
|
|
66
|
+
if (configComponentRef.value.hasOwnProperty("getData") && typeof configComponentRef.value.getData === "function") {
|
|
67
|
+
if (props.logicFlowInstance) {
|
|
68
|
+
if (props.logicFlowInstance.getNodeModelById(props.currentNode.data.id)) {
|
|
69
|
+
props.logicFlowInstance.getNodeModelById(props.currentNode.data.id).setProperties(configComponentRef.value.getData());
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
props.logicFlowInstance.getNodeModelById(props.currentNode.data.id).setProperties(properties.value);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function fullScreenConfig(config) {
|
|
78
|
+
if (config) {
|
|
79
|
+
if (config.withHeader === false) {
|
|
80
|
+
drawerConfig.value.withHeader = false;
|
|
81
|
+
} else {
|
|
82
|
+
drawerConfig.value.withHeader = true;
|
|
83
|
+
}
|
|
84
|
+
if (config.drawerWidth) {
|
|
85
|
+
drawerConfig.value.drawerWidth = config.drawerWidth;
|
|
86
|
+
} else {
|
|
87
|
+
drawerConfig.value.drawerWidth = "100%";
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
drawerConfig.value.drawerWidth = "100%";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
__expose({
|
|
94
|
+
onBlankClick,
|
|
95
|
+
onNodeClick,
|
|
96
|
+
onLogicChange,
|
|
97
|
+
onDeleteNode,
|
|
98
|
+
closeDrawer
|
|
99
|
+
});
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
|
102
|
+
return openBlock(), createBlock(_component_el_drawer, {
|
|
103
|
+
modelValue: drawerVisible.value,
|
|
104
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => drawerVisible.value = $event),
|
|
105
|
+
"append-to-body": false,
|
|
106
|
+
"close-on-press-escape": false,
|
|
107
|
+
"destroy-on-close": "",
|
|
108
|
+
"with-header": drawerConfig.value.withHeader,
|
|
109
|
+
"modal-class": "el-overlay",
|
|
110
|
+
modal: true,
|
|
111
|
+
title: logicNodeType.value.label,
|
|
112
|
+
direction: "rtl",
|
|
113
|
+
size: drawerConfig.value.drawerWidth ? drawerConfig.value.drawerWidth : unref(serviceNodeTypeData).drawerWidth ? unref(serviceNodeTypeData).drawerWidth : "50%"
|
|
114
|
+
}, {
|
|
115
|
+
header: withCtx(({ close, titleId, titleClass }) => [
|
|
116
|
+
createElementVNode("h4", {
|
|
117
|
+
id: titleId,
|
|
118
|
+
class: normalizeClass(titleClass)
|
|
119
|
+
}, toDisplayString(logicNodeType.value.label), 11, _hoisted_1)
|
|
120
|
+
]),
|
|
121
|
+
default: withCtx(() => [
|
|
122
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(serviceNodeTypeData).configComponent), {
|
|
123
|
+
ref_key: "configComponentRef",
|
|
124
|
+
ref: configComponentRef,
|
|
125
|
+
logicFlowInstance: __props.logicFlowInstance,
|
|
126
|
+
currentNode: __props.currentNode,
|
|
127
|
+
properties: properties.value,
|
|
128
|
+
service: __props.service,
|
|
129
|
+
onFullScreen: fullScreenConfig
|
|
130
|
+
}, null, 40, ["logicFlowInstance", "currentNode", "properties", "service"]))
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["modelValue", "with-header", "title", "size"]);
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
export {
|
|
138
|
+
_sfc_main as default
|
|
139
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
service: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
log: {};
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
service: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {
|
|
12
|
+
log: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}>>, {
|
|
16
|
+
service: Record<string, any>;
|
|
17
|
+
}, {}>;
|
|
18
|
+
export default _default;
|