service-flow-designer 2.1.59 → 2.1.96

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.
Files changed (185) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
  2. package/dist/es/assets/icon/aggregateQuery.svg.js +2 -2
  3. package/dist/es/assets/icon/base.png.js +2 -2
  4. package/dist/es/assets/icon/clean.svg.js +2 -2
  5. package/dist/es/assets/icon/condition.png.js +2 -2
  6. package/dist/es/assets/icon/connect.svg.js +2 -2
  7. package/dist/es/assets/icon/dynamicSql.svg.js +2 -2
  8. package/dist/es/assets/icon/end.png.js +2 -2
  9. package/dist/es/assets/icon/end.svg.js +2 -2
  10. package/dist/es/assets/icon/function.png.js +2 -2
  11. package/dist/es/assets/icon/http-service.svg.js +2 -2
  12. package/dist/es/assets/icon/loop.svg.js +2 -2
  13. package/dist/es/assets/icon/notification.svg.js +2 -2
  14. package/dist/es/assets/icon/regularQuery.svg.js +2 -2
  15. package/dist/es/assets/icon/sort.svg.js +2 -2
  16. package/dist/es/assets/icon/split-joint.svg.js +2 -2
  17. package/dist/es/assets/icon/start.png.js +2 -2
  18. package/dist/es/assets/icon/statistics.svg.js +2 -2
  19. package/dist/es/assets/icon/vardef-v.png.js +2 -2
  20. package/dist/es/designer/common/components/database-select.vue.js +4 -4
  21. package/dist/es/designer/common/components/database-select.vue2.js +29 -205
  22. package/dist/es/designer/common/components/datatable-select.vue.js +4 -4
  23. package/dist/es/designer/common/components/datatable-select.vue2.js +52 -299
  24. package/dist/es/designer/common/components/file-upload.vue.js +4 -4
  25. package/dist/es/designer/common/components/file-upload.vue2.js +27 -98
  26. package/dist/es/designer/common/components/json-view/json-view-dialog.vue.js +18 -60
  27. package/dist/es/designer/common/components/json-view/json-view-dialog.vue2.js +2 -2
  28. package/dist/es/designer/common/components/json-view/json-view.vue.js +51 -137
  29. package/dist/es/designer/common/components/json-view/json-view.vue2.js +2 -2
  30. package/dist/es/designer/common/components/node-base-config.vue.js +7 -63
  31. package/dist/es/designer/common/components/node-base-config.vue2.js +2 -2
  32. package/dist/es/designer/common/components/sql-view/sql-view-dialog.vue.js +17 -62
  33. package/dist/es/designer/common/components/sql-view/sql-view-dialog.vue2.js +2 -2
  34. package/dist/es/designer/common/components/sql-view/sql-view.vue.js +2 -2
  35. package/dist/es/designer/common/components/sql-view/sql-view.vue2.js +30 -100
  36. package/dist/es/designer/common/components/value-set-input/index.js +2 -2
  37. package/dist/es/designer/common/components/value-set-input/option.js +6 -59
  38. package/dist/es/designer/common/components/value-set-input/value-set-input.vue.js +4 -4
  39. package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +122 -557
  40. package/dist/es/designer/common/util/node-util.js +32 -42
  41. package/dist/es/designer/desginer-index.vue.js +4 -4
  42. package/dist/es/designer/desginer-index.vue2.js +31 -106
  43. package/dist/es/designer/flow/base/AbLogicNode.js +9 -10
  44. package/dist/es/designer/flow/base/AbLogicNodeModel.js +21 -49
  45. package/dist/es/designer/flow/base/AbLogicResizeNode.js +9 -10
  46. package/dist/es/designer/flow/base/AbLogicResizeNodeModel.js +10 -26
  47. package/dist/es/designer/flow/edge/CustomLine.js +15 -42
  48. package/dist/es/designer/service-components/base/custom-function/config.vue.js +4 -4
  49. package/dist/es/designer/service-components/base/custom-function/config.vue2.js +55 -302
  50. package/dist/es/designer/service-components/base/custom-function/index.js +12 -34
  51. package/dist/es/designer/service-components/base/custom-function/index.vue.js +4 -4
  52. package/dist/es/designer/service-components/base/custom-function/index.vue2.js +8 -40
  53. package/dist/es/designer/service-components/base/end-node/index.js +25 -64
  54. package/dist/es/designer/service-components/base/end-node/index.vue.js +4 -4
  55. package/dist/es/designer/service-components/base/end-node/index.vue2.js +4 -29
  56. package/dist/es/designer/service-components/base/judge-condition/config.vue.js +2 -2
  57. package/dist/es/designer/service-components/base/judge-condition/config.vue2.js +61 -570
  58. package/dist/es/designer/service-components/base/judge-condition/index.js +13 -35
  59. package/dist/es/designer/service-components/base/judge-condition/index.vue.js +4 -4
  60. package/dist/es/designer/service-components/base/judge-condition/index.vue2.js +12 -63
  61. package/dist/es/designer/service-components/base/loop-node/config.vue.js +4 -4
  62. package/dist/es/designer/service-components/base/loop-node/config.vue2.js +9 -73
  63. package/dist/es/designer/service-components/base/loop-node/index.js +37 -145
  64. package/dist/es/designer/service-components/base/notification/config.vue.js +2 -2
  65. package/dist/es/designer/service-components/base/notification/config.vue2.js +35 -320
  66. package/dist/es/designer/service-components/base/notification/index.js +12 -34
  67. package/dist/es/designer/service-components/base/notification/index.vue.js +4 -4
  68. package/dist/es/designer/service-components/base/notification/index.vue2.js +8 -40
  69. package/dist/es/designer/service-components/base/notification/recipients-select.vue.js +4 -4
  70. package/dist/es/designer/service-components/base/notification/recipients-select.vue2.js +23 -146
  71. package/dist/es/designer/service-components/base/notification/select-mail-template.vue.js +17 -103
  72. package/dist/es/designer/service-components/base/notification/select-mail-template.vue2.js +2 -2
  73. package/dist/es/designer/service-components/base/start-node/index.js +25 -65
  74. package/dist/es/designer/service-components/base/start-node/index.vue.js +4 -4
  75. package/dist/es/designer/service-components/base/start-node/index.vue2.js +4 -29
  76. package/dist/es/designer/service-components/components-icons.js +17 -33
  77. package/dist/es/designer/service-components/computation/clean/config.vue.js +4 -4
  78. package/dist/es/designer/service-components/computation/clean/config.vue2.js +40 -419
  79. package/dist/es/designer/service-components/computation/clean/index.js +12 -34
  80. package/dist/es/designer/service-components/computation/clean/index.vue.js +4 -4
  81. package/dist/es/designer/service-components/computation/clean/index.vue2.js +8 -40
  82. package/dist/es/designer/service-components/computation/connect/config.vue.js +4 -4
  83. package/dist/es/designer/service-components/computation/connect/config.vue2.js +38 -506
  84. package/dist/es/designer/service-components/computation/connect/index.js +12 -34
  85. package/dist/es/designer/service-components/computation/connect/index.vue.js +4 -4
  86. package/dist/es/designer/service-components/computation/connect/index.vue2.js +8 -40
  87. package/dist/es/designer/service-components/computation/sort/config.vue.js +4 -4
  88. package/dist/es/designer/service-components/computation/sort/config.vue2.js +41 -297
  89. package/dist/es/designer/service-components/computation/sort/index.js +12 -34
  90. package/dist/es/designer/service-components/computation/sort/index.vue.js +4 -4
  91. package/dist/es/designer/service-components/computation/sort/index.vue2.js +8 -40
  92. package/dist/es/designer/service-components/computation/split-joint/config.vue.js +4 -4
  93. package/dist/es/designer/service-components/computation/split-joint/config.vue2.js +27 -327
  94. package/dist/es/designer/service-components/computation/split-joint/index.js +12 -34
  95. package/dist/es/designer/service-components/computation/split-joint/index.vue.js +4 -4
  96. package/dist/es/designer/service-components/computation/split-joint/index.vue2.js +8 -40
  97. package/dist/es/designer/service-components/computation/statistics/config.vue.js +4 -4
  98. package/dist/es/designer/service-components/computation/statistics/config.vue2.js +41 -436
  99. package/dist/es/designer/service-components/computation/statistics/index.js +12 -34
  100. package/dist/es/designer/service-components/computation/statistics/index.vue.js +4 -4
  101. package/dist/es/designer/service-components/computation/statistics/index.vue2.js +8 -40
  102. package/dist/es/designer/service-components/database/aggregate-query/config.vue.js +4 -4
  103. package/dist/es/designer/service-components/database/aggregate-query/config.vue2.js +75 -375
  104. package/dist/es/designer/service-components/database/aggregate-query/dimension-statistical.vue.js +22 -217
  105. package/dist/es/designer/service-components/database/aggregate-query/dimension-statistical.vue2.js +2 -2
  106. package/dist/es/designer/service-components/database/aggregate-query/filter-conditions.vue.js +30 -439
  107. package/dist/es/designer/service-components/database/aggregate-query/filter-conditions.vue2.js +2 -2
  108. package/dist/es/designer/service-components/database/aggregate-query/index.js +13 -35
  109. package/dist/es/designer/service-components/database/aggregate-query/index.vue.js +4 -4
  110. package/dist/es/designer/service-components/database/aggregate-query/index.vue2.js +22 -90
  111. package/dist/es/designer/service-components/database/aggregate-query/sort-conditions.vue.js +15 -177
  112. package/dist/es/designer/service-components/database/aggregate-query/sort-conditions.vue2.js +2 -2
  113. package/dist/es/designer/service-components/database/aggregate-query/statistical-formula.vue.js +16 -185
  114. package/dist/es/designer/service-components/database/aggregate-query/statistical-formula.vue2.js +2 -2
  115. package/dist/es/designer/service-components/database/dynamic-sql/config.vue.js +4 -4
  116. package/dist/es/designer/service-components/database/dynamic-sql/config.vue2.js +66 -474
  117. package/dist/es/designer/service-components/database/dynamic-sql/index.js +12 -34
  118. package/dist/es/designer/service-components/database/dynamic-sql/index.vue.js +4 -4
  119. package/dist/es/designer/service-components/database/dynamic-sql/index.vue2.js +8 -40
  120. package/dist/es/designer/service-components/database/regular-query/config.vue.js +4 -4
  121. package/dist/es/designer/service-components/database/regular-query/config.vue2.js +52 -749
  122. package/dist/es/designer/service-components/database/regular-query/index.js +13 -35
  123. package/dist/es/designer/service-components/database/regular-query/index.vue.js +4 -4
  124. package/dist/es/designer/service-components/database/regular-query/index.vue2.js +22 -85
  125. package/dist/es/designer/service-components/index.js +33 -224
  126. package/dist/es/designer/service-components/service/common/cookie-data.vue.js +18 -125
  127. package/dist/es/designer/service-components/service/common/cookie-data.vue2.js +2 -2
  128. package/dist/es/designer/service-components/service/common/form-data.vue.js +18 -153
  129. package/dist/es/designer/service-components/service/common/form-data.vue2.js +2 -2
  130. package/dist/es/designer/service-components/service/common/header-data.vue.js +18 -126
  131. package/dist/es/designer/service-components/service/common/header-data.vue2.js +2 -2
  132. package/dist/es/designer/service-components/service/common/json-data.vue.js +4 -4
  133. package/dist/es/designer/service-components/service/common/json-data.vue2.js +18 -127
  134. package/dist/es/designer/service-components/service/common/param-config.vue.js +4 -4
  135. package/dist/es/designer/service-components/service/common/param-config.vue2.js +19 -211
  136. package/dist/es/designer/service-components/service/common/query-params.vue.js +18 -126
  137. package/dist/es/designer/service-components/service/common/query-params.vue2.js +2 -2
  138. package/dist/es/designer/service-components/service/common/raw-data.vue.js +27 -93
  139. package/dist/es/designer/service-components/service/common/raw-data.vue2.js +2 -2
  140. package/dist/es/designer/service-components/service/custom-bean/config.vue.js +2 -2
  141. package/dist/es/designer/service-components/service/custom-bean/config.vue2.js +9 -74
  142. package/dist/es/designer/service-components/service/custom-bean/index.js +12 -34
  143. package/dist/es/designer/service-components/service/custom-bean/index.vue.js +4 -4
  144. package/dist/es/designer/service-components/service/custom-bean/index.vue2.js +8 -40
  145. package/dist/es/designer/service-components/service/http-service/config.vue.js +4 -4
  146. package/dist/es/designer/service-components/service/http-service/config.vue2.js +23 -296
  147. package/dist/es/designer/service-components/service/http-service/index.js +12 -34
  148. package/dist/es/designer/service-components/service/http-service/index.vue.js +4 -4
  149. package/dist/es/designer/service-components/service/http-service/index.vue2.js +8 -40
  150. package/dist/es/designer/service-components/service/http-service/response-json-setting.vue.js +44 -262
  151. package/dist/es/designer/service-components/service/http-service/response-json-setting.vue2.js +2 -2
  152. package/dist/es/designer/service-components/service/http-service/response-text-setting.vue.js +15 -63
  153. package/dist/es/designer/service-components/service/http-service/response-text-setting.vue2.js +2 -2
  154. package/dist/es/designer/service-components/service/http-service/response-xml-setting.vue.js +44 -262
  155. package/dist/es/designer/service-components/service/http-service/response-xml-setting.vue2.js +2 -2
  156. package/dist/es/designer/service-components/util/common-options.js +15 -129
  157. package/dist/es/designer/service-flow-view/flow-tool-util.js +14 -24
  158. package/dist/es/designer/service-flow-view/flow-util.js +52 -129
  159. package/dist/es/designer/service-flow-view/service-flow-tool.vue.js +4 -4
  160. package/dist/es/designer/service-flow-view/service-flow-tool.vue2.js +29 -188
  161. package/dist/es/designer/service-flow-view/service-node-config.vue.js +4 -4
  162. package/dist/es/designer/service-flow-view/service-node-config.vue2.js +28 -153
  163. package/dist/es/designer/service-flow-view/service-params.vue.js +53 -421
  164. package/dist/es/designer/service-flow-view/service-params.vue2.js +2 -2
  165. package/dist/es/designer/service-flow-view/service-result.vue.js +56 -310
  166. package/dist/es/designer/service-flow-view/service-result.vue2.js +2 -2
  167. package/dist/es/designer/service-flow-view/service-test/request-params.vue.js +40 -307
  168. package/dist/es/designer/service-flow-view/service-test/request-params.vue2.js +2 -2
  169. package/dist/es/designer/service-flow-view/service-test/service-test.vue.js +65 -326
  170. package/dist/es/designer/service-flow-view/service-test/service-test.vue2.js +2 -2
  171. package/dist/es/designer/service-flow-view/service-update-log.vue.js +4 -4
  172. package/dist/es/designer/service-flow-view/service-update-log.vue2.js +35 -234
  173. package/dist/es/designer/service-flow-view/view-index.vue.js +4 -4
  174. package/dist/es/designer/service-flow-view/view-index.vue2.js +92 -353
  175. package/dist/es/designer/service-panel/component-panel.vue.js +4 -4
  176. package/dist/es/designer/service-panel/component-panel.vue2.js +13 -81
  177. package/dist/es/designer/service-panel/service-list.vue.js +4 -4
  178. package/dist/es/designer/service-panel/service-list.vue2.js +76 -497
  179. package/dist/es/designer/service-panel/service-panel.vue.js +4 -4
  180. package/dist/es/designer/service-panel/service-panel.vue2.js +18 -78
  181. package/dist/es/index.js +2 -2
  182. package/dist/es/stores/page-store.js +26 -73
  183. package/dist/es/style.css +288 -288
  184. package/dist/es/utils/common-util.js +103 -211
  185. package/package.json +3 -2
