service-flow-designer 2.3.5-flow1 → 2.3.5-sit1-flow1
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/datatable-select.vue.js +1 -1
- package/dist/es/designer/common/components/datatable-select.vue2.js +29 -25
- package/dist/es/designer/common/components/json-view/json-view.vue.js +1 -1
- package/dist/es/designer/common/components/sql-view/sql-view.vue2.js +16 -16
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +1 -1
- 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 +13 -11
- package/dist/es/designer/service-components/database/regular-query/config.vue.js +1 -1
- package/dist/es/designer/service-components/database/regular-query/config.vue2.js +45 -42
- package/dist/es/designer/service-components/service/http-service/response-json-setting.vue.js +4 -4
- package/dist/es/designer/service-components/service/http-service/response-xml-setting.vue.js +4 -4
- package/dist/es/designer/service-flow-view/flow-util.js +4 -7
- package/dist/es/designer/service-flow-view/service-node-config.vue2.js +1 -1
- package/dist/es/designer/service-flow-view/service-test/service-test.vue.js +1 -4
- package/dist/es/designer/service-flow-view/view-index.vue2.js +14 -15
- package/dist/es/designer/service-panel/component-panel.vue2.js +4 -4
- package/dist/es/designer/service-panel/service-list.vue2.js +10 -10
- package/dist/es/designer/service-panel/service-panel.vue2.js +9 -9
- package/dist/es/style.css +7 -7
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./datatable-select.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = t(e, [["__scopeId", "data-v-
|
|
4
|
+
const a = t(e, [["__scopeId", "data-v-075d5fc4"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -10,57 +10,61 @@ import "element-plus/es/components/button/style/css";
|
|
|
10
10
|
import "element-plus/es/components/input/style/css";
|
|
11
11
|
import "element-plus/es/components/select/style/css";
|
|
12
12
|
import "element-plus/es/components/option/style/css";
|
|
13
|
-
import { defineComponent as p, ref as
|
|
13
|
+
import { defineComponent as p, ref as c, watch as m, createBlock as d, openBlock as v, withCtx as g, createVNode as f, createElementBlock as h, Fragment as y, renderList as b, unref as z, createTextVNode as C, createElementVNode as w } from "vue";
|
|
14
14
|
import { Search as V } from "@element-plus/icons-vue";
|
|
15
15
|
import S from "agilebuilder-ui/src/utils/request";
|
|
16
|
-
import { ElMessage as
|
|
17
|
-
const
|
|
18
|
-
const _ = T2, P = p2, x =
|
|
19
|
-
function
|
|
20
|
-
U.value = [], E.value.currentPage = 1, E.value.total = 0
|
|
16
|
+
import { ElMessage as N } from "element-plus";
|
|
17
|
+
const k = { class: "dialog-footer" }, T = p({ name: "DatatableSelect", inheritAttrs: false, __name: "datatable-select", props: { visible: { type: Boolean, default: false }, systemCode: { type: String, default: "" }, systemVersion: { type: Number, default: -1 } }, emits: ["update:visible", "select"], setup(p2, { emit: T2 }) {
|
|
18
|
+
const _ = T2, P = p2, x = c(false), A = c([]), $ = c({ code: "", publishVersion: 1 }), U = c([]), I = c({ searchCode: "", searchName: "" }), B = c({ name: "" }), E = c({ currentPage: 1, pageSize: 20, showTotal: true, total: 0 }), M = c();
|
|
19
|
+
function O(e2) {
|
|
20
|
+
U.value = [], E.value.currentPage = 1, E.value.total = 0;
|
|
21
|
+
const l2 = R(e2);
|
|
22
|
+
$.value = l2, F($.value);
|
|
21
23
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
+
function D() {
|
|
25
|
+
F($.value);
|
|
24
26
|
}
|
|
25
|
-
function
|
|
27
|
+
function F(e2) {
|
|
26
28
|
B.value = { name: "" };
|
|
27
29
|
const l2 = { code: "MMS_MODULE_PAGE", pagination: { currentPage: E.value.currentPage, pageSize: E.value.pageSize, showTotal: true }, searchForm: [], dynamicColumnInfo: [] };
|
|
28
30
|
I.value.searchCode && l2.searchForm.push({ leftBracket: "", rightBracket: "", joinSign: "and", propName: "name", operator: "CONTAIN", dataType: "TEXT", propValue: I.value.searchCode }), I.value.searchName && l2.searchForm.push({ leftBracket: "", rightBracket: "", joinSign: "and", propName: "alias", operator: "CONTAIN", dataType: "TEXT", propValue: I.value.searchName });
|
|
29
|
-
const a2 = e2 || P.systemCode;
|
|
30
|
-
S.post(window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/list/" + a2 + "/0/" +
|
|
31
|
+
const a2 = e2.code || P.systemCode;
|
|
32
|
+
S.post(window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/list/" + a2 + "/0/" + e2.publishVersion, l2).then((e3) => {
|
|
31
33
|
U.value = e3.data, E.value.pageSize = e3.size, E.value.total = e3.total;
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
function
|
|
36
|
+
function j(e2) {
|
|
35
37
|
B.value = e2;
|
|
36
38
|
}
|
|
37
|
-
function
|
|
39
|
+
function J() {
|
|
38
40
|
if (B.value.name) {
|
|
39
|
-
const
|
|
40
|
-
_("select", { dataTable: B.value, system:
|
|
41
|
-
} else
|
|
42
|
-
|
|
41
|
+
const e2 = R($.value.code);
|
|
42
|
+
_("select", { dataTable: B.value, system: e2 }), _("update:visible", false);
|
|
43
|
+
} else N.warning("请选择一条记录!");
|
|
44
|
+
}
|
|
45
|
+
function R(e2) {
|
|
46
|
+
return A.value.find((l2) => l2.code === e2);
|
|
43
47
|
}
|
|
44
48
|
function X() {
|
|
45
49
|
_("update:visible", false);
|
|
46
50
|
}
|
|
47
|
-
|
|
51
|
+
m(() => P.visible, (e2) => {
|
|
48
52
|
x.value = e2, e2 && S.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-charts/findAllSystem").then((e3) => {
|
|
49
53
|
e3 && e3.forEach((e4) => {
|
|
50
54
|
e4.name = e4.name + "(" + e4.publishVersion + ")";
|
|
51
55
|
});
|
|
52
56
|
const l2 = e3.findIndex((e4) => e4.code === P.systemCode);
|
|
53
|
-
|
|
57
|
+
$.value = JSON.parse(JSON.stringify(e3[l2])), A.value = e3, F($.value);
|
|
54
58
|
});
|
|
55
59
|
});
|
|
56
|
-
return (p3,
|
|
57
|
-
const
|
|
58
|
-
return v(), d(
|
|
59
|
-
|
|
60
|
-
}) }, { default: g(() =>
|
|
60
|
+
return (p3, c2) => {
|
|
61
|
+
const m2 = o, S2 = t, N2 = s, T3 = n, _2 = a, P2 = r, B2 = u, R2 = i, q = l, G = e;
|
|
62
|
+
return v(), d(G, { "append-to-body": "", "destroy-on-close": "", modelValue: x.value, "onUpdate:modelValue": c2[7] || (c2[7] = (e2) => x.value = e2), title: "选择数据表", width: "60%", "before-close": X }, { footer: g(() => [w("div", k, [f(T3, { type: "default", size: "small", onClick: c2[6] || (c2[6] = (e2) => x.value = false) }, { default: g(() => c2[9] || (c2[9] = [C("返回")])), _: 1 }), f(T3, { size: "small", type: "primary", onClick: J }, { default: g(() => c2[10] || (c2[10] = [C(" 确定 ")])), _: 1 })])]), default: g(() => [f(q, { style: { height: "400px" } }, { default: g(() => [f(_2, { style: { padding: "0", height: "50px" } }, { default: g(() => [f(S2, { modelValue: $.value.code, "onUpdate:modelValue": c2[0] || (c2[0] = (e2) => $.value.code = e2), onChange: O, "value-key": "code", size: "small", style: { width: "240px" } }, { default: g(() => [(v(true), h(y, null, b(A.value, (e2) => (v(), d(m2, { key: e2.code, label: e2.name, value: e2.code }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"]), f(N2, { size: "small", clearable: "", modelValue: I.value.searchCode, "onUpdate:modelValue": c2[1] || (c2[1] = (e2) => I.value.searchCode = e2), placeholder: "编码", style: { width: "100px" } }, null, 8, ["modelValue"]), f(N2, { size: "small", clearable: "", modelValue: I.value.searchName, "onUpdate:modelValue": c2[2] || (c2[2] = (e2) => I.value.searchName = e2), placeholder: "名称", style: { width: "100px" } }, null, 8, ["modelValue"]), f(T3, { type: "primary", size: "small", icon: z(V), onClick: c2[3] || (c2[3] = (e2) => {
|
|
63
|
+
F($.value);
|
|
64
|
+
}) }, { default: g(() => c2[8] || (c2[8] = [C("查询")])), _: 1 }, 8, ["icon"])]), _: 1 }), f(B2, { ref_key: "tableRef", ref: M, "current-row-key": "code", "row-key": "code", onRowClick: j, data: U.value, "highlight-current-row": "", style: { width: "100%" } }, { default: g(() => [f(P2, { type: "index", width: "50" }), f(P2, { prop: "name", label: "编码" }), f(P2, { prop: "alias", label: "名称" }), f(P2, { prop: "modifierName", label: "修改人" }), f(P2, { prop: "modifiedTime", formatter: (e2) => ((e3) => {
|
|
61
65
|
let l2 = new Date(e3);
|
|
62
66
|
return `${l2.getFullYear()}-${("0" + (l2.getMonth() + 1)).slice(-2)}-${("0" + l2.getDate()).slice(-2)} ${("0" + l2.getHours()).slice(-2)}:${("0" + l2.getMinutes()).slice(-2)}:${("0" + l2.getSeconds()).slice(-2)}`;
|
|
63
|
-
})(e2.modifiedTime), label: "修改时间" }, null, 8, ["formatter"])]), _: 1 }, 8, ["data"]), f(
|
|
67
|
+
})(e2.modifiedTime), label: "修改时间" }, null, 8, ["formatter"])]), _: 1 }, 8, ["data"]), f(R2, { "current-page": E.value.currentPage, "onUpdate:currentPage": c2[4] || (c2[4] = (e2) => E.value.currentPage = e2), "page-size": E.value.pageSize, "onUpdate:pageSize": c2[5] || (c2[5] = (e2) => E.value.pageSize = e2), "page-sizes": [20, 30, 50, 100], small: "", background: "", layout: "total, sizes, prev, pager, next, jumper", total: E.value.total, onSizeChange: D, onCurrentChange: D }, null, 8, ["current-page", "page-size", "total"])]), _: 1 })]), _: 1 }, 8, ["modelValue"]);
|
|
64
68
|
};
|
|
65
69
|
} });
|
|
66
70
|
export {
|
|
@@ -12,7 +12,7 @@ const w = e({ name: "JsonView", inheritAttrs: false, __name: "json-view", props:
|
|
|
12
12
|
if (w2.height) x.value = w2.height + "px";
|
|
13
13
|
else if (b.value) {
|
|
14
14
|
const e4 = b.value.getBoundingClientRect();
|
|
15
|
-
(e4.y || 0 === e4.y) && (
|
|
15
|
+
(e4.y || 0 === e4.y) && (x.value = window.innerHeight - e4.y - 100 + "px");
|
|
16
16
|
}
|
|
17
17
|
const t2 = function(e4) {
|
|
18
18
|
const t3 = function() {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, watch as i, createElementBlock as r, openBlock as l } from "vue";
|
|
2
2
|
import { EditorView as u, basicSetup as m } from "codemirror";
|
|
3
3
|
import { sql as s } from "@codemirror/lang-sql";
|
|
4
4
|
import { Facet as a, EditorState as c } from "@codemirror/state";
|
|
5
5
|
const f = e({ name: "SqlView", inheritAttrs: false, __name: "sql-view", props: { sql: { type: String, default: null }, height: { type: Number, default: 0 }, theme: { type: String, default: null } }, setup(e2) {
|
|
6
|
-
const f2 = e2, d = t(null),
|
|
7
|
-
function
|
|
8
|
-
if (d.value && d.value.destroy(), f2.height)
|
|
9
|
-
else if (
|
|
10
|
-
const e4 =
|
|
11
|
-
(e4.y || 0 === e4.y) && (
|
|
6
|
+
const f2 = e2, d = t(null), p = t(), h = t("400px");
|
|
7
|
+
function v() {
|
|
8
|
+
if (d.value && d.value.destroy(), f2.height) h.value = f2.height + "px";
|
|
9
|
+
else if (p.value) {
|
|
10
|
+
const e4 = p.value.getBoundingClientRect();
|
|
11
|
+
(e4.y || 0 === e4.y) && (h.value = window.innerHeight - e4.y - 100 + "px");
|
|
12
12
|
}
|
|
13
13
|
const e3 = function() {
|
|
14
|
-
const e4 = u.theme({}), t3 = u.theme({ ".cm-content, .cm-gutter": { minHeight:
|
|
15
|
-
return c.create({ doc: f2.sql, extensions: [c.tabSize.of(16), m, s(), e4, t3,
|
|
14
|
+
const e4 = u.theme({}), t3 = u.theme({ ".cm-content, .cm-gutter": { minHeight: h.value }, "&": { height: h.value, maxHeight: h.value, fontSize: "12px" } });
|
|
15
|
+
return c.create({ doc: f2.sql, extensions: [c.tabSize.of(16), m, s(), e4, t3, g.of(true), u.updateListener.of(function(e5) {
|
|
16
16
|
})] });
|
|
17
17
|
}();
|
|
18
18
|
let t2 = document.getElementById("cf-codemirror-view-json");
|
|
19
19
|
t2 && (d.value = new u({ state: e3, parent: t2 }));
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
o(() => {
|
|
22
|
+
n(() => {
|
|
23
|
+
v();
|
|
24
24
|
});
|
|
25
|
-
}),
|
|
26
|
-
|
|
25
|
+
}), i(() => f2.sql, () => {
|
|
26
|
+
v();
|
|
27
27
|
});
|
|
28
|
-
const
|
|
29
|
-
return (e3, t2) => (l(), r("div", { style: { width: "100%" }, ref_key: "cfCodemirrorJsonViewRef", ref:
|
|
28
|
+
const g = a.define({ combine: (e3) => e3.some((e4) => e4) });
|
|
29
|
+
return (e3, t2) => (l(), r("div", { style: { width: "100%" }, ref_key: "cfCodemirrorJsonViewRef", ref: p, id: "cf-codemirror-view-json" }, null, 512));
|
|
30
30
|
} });
|
|
31
31
|
export {
|
|
32
32
|
f as default
|
|
@@ -87,7 +87,7 @@ const B = { key: 0 }, K = { style: { "margin-top": "10px", "font-size": "10px",
|
|
|
87
87
|
const l2 = { code: L(), level: 1, name: re.value, alias: re.value, type: X.autoCreateFieldType ? X.autoCreateFieldType : "string", defaultValue: "", items: [] };
|
|
88
88
|
"array" == l2.type && l2.items.push({ level: l2.level + 1, code: L(), name: "items", isArrayElement: true, alias: "", type: "object", defaultValue: "", items: [] }), Q.currentService.variables || (Q.currentService.variables = []), Q.currentService.variables.push(l2), ne.value.serviceVarOptions = Q.getServiceVarOptions(), Ve(se.value), ie.value = re.value, Z.value = "${" + se.value + "." + re.value + "}", W("update:modelValue", Z.value), pe.value.hide();
|
|
89
89
|
}
|
|
90
|
-
!se.value && ee.value.length > 0 && (se.value = ee.value[0].value, he(se.value)
|
|
90
|
+
!se.value && ee.value.length > 0 && (se.value = ee.value[0].value, he(se.value));
|
|
91
91
|
const xe = v();
|
|
92
92
|
const be = () => {
|
|
93
93
|
ce(), me(), se.value && Ve(se.value), _(() => {
|
|
@@ -8,12 +8,12 @@ import "element-plus/es/components/alert/style/css";
|
|
|
8
8
|
import "element-plus/es/components/form-item/style/css";
|
|
9
9
|
import "element-plus/es/components/input/style/css";
|
|
10
10
|
import "element-plus/es/components/button/style/css";
|
|
11
|
-
import { defineComponent as n, ref as m, onMounted as u, createElementBlock as c, openBlock as d, createVNode as y, withCtx as
|
|
11
|
+
import { defineComponent as n, ref as m, onMounted as u, createElementBlock as c, openBlock as d, createVNode as y, withCtx as b, createElementVNode as v, unref as f, createTextVNode as g } from "vue";
|
|
12
12
|
import { Search as T, View as C, Check as S } from "@element-plus/icons-vue";
|
|
13
13
|
import x from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import { useServiceFlowStore as
|
|
16
|
-
import { queryTableFields as
|
|
14
|
+
import V from "../../../common/components/datatable-select.vue.js";
|
|
15
|
+
import { useServiceFlowStore as j } from "../../../../stores/page-store.js";
|
|
16
|
+
import { queryTableFields as h, updateServiceParams as w, updateServiceReturns as _, getBaseUrl as N } from "../../../../utils/common-util.js";
|
|
17
17
|
import q from "agilebuilder-ui/src/utils/request";
|
|
18
18
|
import "uuid";
|
|
19
19
|
import k from "./dimension-statistical.vue.js";
|
|
@@ -34,12 +34,14 @@ import "@codemirror/state";
|
|
|
34
34
|
import M from "../../../common/components/sql-view/sql-view-dialog.vue.js";
|
|
35
35
|
import "element-plus/es/components/message/style/css";
|
|
36
36
|
const D = { style: { position: "absolute", right: "0" } }, E = { style: { display: "flex" } }, J = n({ __name: "config", props: { properties: { type: Object, default: () => ({ search: {}, noData: {}, result: {} }) }, logicFlowInstance: { type: Object, default: () => ({}) }, currentNode: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, service: { type: Object, default: () => ({}) } }, setup(n2, { expose: J2 }) {
|
|
37
|
-
var _a;
|
|
38
|
-
const B =
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const B = j(), A = n2;
|
|
39
39
|
A.properties.result || (A.properties.result = {});
|
|
40
40
|
const G = m(false), H = m(B.pageContext.systemCode);
|
|
41
41
|
((_a = A.properties) == null ? void 0 : _a.dataTableSystemCode) && (H.value = A.properties.dataTableSystemCode);
|
|
42
|
-
const K = m(B.pageContext.systemVersion)
|
|
42
|
+
const K = m(B.pageContext.systemVersion);
|
|
43
|
+
((_b = A.properties) == null ? void 0 : _b.dataTableSystemVersion) && (K.value = A.properties.dataTableSystemVersion);
|
|
44
|
+
const L = m([]), P = m([]), Q = m([]);
|
|
43
45
|
A.properties.result.valueSetScope || (A.properties.result.valueSetScope = "all");
|
|
44
46
|
const R = m("array"), W = m(false), X = m("");
|
|
45
47
|
function Y() {
|
|
@@ -47,7 +49,7 @@ const D = { style: { position: "absolute", right: "0" } }, E = { style: { displa
|
|
|
47
49
|
}
|
|
48
50
|
function Z() {
|
|
49
51
|
const e2 = A.properties.dataTable, t2 = A.properties.dataTableSystemCode, s2 = A.properties.dataTableSystemVersion;
|
|
50
|
-
e2 ?
|
|
52
|
+
e2 ? h(t2, s2, e2).then((e3) => {
|
|
51
53
|
L.value = e3, P.value = L.value;
|
|
52
54
|
}) : (L.value = [], P.value = L.value);
|
|
53
55
|
}
|
|
@@ -72,7 +74,7 @@ const D = { style: { position: "absolute", right: "0" } }, E = { style: { displa
|
|
|
72
74
|
function te() {
|
|
73
75
|
if (!A.properties.result.setTo) return void i.error("请先设置结果参数!");
|
|
74
76
|
const e2 = "first" == A.properties.result.valueSetScope ? "object" : "array";
|
|
75
|
-
|
|
77
|
+
w(A.properties.result.setTo, e2, Q.value);
|
|
76
78
|
}
|
|
77
79
|
function se() {
|
|
78
80
|
if (!A.properties.result.setTo) return void i.error("请先设置结果参数!");
|
|
@@ -89,8 +91,8 @@ const D = { style: { position: "absolute", right: "0" } }, E = { style: { displa
|
|
|
89
91
|
});
|
|
90
92
|
}
|
|
91
93
|
return J2({}), (i2, m2) => {
|
|
92
|
-
const u2 = o,
|
|
93
|
-
return d(), c("div", null, [y(I2, { "label-width": "100", "label-position": "left", size: "small" }, { default:
|
|
94
|
+
const u2 = o, j2 = s, h2 = t, w2 = l, _2 = a, N2 = p, q2 = r, I2 = e;
|
|
95
|
+
return d(), c("div", null, [y(I2, { "label-width": "100", "label-position": "left", size: "small" }, { default: b(() => [y(z, { properties: n2.properties }, null, 8, ["properties"]), y(h2, { label: "选择数据表" }, { default: b(() => [y(j2, { modelValue: n2.properties.dataTable, "onUpdate:modelValue": m2[1] || (m2[1] = (e2) => n2.properties.dataTable = e2), readonly: "", style: { width: "85%" } }, { append: b(() => [y(u2, { type: "default", icon: f(T), onClick: m2[0] || (m2[0] = (e2) => G.value = !G.value) }, null, 8, ["icon"])]), _: 1 }, 8, ["modelValue"]), v("span", D, [y(u2, { type: "primary", icon: f(C), onClick: oe }, { default: b(() => m2[7] || (m2[7] = [g("预览sql")])), _: 1 }, 8, ["icon"])]), y(V, { visible: G.value, "onUpdate:visible": m2[2] || (m2[2] = (e2) => G.value = e2), modelValue: n2.properties.dataTable, "onUpdate:modelValue": m2[3] || (m2[3] = (e2) => n2.properties.dataTable = e2), systemCode: H.value, systemVersion: K.value, onSelect: $ }, null, 8, ["visible", "modelValue", "systemCode", "systemVersion"])]), _: 1 }), y(w2, { title: "统计维度", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), y(k, { properties: n2.properties, dataTableColumns: P.value, onChange: ee, style: { "margin-bottom": "10 px" } }, null, 8, ["properties", "dataTableColumns"]), y(_2, { style: { "margin-top": "10px", "margin-bottom": "10px", display: "block" }, type: "success" }, { default: b(() => m2[8] || (m2[8] = [g("说明:1.支持自定义日期格式,同SimpleDateFormat,yyyy表示年,MM表示2位月..."), v("br", null, null, -1), g(" 2.未指定新字段名时,输出字段名同选择的字段名"), v("br", null, null, -1), g(" 3.动态维度值有填写时需要匹配才会执行此分组")])), _: 1 }), y(w2, { title: "统计公式", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), y(F, { properties: n2.properties, dataTableColumns: L.value, onChange: ee }, null, 8, ["properties", "dataTableColumns"]), y(_2, { style: { "margin-top": "10px", "margin-bottom": "10px", display: "block" }, type: "success" }, { default: b(() => m2[9] || (m2[9] = [g("说明:1.支持自定义统计公式,如sum(字段1+字段2)")])), _: 1 }), y(w2, { title: "过滤条件", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), y(O, { properties: n2.properties, dataTableColumns: L.value }, null, 8, ["properties", "dataTableColumns"]), y(w2, { title: "排序条件", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), y(U, { properties: n2.properties, dataTableColumns: Q.value }, null, 8, ["properties", "dataTableColumns"]), y(w2, { title: "结果设置", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), y(h2, { label: "", "label-width": "0", style: { width: "100%" } }, { default: b(() => [y(q2, { modelValue: n2.properties.result.valueSetScope, "onUpdate:modelValue": m2[4] || (m2[4] = (e2) => n2.properties.result.valueSetScope = e2), onChange: Y, class: "ml-4" }, { default: b(() => [y(N2, { value: "first" }, { default: b(() => m2[10] || (m2[10] = [g("仅第一条")])), _: 1 }), y(N2, { value: "all" }, { default: b(() => m2[11] || (m2[11] = [g(" 全部 ")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), y(h2, { label: "设置到:", style: { width: "100%" } }, { default: b(() => [v("div", E, [y(f(x), { width: "260", paramTypes: ["service"], modelValue: n2.properties.result.setTo, "onUpdate:modelValue": m2[5] || (m2[5] = (e2) => n2.properties.result.setTo = e2), autoCreateFieldType: R.value }, null, 8, ["modelValue", "autoCreateFieldType"]), y(u2, { icon: f(S), type: "primary", onClick: te, style: { "margin-left": "10px" } }, { default: b(() => m2[12] || (m2[12] = [g(" 更新服务变量 ")])), _: 1 }, 8, ["icon"]), y(u2, { icon: f(S), type: "primary", onClick: se, style: { "margin-left": "10px" } }, { default: b(() => m2[13] || (m2[13] = [g(" 设置为返回值 ")])), _: 1 }, 8, ["icon"])])]), _: 1 })]), _: 1 }), y(f(M), { sql: X.value, "model-value": W.value, "onUpdate:modelValue": m2[6] || (m2[6] = (e2) => W.value = e2) }, null, 8, ["sql", "model-value"])]);
|
|
94
96
|
};
|
|
95
97
|
} });
|
|
96
98
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElMessage as e, ElForm as l, ElFormItem as t, ElInput as a, ElButton as o, ElCheckbox as s, ElAlert as r, ElTable as p, ElTableColumn as i, ElSelect as n, ElOption as d, ElTooltip as m, ElRadioGroup as u, ElRadio as c, ElDivider as b } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/form/style/css";
|
|
4
4
|
import "element-plus/es/components/divider/style/css";
|
|
@@ -14,61 +14,64 @@ import "element-plus/es/components/form-item/style/css";
|
|
|
14
14
|
import "element-plus/es/components/input/style/css";
|
|
15
15
|
import "element-plus/es/components/button/style/css";
|
|
16
16
|
import "element-plus/es/components/checkbox/style/css";
|
|
17
|
-
import { defineComponent as
|
|
18
|
-
import { Search as
|
|
19
|
-
import { getLabel as O, sqlOperators as
|
|
20
|
-
import
|
|
21
|
-
import { getBaseUrl as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { useServiceFlowStore as
|
|
25
|
-
import
|
|
17
|
+
import { defineComponent as y, ref as f, onMounted as V, createElementBlock as h, openBlock as v, createVNode as w, withCtx as g, createElementVNode as k, unref as _, createTextVNode as U, createBlock as T, toDisplayString as x, Fragment as C, renderList as z, createCommentVNode as $ } from "vue";
|
|
18
|
+
import { Search as S, View as D, Minus as j, Plus as E } from "@element-plus/icons-vue";
|
|
19
|
+
import { getLabel as O, sqlOperators as I, logicOperators as q } from "../../util/common-options.js";
|
|
20
|
+
import B from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
21
|
+
import { getBaseUrl as N } from "../../../../utils/common-util.js";
|
|
22
|
+
import A from "agilebuilder-ui/src/utils/request";
|
|
23
|
+
import F from "../../../common/components/datatable-select.vue.js";
|
|
24
|
+
import { useServiceFlowStore as P } from "../../../../stores/page-store.js";
|
|
25
|
+
import M from "../../../common/components/node-base-config.vue.js";
|
|
26
26
|
import "codemirror";
|
|
27
27
|
import "@codemirror/lang-sql";
|
|
28
28
|
import "@codemirror/state";
|
|
29
|
-
import
|
|
30
|
-
import { getNodeRuntimeObject as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
import J from "../../../common/components/sql-view/sql-view-dialog.vue.js";
|
|
30
|
+
import { getNodeRuntimeObject as L } from "../../../service-flow-view/flow-util.js";
|
|
31
|
+
import "element-plus/es/components/message/style/css";
|
|
32
|
+
const R = { style: { position: "absolute", right: "0" } }, G = { key: 0 }, H = { key: 0 }, K = { key: 0 }, Q = { key: 0 }, W = { key: 0 }, X = { key: 0 }, Y = { key: 0 }, Z = y({ __name: "config", props: { properties: { type: Object, default: () => ({ search: {}, noData: {}, result: {} }) }, logicFlowInstance: { type: Object, default: () => ({}) }, currentNode: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, service: { type: Object, default: () => ({}) } }, setup(y2, { expose: Z2 }) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const ee = P(), le = y2, te = f(false), ae = f(""), oe = f(false), se = f([]), re = f(ee.pageContext.systemCode);
|
|
35
|
+
((_a = le.properties) == null ? void 0 : _a.dataTableSystemCode) && (re.value = le.properties.dataTableSystemCode);
|
|
36
|
+
const pe = f(ee.pageContext.systemVersion);
|
|
37
|
+
((_b = le.properties) == null ? void 0 : _b.dataTableSystemVersion) && (pe.value = le.properties.dataTableSystemVersion), le.properties.search || (le.properties.search = {}), le.properties.noData || (le.properties.noData = {}), le.properties.result || (le.properties.result = {}), V(() => {
|
|
38
|
+
if (le.properties.dataTable && le.properties.dataTable !== ee.pageContext.tableName) {
|
|
39
|
+
const l2 = window.$vueApp.config.globalProperties.baseAPI;
|
|
40
|
+
if (!le.properties.dataTableSystemVersion) return void e.warning("未获取到数据表对应的版本。请重新选择数据表");
|
|
41
|
+
A.get(l2 + "/mms/data-tables/table-columns?tableName=" + le.properties.dataTable + "&systemCode=" + le.properties.dataTableSystemCode + "&publishVersion=" + le.properties.dataTableSystemVersion).then((e2) => {
|
|
42
|
+
se.value = e2;
|
|
40
43
|
});
|
|
41
|
-
} else
|
|
44
|
+
} else se.value = ee.pageContext.modelFields;
|
|
42
45
|
});
|
|
43
|
-
const
|
|
46
|
+
const ie = (e2, l2, t2) => {
|
|
44
47
|
e2.$editing = true;
|
|
45
|
-
},
|
|
46
|
-
"sort" === t2 ?
|
|
47
|
-
}, ne = (e2) => {
|
|
48
|
-
ee.properties.dataTable = e2.dataTable.name, ee.properties.dataTableSystemCode = e2.system.code, N.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/table-columns?tableName=" + e2.dataTable.name + "&systemCode=" + e2.system.code + "&publishVersion=" + e2.system.publishVersion).then((e3) => {
|
|
49
|
-
oe.value = e3;
|
|
50
|
-
});
|
|
48
|
+
}, ne = (e2, l2, t2) => {
|
|
49
|
+
"sort" === t2 ? le.properties.sort.splice(e2, 1) : "search" === t2 && le.properties.search.conditions.splice(e2, 1);
|
|
51
50
|
}, de = (e2) => {
|
|
52
|
-
e2
|
|
51
|
+
le.properties.dataTable = e2.dataTable.name, le.properties.dataTableSystemCode = e2.system.code, le.properties.dataTableSystemVersion = e2.system.publishVersion, A.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/table-columns?tableName=" + e2.dataTable.name + "&systemCode=" + e2.system.code + "&publishVersion=" + e2.system.publishVersion).then((e3) => {
|
|
52
|
+
se.value = e3;
|
|
53
|
+
});
|
|
54
|
+
}, me = (e2) => {
|
|
55
|
+
e2 || (le.properties.dataTable = "", se.value = ee.pageContext.modelFields);
|
|
53
56
|
};
|
|
54
57
|
function ue() {
|
|
55
|
-
|
|
56
|
-
const e2 =
|
|
57
|
-
e2.props = JSON.parse(JSON.stringify(
|
|
58
|
-
const l2 =
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
ae.value = "";
|
|
59
|
+
const e2 = L(le.logicFlowInstance.getNodeModelById(le.currentNode.data.id), le.service);
|
|
60
|
+
e2.props = JSON.parse(JSON.stringify(le.properties));
|
|
61
|
+
const l2 = N(le.pageContext.backendUrl, le.pageContext.isTest);
|
|
62
|
+
A.post(l2 + "/dsc/service-flow/test/database-node/show-sql", e2).then((e3) => {
|
|
63
|
+
te.value = true, ae.value = e3;
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
|
-
return
|
|
66
|
+
return Z2({ onClose: () => (le.properties.search.conditions && le.properties.search.conditions.forEach((e2) => {
|
|
64
67
|
e2.$editing && delete e2.$editing;
|
|
65
|
-
}),
|
|
68
|
+
}), le.properties.sort && le.properties.sort.forEach((e2) => {
|
|
66
69
|
e2.$editing && delete e2.$editing;
|
|
67
|
-
}),
|
|
68
|
-
const
|
|
69
|
-
return V(), h("div", null, [v(ve, { "label-width": "auto", "label-position": "left", size: "small" }, { default: g(() => [v(F, { properties: b2.properties }, null, 8, ["properties"]), v(J2, { label: "" }, { label: g((e2) => [v(q2, { onChange: de, modelValue: b2.properties.specifyDataTable, "onUpdate:modelValue": f2[0] || (f2[0] = (e3) => b2.properties.specifyDataTable = e3), label: "指定数据表", style: { width: "100px" } }, null, 8, ["modelValue"])]), default: g(() => [v(A2, { disabled: !b2.properties.specifyDataTable, modelValue: b2.properties.dataTable, "onUpdate:modelValue": f2[2] || (f2[2] = (e2) => b2.properties.dataTable = e2), readonly: "", style: { width: "85%" } }, { append: g(() => [v(N2, { type: "default", icon: k($), onClick: f2[1] || (f2[1] = (e2) => ae.value = !ae.value) }, null, 8, ["icon"])]), _: 1 }, 8, ["disabled", "modelValue"]), w("span", L, [v(N2, { type: "primary", icon: k(D), onClick: ue }, { default: g(() => f2[19] || (f2[19] = [_("预览sql")])), _: 1 }, 8, ["icon"])]), v(P, { visible: ae.value, "onUpdate:visible": f2[3] || (f2[3] = (e2) => ae.value = e2), modelValue: b2.properties.dataTable, "onUpdate:modelValue": f2[4] || (f2[4] = (e2) => b2.properties.dataTable = e2), systemCode: se.value, systemVersion: re.value, onSelect: ne }, null, 8, ["visible", "modelValue", "systemCode", "systemVersion"])]), _: 1 }), v(Y3, { title: "查询条件", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), v(ye, { data: b2.properties.search.conditions, style: { width: "100%", "margin-bottom": "20px" }, "row-key": "code", onRowDblclick: pe, size: "small", border: "", "tree-props": { children: "conditions" }, "default-expand-all": "" }, { default: g(() => [v(Z2, { type: "index", width: "50", label: "序" }), v(Z2, { prop: "name", label: "(((" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, size: "small", modelValue: e2.row.leftBracket, "onUpdate:modelValue": (l2) => e2.row.leftBracket = l2, placeholder: "" }, { default: g(() => [v(me, { label: "", value: "" }), v(me, { label: "(", value: "(" }), v(me, { label: "((", value: "((" }), v(me, { label: "(((", value: "(((" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", R, x(e2.row.leftBracket), 1))]), _: 1 }), v(Z2, { prop: "name", label: "字段名" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, modelValue: e2.row.name, "onUpdate:modelValue": (l2) => e2.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(V(true), h(C, null, T(oe.value, (e3) => (V(), U(me, { key: e3.name, label: e3.alias, value: e3.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", G, x(e2.row.name), 1))]), _: 1 }), v(Z2, { prop: "type", label: "比较" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, modelValue: e2.row.operator, "onUpdate:modelValue": (l2) => e2.row.operator = l2, placeholder: "", size: "small" }, { default: g(() => [(V(true), h(C, null, T(k(S), (e3) => (V(), U(me, { key: e3.value, label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", H, x(k(O)(e2.row.operator, k(S))), 1))]), _: 1 }), v(Z2, { prop: "value", label: "值", width: "150" }, { default: g((e2) => [v(k(I), { customInputTypes: ["data"], showLabel: !e2.row.$editing, size: "small", modelValue: e2.row.value, "onUpdate:modelValue": (l2) => e2.row.value = l2 }, null, 8, ["showLabel", "modelValue", "onUpdate:modelValue"])]), _: 1 }), v(Z2, { prop: "rightBracket", label: ")))" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, size: "small", modelValue: e2.row.rightBracket, "onUpdate:modelValue": (l2) => e2.row.rightBracket = l2, placeholder: "" }, { default: g(() => [v(me, { label: "", value: "" }), v(me, { label: ")", value: ")" }), v(me, { label: "))", value: "))" }), v(me, { label: ")))", value: ")))" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", K, x(e2.row.rightBracket), 1))]), _: 1 }), v(Z2, { prop: "logicOperator", label: "连接符" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, modelValue: e2.row.logicOperator, "onUpdate:modelValue": (l2) => e2.row.logicOperator = l2, placeholder: "", size: "small" }, { default: g(() => [(V(true), h(C, null, T(k(B), (e3) => (V(), U(me, { key: e3.value, label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", Q, x(k(O)(e2.row.logicOperator, k(B))), 1))]), _: 1 }), v(Z2, { align: "center" }, { header: g(() => [v(be, { effect: "dark", content: "添加", placement: "top" }, { default: g(() => [v(N2, { type: "primary", size: "small", icon: k(E), circle: "", onClick: f2[5] || (f2[5] = (e2) => (ee.properties.search.conditions || (ee.properties.search.conditions = []), void ee.properties.search.conditions.push({ prop: "", $editing: true }))) }, null, 8, ["icon"])]), _: 1 })]), default: g((e2) => [w("span", null, [v(be, { effect: "dark", content: "删除", placement: "top" }, { default: g(() => [v(N2, { type: "danger", size: "small", icon: k(j), circle: "", onClick: (l2) => ie(e2.$index, e2.row, "search") }, null, 8, ["icon", "onClick"])]), _: 2 }, 1024)])]), _: 1 })]), _: 1 }, 8, ["data"]), v(J2, { label: "", style: { width: "100%" } }, { label: g((e2) => [v(q2, { modelValue: b2.properties.search.pageEnable, "onUpdate:modelValue": f2[6] || (f2[6] = (e3) => b2.properties.search.pageEnable = e3), label: "分页(offset)" }, null, 8, ["modelValue"])]), default: g(() => [b2.properties.search.pageEnable ? (V(), U(k(I), { key: 0, modelValue: b2.properties.search.page, "onUpdate:modelValue": f2[7] || (f2[7] = (e2) => b2.properties.search.page = e2), customInputTypes: ["data"], size: "small", placeholder: "从变量中获取分页信息" }, null, 8, ["modelValue"])) : z("", true)]), _: 1 }), v(J2, { label: "", style: { width: "100%" } }, { label: g((e2) => [v(q2, { modelValue: b2.properties.search.limitEnable, "onUpdate:modelValue": f2[8] || (f2[8] = (e3) => b2.properties.search.limitEnable = e3), label: "限制数量(limit)" }, null, 8, ["modelValue"])]), default: g(() => [b2.properties.search.limitEnable ? (V(), U(k(I), { key: 0, modelValue: b2.properties.search.limit, "onUpdate:modelValue": f2[9] || (f2[9] = (e2) => b2.properties.search.limit = e2), customInputTypes: ["data"], size: "small", placeholder: "从变量中获取分页大小" }, null, 8, ["modelValue"])) : z("", true)]), _: 1 }), v(J2, { label: "", style: { width: "100%" } }, { label: g((e2) => [v(q2, { modelValue: b2.properties.search.totalEnable, "onUpdate:modelValue": f2[10] || (f2[10] = (e3) => b2.properties.search.totalEnable = e3), label: "设置总条数到变量" }, null, 8, ["modelValue"])]), default: g(() => [b2.properties.search.totalEnable ? (V(), U(k(I), { key: 0, customInputTypes: ["data"], size: "small", modelValue: b2.properties.search.total, "onUpdate:modelValue": f2[11] || (f2[11] = (e2) => b2.properties.search.total = e2) }, null, 8, ["modelValue"])) : z("", true)]), _: 1 }), v(Y3, { title: "排序设置", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), v(ye, { data: b2.properties.sort, style: { width: "100%", "margin-top": "20px", "margin-bottom": "20px" }, "row-key": "code", onRowDblclick: pe, size: "small", border: "", "tree-props": { children: "conditions" }, "default-expand-all": "" }, { default: g(() => [v(Z2, { type: "index", width: "50", label: "序" }), v(Z2, { prop: "name", label: "字段名" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, modelValue: e2.row.name, "onUpdate:modelValue": (l2) => e2.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(V(true), h(C, null, T(oe.value, (e3) => (V(), U(me, { key: e3.name, label: e3.alias, value: e3.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", W, x(e2.row.name), 1))]), _: 1 }), v(Z2, { prop: "order", label: "排序方式" }, { default: g((e2) => [e2.row.$editing ? (V(), U(ce, { key: 1, size: "small", modelValue: e2.row.order, "onUpdate:modelValue": (l2) => e2.row.order = l2, placeholder: "" }, { default: g(() => [v(me, { label: "升序", value: "asc" }), v(me, { label: "降序", value: "desc" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (V(), h("span", X, x(e2.row.order), 1))]), _: 1 }), v(Z2, { align: "center" }, { header: g(() => [v(be, { effect: "dark", content: "添加", placement: "top" }, { default: g(() => [v(N2, { type: "primary", size: "small", icon: k(E), circle: "", onClick: f2[12] || (f2[12] = (e2) => (ee.properties.sort || (ee.properties.sort = []), void ee.properties.sort.push({ prop: "", order: "asc", $editing: true }))) }, null, 8, ["icon"])]), _: 1 })]), default: g((e2) => [w("span", null, [v(be, { effect: "dark", content: "删除", placement: "top" }, { default: g(() => [v(N2, { type: "danger", size: "small", icon: k(j), circle: "", onClick: (l2) => ie(e2.$index, e2.row, "sort") }, null, 8, ["icon", "onClick"])]), _: 2 }, 1024)])]), _: 1 })]), _: 1 }, 8, ["data"]), v(Y3, { title: "查询结果设置", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), v(J2, { label: "", style: { width: "100%" } }, { default: g(() => [v(he, { modelValue: b2.properties.result.valueSetScope, "onUpdate:modelValue": f2[13] || (f2[13] = (e2) => b2.properties.result.valueSetScope = e2), class: "ml-4" }, { default: g(() => [v(fe, { value: "first" }, { default: g(() => f2[20] || (f2[20] = [_("仅第一条")])), _: 1 }), v(fe, { value: "all" }, { default: g(() => f2[21] || (f2[21] = [_(" 全部 ")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), v(J2, { label: "设置到:", style: { width: "100%" } }, { default: g(() => [v(k(I), { paramTypes: ["task", "data", "service"], size: "small", inputSize: "default", modelValue: b2.properties.result.setTo, "onUpdate:modelValue": f2[14] || (f2[14] = (e2) => b2.properties.result.setTo = e2) }, null, 8, ["modelValue"])]), _: 1 }), v(Y3, { title: "对象不存在时", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), v(J2, { label: "", style: { width: "100%" } }, { default: g(() => [v(fe, { modelValue: b2.properties.noData.action, "onUpdate:modelValue": f2[15] || (f2[15] = (e2) => b2.properties.noData.action = e2), value: " ", style: { width: "150px" } }, { default: g(() => f2[22] || (f2[22] = [_(" 继续 ")])), _: 1 }, 8, ["modelValue"])]), _: 1 }), v(J2, { label: "", style: { width: "100%" } }, { label: g((e2) => [v(fe, { modelValue: b2.properties.noData.action, "onUpdate:modelValue": f2[16] || (f2[16] = (e3) => b2.properties.noData.action = e3), value: "throwException", label: "无数据时抛异常" }, null, 8, ["modelValue"])]), default: g(() => [v(A2, { disabled: "throwException" !== b2.properties.noData.action, modelValue: b2.properties.noData.exceptionMessage, "onUpdate:modelValue": f2[17] || (f2[17] = (e2) => b2.properties.noData.exceptionMessage = e2), placeholder: "自定义异常消息" }, null, 8, ["disabled", "modelValue"])]), _: 1 }), v(Ve)]), _: 1 }), v(k(M), { sql: te.value, "model-value": le.value, "onUpdate:modelValue": f2[18] || (f2[18] = (e2) => le.value = e2) }, null, 8, ["sql", "model-value"])]);
|
|
70
|
+
}), le.properties) }), (e2, f2) => {
|
|
71
|
+
const V2 = s, N2 = o, A2 = a, P2 = t, L2 = r, Z3 = i, ee2 = d, ce = n, be = m, ye = p, fe = c, Ve = u, he = b, ve = l;
|
|
72
|
+
return v(), h("div", null, [w(ve, { "label-width": "auto", "label-position": "left", size: "small" }, { default: g(() => [w(M, { properties: y2.properties }, null, 8, ["properties"]), w(P2, { label: "" }, { label: g((e3) => [w(V2, { onChange: me, modelValue: y2.properties.specifyDataTable, "onUpdate:modelValue": f2[0] || (f2[0] = (e4) => y2.properties.specifyDataTable = e4), label: "指定数据表", style: { width: "100px" } }, null, 8, ["modelValue"])]), default: g(() => [w(A2, { disabled: !y2.properties.specifyDataTable, modelValue: y2.properties.dataTable, "onUpdate:modelValue": f2[2] || (f2[2] = (e3) => y2.properties.dataTable = e3), readonly: "", style: { width: "85%" } }, { append: g(() => [w(N2, { type: "default", icon: _(S), onClick: f2[1] || (f2[1] = (e3) => oe.value = !oe.value) }, null, 8, ["icon"])]), _: 1 }, 8, ["disabled", "modelValue"]), k("span", R, [w(N2, { type: "primary", icon: _(D), onClick: ue }, { default: g(() => f2[19] || (f2[19] = [U("预览sql")])), _: 1 }, 8, ["icon"])]), w(F, { visible: oe.value, "onUpdate:visible": f2[3] || (f2[3] = (e3) => oe.value = e3), modelValue: y2.properties.dataTable, "onUpdate:modelValue": f2[4] || (f2[4] = (e3) => y2.properties.dataTable = e3), systemCode: re.value, systemVersion: pe.value, onSelect: de }, null, 8, ["visible", "modelValue", "systemCode", "systemVersion"])]), _: 1 }), w(L2, { title: "查询条件", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), w(ye, { data: y2.properties.search.conditions, style: { width: "100%", "margin-bottom": "20px" }, "row-key": "code", onRowDblclick: ie, size: "small", border: "", "tree-props": { children: "conditions" }, "default-expand-all": "" }, { default: g(() => [w(Z3, { type: "index", width: "50", label: "序" }), w(Z3, { prop: "name", label: "(((" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, size: "small", modelValue: e3.row.leftBracket, "onUpdate:modelValue": (l2) => e3.row.leftBracket = l2, placeholder: "" }, { default: g(() => [w(ee2, { label: "", value: "" }), w(ee2, { label: "(", value: "(" }), w(ee2, { label: "((", value: "((" }), w(ee2, { label: "(((", value: "(((" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", G, x(e3.row.leftBracket), 1))]), _: 1 }), w(Z3, { prop: "name", label: "字段名" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, modelValue: e3.row.name, "onUpdate:modelValue": (l2) => e3.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(v(true), h(C, null, z(se.value, (e4) => (v(), T(ee2, { key: e4.name, label: e4.alias, value: e4.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", H, x(e3.row.name), 1))]), _: 1 }), w(Z3, { prop: "type", label: "比较" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, modelValue: e3.row.operator, "onUpdate:modelValue": (l2) => e3.row.operator = l2, placeholder: "", size: "small" }, { default: g(() => [(v(true), h(C, null, z(_(I), (e4) => (v(), T(ee2, { key: e4.value, label: e4.label, value: e4.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", K, x(_(O)(e3.row.operator, _(I))), 1))]), _: 1 }), w(Z3, { prop: "value", label: "值", width: "150" }, { default: g((e3) => [w(_(B), { customInputTypes: ["data"], showLabel: !e3.row.$editing, size: "small", modelValue: e3.row.value, "onUpdate:modelValue": (l2) => e3.row.value = l2 }, null, 8, ["showLabel", "modelValue", "onUpdate:modelValue"])]), _: 1 }), w(Z3, { prop: "rightBracket", label: ")))" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, size: "small", modelValue: e3.row.rightBracket, "onUpdate:modelValue": (l2) => e3.row.rightBracket = l2, placeholder: "" }, { default: g(() => [w(ee2, { label: "", value: "" }), w(ee2, { label: ")", value: ")" }), w(ee2, { label: "))", value: "))" }), w(ee2, { label: ")))", value: ")))" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", Q, x(e3.row.rightBracket), 1))]), _: 1 }), w(Z3, { prop: "logicOperator", label: "连接符" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, modelValue: e3.row.logicOperator, "onUpdate:modelValue": (l2) => e3.row.logicOperator = l2, placeholder: "", size: "small" }, { default: g(() => [(v(true), h(C, null, z(_(q), (e4) => (v(), T(ee2, { key: e4.value, label: e4.label, value: e4.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", W, x(_(O)(e3.row.logicOperator, _(q))), 1))]), _: 1 }), w(Z3, { align: "center" }, { header: g(() => [w(be, { effect: "dark", content: "添加", placement: "top" }, { default: g(() => [w(N2, { type: "primary", size: "small", icon: _(E), circle: "", onClick: f2[5] || (f2[5] = (e3) => (le.properties.search.conditions || (le.properties.search.conditions = []), void le.properties.search.conditions.push({ prop: "", $editing: true }))) }, null, 8, ["icon"])]), _: 1 })]), default: g((e3) => [k("span", null, [w(be, { effect: "dark", content: "删除", placement: "top" }, { default: g(() => [w(N2, { type: "danger", size: "small", icon: _(j), circle: "", onClick: (l2) => ne(e3.$index, e3.row, "search") }, null, 8, ["icon", "onClick"])]), _: 2 }, 1024)])]), _: 1 })]), _: 1 }, 8, ["data"]), w(P2, { label: "", style: { width: "100%" } }, { label: g((e3) => [w(V2, { modelValue: y2.properties.search.pageEnable, "onUpdate:modelValue": f2[6] || (f2[6] = (e4) => y2.properties.search.pageEnable = e4), label: "分页(offset)" }, null, 8, ["modelValue"])]), default: g(() => [y2.properties.search.pageEnable ? (v(), T(_(B), { key: 0, modelValue: y2.properties.search.page, "onUpdate:modelValue": f2[7] || (f2[7] = (e3) => y2.properties.search.page = e3), customInputTypes: ["data"], size: "small", placeholder: "从变量中获取分页信息" }, null, 8, ["modelValue"])) : $("", true)]), _: 1 }), w(P2, { label: "", style: { width: "100%" } }, { label: g((e3) => [w(V2, { modelValue: y2.properties.search.limitEnable, "onUpdate:modelValue": f2[8] || (f2[8] = (e4) => y2.properties.search.limitEnable = e4), label: "限制数量(limit)" }, null, 8, ["modelValue"])]), default: g(() => [y2.properties.search.limitEnable ? (v(), T(_(B), { key: 0, modelValue: y2.properties.search.limit, "onUpdate:modelValue": f2[9] || (f2[9] = (e3) => y2.properties.search.limit = e3), customInputTypes: ["data"], size: "small", placeholder: "从变量中获取分页大小" }, null, 8, ["modelValue"])) : $("", true)]), _: 1 }), w(P2, { label: "", style: { width: "100%" } }, { label: g((e3) => [w(V2, { modelValue: y2.properties.search.totalEnable, "onUpdate:modelValue": f2[10] || (f2[10] = (e4) => y2.properties.search.totalEnable = e4), label: "设置总条数到变量" }, null, 8, ["modelValue"])]), default: g(() => [y2.properties.search.totalEnable ? (v(), T(_(B), { key: 0, customInputTypes: ["data"], size: "small", modelValue: y2.properties.search.total, "onUpdate:modelValue": f2[11] || (f2[11] = (e3) => y2.properties.search.total = e3) }, null, 8, ["modelValue"])) : $("", true)]), _: 1 }), w(L2, { title: "排序设置", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), w(ye, { data: y2.properties.sort, style: { width: "100%", "margin-top": "20px", "margin-bottom": "20px" }, "row-key": "code", onRowDblclick: ie, size: "small", border: "", "tree-props": { children: "conditions" }, "default-expand-all": "" }, { default: g(() => [w(Z3, { type: "index", width: "50", label: "序" }), w(Z3, { prop: "name", label: "字段名" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, modelValue: e3.row.name, "onUpdate:modelValue": (l2) => e3.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(v(true), h(C, null, z(se.value, (e4) => (v(), T(ee2, { key: e4.name, label: e4.alias, value: e4.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", X, x(e3.row.name), 1))]), _: 1 }), w(Z3, { prop: "order", label: "排序方式" }, { default: g((e3) => [e3.row.$editing ? (v(), T(ce, { key: 1, size: "small", modelValue: e3.row.order, "onUpdate:modelValue": (l2) => e3.row.order = l2, placeholder: "" }, { default: g(() => [w(ee2, { label: "升序", value: "asc" }), w(ee2, { label: "降序", value: "desc" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (v(), h("span", Y, x(e3.row.order), 1))]), _: 1 }), w(Z3, { align: "center" }, { header: g(() => [w(be, { effect: "dark", content: "添加", placement: "top" }, { default: g(() => [w(N2, { type: "primary", size: "small", icon: _(E), circle: "", onClick: f2[12] || (f2[12] = (e3) => (le.properties.sort || (le.properties.sort = []), void le.properties.sort.push({ prop: "", order: "asc", $editing: true }))) }, null, 8, ["icon"])]), _: 1 })]), default: g((e3) => [k("span", null, [w(be, { effect: "dark", content: "删除", placement: "top" }, { default: g(() => [w(N2, { type: "danger", size: "small", icon: _(j), circle: "", onClick: (l2) => ne(e3.$index, e3.row, "sort") }, null, 8, ["icon", "onClick"])]), _: 2 }, 1024)])]), _: 1 })]), _: 1 }, 8, ["data"]), w(L2, { title: "查询结果设置", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), w(P2, { label: "", style: { width: "100%" } }, { default: g(() => [w(Ve, { modelValue: y2.properties.result.valueSetScope, "onUpdate:modelValue": f2[13] || (f2[13] = (e3) => y2.properties.result.valueSetScope = e3), class: "ml-4" }, { default: g(() => [w(fe, { value: "first" }, { default: g(() => f2[20] || (f2[20] = [U("仅第一条")])), _: 1 }), w(fe, { value: "all" }, { default: g(() => f2[21] || (f2[21] = [U(" 全部 ")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), w(P2, { label: "设置到:", style: { width: "100%" } }, { default: g(() => [w(_(B), { paramTypes: ["task", "data", "service"], size: "small", inputSize: "default", modelValue: y2.properties.result.setTo, "onUpdate:modelValue": f2[14] || (f2[14] = (e3) => y2.properties.result.setTo = e3) }, null, 8, ["modelValue"])]), _: 1 }), w(L2, { title: "对象不存在时", type: "info", size: "small", closable: false, style: { "margin-bottom": "20px" } }), w(P2, { label: "", style: { width: "100%" } }, { default: g(() => [w(fe, { modelValue: y2.properties.noData.action, "onUpdate:modelValue": f2[15] || (f2[15] = (e3) => y2.properties.noData.action = e3), value: " ", style: { width: "150px" } }, { default: g(() => f2[22] || (f2[22] = [U(" 继续 ")])), _: 1 }, 8, ["modelValue"])]), _: 1 }), w(P2, { label: "", style: { width: "100%" } }, { label: g((e3) => [w(fe, { modelValue: y2.properties.noData.action, "onUpdate:modelValue": f2[16] || (f2[16] = (e4) => y2.properties.noData.action = e4), value: "throwException", label: "无数据时抛异常" }, null, 8, ["modelValue"])]), default: g(() => [w(A2, { disabled: "throwException" !== y2.properties.noData.action, modelValue: y2.properties.noData.exceptionMessage, "onUpdate:modelValue": f2[17] || (f2[17] = (e3) => y2.properties.noData.exceptionMessage = e3), placeholder: "自定义异常消息" }, null, 8, ["disabled", "modelValue"])]), _: 1 }), w(he)]), _: 1 }), w(_(J), { sql: ae.value, "model-value": te.value, "onUpdate:modelValue": f2[18] || (f2[18] = (e3) => te.value = e3) }, null, 8, ["sql", "model-value"])]);
|
|
70
73
|
};
|
|
71
74
|
} });
|
|
72
75
|
export {
|
|
73
|
-
|
|
76
|
+
Z as default
|
|
74
77
|
};
|
package/dist/es/designer/service-components/service/http-service/response-json-setting.vue.js
CHANGED
|
@@ -9,7 +9,7 @@ import "element-plus/es/components/select/style/css";
|
|
|
9
9
|
import "element-plus/es/components/option/style/css";
|
|
10
10
|
import "element-plus/es/components/table-column/style/css";
|
|
11
11
|
import "element-plus/es/components/input/style/css";
|
|
12
|
-
import { defineComponent as i, createBlock as p, openBlock as d, withCtx as u, createVNode as c, createElementBlock as y, toDisplayString as w, Fragment as f, renderList as v, createCommentVNode as
|
|
12
|
+
import { defineComponent as i, createBlock as p, openBlock as d, withCtx as u, createVNode as c, createElementBlock as y, toDisplayString as w, Fragment as f, renderList as v, createCommentVNode as b, unref as V, createTextVNode as k } from "vue";
|
|
13
13
|
import g from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
14
14
|
import { v4 as h } from "uuid";
|
|
15
15
|
const _ = { key: 0 }, x = { key: 0 }, C = i({ __name: "response-json-setting", props: { modelValue: { type: Array, default: () => [] }, contentType: { type: String, default: "" } }, emits: ["update:modelValue"], setup(i2, { expose: C2, emit: $ }) {
|
|
@@ -37,15 +37,15 @@ const _ = { key: 0 }, x = { key: 0 }, C = i({ __name: "response-json-setting", p
|
|
|
37
37
|
return d(), p(H, { data: i2.modelValue, style: { width: "100%", "margin-top": "20px", "margin-bottom": "20px" }, "row-key": "code", size: "small", onRowDblclick: j, border: "", "tree-props": { children: "items" }, "default-expand-all": "" }, { default: u(() => [c(z2, { prop: "name", label: "返回值字段" }, { default: u((e2) => [e2.row.$editing ? (d(), p($2, { key: 1, size: "small", disabled: e2.row.isArrayElement, modelValue: e2.row.name, "onUpdate:modelValue": (l2) => e2.row.name = l2, placeholder: "" }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])) : (d(), y("span", _, w(e2.row.name), 1))]), _: 1 }), c(z2, { prop: "paramType", width: "100", label: "类型" }, { default: u((e2) => [e2.row.$editing ? (d(), p(R, { key: 1, modelValue: e2.row.paramType, "onUpdate:modelValue": (l2) => e2.row.paramType = l2, onChange: (l2) => {
|
|
38
38
|
return t2 = l2, e2.$index, o2 = e2.row, void ("array" === t2 || o2.items && o2.items.length > 0 && ("object" === t2 ? o2.items = [] : o2.items && delete o2.items));
|
|
39
39
|
var t2, o2;
|
|
40
|
-
}, placeholder: "", size: "small" }, { default: u(() => [(d(), y(f, null, v(U, (e3) => c(D, { key: e3, label: e3, value: e3 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (d(), y("span", x, w(e2.row.paramType), 1))]), _: 1 }), c(z2, { prop: "value", label: "设置到" }, { default: u((e2) => [e2.row.isArrayElement ?
|
|
40
|
+
}, placeholder: "", size: "small" }, { default: u(() => [(d(), y(f, null, v(U, (e3) => c(D, { key: e3, label: e3, value: e3 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (d(), y("span", x, w(e2.row.paramType), 1))]), _: 1 }), c(z2, { prop: "value", label: "设置到" }, { default: u((e2) => [e2.row.isArrayElement ? b("", true) : (d(), p(V(g), { key: 0, showLabel: !e2.row.$editing, size: "small", paramTypes: ["request", "data", "service"], modelValue: e2.row.value, "onUpdate:modelValue": (l2) => e2.row.value = l2 }, null, 8, ["showLabel", "modelValue", "onUpdate:modelValue"]))]), _: 1 }), c(z2, { align: "center", width: 150 }, { header: u(() => [c(S, { type: "primary", size: "small", onClick: A, link: "" }, { default: u(() => C3[0] || (C3[0] = [k("添加 ")])), _: 1 })]), default: u((e2) => [c(G, { size: "small", style: { "vertical-align": "middle" } }, { dropdown: u(() => [c(F, null, { default: u(() => ["object" === e2.row.paramType ? (d(), p(B, { key: 0, onClick: (l2) => ((e3, l3) => {
|
|
41
41
|
l3.items || (l3.items = []);
|
|
42
42
|
const t2 = q();
|
|
43
43
|
t2.level = l3.level + 1, l3.items.push(t2);
|
|
44
|
-
})(e2.$index, e2.row) }, { default: u(() => C3[2] || (C3[2] = [k("添加下级节点")])), _: 2 }, 1032, ["onClick"])) :
|
|
44
|
+
})(e2.$index, e2.row) }, { default: u(() => C3[2] || (C3[2] = [k("添加下级节点")])), _: 2 }, 1032, ["onClick"])) : b("", true), e2.row.isArrayElement ? b("", true) : (d(), p(B, { key: 1, onClick: (l2) => {
|
|
45
45
|
return e2.$index, t2 = e2.row, void E(T.modelValue, t2);
|
|
46
46
|
var t2;
|
|
47
47
|
} }, { default: u(() => C3[3] || (C3[3] = [k("添加相邻节点")])), _: 2 }, 1032, ["onClick"]))]), _: 2 }, 1024)]), default: u(() => [c(S, { type: "primary", link: "", size: "small" }, { default: u(() => C3[1] || (C3[1] = [k(" 添加 ")])), _: 1 })]), _: 2 }, 1024), c(S, { type: "danger", size: "small", disabled: e2.row.isArrayElement, link: "", onClick: (l2) => {
|
|
48
|
-
return e2.$index, t2 = e2.row,
|
|
48
|
+
return e2.$index, t2 = e2.row, void L(T.modelValue, t2);
|
|
49
49
|
var t2;
|
|
50
50
|
} }, { default: u(() => C3[4] || (C3[4] = [k(" 删除 ")])), _: 2 }, 1032, ["disabled", "onClick"])]), _: 1 })]), _: 1 }, 8, ["data"]);
|
|
51
51
|
};
|
package/dist/es/designer/service-components/service/http-service/response-xml-setting.vue.js
CHANGED
|
@@ -9,7 +9,7 @@ import "element-plus/es/components/select/style/css";
|
|
|
9
9
|
import "element-plus/es/components/option/style/css";
|
|
10
10
|
import "element-plus/es/components/table-column/style/css";
|
|
11
11
|
import "element-plus/es/components/input/style/css";
|
|
12
|
-
import { defineComponent as i, createBlock as p, openBlock as d, withCtx as u, createVNode as c, createElementBlock as y, toDisplayString as w, Fragment as f, renderList as v, createCommentVNode as
|
|
12
|
+
import { defineComponent as i, createBlock as p, openBlock as d, withCtx as u, createVNode as c, createElementBlock as y, toDisplayString as w, Fragment as f, renderList as v, createCommentVNode as b, unref as V, createTextVNode as k } from "vue";
|
|
13
13
|
import g from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
14
14
|
import { v4 as h } from "uuid";
|
|
15
15
|
const _ = { key: 0 }, x = { key: 0 }, C = i({ __name: "response-xml-setting", props: { modelValue: { type: Array, default: () => [] }, contentType: { type: String, default: "" } }, emits: ["update:modelValue"], setup(i2, { expose: C2, emit: $ }) {
|
|
@@ -37,15 +37,15 @@ const _ = { key: 0 }, x = { key: 0 }, C = i({ __name: "response-xml-setting", pr
|
|
|
37
37
|
return d(), p(H, { data: i2.modelValue, style: { width: "100%", "margin-top": "20px", "margin-bottom": "20px" }, "row-key": "code", size: "small", onRowDblclick: A, border: "", "tree-props": { children: "items" }, "default-expand-all": "" }, { default: u(() => [c(z2, { prop: "name", label: "返回值字段" }, { default: u((e2) => [e2.row.$editing ? (d(), p($2, { key: 1, size: "small", disabled: e2.row.isArrayElement, modelValue: e2.row.name, "onUpdate:modelValue": (l2) => e2.row.name = l2, placeholder: "" }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])) : (d(), y("span", _, w(e2.row.name), 1))]), _: 1 }), c(z2, { prop: "paramType", width: "100", label: "类型" }, { default: u((e2) => [e2.row.$editing ? (d(), p(R, { key: 1, modelValue: e2.row.paramType, "onUpdate:modelValue": (l2) => e2.row.paramType = l2, onChange: (l2) => {
|
|
38
38
|
return t2 = l2, e2.$index, o2 = e2.row, void ("array" === t2 || o2.items && o2.items.length > 0 && ("object" === t2 ? o2.items = [] : o2.items && delete o2.items));
|
|
39
39
|
var t2, o2;
|
|
40
|
-
}, placeholder: "", size: "small" }, { default: u(() => [(d(), y(f, null, v(U, (e3) => c(D, { key: e3, label: e3, value: e3 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (d(), y("span", x, w(e2.row.paramType), 1))]), _: 1 }), c(z2, { prop: "value", label: "设置到" }, { default: u((e2) => [e2.row.isArrayElement ?
|
|
40
|
+
}, placeholder: "", size: "small" }, { default: u(() => [(d(), y(f, null, v(U, (e3) => c(D, { key: e3, label: e3, value: e3 }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : (d(), y("span", x, w(e2.row.paramType), 1))]), _: 1 }), c(z2, { prop: "value", label: "设置到" }, { default: u((e2) => [e2.row.isArrayElement ? b("", true) : (d(), p(V(g), { key: 0, showLabel: !e2.row.$editing, size: "small", paramTypes: ["request", "data", "service"], modelValue: e2.row.value, "onUpdate:modelValue": (l2) => e2.row.value = l2 }, null, 8, ["showLabel", "modelValue", "onUpdate:modelValue"]))]), _: 1 }), c(z2, { align: "center", width: 150 }, { header: u(() => [c(S, { type: "primary", size: "small", onClick: E, link: "" }, { default: u(() => C3[0] || (C3[0] = [k("添加 ")])), _: 1 })]), default: u((e2) => [c(G, { size: "small", style: { "vertical-align": "middle" } }, { dropdown: u(() => [c(F, null, { default: u(() => ["object" === e2.row.paramType ? (d(), p(B, { key: 0, onClick: (l2) => ((e3, l3) => {
|
|
41
41
|
l3.items || (l3.items = []);
|
|
42
42
|
const t2 = q();
|
|
43
43
|
t2.level = l3.level + 1, l3.items.push(t2);
|
|
44
|
-
})(e2.$index, e2.row) }, { default: u(() => C3[1] || (C3[1] = [k("添加下级节点")])), _: 2 }, 1032, ["onClick"])) :
|
|
44
|
+
})(e2.$index, e2.row) }, { default: u(() => C3[1] || (C3[1] = [k("添加下级节点")])), _: 2 }, 1032, ["onClick"])) : b("", true), e2.row.isArrayElement ? b("", true) : (d(), p(B, { key: 1, onClick: (l2) => {
|
|
45
45
|
return e2.$index, t2 = e2.row, void j(T.modelValue, t2);
|
|
46
46
|
var t2;
|
|
47
47
|
} }, { default: u(() => C3[2] || (C3[2] = [k("添加相邻节点")])), _: 2 }, 1032, ["onClick"]))]), _: 2 }, 1024)]), default: u(() => [c(S, { type: "primary", link: "", size: "small" }, { default: u(() => [k(" 添加 " + w(e2.row.type), 1)]), _: 2 }, 1024)]), _: 2 }, 1024), c(S, { type: "danger", size: "small", disabled: e2.row.isArrayElement, link: "", onClick: (l2) => {
|
|
48
|
-
return e2.$index, t2 = e2.row,
|
|
48
|
+
return e2.$index, t2 = e2.row, void L(T.modelValue, t2);
|
|
49
49
|
var t2;
|
|
50
50
|
} }, { default: u(() => C3[3] || (C3[3] = [k(" 删除 ")])), _: 2 }, 1032, ["disabled", "onClick"])]), _: 1 })]), _: 1 }, 8, ["data"]);
|
|
51
51
|
};
|
|
@@ -3,21 +3,18 @@ import { initNodes as o, serviceComponentGroups as t } from "../service-componen
|
|
|
3
3
|
import s from "../flow/edge/CustomLine.js";
|
|
4
4
|
import r from "@logicflow/core";
|
|
5
5
|
import { Dagre as c } from "@logicflow/layout";
|
|
6
|
-
import { Menu as i, DndPanel as n, SelectionSelect as l, MiniMap as
|
|
6
|
+
import { Menu as i, DndPanel as n, SelectionSelect as l, MiniMap as d, Group as a } from "@logicflow/extension";
|
|
7
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
8
|
function f(e2) {
|
|
9
|
-
return new r({ container: e2, grid: { visible: false, size: 2 }, background: {}, plugins: [i, n, l,
|
|
9
|
+
return new r({ container: e2, grid: { visible: false, size: 2 }, background: {}, plugins: [i, n, l, d, a, c] });
|
|
10
10
|
}
|
|
11
11
|
function u(e2) {
|
|
12
12
|
e2.addNode({ id: "start", type: "start", x: 620, y: 50, properties: {} }), e2.addNode({ type: "end", x: 620, y: 550, properties: {} });
|
|
13
13
|
}
|
|
14
14
|
const m = (e2) => {
|
|
15
15
|
if (e2) {
|
|
16
|
-
for (const t2 of o)
|
|
17
|
-
for (const o2 of t)
|
|
18
|
-
o2.label;
|
|
19
|
-
for (const t2 of o2.items) t2.type, t2.label, e2.register(t2.nodeAndView);
|
|
20
|
-
}
|
|
16
|
+
for (const t2 of o) e2.register(t2.nodeAndView);
|
|
17
|
+
for (const o2 of t) for (const t2 of o2.items) e2.register(t2.nodeAndView);
|
|
21
18
|
e2.register(s), e2.setDefaultEdgeType("customLine");
|
|
22
19
|
}
|
|
23
20
|
};
|
|
@@ -13,7 +13,7 @@ const v = ["id"], w = t({ __name: "service-node-config", props: { service: { typ
|
|
|
13
13
|
I.value || O(), I.value = false, W("update:currentNode", null);
|
|
14
14
|
}
|
|
15
15
|
function O() {
|
|
16
|
-
|
|
16
|
+
C.value && C.value.hasOwnProperty("onClose") && "function" == typeof C.value.onClose && C.value.onClose(), g.currentNode && (["start", "end"].includes(g.currentNode.type) || (C.value && 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)));
|
|
17
17
|
}
|
|
18
18
|
function j(e2) {
|
|
19
19
|
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%";
|
|
@@ -61,10 +61,7 @@ const q = { class: "dialog-footer" }, B = r({ __name: "service-test", props: { m
|
|
|
61
61
|
}).catch((e3) => {
|
|
62
62
|
I.value = e3.response;
|
|
63
63
|
});
|
|
64
|
-
}, Q = () => {
|
|
65
|
-
const e2 = { inputType: R.value, inputJson: F.value, entity: P.value, requestParams: A.value, serviceFlowJson: W(), pageDesignJson: X() };
|
|
66
|
-
return P.value, A.value, e2;
|
|
67
|
-
}, W = () => {
|
|
64
|
+
}, Q = () => ({ inputType: R.value, inputJson: F.value, entity: P.value, requestParams: A.value, serviceFlowJson: W(), pageDesignJson: X() }), W = () => {
|
|
68
65
|
var _a;
|
|
69
66
|
const e2 = JSON.parse(JSON.stringify(B2.cloneService));
|
|
70
67
|
return e2.flow = (_a = B2.lf) == null ? void 0 : _a.getGraphData(), e2.runtimeJson = JSON.stringify(k(e2)), e2.variables = JSON.stringify(e2.variables), e2.log = JSON.stringify(e2.log), e2.flow = JSON.stringify(e2.flow), e2.returnValues = JSON.stringify(e2.returnValues), JSON.stringify(e2);
|
|
@@ -4,7 +4,7 @@ import "element-plus/es/components/drawer/style/css";
|
|
|
4
4
|
import "element-plus/es/components/timeline/style/css";
|
|
5
5
|
import "element-plus/es/components/skeleton/style/css";
|
|
6
6
|
import "element-plus/es/components/skeleton-item/style/css";
|
|
7
|
-
import { defineComponent as t, ref as n, computed as i, onMounted as r, createElementBlock as s, openBlock as u, Fragment as
|
|
7
|
+
import { defineComponent as t, ref as n, computed as i, onMounted as r, createElementBlock as s, openBlock as u, Fragment as v, createElementVNode as c, createVNode as p, withDirectives as d, normalizeStyle as f, vShow as g, withCtx as m, nextTick as w } from "vue";
|
|
8
8
|
import y from "./service-node-config.vue.js";
|
|
9
9
|
import S from "./service-update-log.vue.js";
|
|
10
10
|
import x from "./service-flow-tool.vue.js";
|
|
@@ -20,7 +20,7 @@ import { useServiceFlowStore as j } from "../../stores/page-store.js";
|
|
|
20
20
|
import { ElMessageBox as M, ElMessage as V } from "element-plus";
|
|
21
21
|
const _ = { class: "serviceflow-design-content", ref: "ambServiceFlowContent" }, B = { style: { height: "100%" } }, I = { class: "serviceflow-design-board", ref: "pageDesignBoardMain" }, z = { style: { padding: "200px", "box-sizing": "border-box", height: "100%", "background-color": "#ffffff" } }, G = t({ __name: "view-index", props: { logicFlowInstance: { type: b, default: () => {
|
|
22
22
|
} }, serviceTreeData: { type: Array, default: () => [] }, pageContext: { type: Object, default: () => ({}) } }, emits: ["onBlankClick", "onDeleteNode", "update:logicFlowInstance", "load-tree-data"], setup(t2, { expose: b2, emit: G2 }) {
|
|
23
|
-
const
|
|
23
|
+
const R = j(), T = t2, A = G2, E = n(), L = n(), P = n(), U = n("100%"), H = n(), $ = i(() => ({ height: U.value })), q = n(false), K = n(), Q = n(null), W = n({ code: "", name: "" }), X = n(null);
|
|
24
24
|
r(() => {
|
|
25
25
|
if (H.value) {
|
|
26
26
|
const e2 = H.value.getBoundingClientRect();
|
|
@@ -37,17 +37,16 @@ const _ = { class: "serviceflow-design-content", ref: "ambServiceFlowContent" },
|
|
|
37
37
|
});
|
|
38
38
|
}, le = () => {
|
|
39
39
|
K.value && (K.value.on("connection:not-allowed", (e2) => {
|
|
40
|
-
e2.msg;
|
|
41
40
|
}), K.value.on("blank:click", (e2) => {
|
|
42
|
-
|
|
41
|
+
L.value.onBlankClick();
|
|
43
42
|
}), K.value.on("selection:selected", () => {
|
|
44
43
|
K.value && K.value.extension.selectionSelect.closeSelectionSelect();
|
|
45
44
|
}), K.value.on("node:click", (e2) => {
|
|
46
|
-
X.value && X.value.data.id === e2.data.id || (
|
|
45
|
+
X.value && X.value.data.id === e2.data.id || (L.value.onNodeClick(e2), X.value = e2);
|
|
47
46
|
}), K.value.on("history:change", (e2) => {
|
|
48
47
|
e2.data.undos;
|
|
49
48
|
}), K.value.on("custom:deleteNode", (e2) => {
|
|
50
|
-
X.value &&
|
|
49
|
+
X.value && L.value.onDeleteNode(), A("onDeleteNode");
|
|
51
50
|
}));
|
|
52
51
|
}, oe = (e2) => {
|
|
53
52
|
if (K.value) {
|
|
@@ -55,23 +54,23 @@ const _ = { class: "serviceflow-design-content", ref: "ambServiceFlowContent" },
|
|
|
55
54
|
te() ? M.confirm("服务配置发生变化, 是否需要保存?", "提示", { confirmButtonText: "保存", cancelButtonText: "不保存", closeOnClickModal: false, closeOnPressEscape: false, type: "warning" }).then(() => {
|
|
56
55
|
var _a;
|
|
57
56
|
Q.value = W.value, Q.value.flow = (_a = K.value) == null ? void 0 : _a.getGraphData();
|
|
58
|
-
D(W.value.code,
|
|
57
|
+
D(W.value.code, T.serviceTreeData).name = W.value.name, re({ beforeSave: true });
|
|
59
58
|
}).catch(() => {
|
|
60
59
|
ae(e2);
|
|
61
60
|
}) : ae(e2);
|
|
62
61
|
} else ae(e2);
|
|
63
62
|
}, ae = (e2) => {
|
|
64
|
-
|
|
65
|
-
K.value = k(
|
|
66
|
-
if (
|
|
67
|
-
const e4 =
|
|
63
|
+
L.value.closeDrawer(), W.value = JSON.parse(JSON.stringify(e2)), Q.value = JSON.parse(JSON.stringify(e2)), R.currentService = W.value, ((e3) => {
|
|
64
|
+
K.value = k(E.value), w(() => {
|
|
65
|
+
if (E.value) {
|
|
66
|
+
const e4 = E.value.getBoundingClientRect();
|
|
68
67
|
(e4.y || 0 === e4.y) && (U.value = window.innerHeight - e4.y - 60 - 20 + "px");
|
|
69
68
|
}
|
|
70
69
|
}), K.value.extension.menu.setMenuConfig({ nodeMenu: [], graphMenu: [{ text: "服务属性", callback() {
|
|
71
70
|
q.value = true;
|
|
72
71
|
} }] }), le(), O(K.value), e3.flow && e3.flow.nodes && e3.flow.nodes.length > 0 ? K.value.render(e3.flow) : (K.value.render(), J(K.value));
|
|
73
72
|
const { editConfigModel: l2 } = K.value.graphModel;
|
|
74
|
-
l2.updateEditConfig({ stopMoveGraph: false }),
|
|
73
|
+
l2.updateEditConfig({ stopMoveGraph: false }), A("update:logicFlowInstance", K.value);
|
|
75
74
|
})(W.value);
|
|
76
75
|
}, te = () => {
|
|
77
76
|
if (!K.value) return false;
|
|
@@ -84,7 +83,7 @@ const _ = { class: "serviceflow-design-content", ref: "ambServiceFlowContent" },
|
|
|
84
83
|
W.value.runtimeJson = JSON.stringify(C(W.value));
|
|
85
84
|
const l2 = JSON.parse(JSON.stringify(W.value));
|
|
86
85
|
l2.variables = JSON.stringify(l2.variables), l2.log = JSON.stringify(l2.log), l2.flow = JSON.stringify(l2.flow), l2.returnValues = JSON.stringify(l2.returnValues), h.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/service-flow", { designLog: e2, appServiceFlow: l2 }).then((e3) => {
|
|
87
|
-
e3 && (V({ message: "保存成功", type: "success" }), K.value = null, e3.variables && (e3.variables = JSON.parse(e3.variables)), e3.log && (e3.log = JSON.parse(e3.log)), e3.flow && (e3.flow = JSON.parse(e3.flow)), e3.returnValues && (e3.returnValues = JSON.parse(e3.returnValues)), oe(e3), P.value.closeDialog(),
|
|
86
|
+
e3 && (V({ message: "保存成功", type: "success" }), K.value = null, e3.variables && (e3.variables = JSON.parse(e3.variables)), e3.log && (e3.log = JSON.parse(e3.log)), e3.flow && (e3.flow = JSON.parse(e3.flow)), e3.returnValues && (e3.returnValues = JSON.parse(e3.returnValues)), oe(e3), P.value.closeDialog(), A("load-tree-data"));
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
};
|
|
@@ -94,12 +93,12 @@ const _ = { class: "serviceflow-design-content", ref: "ambServiceFlowContent" },
|
|
|
94
93
|
const se = () => {
|
|
95
94
|
};
|
|
96
95
|
return b2({ onDragNode: (e2) => {
|
|
97
|
-
K.value
|
|
96
|
+
K.value && K.value.dnd.startDrag({ type: e2.type, properties: { name: e2.label } });
|
|
98
97
|
}, onServiceClick: oe, clearFlowCanvas: () => {
|
|
99
98
|
K.value && (K.value.clearData(), K.value = null, Q.value = null, W.value = { code: "", name: "" }, q.value = false, X.value = {});
|
|
100
99
|
} }), (n2, i2) => {
|
|
101
100
|
const r2 = l, w2 = e, b3 = o, h2 = a;
|
|
102
|
-
return u(), s(
|
|
101
|
+
return u(), s(v, null, [c("div", _, [d(c("div", B, [p(x, { cloneService: W.value, lf: K.value, pageContext: t2.pageContext, onShowJson: se, onShowServiceLog: re, onSaveSevice: ne }, null, 8, ["cloneService", "lf", "pageContext"]), c("div", I, [c("div", { style: f($.value), ref_key: "logicFlowContainer", ref: E, class: "container" }, null, 4)], 512)], 512), [[g, K.value]]), d(c("div", { style: f([{ "padding-top": "10px", "box-sizing": "border-box" }, $.value]), ref_key: "emptyContainer", ref: H }, [c("div", z, [p(w2, { style: { "--el-skeleton-circle-size": "100px" } }, { template: m(() => [p(r2, { variant: "circle" }), p(r2, { variant: "rect", style: { width: "100px", height: "100px", margin: "0 50px" } }), i2[2] || (i2[2] = c("div", { class: "triangle" }, null, -1))]), _: 1 }), p(b3, { style: { "max-width": "600px" } })])], 4), [[g, !K.value]]), p(h2, { modelValue: q.value, "onUpdate:modelValue": i2[0] || (i2[0] = (e2) => q.value = e2), "append-to-body": true, "destroy-on-close": "", "modal-class": "el-overlay", modal: true, title: "服务参数", onClose: Z, "before-close": Y, direction: "rtl", size: "50%" }, { default: m(() => [p(N, { service: W.value }, null, 8, ["service"])]), _: 1 }, 8, ["modelValue"])], 512), p(S, { ref_key: "serviceUpdateLogRef", ref: P, onSave: ie, lf: K.value, cloneService: W.value }, null, 8, ["lf", "cloneService"]), p(y, { logicFlowInstance: t2.logicFlowInstance, currentNode: X.value, "onUpdate:currentNode": i2[1] || (i2[1] = (e2) => X.value = e2), sourceService: Q.value, service: W.value, pageContext: t2.pageContext, ref_key: "serviceNodeConfigRef", ref: L }, null, 8, ["logicFlowInstance", "currentNode", "sourceService", "service", "pageContext"])], 64);
|
|
103
102
|
};
|
|
104
103
|
} });
|
|
105
104
|
export {
|
|
@@ -4,15 +4,15 @@ import "element-plus/es/components/collapse/style/css";
|
|
|
4
4
|
import "element-plus/es/components/collapse-item/style/css";
|
|
5
5
|
import "element-plus/es/components/row/style/css";
|
|
6
6
|
import "element-plus/es/components/col/style/css";
|
|
7
|
-
import { defineComponent as n, ref as o, createBlock as m, openBlock as p, withCtx as a, createElementBlock as i, Fragment as u, renderList as r, unref as c, createElementVNode as d, createVNode as f, toDisplayString as
|
|
7
|
+
import { defineComponent as n, ref as o, createBlock as m, openBlock as p, withCtx as a, createElementBlock as i, Fragment as u, renderList as r, unref as c, createElementVNode as d, createVNode as f, toDisplayString as g, createTextVNode as y } from "vue";
|
|
8
8
|
import { serviceComponentGroups as v } from "../service-components/index.js";
|
|
9
9
|
const x = ["src"], _ = { style: { padding: "8px 0px 0px 0px" } }, b = ["title", "onMousedown"], h = ["src"], w = n({ __name: "component-panel", emits: ["drag-node"], setup(n2, { emit: w2 }) {
|
|
10
10
|
const V = w2, M = o(v[0].name);
|
|
11
11
|
return (n3, o2) => {
|
|
12
12
|
const w3 = t, j = s, k = l, U = e;
|
|
13
|
-
return p(), m(U, { modelValue: M.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e2) => M.value = e2), style: { "margin-top": "6px" } }, { default: a(() => [(p(true), i(u, null, r(c(v), (e2, l2) => (p(), m(k, { key: l2, name: e2.name, class: "serviceflow-attr-group-header" }, { title: a(() => [d("img", { src: e2.icon, style: { height: "18px" } }, null, 8, x), o2[1] || (o2[1] =
|
|
14
|
-
|
|
15
|
-
}(e3) }, [d("div", null, [d("img", { src: e3.icon, style: { height: "16px" } }, null, 8, h)]), d("span", null,
|
|
13
|
+
return p(), m(U, { modelValue: M.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e2) => M.value = e2), style: { "margin-top": "6px" } }, { default: a(() => [(p(true), i(u, null, r(c(v), (e2, l2) => (p(), m(k, { key: l2, name: e2.name, class: "serviceflow-attr-group-header" }, { title: a(() => [d("img", { src: e2.icon, style: { height: "18px" } }, null, 8, x), o2[1] || (o2[1] = y(" ")), d("b", null, g(e2.label), 1)]), default: a(() => [d("div", _, [f(j, { gutter: 14 }, { default: a(() => [(p(true), i(u, null, r(e2.items, (e3, l3) => (p(), m(w3, { span: 8 }, { default: a(() => [d("div", { class: "serviceflow-item", title: e3.label, onMousedown: (l4) => function(e4) {
|
|
14
|
+
V("drag-node", e4);
|
|
15
|
+
}(e3) }, [d("div", null, [d("img", { src: e3.icon, style: { height: "16px" } }, null, 8, h)]), d("span", null, g(e3.label), 1)], 40, b)]), _: 2 }, 1024))), 256))]), _: 2 }, 1024)])]), _: 2 }, 1032, ["name"]))), 128))]), _: 1 }, 8, ["modelValue"]);
|
|
16
16
|
};
|
|
17
17
|
} });
|
|
18
18
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElRow as e, ElCol as l, ElInput as a, ElIcon as t, ElTooltip as o, ElButton as n, ElTree as
|
|
1
|
+
import { ElRow as e, ElCol as l, ElInput as a, ElIcon as t, ElTooltip as o, ElButton as n, ElTree as s, ElDialog as u, ElFormItem as i } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/dialog/style/css";
|
|
4
4
|
import "element-plus/es/components/form-item/style/css";
|
|
@@ -31,15 +31,15 @@ const I = { class: "custom-tree-node" }, P = { style: { "margin-left": "5px", "l
|
|
|
31
31
|
K.value = G.value.type, Q.value = JSON.parse(JSON.stringify(G.value)), Q.value.children && delete Q.value.children, H.value = true;
|
|
32
32
|
}, oe = (e2) => {
|
|
33
33
|
Q.value = { code: N(), name: "", customCode: "", type: K.value }, G.value.id && "leaf" === e2 && (Q.value.parentCode = G.value.code), H.value = true;
|
|
34
|
-
}, ne = r([]),
|
|
34
|
+
}, ne = r([]), se = (e2, l2, a2) => {
|
|
35
35
|
l2 ? (ne.value.push(e2.id), e2.children && e2.children.length > 0 && e2.children.forEach((e3) => {
|
|
36
36
|
-1 == ne.value.indexOf(e3.id) && ne.value.push(e3.id);
|
|
37
37
|
})) : (ne.value.splice(ne.value.indexOf(e2.id), 1), e2.children && e2.children.length > 0 && e2.children.forEach((e3) => {
|
|
38
38
|
let l3 = ne.value.indexOf(e3.id);
|
|
39
39
|
l3 > -1 && ne.value.splice(l3, 1);
|
|
40
40
|
}));
|
|
41
|
-
},
|
|
42
|
-
ne.value.length > 0 ? U({ url: window.$vueApp.config.globalProperties.baseAPI + `/component/super-page-design/service-flow/export/${
|
|
41
|
+
}, ue = J.pageContext.systemCode, ie = J.pageContext.systemVersion, de = () => {
|
|
42
|
+
ne.value.length > 0 ? U({ url: window.$vueApp.config.globalProperties.baseAPI + `/component/super-page-design/service-flow/export/${ue}/${ie}`, method: "post", data: ne.value, responseType: "blob" }).then((e2) => {
|
|
43
43
|
let l2 = new Blob([e2], { type: "application/zip" }), a2 = document.createElement("a");
|
|
44
44
|
a2.href = window.URL.createObjectURL(l2), a2.download = "服务编排.zip", a2.click(), window.URL.revokeObjectURL(a2.href);
|
|
45
45
|
}) : A.warning("请选择服务或菜单");
|
|
@@ -50,17 +50,17 @@ const I = { class: "custom-tree-node" }, P = { style: { "margin-left": "5px", "l
|
|
|
50
50
|
if (e2) {
|
|
51
51
|
re.value.value = null;
|
|
52
52
|
const l2 = new FormData();
|
|
53
|
-
l2.append("multipartFile", e2), U({ url: window.$vueApp.config.globalProperties.baseAPI + `/component/super-page-design/service-flow/import/${
|
|
53
|
+
l2.append("multipartFile", e2), U({ url: window.$vueApp.config.globalProperties.baseAPI + `/component/super-page-design/service-flow/import/${ue}/${ie}`, method: "post", headers: { "Content-Type": "multipart/form-data" }, data: l2 }).then(() => {
|
|
54
54
|
A.success("导入成功"), M("load-tree-data");
|
|
55
55
|
}).catch((e3) => {
|
|
56
56
|
});
|
|
57
57
|
} else A.warning("未选择文件");
|
|
58
58
|
}, me = () => {
|
|
59
|
-
Q.value.name ? "MENU" === Q.value.type || Q.value.customCode ? (Q.value
|
|
59
|
+
Q.value.name ? "MENU" === Q.value.type || Q.value.customCode ? (Q.value.systemCode || (Q.value.systemCode = J.pageContext.systemCode), Q.value.publishVersion || (Q.value.publishVersion = J.pageContext.systemVersion), U.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/service-flow", { designLog: null, appServiceFlow: Q.value }).then((e2) => {
|
|
60
60
|
e2 && (Q.value.id ? (M("load-tree-data"), Object.assign(G.value, e2)) : Q.value.parentCode ? (G.value.children || (G.value.children = []), G.value.children.push(e2)) : L.serviceTreeData.push(e2), G.value = {}, A.success("保存成功"), H.value = false, Q.value = {});
|
|
61
61
|
})) : A.warning("自定义编码不能为空") : A.warning("名称不能为空");
|
|
62
62
|
}, ve = () => {
|
|
63
|
-
G.value
|
|
63
|
+
G.value.children && G.value.children.length > 0 ? A.warning("该节点下存在子节点,不能删除!") : T.confirm("确定要删除吗?", "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e2 }) => {
|
|
64
64
|
fe();
|
|
65
65
|
});
|
|
66
66
|
}, fe = () => {
|
|
@@ -79,7 +79,7 @@ const I = { class: "custom-tree-node" }, P = { style: { "margin-left": "5px", "l
|
|
|
79
79
|
e3.variables && (e3.variables = JSON.parse(e3.variables)), e3.log && (e3.log = JSON.parse(e3.log)), e3.flow && (e3.flow = JSON.parse(e3.flow)), e3.returnValues && (e3.returnValues = JSON.parse(e3.returnValues)), W.value = e3, M("service-click", e3);
|
|
80
80
|
});
|
|
81
81
|
}, ge = () => {
|
|
82
|
-
|
|
82
|
+
K.value = G.value.type;
|
|
83
83
|
const e2 = JSON.parse(JSON.stringify(G.value));
|
|
84
84
|
Y.value = { sourceServiceCode: e2.code, publishVersion: e2.publishVersion, code: N() }, X.value = true;
|
|
85
85
|
}, he = () => {
|
|
@@ -91,8 +91,8 @@ const I = { class: "custom-tree-node" }, P = { style: { "margin-left": "5px", "l
|
|
|
91
91
|
}) : A.warning("自定义编码不能为空") : A.warning("名称不能为空");
|
|
92
92
|
};
|
|
93
93
|
return (r2, N2) => {
|
|
94
|
-
const U2 = t, O2 = a, S2 = l, A2 = e, T2 = n, $3 = o, J2 =
|
|
95
|
-
return c(), p("div", null, [m(A2, { style: { "margin-bottom": "10px" } }, { default: f(() => [m(S2, { span: 24 }, { default: f(() => [m(O2, { modelValue: j.value, "onUpdate:modelValue": N2[0] || (N2[0] = (e2) => j.value = e2), placeholder: "搜索" }, { suffix: f(() => [m(U2, null, { default: f(() => [m(y(k))]), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), _: 1 }), m(A2, null, { default: f(() => [m(S2, { span: 24 }, { default: f(() => [m($3, { effect: "dark", content: "导入", placement: "top" }, { default: f(() => [m(T2, { type: "primary", onClick: pe }, { default: f(() => [g("input", { ref_key: "processFile", ref: re, accept: ".zip", name: "processFile", style: { display: "none" }, type: "file", onChange: ce }, null, 544), N2[11] || (N2[11] = h(" 导入 "))]), _: 1 })]), _: 1 }), m($3, { effect: "dark", content: "导出", placement: "top" }, { default: f(() => [m(T2, { type: "primary", onClick: de }, { default: f(() => N2[12] || (N2[12] = [h("导出")])), _: 1 })]), _: 1 }), m($3, { effect: "dark", content: "添加根菜单", placement: "top" }, { default: f(() => [m(T2, { type: "primary", icon: y(V), onClick: le }, null, 8, ["icon"])]), _: 1 })]), _: 1 })]), _: 1 }), m(J2, { style: { "margin-top": "10px" }, ref_key: "serviceTreeRef", ref: F, data: d2.serviceTreeData, "node-key": "id", props: D, "show-checkbox": "", "expand-on-click-node": false, "default-expand-all": true, "highlight-current": "", onNodeClick: ye, onNodeContextmenu: Z, onCheckChange:
|
|
94
|
+
const U2 = t, O2 = a, S2 = l, A2 = e, T2 = n, $3 = o, J2 = s, M2 = i, L2 = u;
|
|
95
|
+
return c(), p("div", null, [m(A2, { style: { "margin-bottom": "10px" } }, { default: f(() => [m(S2, { span: 24 }, { default: f(() => [m(O2, { modelValue: j.value, "onUpdate:modelValue": N2[0] || (N2[0] = (e2) => j.value = e2), placeholder: "搜索" }, { suffix: f(() => [m(U2, null, { default: f(() => [m(y(k))]), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), _: 1 }), m(A2, null, { default: f(() => [m(S2, { span: 24 }, { default: f(() => [m($3, { effect: "dark", content: "导入", placement: "top" }, { default: f(() => [m(T2, { type: "primary", onClick: pe }, { default: f(() => [g("input", { ref_key: "processFile", ref: re, accept: ".zip", name: "processFile", style: { display: "none" }, type: "file", onChange: ce }, null, 544), N2[11] || (N2[11] = h(" 导入 "))]), _: 1 })]), _: 1 }), m($3, { effect: "dark", content: "导出", placement: "top" }, { default: f(() => [m(T2, { type: "primary", onClick: de }, { default: f(() => N2[12] || (N2[12] = [h("导出")])), _: 1 })]), _: 1 }), m($3, { effect: "dark", content: "添加根菜单", placement: "top" }, { default: f(() => [m(T2, { type: "primary", icon: y(V), onClick: le }, null, 8, ["icon"])]), _: 1 })]), _: 1 })]), _: 1 }), m(J2, { style: { "margin-top": "10px" }, ref_key: "serviceTreeRef", ref: F, data: d2.serviceTreeData, "node-key": "id", props: D, "show-checkbox": "", "expand-on-click-node": false, "default-expand-all": true, "highlight-current": "", onNodeClick: ye, onNodeContextmenu: Z, onCheckChange: se }, { default: f(({ node: e2, data: l2 }) => [g("span", I, ["MENU" === l2.type ? (c(), b(U2, { key: 0, size: 16 }, { default: f(() => [m(y(x))]), _: 1 })) : (c(), b(U2, { key: 1, size: 16 }, { default: f(() => [m(y(E))]), _: 1 })), g("span", P, w(e2.label), 1)])]), _: 1 }, 8, ["data"]), m(L2, { modelValue: H.value, "onUpdate:modelValue": N2[4] || (N2[4] = (e2) => H.value = e2), "append-to-body": true, title: "MENU" === K.value ? "菜单" : "服务", width: "500" }, { footer: f(() => [g("div", z, [m(T2, { type: "default", size: "mini", onClick: N2[3] || (N2[3] = (e2) => H.value = false) }, { default: f(() => N2[13] || (N2[13] = [h("返回")])), _: 1 }), m(T2, { size: "mini", type: "primary", onClick: me }, { default: f(() => N2[14] || (N2[14] = [h(" 确定 ")])), _: 1 })])]), default: f(() => ["SERVICE" === K.value ? (c(), b(M2, { key: 0, label: "自定义编码:", required: true }, { default: f(() => [m(O2, { disabled: Q.value.id, modelValue: Q.value.customCode, "onUpdate:modelValue": N2[1] || (N2[1] = (e2) => Q.value.customCode = e2) }, null, 8, ["disabled", "modelValue"])]), _: 1 })) : C("", true), m(M2, { label: " 名称:", required: true }, { default: f(() => [m(O2, { modelValue: Q.value.name, "onUpdate:modelValue": N2[2] || (N2[2] = (e2) => Q.value.name = e2) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 }, 8, ["modelValue", "title"]), m(L2, { modelValue: X.value, "onUpdate:modelValue": N2[8] || (N2[8] = (e2) => X.value = e2), "append-to-body": true, title: "复制服务", width: "500" }, { footer: f(() => [g("div", R, [m(T2, { type: "default", size: "mini", onClick: N2[7] || (N2[7] = (e2) => X.value = false) }, { default: f(() => N2[15] || (N2[15] = [h("返回")])), _: 1 }), m(T2, { size: "mini", type: "primary", onClick: he }, { default: f(() => N2[16] || (N2[16] = [h(" 确定 ")])), _: 1 })])]), default: f(() => [m(M2, { label: "自定义编码:", required: true }, { default: f(() => [m(O2, { modelValue: Y.value.customCode, "onUpdate:modelValue": N2[5] || (N2[5] = (e2) => Y.value.customCode = e2) }, null, 8, ["modelValue"])]), _: 1 }), m(M2, { label: " 名称:", required: true }, { default: f(() => [m(O2, { modelValue: Y.value.name, "onUpdate:modelValue": N2[6] || (N2[6] = (e2) => Y.value.name = e2) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 }, 8, ["modelValue"]), v(g("div", null, [g("ul", { ref_key: "contxtMenuRef", ref: q, class: "context-menu" }, ["MENU" === G.value.type ? (c(), p("li", { key: 0, tabindex: "-1", class: "menu__item", onClick: N2[9] || (N2[9] = (e2) => ae("MENU")) }, N2[17] || (N2[17] = [g("span", null, "添加菜单", -1)]))) : C("", true), "MENU" === G.value.type ? (c(), p("li", { key: 1, tabindex: "-1", class: "menu__item", onClick: N2[10] || (N2[10] = (e2) => ae("SERVICE")) }, N2[18] || (N2[18] = [g("span", null, "添加服务", -1)]))) : C("", true), W.value.code !== G.value.code ? (c(), p("li", { key: 2, tabindex: "-1", class: "menu__item", onClick: te }, N2[19] || (N2[19] = [g("span", null, "修改", -1)]))) : C("", true), "SERVICE" === G.value.type ? (c(), p("li", { key: 3, tabindex: "-1", class: "menu__item", onClick: ge }, N2[20] || (N2[20] = [g("span", null, "复制", -1)]))) : C("", true), g("li", { tabindex: "-1", class: "menu__item", onClick: ve }, N2[21] || (N2[21] = [g("span", null, "删除", -1)]))], 512)], 512), [[_, B.value && G.value]])]);
|
|
96
96
|
};
|
|
97
97
|
} });
|
|
98
98
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a, computed as s, createElementBlock as l, openBlock as o, normalizeStyle as
|
|
1
|
+
import { defineComponent as e, ref as a, computed as s, createElementBlock as l, openBlock as o, normalizeStyle as r, createElementVNode as t, normalizeClass as c, createBlock as i } from "vue";
|
|
2
2
|
import n from "@logicflow/core";
|
|
3
3
|
import v from "./service-list.vue.js";
|
|
4
4
|
import m from "./component-panel.vue.js";
|
|
5
5
|
import "../service-components/index.js";
|
|
6
|
-
const d = { class: "amb-assembly-header" }, p = { class: "amb-assembly-header-type" }, u = { class: "amb-design-assembly-list" },
|
|
6
|
+
const d = { class: "amb-assembly-header" }, p = { class: "amb-assembly-header-type" }, u = { class: "amb-design-assembly-list" }, b = e({ __name: "service-panel", props: { logicFlowInstance: { type: n, default: () => {
|
|
7
7
|
} }, serviceTreeData: { type: Array, default: () => [] } }, emits: ["drag-node", "service-click", "clear-flow-canvas", "load-tree-data"], setup(e2, { emit: n2 }) {
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const b2 = n2, y = a("serviceFlowList"), f = a(), g = s(() => ({ height: f.value + "px" })), w = (e3) => {
|
|
9
|
+
b2("drag-node", e3);
|
|
10
10
|
}, k = (e3) => {
|
|
11
|
-
|
|
11
|
+
b2("service-click", e3);
|
|
12
12
|
}, D = () => {
|
|
13
|
-
|
|
13
|
+
b2("clear-flow-canvas");
|
|
14
14
|
}, C = () => {
|
|
15
|
-
|
|
15
|
+
b2("load-tree-data");
|
|
16
16
|
};
|
|
17
|
-
return (a2, s2) => (o(), l("div", { class: "amb-design-assembly-content", ref: "ambDesignAssemblyContent", style:
|
|
17
|
+
return (a2, s2) => (o(), l("div", { class: "amb-design-assembly-content", ref: "ambDesignAssemblyContent", style: r(g.value) }, [t("div", d, [t("div", p, [t("label", { class: c({ selected: "serviceFlowList" === y.value }), onClick: s2[0] || (s2[0] = (e3) => y.value = "serviceFlowList") }, " 服务列表 ", 2), t("label", { class: c({ selected: "component" === y.value }), onClick: s2[1] || (s2[1] = (e3) => y.value = "component") }, " 组件库 ", 2)])]), t("div", u, ["serviceFlowList" === y.value ? (o(), i(v, { key: 0, serviceTreeData: e2.serviceTreeData, onLoadTreeData: C, onServiceClick: k, onClearFlowCanvas: D }, null, 8, ["serviceTreeData"])) : (o(), i(m, { key: 1, onDragNode: w }))])], 4));
|
|
18
18
|
} });
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
b as default
|
|
21
21
|
};
|
package/dist/es/style.css
CHANGED
|
@@ -1204,27 +1204,27 @@
|
|
|
1204
1204
|
position: static;
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
|
-
.el-select + .el-input[data-v-
|
|
1207
|
+
.el-select + .el-input[data-v-075d5fc4] {
|
|
1208
1208
|
margin-left: 10px;
|
|
1209
1209
|
}
|
|
1210
|
-
.el-input + .el-input[data-v-
|
|
1210
|
+
.el-input + .el-input[data-v-075d5fc4] {
|
|
1211
1211
|
margin-left: 10px;
|
|
1212
1212
|
}
|
|
1213
|
-
.el-input + .el-button[data-v-
|
|
1213
|
+
.el-input + .el-button[data-v-075d5fc4] {
|
|
1214
1214
|
margin-left: 10px;
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
[data-v-
|
|
1217
|
+
[data-v-c119b3b3] .el-radio {
|
|
1218
1218
|
margin: 0;
|
|
1219
1219
|
}
|
|
1220
|
-
.el-radio + .el-radio[data-v-
|
|
1220
|
+
.el-radio + .el-radio[data-v-c119b3b3] {
|
|
1221
1221
|
margin-left: 10px;
|
|
1222
1222
|
}
|
|
1223
1223
|
|
|
1224
|
-
[data-v-
|
|
1224
|
+
[data-v-c47f34ac] .el-radio {
|
|
1225
1225
|
margin: 0;
|
|
1226
1226
|
}
|
|
1227
|
-
.el-radio + .el-radio[data-v-
|
|
1227
|
+
.el-radio + .el-radio[data-v-c47f34ac] {
|
|
1228
1228
|
margin-left: 10px;
|
|
1229
1229
|
}
|
|
1230
1230
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "service-flow-designer",
|
|
3
|
-
"version": "2.3.5-flow1",
|
|
3
|
+
"version": "2.3.5-sit1-flow1",
|
|
4
4
|
"description": "AgileBuilder Service Flow Designer",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@logicflow/layout": "1.2.0-alpha.16",
|
|
62
62
|
"@uiw/codemirror-themes-all": "^4.21.25",
|
|
63
63
|
"@vueuse/core": "^10.9.0",
|
|
64
|
-
"agilebuilder-ui": "1.1.
|
|
64
|
+
"agilebuilder-ui": "1.1.41-sit1",
|
|
65
65
|
"codemirror": "^6.0.1",
|
|
66
66
|
"nprogress": "^0.2.0",
|
|
67
67
|
"pinia": "^2.1.7",
|