service-flow-designer 0.0.2-tmp7 → 1.0.2
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/value-set-input/option.js +4 -4
- package/dist/es/designer/common/components/value-set-input/value-set-input.css +3 -3
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.d.ts +0 -8
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.js +1 -1
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +15 -155
- package/dist/es/designer/service-components/base/custom-function/index.css +2 -4
- package/dist/es/designer/service-components/base/judge-condition/index.css +2 -4
- package/dist/es/designer/service-components/base/notification/config.vue2.js +0 -5
- package/dist/es/designer/service-components/base/notification/index.css +2 -4
- package/dist/es/designer/service-components/computation/clean/index.css +2 -4
- package/dist/es/designer/service-components/computation/connect/index.css +2 -4
- package/dist/es/designer/service-components/computation/sort/index.css +2 -4
- package/dist/es/designer/service-components/computation/split-joint/index.css +2 -4
- package/dist/es/designer/service-components/computation/statistics/index.css +2 -4
- package/dist/es/designer/service-components/database/aggregate-query/config.css +2 -2
- package/dist/es/designer/service-components/database/aggregate-query/config.vue.js +1 -1
- package/dist/es/designer/service-components/database/aggregate-query/config.vue2.js +93 -161
- package/dist/es/designer/service-components/database/aggregate-query/dimension-additional.vue.js +186 -0
- package/dist/es/designer/service-components/database/aggregate-query/dimension-additional.vue2.js +4 -0
- package/dist/es/designer/service-components/database/aggregate-query/dimension-statistical.vue.js +13 -37
- package/dist/es/designer/service-components/database/aggregate-query/filter-conditions.vue.js +55 -203
- package/dist/es/designer/service-components/database/aggregate-query/index.css +8 -10
- package/dist/es/designer/service-components/database/aggregate-query/index.vue.js +1 -1
- package/dist/es/designer/service-components/database/aggregate-query/index.vue2.js +3 -8
- package/dist/es/designer/service-components/database/aggregate-query/sort-conditions.vue.js +17 -21
- package/dist/es/designer/service-components/database/aggregate-query/statistical-formula.vue.d.ts +2 -6
- package/dist/es/designer/service-components/database/aggregate-query/statistical-formula.vue.js +16 -23
- package/dist/es/designer/service-components/database/dynamic-sql/index.css +2 -4
- package/dist/es/designer/service-components/database/regular-query/index.css +2 -4
- package/dist/es/designer/service-components/service/custom-bean/index.css +2 -4
- package/dist/es/designer/service-components/service/http-service/index.css +2 -4
- package/dist/es/designer/service-components/util/common-options.js +8 -10
- package/dist/es/designer/service-flow-view/service-node-config.css +1 -1
- package/dist/es/designer/service-flow-view/service-node-config.vue.js +1 -1
- package/dist/es/designer/service-flow-view/service-node-config.vue2.js +1 -1
- package/dist/es/designer/service-flow-view/service-params.vue.js +18 -44
- package/dist/es/designer/service-flow-view/service-result.vue.js +57 -89
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/lib/assets/icon/end.svg.js +3 -0
- package/dist/lib/assets/icon/start.png.js +3 -0
- package/dist/lib/assets/icon/vardef-v.png.js +3 -0
- package/dist/lib/designer/common/components/database-select.css +10 -0
- package/dist/lib/designer/common/components/database-select.vue.js +6 -0
- package/dist/lib/designer/common/components/database-select.vue2.js +217 -0
- package/dist/lib/designer/common/components/datatable-select.css +10 -0
- package/dist/lib/designer/common/components/datatable-select.vue.js +6 -0
- package/dist/lib/designer/common/components/datatable-select.vue2.js +307 -0
- package/dist/lib/designer/common/components/file-upload.css +7 -0
- package/dist/lib/designer/common/components/file-upload.vue.js +6 -0
- package/dist/lib/designer/common/components/file-upload.vue2.js +103 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue.js +63 -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.js +141 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue2.js +3 -0
- package/dist/lib/designer/common/components/node-base-config.vue.js +69 -0
- package/dist/lib/designer/common/components/node-base-config.vue2.js +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.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 +0 -8
- 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 +431 -0
- package/dist/lib/designer/common/util/node-util.js +56 -0
- package/dist/lib/designer/desginer-index.css +24 -0
- package/dist/lib/designer/desginer-index.vue.js +6 -0
- package/dist/lib/designer/desginer-index.vue2.js +113 -0
- package/dist/lib/designer/flow/base/AbLogicNode.js +28 -0
- package/dist/lib/designer/flow/base/AbLogicNodeModel.js +70 -0
- package/dist/lib/designer/flow/base/AbLogicResizeNode.js +28 -0
- package/dist/lib/designer/flow/base/AbLogicResizeNodeModel.js +44 -0
- package/dist/lib/designer/flow/edge/CustomLine.js +48 -0
- package/dist/lib/designer/service-components/base/custom-function/config.css +13 -0
- package/dist/lib/designer/service-components/base/custom-function/config.vue.js +6 -0
- package/dist/lib/designer/service-components/base/custom-function/config.vue2.js +320 -0
- package/dist/lib/designer/service-components/base/custom-function/index.css +49 -0
- package/dist/lib/designer/service-components/base/custom-function/index.js +38 -0
- package/dist/lib/designer/service-components/base/custom-function/index.vue.js +6 -0
- package/dist/lib/designer/service-components/base/custom-function/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/base/end-node/index.css +20 -0
- package/dist/lib/designer/service-components/base/end-node/index.js +83 -0
- package/dist/lib/designer/service-components/base/end-node/index.vue.js +6 -0
- package/dist/lib/designer/service-components/base/end-node/index.vue2.js +30 -0
- package/dist/lib/designer/service-components/base/judge-condition/config.vue.js +3 -0
- package/dist/lib/designer/service-components/base/judge-condition/config.vue2.js +588 -0
- package/dist/lib/designer/service-components/base/judge-condition/index.css +50 -0
- package/dist/lib/designer/service-components/base/judge-condition/index.js +48 -0
- package/dist/lib/designer/service-components/base/judge-condition/index.vue.js +6 -0
- package/dist/lib/designer/service-components/base/judge-condition/index.vue2.js +66 -0
- package/dist/lib/designer/service-components/base/loop-node/config.css +4 -0
- package/dist/lib/designer/service-components/base/loop-node/config.vue.js +6 -0
- package/dist/lib/designer/service-components/base/loop-node/config.vue2.js +79 -0
- package/dist/lib/designer/service-components/base/loop-node/index.css +20 -0
- package/dist/lib/designer/service-components/base/loop-node/index.js +176 -0
- package/dist/lib/designer/service-components/base/notification/config.vue.js +3 -0
- package/dist/lib/designer/service-components/base/notification/config.vue2.js +333 -0
- package/dist/lib/designer/service-components/base/notification/index.css +49 -0
- package/dist/lib/designer/service-components/base/notification/index.js +38 -0
- package/dist/lib/designer/service-components/base/notification/index.vue.js +6 -0
- package/dist/lib/designer/service-components/base/notification/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/base/notification/recipients-select.css +4 -0
- package/dist/lib/designer/service-components/base/notification/recipients-select.vue.js +6 -0
- package/dist/lib/designer/service-components/base/notification/recipients-select.vue2.js +152 -0
- package/dist/lib/designer/service-components/base/notification/select-mail-template.vue.js +109 -0
- package/dist/lib/designer/service-components/base/notification/select-mail-template.vue2.js +3 -0
- package/dist/lib/designer/service-components/base/start-node/index.css +20 -0
- package/dist/lib/designer/service-components/base/start-node/index.js +84 -0
- package/dist/lib/designer/service-components/base/start-node/index.vue.js +6 -0
- package/dist/lib/designer/service-components/base/start-node/index.vue2.js +30 -0
- package/dist/lib/designer/service-components/computation/clean/config.css +10 -0
- package/dist/lib/designer/service-components/computation/clean/config.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/clean/config.vue2.js +433 -0
- package/dist/lib/designer/service-components/computation/clean/index.css +49 -0
- package/dist/lib/designer/service-components/computation/clean/index.js +38 -0
- package/dist/lib/designer/service-components/computation/clean/index.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/clean/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/computation/connect/config.css +7 -0
- package/dist/lib/designer/service-components/computation/connect/config.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/connect/config.vue2.js +521 -0
- package/dist/lib/designer/service-components/computation/connect/index.css +49 -0
- package/dist/lib/designer/service-components/computation/connect/index.js +38 -0
- package/dist/lib/designer/service-components/computation/connect/index.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/connect/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/computation/sort/config.css +10 -0
- package/dist/lib/designer/service-components/computation/sort/config.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/sort/config.vue2.js +312 -0
- package/dist/lib/designer/service-components/computation/sort/index.css +49 -0
- package/dist/lib/designer/service-components/computation/sort/index.js +38 -0
- package/dist/lib/designer/service-components/computation/sort/index.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/sort/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/computation/split-joint/config.css +7 -0
- package/dist/lib/designer/service-components/computation/split-joint/config.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/split-joint/config.vue2.js +342 -0
- package/dist/lib/designer/service-components/computation/split-joint/index.css +49 -0
- package/dist/lib/designer/service-components/computation/split-joint/index.js +38 -0
- package/dist/lib/designer/service-components/computation/split-joint/index.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/split-joint/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/computation/statistics/config.css +7 -0
- package/dist/lib/designer/service-components/computation/statistics/config.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/statistics/config.vue2.js +451 -0
- package/dist/lib/designer/service-components/computation/statistics/index.css +49 -0
- package/dist/lib/designer/service-components/computation/statistics/index.js +38 -0
- package/dist/lib/designer/service-components/computation/statistics/index.vue.js +6 -0
- package/dist/lib/designer/service-components/computation/statistics/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/database/aggregate-query/config.css +7 -0
- package/dist/lib/designer/service-components/database/aggregate-query/config.vue.js +6 -0
- package/dist/lib/designer/service-components/database/aggregate-query/config.vue2.js +283 -0
- package/dist/lib/designer/service-components/database/aggregate-query/dimension-additional.vue.js +185 -0
- package/dist/lib/designer/service-components/database/aggregate-query/dimension-additional.vue2.js +3 -0
- package/dist/lib/designer/service-components/database/aggregate-query/dimension-statistical.vue.js +203 -0
- package/dist/lib/designer/service-components/database/aggregate-query/dimension-statistical.vue2.js +3 -0
- package/dist/lib/designer/service-components/database/aggregate-query/filter-conditions.vue.js +298 -0
- package/dist/lib/designer/service-components/database/aggregate-query/filter-conditions.vue2.js +3 -0
- package/dist/lib/designer/service-components/database/aggregate-query/index.css +50 -0
- package/dist/lib/designer/service-components/database/aggregate-query/index.js +48 -0
- package/dist/lib/designer/service-components/database/aggregate-query/index.vue.js +6 -0
- package/dist/lib/designer/service-components/database/aggregate-query/index.vue2.js +89 -0
- package/dist/lib/designer/service-components/database/aggregate-query/sort-conditions.vue.js +182 -0
- package/dist/lib/designer/service-components/database/aggregate-query/sort-conditions.vue2.js +3 -0
- package/dist/lib/designer/service-components/database/aggregate-query/statistical-formula.vue.d.ts +2 -6
- package/dist/lib/designer/service-components/database/aggregate-query/statistical-formula.vue.js +187 -0
- package/dist/lib/designer/service-components/database/aggregate-query/statistical-formula.vue2.js +3 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/config.css +13 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/config.vue.js +6 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/config.vue2.js +504 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/index.css +49 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/index.js +38 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/index.vue.js +6 -0
- package/dist/lib/designer/service-components/database/dynamic-sql/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/database/regular-query/config.css +7 -0
- package/dist/lib/designer/service-components/database/regular-query/config.vue.js +6 -0
- package/dist/lib/designer/service-components/database/regular-query/config.vue2.js +674 -0
- package/dist/lib/designer/service-components/database/regular-query/index.css +50 -0
- package/dist/lib/designer/service-components/database/regular-query/index.js +48 -0
- package/dist/lib/designer/service-components/database/regular-query/index.vue.js +6 -0
- package/dist/lib/designer/service-components/database/regular-query/index.vue2.js +89 -0
- package/dist/lib/designer/service-components/index.js +230 -0
- package/dist/lib/designer/service-components/service/common/cookie-data.vue.js +131 -0
- package/dist/lib/designer/service-components/service/common/cookie-data.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/common/form-data.vue.js +161 -0
- package/dist/lib/designer/service-components/service/common/form-data.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/common/header-data.vue.js +132 -0
- package/dist/lib/designer/service-components/service/common/header-data.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/common/json-data.css +4 -0
- package/dist/lib/designer/service-components/service/common/json-data.vue.js +6 -0
- package/dist/lib/designer/service-components/service/common/json-data.vue2.js +133 -0
- package/dist/lib/designer/service-components/service/common/param-config.css +7 -0
- package/dist/lib/designer/service-components/service/common/param-config.vue.js +6 -0
- package/dist/lib/designer/service-components/service/common/param-config.vue2.js +222 -0
- package/dist/lib/designer/service-components/service/common/query-params.vue.js +132 -0
- package/dist/lib/designer/service-components/service/common/query-params.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/common/raw-data.vue.js +95 -0
- package/dist/lib/designer/service-components/service/common/raw-data.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/custom-bean/config.vue.js +3 -0
- package/dist/lib/designer/service-components/service/custom-bean/config.vue2.js +70 -0
- package/dist/lib/designer/service-components/service/custom-bean/index.css +49 -0
- package/dist/lib/designer/service-components/service/custom-bean/index.js +38 -0
- package/dist/lib/designer/service-components/service/custom-bean/index.vue.js +6 -0
- package/dist/lib/designer/service-components/service/custom-bean/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/service/http-service/config.css +7 -0
- package/dist/lib/designer/service-components/service/http-service/config.vue.js +6 -0
- package/dist/lib/designer/service-components/service/http-service/config.vue2.js +307 -0
- package/dist/lib/designer/service-components/service/http-service/index.css +49 -0
- package/dist/lib/designer/service-components/service/http-service/index.js +38 -0
- package/dist/lib/designer/service-components/service/http-service/index.vue.js +6 -0
- package/dist/lib/designer/service-components/service/http-service/index.vue2.js +43 -0
- package/dist/lib/designer/service-components/service/http-service/response-json-setting.vue.js +274 -0
- package/dist/lib/designer/service-components/service/http-service/response-json-setting.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/http-service/response-text-setting.vue.js +67 -0
- package/dist/lib/designer/service-components/service/http-service/response-text-setting.vue2.js +3 -0
- package/dist/lib/designer/service-components/service/http-service/response-xml-setting.vue.js +274 -0
- package/dist/lib/designer/service-components/service/http-service/response-xml-setting.vue2.js +3 -0
- package/dist/lib/designer/service-components/util/common-options.js +131 -0
- package/dist/lib/designer/service-flow-view/flow-tool-util.js +44 -0
- package/dist/lib/designer/service-flow-view/flow-util.js +123 -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.js +6 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue2.js +193 -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.js +6 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue2.js +152 -0
- package/dist/lib/designer/service-flow-view/service-params.vue.js +402 -0
- package/dist/lib/designer/service-flow-view/service-params.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-result.vue.js +284 -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.js +321 -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.js +449 -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.js +6 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue2.js +214 -0
- package/dist/lib/designer/service-flow-view/view-index.css +102 -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 +353 -0
- package/dist/lib/designer/service-panel/component-panel.css +66 -0
- package/dist/lib/designer/service-panel/component-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/component-panel.vue2.js +93 -0
- package/dist/lib/designer/service-panel/service-list.css +36 -0
- package/dist/lib/designer/service-panel/service-list.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-list.vue2.js +351 -0
- package/dist/lib/designer/service-panel/service-panel.css +41 -0
- package/dist/lib/designer/service-panel/service-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-panel.vue2.js +80 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/stores/page-store.js +79 -0
- package/package.json +14 -13
- package/dist/es/designer/service-components/base/notification/quill-example.vue.d.ts +0 -19
- package/dist/es/utils/common-util.d.ts +0 -21
- package/dist/es/utils/common-util.js +0 -235
- package/dist/lib/designer/service-components/base/notification/quill-example.vue.d.ts +0 -19
- package/dist/lib/utils/common-util.d.ts +0 -21
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const es = require("element-plus/es");
|
|
3
|
+
require("element-plus/es/components/base/style/css");
|
|
4
|
+
require("element-plus/es/components/dialog/style/css");
|
|
5
|
+
require("element-plus/es/components/form-item/style/css");
|
|
6
|
+
require("element-plus/es/components/tree/style/css");
|
|
7
|
+
require("element-plus/es/components/row/style/css");
|
|
8
|
+
require("element-plus/es/components/tooltip/style/css");
|
|
9
|
+
require("element-plus/es/components/button/style/css");
|
|
10
|
+
require("element-plus/es/components/col/style/css");
|
|
11
|
+
require("element-plus/es/components/input/style/css");
|
|
12
|
+
require("element-plus/es/components/icon/style/css");
|
|
13
|
+
const vue = require("vue");
|
|
14
|
+
const iconsVue = require("@element-plus/icons-vue");
|
|
15
|
+
const uuid = require("uuid");
|
|
16
|
+
const http = require("agilebuilder-ui/src/utils/request");
|
|
17
|
+
const nodeUtil = require("../common/util/node-util.js");
|
|
18
|
+
const pageStore = require("../../stores/page-store.js");
|
|
19
|
+
const elementPlus = require("element-plus");
|
|
20
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-a5cc897b"), n = n(), vue.popScopeId(), n);
|
|
21
|
+
const _hoisted_1 = { class: "custom-tree-node" };
|
|
22
|
+
const _hoisted_2 = { style: { "margin-left": "5px", "line-height": "14px", "font-size": "14px" } };
|
|
23
|
+
const _hoisted_3 = { class: "dialog-footer" };
|
|
24
|
+
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", null, "添加菜单", -1));
|
|
25
|
+
const _hoisted_5 = [
|
|
26
|
+
_hoisted_4
|
|
27
|
+
];
|
|
28
|
+
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", null, "添加服务", -1));
|
|
29
|
+
const _hoisted_7 = [
|
|
30
|
+
_hoisted_6
|
|
31
|
+
];
|
|
32
|
+
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", null, "修改", -1));
|
|
33
|
+
const _hoisted_9 = [
|
|
34
|
+
_hoisted_8
|
|
35
|
+
];
|
|
36
|
+
const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", null, "删除", -1));
|
|
37
|
+
const _hoisted_11 = [
|
|
38
|
+
_hoisted_10
|
|
39
|
+
];
|
|
40
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
41
|
+
__name: "service-list",
|
|
42
|
+
props: {
|
|
43
|
+
serviceTreeData: {
|
|
44
|
+
type: Array,
|
|
45
|
+
default: () => []
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ["service-click", "clear-flow-canvas", "load-tree-data"],
|
|
49
|
+
setup(__props, { emit: __emit }) {
|
|
50
|
+
const serviceFlowStoreUtil = pageStore.useServiceFlowStore();
|
|
51
|
+
const emits = __emit;
|
|
52
|
+
const treeProps = {
|
|
53
|
+
id: "id",
|
|
54
|
+
label: "name"
|
|
55
|
+
};
|
|
56
|
+
const props = __props;
|
|
57
|
+
const search = vue.ref("");
|
|
58
|
+
const contxtMenuRef = vue.ref();
|
|
59
|
+
const serviceTreeRef = vue.ref();
|
|
60
|
+
const showContextMenu = vue.ref(false);
|
|
61
|
+
const contextMenuData = vue.ref({});
|
|
62
|
+
const dialogVisible = vue.ref(false);
|
|
63
|
+
const editType = vue.ref("");
|
|
64
|
+
const serviceFlow = vue.ref({});
|
|
65
|
+
const currentServiceflowService = vue.ref({});
|
|
66
|
+
const nodeContextmenu = (event, data, node, resolve) => {
|
|
67
|
+
contextMenuData.value = data;
|
|
68
|
+
showContextMenu.value = true;
|
|
69
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
70
|
+
contxtMenuRef.value.style.display = "block";
|
|
71
|
+
contxtMenuRef.value.style.left = event.x + "px";
|
|
72
|
+
contxtMenuRef.value.style.top = event.y + scrollTop - 60 - 10 + "px";
|
|
73
|
+
document.addEventListener("click", closeRightMenu);
|
|
74
|
+
};
|
|
75
|
+
const closeRightMenu = () => {
|
|
76
|
+
showContextMenu.value = false;
|
|
77
|
+
document.removeEventListener("click", closeRightMenu);
|
|
78
|
+
};
|
|
79
|
+
const addRootServiceMenu = () => {
|
|
80
|
+
editType.value = "MENU";
|
|
81
|
+
createService();
|
|
82
|
+
};
|
|
83
|
+
const addServce = (type) => {
|
|
84
|
+
editType.value = type;
|
|
85
|
+
createService();
|
|
86
|
+
};
|
|
87
|
+
const editServiceBaseInfo = () => {
|
|
88
|
+
editType.value = contextMenuData.value.type;
|
|
89
|
+
serviceFlow.value = JSON.parse(JSON.stringify(contextMenuData.value));
|
|
90
|
+
if (serviceFlow.value.children) {
|
|
91
|
+
delete serviceFlow.value.children;
|
|
92
|
+
}
|
|
93
|
+
dialogVisible.value = true;
|
|
94
|
+
};
|
|
95
|
+
const createService = () => {
|
|
96
|
+
serviceFlow.value = {
|
|
97
|
+
code: uuid.v4(),
|
|
98
|
+
name: "",
|
|
99
|
+
type: editType.value
|
|
100
|
+
};
|
|
101
|
+
if (contextMenuData.value.id) {
|
|
102
|
+
serviceFlow.value.parentCode = contextMenuData.value.code;
|
|
103
|
+
}
|
|
104
|
+
dialogVisible.value = true;
|
|
105
|
+
};
|
|
106
|
+
const saveServiceBaseInfo = () => {
|
|
107
|
+
if (!serviceFlow.value.name) {
|
|
108
|
+
elementPlus.ElMessage.warning("名称不能为空");
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
console.log("保存服务基本信息:", serviceFlow.value);
|
|
112
|
+
if (!serviceFlow.value.systemCode) {
|
|
113
|
+
serviceFlow.value.systemCode = serviceFlowStoreUtil.pageContext.systemCode;
|
|
114
|
+
}
|
|
115
|
+
if (!serviceFlow.value.publishVersion) {
|
|
116
|
+
serviceFlow.value.publishVersion = serviceFlowStoreUtil.pageContext.systemVersion;
|
|
117
|
+
}
|
|
118
|
+
http.post("/component/super-page-design/service-flow", { designLog: null, appServiceFlow: serviceFlow.value }).then((res) => {
|
|
119
|
+
if (res) {
|
|
120
|
+
if (!serviceFlow.value.id) {
|
|
121
|
+
if (!serviceFlow.value.parentCode) {
|
|
122
|
+
props.serviceTreeData.push(res);
|
|
123
|
+
} else {
|
|
124
|
+
if (!contextMenuData.value.children) {
|
|
125
|
+
contextMenuData.value.children = [];
|
|
126
|
+
}
|
|
127
|
+
contextMenuData.value.children.push(res);
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
emits("load-tree-data");
|
|
131
|
+
Object.assign(contextMenuData.value, res);
|
|
132
|
+
}
|
|
133
|
+
contextMenuData.value = {};
|
|
134
|
+
elementPlus.ElMessage.success("保存成功");
|
|
135
|
+
dialogVisible.value = false;
|
|
136
|
+
serviceFlow.value = {};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
const deleteService = () => {
|
|
141
|
+
console.log("删除服务:", contextMenuData.value);
|
|
142
|
+
if (contextMenuData.value.children && contextMenuData.value.children.length > 0) {
|
|
143
|
+
elementPlus.ElMessage.warning("该节点下存在子节点,不能删除!");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
http.delete("/component/super-page-design/service-flow", { data: [contextMenuData.value.id] }).then((res) => {
|
|
147
|
+
elementPlus.ElMessage.success("删除成功");
|
|
148
|
+
emits("load-tree-data");
|
|
149
|
+
if (contextMenuData.value.parentCode) {
|
|
150
|
+
const parent = nodeUtil.findServcieByCode(contextMenuData.value.parentCode, props.serviceTreeData);
|
|
151
|
+
const index = parent.children.findIndex((item) => item.id === contextMenuData.value.id);
|
|
152
|
+
parent.children.splice(index, 1);
|
|
153
|
+
} else {
|
|
154
|
+
const index = props.serviceTreeData.findIndex((item) => item.id === contextMenuData.value.id);
|
|
155
|
+
props.serviceTreeData.splice(index, 1);
|
|
156
|
+
}
|
|
157
|
+
if (currentServiceflowService.value.code === contextMenuData.value.code) {
|
|
158
|
+
emits("clear-flow-canvas");
|
|
159
|
+
}
|
|
160
|
+
contextMenuData.value = {};
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
const nodeClick = (data, node, event) => {
|
|
164
|
+
console.log("node-click", data);
|
|
165
|
+
closeRightMenu();
|
|
166
|
+
if (data.type === "SERVICE") {
|
|
167
|
+
http.get("/component/super-page-design/service-flow/" + data.id).then((res) => {
|
|
168
|
+
res.variables && (res.variables = JSON.parse(res.variables));
|
|
169
|
+
res.log && (res.log = JSON.parse(res.log));
|
|
170
|
+
res.flow && (res.flow = JSON.parse(res.flow));
|
|
171
|
+
res.returnValues && (res.returnValues = JSON.parse(res.returnValues));
|
|
172
|
+
currentServiceflowService.value = res;
|
|
173
|
+
emits("service-click", res);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
return (_ctx, _cache) => {
|
|
178
|
+
const _component_el_icon = es.ElIcon;
|
|
179
|
+
const _component_el_input = es.ElInput;
|
|
180
|
+
const _component_el_col = es.ElCol;
|
|
181
|
+
const _component_el_button = es.ElButton;
|
|
182
|
+
const _component_el_tooltip = es.ElTooltip;
|
|
183
|
+
const _component_el_row = es.ElRow;
|
|
184
|
+
const _component_el_tree = es.ElTree;
|
|
185
|
+
const _component_el_form_item = es.ElFormItem;
|
|
186
|
+
const _component_el_dialog = es.ElDialog;
|
|
187
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
188
|
+
vue.createVNode(_component_el_row, null, {
|
|
189
|
+
default: vue.withCtx(() => [
|
|
190
|
+
vue.createVNode(_component_el_col, { span: 18 }, {
|
|
191
|
+
default: vue.withCtx(() => [
|
|
192
|
+
vue.createVNode(_component_el_input, {
|
|
193
|
+
modelValue: search.value,
|
|
194
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
195
|
+
placeholder: "搜索"
|
|
196
|
+
}, {
|
|
197
|
+
suffix: vue.withCtx(() => [
|
|
198
|
+
vue.createVNode(_component_el_icon, null, {
|
|
199
|
+
default: vue.withCtx(() => [
|
|
200
|
+
vue.createVNode(vue.unref(iconsVue.Search))
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
})
|
|
204
|
+
]),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 8, ["modelValue"])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
}),
|
|
210
|
+
vue.createVNode(_component_el_col, {
|
|
211
|
+
span: 6,
|
|
212
|
+
style: { "text-align": "right" }
|
|
213
|
+
}, {
|
|
214
|
+
default: vue.withCtx(() => [
|
|
215
|
+
vue.createVNode(_component_el_tooltip, {
|
|
216
|
+
effect: "dark",
|
|
217
|
+
content: "添加根菜单",
|
|
218
|
+
placement: "top"
|
|
219
|
+
}, {
|
|
220
|
+
default: vue.withCtx(() => [
|
|
221
|
+
vue.createVNode(_component_el_button, {
|
|
222
|
+
type: "primary",
|
|
223
|
+
icon: vue.unref(iconsVue.Plus),
|
|
224
|
+
onClick: addRootServiceMenu
|
|
225
|
+
}, null, 8, ["icon"])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
})
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
}),
|
|
235
|
+
vue.createVNode(_component_el_tree, {
|
|
236
|
+
style: { "margin-top": "10px" },
|
|
237
|
+
ref_key: "serviceTreeRef",
|
|
238
|
+
ref: serviceTreeRef,
|
|
239
|
+
data: __props.serviceTreeData,
|
|
240
|
+
props: treeProps,
|
|
241
|
+
"default-expand-all": true,
|
|
242
|
+
"check-strictly": true,
|
|
243
|
+
"highlight-current": "",
|
|
244
|
+
onNodeClick: nodeClick,
|
|
245
|
+
onNodeContextmenu: nodeContextmenu
|
|
246
|
+
}, {
|
|
247
|
+
default: vue.withCtx(({ node, data }) => [
|
|
248
|
+
vue.createElementVNode("span", _hoisted_1, [
|
|
249
|
+
data.type === "MENU" ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
250
|
+
key: 0,
|
|
251
|
+
size: 16
|
|
252
|
+
}, {
|
|
253
|
+
default: vue.withCtx(() => [
|
|
254
|
+
vue.createVNode(vue.unref(iconsVue.Menu))
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
})) : (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
258
|
+
key: 1,
|
|
259
|
+
size: 16
|
|
260
|
+
}, {
|
|
261
|
+
default: vue.withCtx(() => [
|
|
262
|
+
vue.createVNode(vue.unref(iconsVue.Promotion))
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
})),
|
|
266
|
+
vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(node.label), 1)
|
|
267
|
+
])
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}, 8, ["data"]),
|
|
271
|
+
vue.createVNode(_component_el_dialog, {
|
|
272
|
+
modelValue: dialogVisible.value,
|
|
273
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
|
|
274
|
+
"append-to-body": true,
|
|
275
|
+
title: editType.value === "MENU" ? "菜单" : "服务",
|
|
276
|
+
width: "500"
|
|
277
|
+
}, {
|
|
278
|
+
footer: vue.withCtx(() => [
|
|
279
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
280
|
+
vue.createVNode(_component_el_button, {
|
|
281
|
+
size: "mini",
|
|
282
|
+
onClick: _cache[2] || (_cache[2] = ($event) => dialogVisible.value = false)
|
|
283
|
+
}, {
|
|
284
|
+
default: vue.withCtx(() => [
|
|
285
|
+
vue.createTextVNode("返回")
|
|
286
|
+
]),
|
|
287
|
+
_: 1
|
|
288
|
+
}),
|
|
289
|
+
vue.createVNode(_component_el_button, {
|
|
290
|
+
size: "mini",
|
|
291
|
+
type: "primary",
|
|
292
|
+
onClick: saveServiceBaseInfo
|
|
293
|
+
}, {
|
|
294
|
+
default: vue.withCtx(() => [
|
|
295
|
+
vue.createTextVNode(" 确定 ")
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
})
|
|
299
|
+
])
|
|
300
|
+
]),
|
|
301
|
+
default: vue.withCtx(() => [
|
|
302
|
+
vue.createVNode(_component_el_form_item, { label: "名称:" }, {
|
|
303
|
+
default: vue.withCtx(() => [
|
|
304
|
+
vue.createVNode(_component_el_input, {
|
|
305
|
+
modelValue: serviceFlow.value.name,
|
|
306
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => serviceFlow.value.name = $event)
|
|
307
|
+
}, null, 8, ["modelValue"])
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
})
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
}, 8, ["modelValue", "title"]),
|
|
314
|
+
vue.withDirectives(vue.createElementVNode("div", null, [
|
|
315
|
+
vue.createElementVNode("ul", {
|
|
316
|
+
ref_key: "contxtMenuRef",
|
|
317
|
+
ref: contxtMenuRef,
|
|
318
|
+
class: "context-menu"
|
|
319
|
+
}, [
|
|
320
|
+
contextMenuData.value.type === "MENU" ? (vue.openBlock(), vue.createElementBlock("li", {
|
|
321
|
+
key: 0,
|
|
322
|
+
tabindex: "-1",
|
|
323
|
+
class: "menu__item",
|
|
324
|
+
onClick: _cache[4] || (_cache[4] = ($event) => addServce("MENU"))
|
|
325
|
+
}, _hoisted_5)) : vue.createCommentVNode("", true),
|
|
326
|
+
contextMenuData.value.type === "MENU" ? (vue.openBlock(), vue.createElementBlock("li", {
|
|
327
|
+
key: 1,
|
|
328
|
+
tabindex: "-1",
|
|
329
|
+
class: "menu__item",
|
|
330
|
+
onClick: _cache[5] || (_cache[5] = ($event) => addServce("SERVICE"))
|
|
331
|
+
}, _hoisted_7)) : vue.createCommentVNode("", true),
|
|
332
|
+
currentServiceflowService.value.code !== contextMenuData.value.code ? (vue.openBlock(), vue.createElementBlock("li", {
|
|
333
|
+
key: 2,
|
|
334
|
+
tabindex: "-1",
|
|
335
|
+
class: "menu__item",
|
|
336
|
+
onClick: editServiceBaseInfo
|
|
337
|
+
}, _hoisted_9)) : vue.createCommentVNode("", true),
|
|
338
|
+
vue.createElementVNode("li", {
|
|
339
|
+
tabindex: "-1",
|
|
340
|
+
class: "menu__item",
|
|
341
|
+
onClick: deleteService
|
|
342
|
+
}, _hoisted_11)
|
|
343
|
+
], 512)
|
|
344
|
+
], 512), [
|
|
345
|
+
[vue.vShow, showContextMenu.value]
|
|
346
|
+
])
|
|
347
|
+
]);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
.amb-design-assembly-content[data-v-59e0837d] {
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
box-shadow: 1px 0px 10px 0px rgba(0, 0, 0, 0.05);
|
|
5
|
+
height: 100%;
|
|
6
|
+
padding-left: 10px;
|
|
7
|
+
padding-right: 10px;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
10
|
+
/*控制滚动条宽度*/
|
|
11
|
+
.amb-design-assembly-content[data-v-59e0837d]::-webkit-scrollbar {
|
|
12
|
+
width: 1px;
|
|
13
|
+
}
|
|
14
|
+
.amb-assembly-header[data-v-59e0837d] {
|
|
15
|
+
position: absolute;
|
|
16
|
+
width: 220px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
padding: 18px 0px 10px 0px;
|
|
19
|
+
padding-bottom: 14px;
|
|
20
|
+
background-color: #ffffff;
|
|
21
|
+
}
|
|
22
|
+
.amb-assembly-header-type[data-v-59e0837d] {
|
|
23
|
+
border-radius: 100px 100px 100px 100px;
|
|
24
|
+
background: #ffffff;
|
|
25
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
|
|
26
|
+
padding: 10px;
|
|
27
|
+
padding-bottom: 12px;
|
|
28
|
+
}
|
|
29
|
+
.amb-assembly-header-type > label[data-v-59e0837d] {
|
|
30
|
+
padding: 4px 14px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
}
|
|
34
|
+
.amb-assembly-header-type > label.selected[data-v-59e0837d] {
|
|
35
|
+
border-radius: 100px 100px 100px 100px;
|
|
36
|
+
background: #5893ef;
|
|
37
|
+
color: #ffffff;
|
|
38
|
+
}
|
|
39
|
+
.amb-design-assembly-list[data-v-59e0837d] {
|
|
40
|
+
padding-top: 80px;
|
|
41
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const servicePanel_vue_vue_type_script_setup_true_lang = require("./service-panel.vue2.js");
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.js");
|
|
5
|
+
const ServicePanel = /* @__PURE__ */ _pluginVue_exportHelper(servicePanel_vue_vue_type_script_setup_true_lang, [["__scopeId", "data-v-59e0837d"]]);
|
|
6
|
+
module.exports = ServicePanel;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const LogicFlow = require("@logicflow/core");
|
|
4
|
+
const serviceList = require("./service-list.vue.js");
|
|
5
|
+
const componentPanel = require("./component-panel.vue.js");
|
|
6
|
+
require("../service-components/index.js");
|
|
7
|
+
const _hoisted_1 = { class: "amb-assembly-header" };
|
|
8
|
+
const _hoisted_2 = { class: "amb-assembly-header-type" };
|
|
9
|
+
const _hoisted_3 = { class: "amb-design-assembly-list" };
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
__name: "service-panel",
|
|
12
|
+
props: {
|
|
13
|
+
logicFlowInstance: {
|
|
14
|
+
type: LogicFlow,
|
|
15
|
+
default: () => {
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
serviceTreeData: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["drag-node", "service-click", "clear-flow-canvas", "load-tree-data"],
|
|
24
|
+
setup(__props, { emit: __emit }) {
|
|
25
|
+
const emits = __emit;
|
|
26
|
+
const clickType = vue.ref("serviceFlowList");
|
|
27
|
+
const winHeight = vue.ref();
|
|
28
|
+
const containerHeightStyle = vue.computed(() => {
|
|
29
|
+
return {
|
|
30
|
+
height: winHeight.value + "px"
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
const dragNode = (serviceComponent) => {
|
|
34
|
+
console.log(`service-component-lib $_dragNode:${serviceComponent.type}`);
|
|
35
|
+
emits("drag-node", serviceComponent);
|
|
36
|
+
};
|
|
37
|
+
const onServiceClick = (service) => {
|
|
38
|
+
emits("service-click", service);
|
|
39
|
+
};
|
|
40
|
+
const clearFlowCanvas = () => {
|
|
41
|
+
emits("clear-flow-canvas");
|
|
42
|
+
};
|
|
43
|
+
const loadTreeData = () => {
|
|
44
|
+
emits("load-tree-data");
|
|
45
|
+
};
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
48
|
+
class: "amb-design-assembly-content",
|
|
49
|
+
ref: "ambDesignAssemblyContent",
|
|
50
|
+
style: vue.normalizeStyle(containerHeightStyle.value)
|
|
51
|
+
}, [
|
|
52
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
53
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
54
|
+
vue.createElementVNode("label", {
|
|
55
|
+
class: vue.normalizeClass({ selected: clickType.value === "serviceFlowList" }),
|
|
56
|
+
onClick: _cache[0] || (_cache[0] = ($event) => clickType.value = "serviceFlowList")
|
|
57
|
+
}, " 服务列表 ", 2),
|
|
58
|
+
vue.createElementVNode("label", {
|
|
59
|
+
class: vue.normalizeClass({ selected: clickType.value === "component" }),
|
|
60
|
+
onClick: _cache[1] || (_cache[1] = ($event) => clickType.value = "component")
|
|
61
|
+
}, " 组件库 ", 2)
|
|
62
|
+
])
|
|
63
|
+
]),
|
|
64
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
65
|
+
clickType.value === "serviceFlowList" ? (vue.openBlock(), vue.createBlock(serviceList, {
|
|
66
|
+
key: 0,
|
|
67
|
+
serviceTreeData: __props.serviceTreeData,
|
|
68
|
+
onLoadTreeData: loadTreeData,
|
|
69
|
+
onServiceClick,
|
|
70
|
+
onClearFlowCanvas: clearFlowCanvas
|
|
71
|
+
}, null, 8, ["serviceTreeData"])) : (vue.openBlock(), vue.createBlock(componentPanel, {
|
|
72
|
+
key: 1,
|
|
73
|
+
onDragNode: dragNode
|
|
74
|
+
}))
|
|
75
|
+
])
|
|
76
|
+
], 4);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
module.exports = _sfc_main;
|
|
Binary file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const pinia = require("pinia");
|
|
5
|
+
const useServiceFlowStore = pinia.defineStore("serviceFlowStoreUtil", () => {
|
|
6
|
+
const pageContext = vue.ref({ modelFields: [] });
|
|
7
|
+
const currentService = vue.ref({ variables: [] });
|
|
8
|
+
vue.watch(
|
|
9
|
+
() => pageContext.value.modelFields,
|
|
10
|
+
(newValue, oldValue) => {
|
|
11
|
+
console.log("pageContext.value.modelFields 改变", newValue, oldValue);
|
|
12
|
+
setPageContextVarOptions(pageContext.value);
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
const pageContextVarOptions = vue.ref({
|
|
16
|
+
dataOptions: [],
|
|
17
|
+
systemVarOptions: [],
|
|
18
|
+
pageVarOptions: []
|
|
19
|
+
});
|
|
20
|
+
function setPageContext(newPageContext) {
|
|
21
|
+
pageContext.value = newPageContext;
|
|
22
|
+
setPageContextVarOptions(newPageContext);
|
|
23
|
+
}
|
|
24
|
+
function setPageContextVarOptions(pageObject) {
|
|
25
|
+
if (pageObject) {
|
|
26
|
+
pageObject.modelFields.forEach((element) => {
|
|
27
|
+
pageContextVarOptions.value.dataOptions.push({
|
|
28
|
+
value: element.name,
|
|
29
|
+
label: element.alias,
|
|
30
|
+
type: element.type
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function setVarOptions(variables, parentName, filterArray) {
|
|
36
|
+
const tempVarOptions = [];
|
|
37
|
+
if (variables) {
|
|
38
|
+
variables.forEach((element) => {
|
|
39
|
+
const item = {
|
|
40
|
+
code: element.code,
|
|
41
|
+
value: element.name,
|
|
42
|
+
label: element.alias,
|
|
43
|
+
type: element.type
|
|
44
|
+
};
|
|
45
|
+
if (parentName) {
|
|
46
|
+
item.value = `${parentName}.${element.name}`;
|
|
47
|
+
}
|
|
48
|
+
if (element.items && element.items.length > 0 && element.type !== "array") {
|
|
49
|
+
item.items = setVarOptions(element.items, element.name);
|
|
50
|
+
}
|
|
51
|
+
tempVarOptions.push(item);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return tempVarOptions;
|
|
55
|
+
}
|
|
56
|
+
function getServiceVarOptions() {
|
|
57
|
+
let temp = [];
|
|
58
|
+
if (currentService.value.variables) {
|
|
59
|
+
currentService.value.variables.forEach((element) => {
|
|
60
|
+
temp.push({
|
|
61
|
+
code: element.code,
|
|
62
|
+
value: element.name,
|
|
63
|
+
label: element.alias,
|
|
64
|
+
type: element.type
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
temp = setVarOptions(currentService.value.variables);
|
|
69
|
+
return temp;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
pageContext,
|
|
73
|
+
pageContextVarOptions,
|
|
74
|
+
currentService,
|
|
75
|
+
setPageContext,
|
|
76
|
+
getServiceVarOptions
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
exports.useServiceFlowStore = useServiceFlowStore;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "service-flow-designer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "AgileBuilder Service Flow Designer",
|
|
5
5
|
"license": "ISC",
|
|
6
|
-
"main": "dist/
|
|
6
|
+
"main": "dist/lib/index.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist/*"
|
|
9
9
|
],
|
|
@@ -21,22 +21,20 @@
|
|
|
21
21
|
"format": "prettier --write src/"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
25
|
-
"@types/jsdom": "^21.1.6",
|
|
26
|
-
"@types/node": "^20.11.28",
|
|
27
|
-
"@types/uuid": "^9.0.8",
|
|
28
24
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
29
25
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
30
26
|
"@vue/test-utils": "^2.4.4",
|
|
31
27
|
"cypress": "^13.6.6",
|
|
32
|
-
"element-plus": "^2.6.1",
|
|
33
28
|
"eslint-plugin-cypress": "^2.15.1",
|
|
34
29
|
"jsdom": "^24.0.0",
|
|
35
30
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
36
31
|
"start-server-and-test": "^2.0.3",
|
|
37
32
|
"unplugin-auto-import": "^0.17.5",
|
|
38
33
|
"unplugin-vue-components": "^0.26.0",
|
|
39
|
-
"
|
|
34
|
+
"vite": "^5.1.6",
|
|
35
|
+
"vite-plugin-dts": "^3.9.1",
|
|
36
|
+
"vitest": "^1.3.1",
|
|
37
|
+
"vue-i18n": "^9.5.0"
|
|
40
38
|
},
|
|
41
39
|
"dependencies": {
|
|
42
40
|
"@codemirror/autocomplete": "^6.16.0",
|
|
@@ -48,22 +46,25 @@
|
|
|
48
46
|
"@codemirror/language": "^6.10.1",
|
|
49
47
|
"@codemirror/search": "^6.5.6",
|
|
50
48
|
"@codemirror/state": "^6.4.1",
|
|
49
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
51
50
|
"@imengyu/vue3-context-menu": "^1.4.1",
|
|
52
51
|
"@lezer/highlight": "^1.2.0",
|
|
53
52
|
"@logicflow/core": "^1.2.23",
|
|
54
53
|
"@logicflow/extension": "^1.2.23",
|
|
55
54
|
"@logicflow/layout": "1.2.0-alpha.16",
|
|
55
|
+
"@types/jsdom": "^21.1.6",
|
|
56
|
+
"@types/node": "^20.11.28",
|
|
57
|
+
"@types/uuid": "^9.0.8",
|
|
56
58
|
"@uiw/codemirror-themes-all": "^4.21.25",
|
|
57
59
|
"@vueuse/core": "^10.9.0",
|
|
58
60
|
"agilebuilder-ui": "^1.0.7",
|
|
59
61
|
"codemirror": "^6.0.1",
|
|
62
|
+
"element-plus": "^2.6.1",
|
|
63
|
+
"mitt": "^3.0.1",
|
|
60
64
|
"nprogress": "^0.2.0",
|
|
61
65
|
"pinia": "^2.1.7",
|
|
62
|
-
"quill": "^2.0.
|
|
63
|
-
"quill-delta": "5.1.0",
|
|
66
|
+
"quill": "^2.0.1",
|
|
64
67
|
"uuid": "^8.2.0",
|
|
65
|
-
"vue": "^3.4.21"
|
|
66
|
-
"vue-i18n": "^9.5.0",
|
|
67
|
-
"vuex": "^4.1.0"
|
|
68
|
+
"vue": "^3.4.21"
|
|
68
69
|
}
|
|
69
70
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: import('vue').DefineComponent<{
|
|
3
|
-
modelValue: {
|
|
4
|
-
type: StringConstructor;
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (...args: any[]) => void;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
}>> & {
|
|
15
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
16
|
-
}, {
|
|
17
|
-
modelValue: string;
|
|
18
|
-
}, {}>;
|
|
19
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 深度复制
|
|
3
|
-
* @returns
|
|
4
|
-
*/
|
|
5
|
-
export declare function deepCopy(srcObj: any): any;
|
|
6
|
-
/**
|
|
7
|
-
* 查询表字的字段
|
|
8
|
-
* @param systemCode
|
|
9
|
-
* @param systemVersion
|
|
10
|
-
* @param tableName
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export declare function queryTableFields(systemCode: string, systemVersion: string, tableName: string): Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* 同步选择的参数值到服务变量中
|
|
16
|
-
*/
|
|
17
|
-
export declare function updateServiceParams(updateVariable: string, variableFieldType: string, childItems: Array<any>): void;
|
|
18
|
-
/**
|
|
19
|
-
* 同步选择的参数值到服务返回值中
|
|
20
|
-
*/
|
|
21
|
-
export declare function updateServiceReturns(updateVariable: string, variableFieldType: string, childItems: Array<any>): void;
|