@@ -1,141 +1,64 @@
1
- import { getNextNodeById } from "../common/util/node-util.js";
2
- import { initNodes, serviceComponentGroups } from "../service-components/index.js";
3
- import CustomLine from "../flow/edge/CustomLine.js";
4
- import LogicFlow from "@logicflow/core";
5
- import { Dagre } from "@logicflow/layout";
6
- import { Menu, DndPanel, SelectionSelect, MiniMap, Group } from "@logicflow/extension";
7
- const customControl = [
8
- { type: "zoomOut", desc: "缩小", class: "serviceflow-control-item-zoomOut" },
9
- { type: "zoomIn", desc: "放大", class: "serviceflow-control-item-zoomIn" },
10
- { type: "fit", desc: "适应", class: "serviceflow-control-item-fit" },
11
- { type: "undo", desc: "上一步", class: "serviceflow-control-item-undo" },
12
- { type: "redo", desc: "下一步", class: "serviceflow-control-item-redo" },
13
- { type: "reset", desc: "定位还原", class: "custom-reset" },
14
- { type: "select", desc: "框选", class: "custom-select", clickStyle: true },
15
- { type: "beautify", desc: "一键美化", class: "custom-beautify" }
16
- ];
17
- function newLogicFlow(container) {
18
- return new LogicFlow({
19
- // 通过选项指定了渲染的容器和需要显示网格
20
- container,
21
- grid: {
22
- // 设置原背景不显示
23
- visible: false,
24
- // 控制拖拽节点时每次移动的像素
25
- size: 2
26
- },
27
- // 背景
28
- background: {},
29
- plugins: [Menu, DndPanel, SelectionSelect, MiniMap, Group, Dagre]
30
- });
1
+ import { getNextNodeById as e } from "../common/util/node-util.js";
2
+ import { initNodes as o, serviceComponentGroups as t } from "../service-components/index.js";
3
+ import s from "../flow/edge/CustomLine.js";
4
+ import r from "@logicflow/core";
5
+ import { Dagre as c } from "@logicflow/layout";
6
+ import { Menu as i, DndPanel as n, SelectionSelect as l, MiniMap as d, Group as a } from "@logicflow/extension";
7
+ const p = [{ type: "zoomOut", desc: "缩小", class: "serviceflow-control-item-zoomOut" }, { type: "zoomIn", desc: "放大", class: "serviceflow-control-item-zoomIn" }, { type: "fit", desc: "适应", class: "serviceflow-control-item-fit" }, { type: "undo", desc: "上一步", class: "serviceflow-control-item-undo" }, { type: "redo", desc: "下一步", class: "serviceflow-control-item-redo" }, { type: "reset", desc: "定位还原", class: "custom-reset" }, { type: "select", desc: "框选", class: "custom-select", clickStyle: true }, { type: "beautify", desc: "一键美化", class: "custom-beautify" }];
8
+ function f(e2) {
9
+ return new r({ container: e2, grid: { visible: false, size: 2 }, background: {}, plugins: [i, n, l, d, a, c] });
31
10
  }
32
- function addInitNode(lf) {
33
- lf.addNode({
34
- id: "start",
35
- type: "start",
36
- x: 620,
37
- y: 50,
38
- properties: {}
39
- });
40
- lf.addNode({
41
- type: "end",
42
- x: 620,
43
- y: 550,
44
- properties: {}
45
- });
11
+ function u(e2) {
12
+ e2.addNode({ id: "start", type: "start", x: 620, y: 50, properties: {} }), e2.addNode({ type: "end", x: 620, y: 550, properties: {} });
46
13
  }
47
- const registerNode = (lf) => {
48
- if (!lf) {
49
- return;
14
+ const m = (e2) => {
15
+ if (e2) {
16
+ for (const t2 of o)
17
+ e2.register(t2.nodeAndView);
18
+ for (const o2 of t)
19
+ for (const t2 of o2.items)
20
+ e2.register(t2.nodeAndView);
21
+ e2.register(s), e2.setDefaultEdgeType("customLine");
50
22
  }
51
- for (const item of initNodes) {
52
- console.log(`节点类型:${item.type}, 节点标签:${item.label}`);
53
- lf.register(item.nodeAndView);
54
- }
55
- for (const group of serviceComponentGroups) {
56
- console.log(`组别名称:${group.label}`);
57
- for (const item of group.items) {
58
- console.log(`节点类型:${item.type}, 节点标签:${item.label}`);
59
- lf.register(item.nodeAndView);
60
- }
61
- }
62
- lf.register(CustomLine);
63
- lf.setDefaultEdgeType("customLine");
64
23
  };
65
- function getRuntimeJson(service) {
66
- const runTimeJson = {
67
- code: service.code,
68
- name: service.name,
69
- returnValues: service.returnValues,
70
- errorMessage: service.errorMessage,
71
- log: service.log,
72
- variables: [],
73
- nodes: []
74
- };
75
- const tempVars = [];
76
- if (service.variables) {
77
- service.variables.forEach((variable) => {
78
- tempVars.push(convertVariable(variable));
79
- });
80
- }
81
- runTimeJson.variables = tempVars;
82
- const tempNodes = [];
83
- service.flow.nodes.forEach((node) => {
84
- const tempNode = {};
85
- tempNode.code = node.id;
86
- tempNode.type = node.type;
87
- tempNode.props = node.properties;
88
- if (node.type === "loop") {
89
- tempNode.children = node.children;
90
- }
91
- tempNode.tos = [];
92
- const nextNodes = getNextNodeById(node, service.flow);
93
- nextNodes.forEach((nextNode) => {
94
- tempNode.tos.push({ code: nextNode.id });
95
- });
96
- tempNodes.push(tempNode);
97
- });
98
- runTimeJson.nodes = tempNodes;
99
- console.log(runTimeJson, "runTimeJson");
100
- return runTimeJson;
24
+ function y(o2) {
25
+ const t2 = { code: o2.code, name: o2.name, returnValues: o2.returnValues, errorMessage: o2.errorMessage, log: o2.log, variables: [], nodes: [] }, s2 = [];
26
+ o2.variables && o2.variables.forEach((e2) => {
27
+ s2.push(g(e2));
28
+ }), t2.variables = s2;
29
+ const r2 = [];
30
+ return o2.flow.nodes.forEach((t3) => {
31
+ const s3 = {};
32
+ s3.code = t3.id, s3.type = t3.type, s3.props = t3.properties, "loop" === t3.type && (s3.children = t3.children), s3.tos = [];
33
+ e(t3, o2.flow).forEach((e2) => {
34
+ s3.tos.push({ code: e2.id });
35
+ }), r2.push(s3);
36
+ }), t2.nodes = r2, t2;
101
37
  }
102
- function convertVariable(variable) {
103
- const tempVar = {};
104
- tempVar.name = variable.name;
105
- tempVar.alias = variable.alias;
106
- tempVar.type = variable.type;
107
- tempVar.defaultValue = variable.defaultValue;
108
- if (variable.items && variable.items.length > 0) {
109
- const items = [];
110
- variable.items.forEach((item) => {
111
- items.push(convertVariable(item));
112
- });
113
- tempVar.items = items;
38
+ function g(e2) {
39
+ const o2 = {};
40
+ if (o2.name = e2.name, o2.alias = e2.alias, o2.type = e2.type, o2.defaultValue = e2.defaultValue, e2.items && e2.items.length > 0) {
41
+ const t2 = [];
42
+ e2.items.forEach((e3) => {
43
+ t2.push(g(e3));
44
+ }), o2.items = t2;
114
45
  }
115
- return tempVar;
46
+ return o2;
116
47
  }
117
- function getNodeRuntimeObject(node, service) {
118
- const tempNode = {};
119
- tempNode.code = node.id;
120
- tempNode.type = node.type;
121
- tempNode.props = node.properties;
122
- if (node.type === "loop") {
123
- tempNode.children = node.children;
124
- }
125
- tempNode.tos = [];
126
- if (service.flow) {
127
- const nextNodes = getNextNodeById(node, service.flow);
128
- nextNodes.forEach((nextNode) => {
129
- tempNode.tos.push({ code: nextNode.id });
48
+ function w(o2, t2) {
49
+ const s2 = {};
50
+ if (s2.code = o2.id, s2.type = o2.type, s2.props = o2.properties, "loop" === o2.type && (s2.children = o2.children), s2.tos = [], t2.flow) {
51
+ e(o2, t2.flow).forEach((e2) => {
52
+ s2.tos.push({ code: e2.id });
130
53
  });
131
54
  }
132
- return tempNode;
55
+ return s2;
133
56
  }
134
57
  export {
135
- addInitNode,
136
- customControl,
137
- getNodeRuntimeObject,
138
- getRuntimeJson,
139
- newLogicFlow,
140
- registerNode
58
+ u as addInitNode,
59
+ p as customControl,
60
+ w as getNodeRuntimeObject,
61
+ y as getRuntimeJson,
62
+ f as newLogicFlow,
63
+ m as registerNode
141
64
  };
@@ -1,7 +1,7 @@
1
- import _sfc_main from "./service-flow-tool.vue2.js";
1
+ import o from "./service-flow-tool.vue2.js";
2
2
  import "./service-flow-tool.vue3.js";
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const serviceFlowTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a2bd7452"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = e(o, [["__scopeId", "data-v-a2bd7452"]]);
5
5
  export {
6
- serviceFlowTool as default
6
+ r as default
7
7
  };
@@ -1,199 +1,40 @@
1
- import { ElInput, ElDivider, ElTooltip, ElIcon } from "element-plus/es";
1
+ import { ElInput as e, ElDivider as l, ElTooltip as o, ElIcon as t } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/icon/style/css";
4
4
  import "element-plus/es/components/tooltip/style/css";
5
5
  import "element-plus/es/components/divider/style/css";
6
6
  import "element-plus/es/components/input/style/css";
7
- import { defineComponent, ref, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, vShow, Fragment, renderList, unref, createBlock, withCtx, normalizeClass, pushScopeId, popScopeId } from "vue";
8
- import { View, CaretRight, Check } from "@element-plus/icons-vue";
9
- import { customControl } from "./flow-util.js";
10
- import { customControlClick } from "./flow-tool-util.js";
11
- import LogicFlow from "@logicflow/core";
7
+ import { defineComponent as s, ref as i, openBlock as c, createElementBlock as a, withDirectives as n, createElementVNode as r, createVNode as p, vShow as m, Fragment as u, renderList as v, unref as d, createBlock as f, withCtx as w, normalizeClass as g, pushScopeId as y, popScopeId as b } from "vue";
8
+ import { View as j, CaretRight as S, Check as C } from "@element-plus/icons-vue";
9
+ import { customControl as h } from "./flow-util.js";
10
+ import { customControlClick as x } from "./flow-tool-util.js";
11
+ import V from "@logicflow/core";
12
12
  import "codemirror";
13
13
  import "@codemirror/lang-json";
14
14
  import "@codemirror/state";
15
15
  import "@uiw/codemirror-themes-all";
16
- import _sfc_main$1 from "../common/components/json-view/json-view-dialog.vue.js";
17
- import _sfc_main$2 from "./service-test/service-test.vue.js";
18
- const _withScopeId = (n) => (pushScopeId("data-v-a2bd7452"), n = n(), popScopeId(), n);
19
- const _hoisted_1 = { class: "serviceflow-design-tool" };
20
- const _hoisted_2 = { style: { "top": "-5px", "margin-left": "10px", "position": "relative" } };
21
- const _hoisted_3 = { style: { "float": "right" } };
22
- const _hoisted_4 = ["onClick"];
23
- const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "查看JSON", -1));
24
- const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "日志", -1));
25
- const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "测试", -1));
26
- const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("label", null, "保存", -1));
27
- const _sfc_main = /* @__PURE__ */ defineComponent({
28
- __name: "service-flow-tool",
29
- props: {
30
- cloneService: {
31
- type: Object,
32
- default: () => {
33
- }
34
- },
35
- lf: {
36
- type: LogicFlow,
37
- default: () => {
38
- }
39
- },
40
- pageContext: {
41
- type: Object,
42
- default: () => ({})
43
- }
44
- },
45
- emits: ["show-service-log", "save-sevice", "show-json"],
46
- setup(__props, { emit: __emit }) {
47
- const emits = __emit;
48
- const props = __props;
49
- const clickControlType = ref("");
50
- const jsonDialogVisible = ref(false);
51
- const testDialogVisble = ref(false);
52
- const jsonObject = ref({});
53
- const controlClick = (item) => {
54
- if (!props.lf) {
55
- return;
56
- }
57
- customControlClick(props.lf, item);
58
- };
59
- const showJson = () => {
60
- var _a;
61
- jsonDialogVisible.value = true;
62
- jsonObject.value = JSON.parse(JSON.stringify(props.cloneService));
63
- jsonObject.value.flow = (_a = props.lf) == null ? void 0 : _a.getGraphData();
64
- emits("show-json");
65
- };
66
- const showTestDialog = () => {
67
- testDialogVisble.value = !testDialogVisble.value;
68
- };
69
- const showServiceLog = () => {
70
- emits("show-service-log", {});
71
- };
72
- const saveService = () => {
73
- emits("save-sevice");
74
- };
75
- return (_ctx, _cache) => {
76
- const _component_el_input = ElInput;
77
- const _component_el_divider = ElDivider;
78
- const _component_el_tooltip = ElTooltip;
79
- const _component_el_icon = ElIcon;
80
- return openBlock(), createElementBlock("div", _hoisted_1, [
81
- withDirectives(createElementVNode("span", _hoisted_2, [
82
- createVNode(_component_el_input, {
83
- placeholder: "",
84
- modelValue: __props.cloneService.name,
85
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.cloneService.name = $event),
86
- style: { "width": "150px" }
87
- }, null, 8, ["modelValue"])
88
- ], 512), [
89
- [vShow, __props.cloneService.code]
90
- ]),
91
- withDirectives(createElementVNode("span", _hoisted_3, [
92
- createVNode(_component_el_divider, {
93
- direction: "vertical",
94
- class: "serviceflow-design-tool-split"
95
- }),
96
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(customControl), (item) => {
97
- return openBlock(), createBlock(_component_el_tooltip, {
98
- class: "box-item",
99
- effect: "dark",
100
- content: item.desc,
101
- placement: "top"
102
- }, {
103
- default: withCtx(() => [
104
- createElementVNode("label", {
105
- class: normalizeClass(["serviceflow-control-item", item.type === clickControlType.value ? "serviceflow-control-item-click" : ""]),
106
- onClick: ($event) => controlClick(item)
107
- }, [
108
- createElementVNode("i", {
109
- class: normalizeClass(item.class)
110
- }, null, 2)
111
- ], 10, _hoisted_4)
112
- ]),
113
- _: 2
114
- }, 1032, ["content"]);
115
- }), 256)),
116
- createVNode(_component_el_divider, {
117
- direction: "vertical",
118
- class: "serviceflow-design-tool-split"
119
- }),
120
- createElementVNode("label", {
121
- class: "serviceflow-page-type",
122
- onClick: showJson
123
- }, [
124
- createVNode(_component_el_icon, { size: 18 }, {
125
- default: withCtx(() => [
126
- createVNode(unref(View))
127
- ]),
128
- _: 1
129
- }),
130
- _hoisted_5
131
- ]),
132
- createElementVNode("label", {
133
- class: "serviceflow-page-type",
134
- onClick: showServiceLog
135
- }, [
136
- createVNode(_component_el_icon, { size: 18 }, {
137
- default: withCtx(() => [
138
- createVNode(unref(View))
139
- ]),
140
- _: 1
141
- }),
142
- _hoisted_6
143
- ]),
144
- createVNode(_component_el_divider, {
145
- direction: "vertical",
146
- class: "serviceflow-design-tool-split"
147
- }),
148
- createElementVNode("label", {
149
- class: "serviceflow-page-type",
150
- onClick: showTestDialog
151
- }, [
152
- createVNode(_component_el_icon, { size: 18 }, {
153
- default: withCtx(() => [
154
- createVNode(unref(CaretRight))
155
- ]),
156
- _: 1
157
- }),
158
- _hoisted_7
159
- ]),
160
- createVNode(_component_el_divider, {
161
- direction: "vertical",
162
- class: "serviceflow-design-tool-split"
163
- }),
164
- createElementVNode("label", {
165
- class: "serviceflow-page-type",
166
- onClick: saveService
167
- }, [
168
- createVNode(_component_el_icon, { size: 18 }, {
169
- default: withCtx(() => [
170
- createVNode(unref(Check))
171
- ]),
172
- _: 1
173
- }),
174
- _hoisted_8
175
- ])
176
- ], 512), [
177
- [vShow, __props.cloneService.code]
178
- ]),
179
- createVNode(unref(_sfc_main$1), {
180
- modelValue: jsonDialogVisible.value,
181
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => jsonDialogVisible.value = $event),
182
- "json-object": jsonObject.value,
183
- "append-to-body": true
184
- }, null, 8, ["modelValue", "json-object"]),
185
- createVNode(_sfc_main$2, {
186
- modelValue: testDialogVisble.value,
187
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => testDialogVisble.value = $event),
188
- pageContext: __props.pageContext,
189
- "append-to-body": true,
190
- cloneService: __props.cloneService,
191
- lf: __props.lf
192
- }, null, 8, ["modelValue", "pageContext", "cloneService", "lf"])
193
- ]);
194
- };
195
- }
196
- });
16
+ import k from "../common/components/json-view/json-view-dialog.vue.js";
17
+ import _ from "./service-test/service-test.vue.js";
18
+ const O = (e2) => (y("data-v-a2bd7452"), e2 = e2(), b(), e2), z = { class: "serviceflow-design-tool" }, J = { style: { top: "-5px", "margin-left": "10px", position: "relative" } }, N = { style: { float: "right" } }, U = ["onClick"], D = O(() => r("label", null, "查看JSON", -1)), G = O(() => r("label", null, "日志", -1)), q = O(() => r("label", null, "测试", -1)), A = O(() => r("label", null, "保存", -1)), B = s({ __name: "service-flow-tool", props: { cloneService: { type: Object, default: () => {
19
+ } }, lf: { type: V, default: () => {
20
+ } }, pageContext: { type: Object, default: () => ({}) } }, emits: ["show-service-log", "save-sevice", "show-json"], setup(s2, { emit: y2 }) {
21
+ const b2 = y2, V2 = s2, O2 = i(""), B2 = i(false), E = i(false), F = i({}), H = () => {
22
+ var _a;
23
+ B2.value = true, F.value = JSON.parse(JSON.stringify(V2.cloneService)), F.value.flow = (_a = V2.lf) == null ? void 0 : _a.getGraphData(), b2("show-json");
24
+ }, I = () => {
25
+ E.value = !E.value;
26
+ }, K = () => {
27
+ b2("show-service-log", {});
28
+ }, L = () => {
29
+ b2("save-sevice");
30
+ };
31
+ return (i2, y3) => {
32
+ const b3 = e, M = l, P = o, Q = t;
33
+ return c(), a("div", z, [n(r("span", J, [p(b3, { placeholder: "", modelValue: s2.cloneService.name, "onUpdate:modelValue": y3[0] || (y3[0] = (e2) => s2.cloneService.name = e2), style: { width: "150px" } }, null, 8, ["modelValue"])], 512), [[m, s2.cloneService.code]]), n(r("span", N, [p(M, { direction: "vertical", class: "serviceflow-design-tool-split" }), (c(true), a(u, null, v(d(h), (e2) => (c(), f(P, { class: "box-item", effect: "dark", content: e2.desc, placement: "top" }, { default: w(() => [r("label", { class: g(["serviceflow-control-item", e2.type === O2.value ? "serviceflow-control-item-click" : ""]), onClick: (l2) => ((e3) => {
34
+ V2.lf && x(V2.lf, e3);
35
+ })(e2) }, [r("i", { class: g(e2.class) }, null, 2)], 10, U)]), _: 2 }, 1032, ["content"]))), 256)), p(M, { direction: "vertical", class: "serviceflow-design-tool-split" }), r("label", { class: "serviceflow-page-type", onClick: H }, [p(Q, { size: 18 }, { default: w(() => [p(d(j))]), _: 1 }), D]), r("label", { class: "serviceflow-page-type", onClick: K }, [p(Q, { size: 18 }, { default: w(() => [p(d(j))]), _: 1 }), G]), p(M, { direction: "vertical", class: "serviceflow-design-tool-split" }), r("label", { class: "serviceflow-page-type", onClick: I }, [p(Q, { size: 18 }, { default: w(() => [p(d(S))]), _: 1 }), q]), p(M, { direction: "vertical", class: "serviceflow-design-tool-split" }), r("label", { class: "serviceflow-page-type", onClick: L }, [p(Q, { size: 18 }, { default: w(() => [p(d(C))]), _: 1 }), A])], 512), [[m, s2.cloneService.code]]), p(d(k), { modelValue: B2.value, "onUpdate:modelValue": y3[1] || (y3[1] = (e2) => B2.value = e2), "json-object": F.value, "append-to-body": true }, null, 8, ["modelValue", "json-object"]), p(_, { modelValue: E.value, "onUpdate:modelValue": y3[2] || (y3[2] = (e2) => E.value = e2), pageContext: s2.pageContext, "append-to-body": true, cloneService: s2.cloneService, lf: s2.lf }, null, 8, ["modelValue", "pageContext", "cloneService", "lf"])]);
36
+ };
37
+ } });
197
38
  export {
198
- _sfc_main as default
39
+ B as default
199
40
  };
@@ -1,7 +1,7 @@
1
- import _sfc_main from "./service-node-config.vue2.js";
1
+ import e from "./service-node-config.vue2.js";
2
2
  import "./service-node-config.vue3.js";
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const serviceNodeConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d5185214"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = o(e, [["__scopeId", "data-v-d5185214"]]);
5
5
  export {
6
- serviceNodeConfig as default
6
+ r as default
7
7
  };
@@ -1,158 +1,33 @@
1
- import { ElDrawer } from "element-plus/es";
1
+ import { ElDrawer as e } from "element-plus/es";
2
2
  import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/drawer/style/css";
4
- import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, toDisplayString, resolveDynamicComponent } from "vue";
5
- import { getServiceNodeByType, getConfigByType } from "../service-components/index.js";
6
- const _hoisted_1 = ["id"];
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "service-node-config",
9
- props: {
10
- service: {
11
- type: Object,
12
- default: () => {
13
- return {};
14
- }
15
- },
16
- currentNode: {
17
- type: Object,
18
- default: () => {
19
- return {};
20
- }
21
- },
22
- logicFlowInstance: {
23
- type: Object,
24
- default: () => {
25
- return {};
26
- }
27
- },
28
- pageContext: {
29
- type: Object,
30
- default: () => ({})
31
- }
32
- },
33
- emits: ["onConfigChange", "update:currentNode"],
34
- setup(__props, { expose: __expose, emit: __emit }) {
35
- const props = __props;
36
- const properties = ref({});
37
- const drawerVisible = ref(false);
38
- const logicNodeType = ref({});
39
- const configComponentRef = ref();
40
- const drawerConfig = ref({ withHeader: true, drawerWidth: "" });
41
- const emits = __emit;
42
- let serviceNodeTypeData = { configComponent: null, drawerWidth: "50%" };
43
- function onNodeClick(model) {
44
- if (!["start", "end"].includes(model.data.type)) {
45
- if (drawerVisible.value == true) {
46
- updateNodeValue();
47
- logicNodeType.value = getServiceNodeByType(model.data.type);
48
- } else {
49
- showDrawer();
50
- logicNodeType.value = getServiceNodeByType(model.data.type);
51
- }
52
- serviceNodeTypeData = getConfigByType(model.data.type);
53
- } else {
54
- updateNodeValue();
55
- closeDrawer();
56
- }
57
- properties.value = model.data.properties;
58
- }
59
- function onBlankClick() {
60
- if (drawerVisible.value) {
61
- updateNodeValue();
62
- closeDrawer();
63
- }
64
- }
65
- function onDeleteNode() {
66
- closeDrawer();
67
- }
68
- function showDrawer() {
69
- drawerVisible.value = true;
70
- }
71
- function closeDrawer() {
72
- drawerVisible.value = false;
73
- emits("update:currentNode", null);
74
- }
75
- function onLogicChange() {
76
- closeDrawer();
77
- }
78
- function updateNodeValue() {
79
- console.log(" 关闭配置窗口时时自动赋值", props.currentNode);
80
- if (configComponentRef.value && configComponentRef.value.hasOwnProperty("onClose") && typeof configComponentRef.value.onClose === "function") {
81
- configComponentRef.value.onClose();
82
- }
83
- if (!["start", "end"].includes(props.currentNode.type)) {
84
- if (configComponentRef.value.hasOwnProperty("getData") && typeof configComponentRef.value.getData === "function") {
85
- if (props.logicFlowInstance) {
86
- if (props.logicFlowInstance.getNodeModelById(props.currentNode.data.id)) {
87
- props.logicFlowInstance.getNodeModelById(props.currentNode.data.id).setProperties(configComponentRef.value.getData());
88
- }
89
- }
90
- } else {
91
- props.logicFlowInstance.getNodeModelById(props.currentNode.data.id).setProperties(properties.value);
92
- }
93
- }
94
- }
95
- function fullScreenConfig(config) {
96
- if (config) {
97
- if (config.withHeader === false) {
98
- drawerConfig.value.withHeader = false;
99
- } else {
100
- drawerConfig.value.withHeader = true;
101
- }
102
- if (config.drawerWidth) {
103
- drawerConfig.value.drawerWidth = config.drawerWidth;
104
- } else {
105
- drawerConfig.value.drawerWidth = "100%";
106
- }
107
- } else {
108
- drawerConfig.value.drawerWidth = "100%";
109
- }
110
- }
111
- __expose({
112
- onBlankClick,
113
- onNodeClick,
114
- onLogicChange,
115
- onDeleteNode,
116
- closeDrawer
117
- });
118
- return (_ctx, _cache) => {
119
- const _component_el_drawer = ElDrawer;
120
- return openBlock(), createBlock(_component_el_drawer, {
121
- modelValue: drawerVisible.value,
122
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => drawerVisible.value = $event),
123
- "append-to-body": false,
124
- "close-on-press-escape": false,
125
- "destroy-on-close": "",
126
- "with-header": drawerConfig.value.withHeader,
127
- "modal-class": "el-overlay",
128
- modal: true,
129
- title: logicNodeType.value.label,
130
- direction: "rtl",
131
- size: drawerConfig.value.drawerWidth ? drawerConfig.value.drawerWidth : unref(serviceNodeTypeData).drawerWidth ? unref(serviceNodeTypeData).drawerWidth : "50%"
132
- }, {
133
- header: withCtx(({ close, titleId, titleClass }) => [
134
- createElementVNode("h4", {
135
- id: titleId,
136
- class: normalizeClass(titleClass)
137
- }, toDisplayString(logicNodeType.value.label), 11, _hoisted_1)
138
- ]),
139
- default: withCtx(() => [
140
- (openBlock(), createBlock(resolveDynamicComponent(unref(serviceNodeTypeData).configComponent), {
141
- ref_key: "configComponentRef",
142
- ref: configComponentRef,
143
- logicFlowInstance: __props.logicFlowInstance,
144
- currentNode: __props.currentNode,
145
- properties: properties.value,
146
- service: __props.service,
147
- pageContext: __props.pageContext,
148
- onFullScreen: fullScreenConfig
149
- }, null, 40, ["logicFlowInstance", "currentNode", "properties", "service", "pageContext"]))
150
- ]),
151
- _: 1
152
- }, 8, ["modelValue", "with-header", "title", "size"]);
153
- };
4
+ import { defineComponent as t, ref as o, openBlock as a, createBlock as l, unref as n, withCtx as r, createElementVNode as d, normalizeClass as i, toDisplayString as c, resolveDynamicComponent as s } from "vue";
5
+ import { getServiceNodeByType as u, getConfigByType as p } from "../service-components/index.js";
6
+ const v = ["id"], w = t({ __name: "service-node-config", props: { service: { type: Object, default: () => ({}) }, currentNode: { type: Object, default: () => ({}) }, logicFlowInstance: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, emits: ["onConfigChange", "update:currentNode"], setup(t2, { expose: w2, emit: f }) {
7
+ const g = t2, h = o({}), m = o(false), y = o({}), C = o(), N = o({ withHeader: true, drawerWidth: "" }), I = f;
8
+ let W = { configComponent: null, drawerWidth: "50%" };
9
+ function F() {
10
+ m.value = false, I("update:currentNode", null);
154
11
  }
155
- });
12
+ function b() {
13
+ C.value && C.value.hasOwnProperty("onClose") && "function" == typeof C.value.onClose && C.value.onClose(), ["start", "end"].includes(g.currentNode.type) || (C.value.hasOwnProperty("getData") && "function" == typeof C.value.getData ? g.logicFlowInstance && g.logicFlowInstance.getNodeModelById(g.currentNode.data.id) && g.logicFlowInstance.getNodeModelById(g.currentNode.data.id).setProperties(C.value.getData()) : g.logicFlowInstance.getNodeModelById(g.currentNode.data.id).setProperties(h.value));
14
+ }
15
+ function x(e2) {
16
+ e2 ? (false === e2.withHeader ? N.value.withHeader = false : N.value.withHeader = true, e2.drawerWidth ? N.value.drawerWidth = e2.drawerWidth : N.value.drawerWidth = "100%") : N.value.drawerWidth = "100%";
17
+ }
18
+ return w2({ onBlankClick: function() {
19
+ m.value && (b(), F());
20
+ }, onNodeClick: function(e2) {
21
+ ["start", "end"].includes(e2.data.type) ? (b(), F()) : (1 == m.value ? (b(), y.value = u(e2.data.type)) : (m.value = true, y.value = u(e2.data.type)), W = p(e2.data.type)), h.value = e2.data.properties;
22
+ }, onLogicChange: function() {
23
+ F();
24
+ }, onDeleteNode: function() {
25
+ F();
26
+ }, closeDrawer: F }), (o2, u2) => {
27
+ const p2 = e;
28
+ return a(), l(p2, { modelValue: m.value, "onUpdate:modelValue": u2[0] || (u2[0] = (e2) => m.value = e2), "append-to-body": false, "close-on-press-escape": false, "destroy-on-close": "", "with-header": N.value.withHeader, "modal-class": "el-overlay", modal: true, title: y.value.label, direction: "rtl", size: N.value.drawerWidth ? N.value.drawerWidth : n(W).drawerWidth ? n(W).drawerWidth : "50%" }, { header: r(({ close: e2, titleId: t3, titleClass: o3 }) => [d("h4", { id: t3, class: i(o3) }, c(y.value.label), 11, v)]), default: r(() => [(a(), l(s(n(W).configComponent), { ref_key: "configComponentRef", ref: C, logicFlowInstance: t2.logicFlowInstance, currentNode: t2.currentNode, properties: h.value, service: t2.service, pageContext: t2.pageContext, onFullScreen: x }, null, 40, ["logicFlowInstance", "currentNode", "properties", "service", "pageContext"]))]), _: 1 }, 8, ["modelValue", "with-header", "title", "size"]);
29
+ };
30
+ } });
156
31
  export {
157
- _sfc_main as default
32
+ w as default
158
33
  };