service-flow-designer 2.3.7-flow1 → 2.3.12-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/service-components/database/aggregate-query/config.vue.js +1 -1
- 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 +15 -15
- package/dist/es/style.css +4 -4
- package/dist/es/utils/common-util.js +36 -36
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElMessage as e, ElForm as l, ElFormItem as
|
|
1
|
+
import { ElMessage as e, ElForm as l, ElFormItem as a, ElInput as t, ElButton as o, ElCheckbox as s, ElAlert as r, ElTable as p, ElTableColumn as i, ElSelect as n, ElOption as d, ElTooltip as u, ElRadioGroup as m, 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,8 +14,8 @@ 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 y, ref as f, onMounted as V, createElementBlock as
|
|
18
|
-
import { Search as
|
|
17
|
+
import { defineComponent as y, ref as f, onMounted as V, createElementBlock as v, openBlock as h, createVNode as w, withCtx as g, createElementVNode as k, unref as _, createTextVNode as U, createBlock as x, toDisplayString as T, Fragment as z, renderList as C, createCommentVNode as $ } from "vue";
|
|
18
|
+
import { Search as D, View as S, Minus as j, Plus as E } from "@element-plus/icons-vue";
|
|
19
19
|
import { getLabel as O, sqlOperators as I, logicOperators as q } from "../../util/common-options.js";
|
|
20
20
|
import B from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
21
21
|
import { getBaseUrl as N } from "../../../../utils/common-util.js";
|
|
@@ -31,36 +31,36 @@ import { getNodeRuntimeObject as L } from "../../../service-flow-view/flow-util.
|
|
|
31
31
|
import "element-plus/es/components/message/style/css";
|
|
32
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
33
|
var _a, _b;
|
|
34
|
-
const ee = P(), le = y2,
|
|
34
|
+
const ee = P(), le = y2, ae = f(false), te = f(""), oe = f(false), se = f([]), re = f(ee.pageContext.systemCode);
|
|
35
35
|
((_a = le.properties) == null ? void 0 : _a.dataTableSystemCode) && (re.value = le.properties.dataTableSystemCode);
|
|
36
36
|
const pe = f(ee.pageContext.systemVersion);
|
|
37
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
38
|
if (le.properties.dataTable && le.properties.dataTable !== ee.pageContext.tableName) {
|
|
39
39
|
const l2 = window.$vueApp.config.globalProperties.baseAPI;
|
|
40
40
|
if (!le.properties.dataTableSystemVersion) return void e.warning("未获取到数据表对应的版本。请重新选择数据表");
|
|
41
|
-
A.get(l2 + "/mms/data-tables/table-columns?tableName=" + le.properties.dataTable
|
|
41
|
+
A.get(l2 + "/mms/data-tables/table-columns?tableName=" + le.properties.dataTable).then((e2) => {
|
|
42
42
|
se.value = e2;
|
|
43
43
|
});
|
|
44
44
|
} else se.value = ee.pageContext.modelFields;
|
|
45
45
|
});
|
|
46
|
-
const ie = (e2, l2,
|
|
46
|
+
const ie = (e2, l2, a2) => {
|
|
47
47
|
e2.$editing = true;
|
|
48
|
-
}, ne = (e2, l2,
|
|
49
|
-
"sort" ===
|
|
48
|
+
}, ne = (e2, l2, a2) => {
|
|
49
|
+
"sort" === a2 ? le.properties.sort.splice(e2, 1) : "search" === a2 && le.properties.search.conditions.splice(e2, 1);
|
|
50
50
|
}, de = (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
|
|
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).then((e3) => {
|
|
52
52
|
se.value = e3;
|
|
53
53
|
});
|
|
54
|
-
},
|
|
54
|
+
}, ue = (e2) => {
|
|
55
55
|
e2 || (le.properties.dataTable = "", se.value = ee.pageContext.modelFields);
|
|
56
56
|
};
|
|
57
|
-
function
|
|
58
|
-
|
|
57
|
+
function me() {
|
|
58
|
+
te.value = "";
|
|
59
59
|
const e2 = L(le.logicFlowInstance.getNodeModelById(le.currentNode.data.id), le.service);
|
|
60
60
|
e2.props = JSON.parse(JSON.stringify(le.properties));
|
|
61
61
|
const l2 = N(le.pageContext.backendUrl, le.pageContext.isTest);
|
|
62
62
|
A.post(l2 + "/dsc/service-flow/test/database-node/show-sql", e2).then((e3) => {
|
|
63
|
-
|
|
63
|
+
ae.value = true, te.value = e3;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
return Z2({ onClose: () => (le.properties.search.conditions && le.properties.search.conditions.forEach((e2) => {
|
|
@@ -68,8 +68,8 @@ const R = { style: { position: "absolute", right: "0" } }, G = { key: 0 }, H = {
|
|
|
68
68
|
}), le.properties.sort && le.properties.sort.forEach((e2) => {
|
|
69
69
|
e2.$editing && delete e2.$editing;
|
|
70
70
|
}), le.properties) }), (e2, f2) => {
|
|
71
|
-
const V2 = s, N2 = o, A2 =
|
|
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"])]);
|
|
71
|
+
const V2 = s, N2 = o, A2 = t, P2 = a, L2 = r, Z3 = i, ee2 = d, ce = n, be = u, ye = p, fe = c, Ve = m, ve = b, he = l;
|
|
72
|
+
return h(), v("div", null, [w(he, { "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: ue, 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: _(D), 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: _(S), onClick: me }, { 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 ? (h(), x(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"])) : (h(), v("span", G, T(e3.row.leftBracket), 1))]), _: 1 }), w(Z3, { prop: "name", label: "字段名" }, { default: g((e3) => [e3.row.$editing ? (h(), x(ce, { key: 1, modelValue: e3.row.name, "onUpdate:modelValue": (l2) => e3.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(h(true), v(z, null, C(se.value, (e4) => (h(), x(ee2, { key: e4.name, label: e4.alias, value: e4.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (h(), v("span", H, T(e3.row.name), 1))]), _: 1 }), w(Z3, { prop: "type", label: "比较" }, { default: g((e3) => [e3.row.$editing ? (h(), x(ce, { key: 1, modelValue: e3.row.operator, "onUpdate:modelValue": (l2) => e3.row.operator = l2, placeholder: "", size: "small" }, { default: g(() => [(h(true), v(z, null, C(_(I), (e4) => (h(), x(ee2, { key: e4.value, label: e4.label, value: e4.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (h(), v("span", K, T(_(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 ? (h(), x(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"])) : (h(), v("span", Q, T(e3.row.rightBracket), 1))]), _: 1 }), w(Z3, { prop: "logicOperator", label: "连接符" }, { default: g((e3) => [e3.row.$editing ? (h(), x(ce, { key: 1, modelValue: e3.row.logicOperator, "onUpdate:modelValue": (l2) => e3.row.logicOperator = l2, placeholder: "", size: "small" }, { default: g(() => [(h(true), v(z, null, C(_(q), (e4) => (h(), x(ee2, { key: e4.value, label: e4.label, value: e4.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (h(), v("span", W, T(_(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 ? (h(), x(_(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 ? (h(), x(_(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 ? (h(), x(_(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 ? (h(), x(ce, { key: 1, modelValue: e3.row.name, "onUpdate:modelValue": (l2) => e3.row.name = l2, placeholder: "", size: "small" }, { default: g(() => [(h(true), v(z, null, C(se.value, (e4) => (h(), x(ee2, { key: e4.name, label: e4.alias, value: e4.name }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])) : (h(), v("span", X, T(e3.row.name), 1))]), _: 1 }), w(Z3, { prop: "order", label: "排序方式" }, { default: g((e3) => [e3.row.$editing ? (h(), x(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"])) : (h(), v("span", Y, T(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(ve)]), _: 1 }), w(_(J), { sql: te.value, "model-value": ae.value, "onUpdate:modelValue": f2[18] || (f2[18] = (e3) => ae.value = e3) }, null, 8, ["sql", "model-value"])]);
|
|
73
73
|
};
|
|
74
74
|
} });
|
|
75
75
|
export {
|
package/dist/es/style.css
CHANGED
|
@@ -1214,17 +1214,17 @@
|
|
|
1214
1214
|
margin-left: 10px;
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
[data-v-
|
|
1217
|
+
[data-v-44bc8663] .el-radio {
|
|
1218
1218
|
margin: 0;
|
|
1219
1219
|
}
|
|
1220
|
-
.el-radio + .el-radio[data-v-
|
|
1220
|
+
.el-radio + .el-radio[data-v-44bc8663] {
|
|
1221
1221
|
margin-left: 10px;
|
|
1222
1222
|
}
|
|
1223
1223
|
|
|
1224
|
-
[data-v-
|
|
1224
|
+
[data-v-7433f16a] .el-radio {
|
|
1225
1225
|
margin: 0;
|
|
1226
1226
|
}
|
|
1227
|
-
.el-radio + .el-radio[data-v-
|
|
1227
|
+
.el-radio + .el-radio[data-v-7433f16a] {
|
|
1228
1228
|
margin-left: 10px;
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getSystemBackendUrl as t } from "agilebuilder-ui/src/utils/common-util";
|
|
3
3
|
import { useServiceFlowStore as n } from "../stores/page-store.js";
|
|
4
|
-
import { v4 as
|
|
5
|
-
import { ElMessage as
|
|
4
|
+
import { v4 as i } from "uuid";
|
|
5
|
+
import { ElMessage as r, ElMessageBox as s } from "element-plus/es";
|
|
6
6
|
import "element-plus/es/components/base/style/css";
|
|
7
7
|
import "element-plus/es/components/message/style/css";
|
|
8
8
|
import "element-plus/es/components/message-box/style/css";
|
|
9
|
-
function l(t2, n2,
|
|
10
|
-
let
|
|
11
|
-
return
|
|
9
|
+
function l(t2, n2, i2) {
|
|
10
|
+
let r2 = window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/table-columns";
|
|
11
|
+
return r2 += "?tableName=" + (i2 || ""), e.get(r2);
|
|
12
12
|
}
|
|
13
|
-
function o(e2, t2,
|
|
13
|
+
function o(e2, t2, i2) {
|
|
14
14
|
const l2 = e2.replace("${service.", "").replace("}", ""), o2 = a(n().currentService.variables, l2, "");
|
|
15
|
-
o2 ? o2.type != t2 ?
|
|
16
|
-
m(o2, t2,
|
|
17
|
-
}) : m(o2, t2,
|
|
15
|
+
o2 ? o2.type != t2 ? s.confirm("服务变量类型将根据设置修改,确定要继续吗?", "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e3 }) => {
|
|
16
|
+
m(o2, t2, i2);
|
|
17
|
+
}) : m(o2, t2, i2) : r.error("服务变量中未找到设置的变量,请重新设置返回值!");
|
|
18
18
|
}
|
|
19
19
|
function m(e2, t2, n2) {
|
|
20
20
|
if (e2.type != t2) {
|
|
21
21
|
let n3 = e2.items;
|
|
22
22
|
if (n3 = n3 && n3.length > 0 && n3[0].isArrayElement ? n3[0].items : null, e2.items = [], "object" == t2) e2.items = n3 || [];
|
|
23
23
|
else if ("array" == t2) {
|
|
24
|
-
const t3 = { code:
|
|
24
|
+
const t3 = { code: i(), name: "items", isArrayElement: true, alias: "", type: "object", defaultValue: "", items: n3 || [] };
|
|
25
25
|
e2.items = [t3];
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
e2.type = t2, e2.items || (e2.items = []);
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
29
|
+
let s2 = e2.items;
|
|
30
|
+
if (s2 = s2 && s2.length > 0 && s2[0].isArrayElement ? s2[0].items : s2, n2) {
|
|
31
31
|
const e3 = {};
|
|
32
|
-
for (let t3 of
|
|
32
|
+
for (let t3 of s2) e3[t3.name] = t3;
|
|
33
33
|
for (let t3 of n2) {
|
|
34
34
|
if (e3[t3.name]) continue;
|
|
35
|
-
const n3 = { code:
|
|
36
|
-
|
|
35
|
+
const n3 = { code: i(), name: t3.name, alias: t3.alias, type: t3.type, defaultValue: "", items: [] };
|
|
36
|
+
s2.push(n3), e3[n3.name] = n3;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
r.success("更新服务变量成功!");
|
|
40
40
|
}
|
|
41
41
|
function a(e2, t2, n2) {
|
|
42
42
|
if (!e2) return null;
|
|
43
|
-
for (let
|
|
44
|
-
if (!
|
|
45
|
-
let e3 =
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
48
|
-
const n3 = a(
|
|
43
|
+
for (let i2 of e2) {
|
|
44
|
+
if (!i2.name) continue;
|
|
45
|
+
let e3 = i2.name;
|
|
46
|
+
if (i2.isArrayElement ? e3 = n2 : n2 && (e3 = n2 + "." + e3), e3 == t2) return i2;
|
|
47
|
+
if (i2.items) {
|
|
48
|
+
const n3 = a(i2.items, t2, e3);
|
|
49
49
|
if (n3) return n3;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
function u(e2, t2,
|
|
55
|
-
if (!e2) return void
|
|
54
|
+
function u(e2, t2, i2) {
|
|
55
|
+
if (!e2) return void r.error("未找到设置变量,请重新设置!");
|
|
56
56
|
const l2 = n();
|
|
57
57
|
l2.currentService.returnValues || (l2.currentService.returnValues = []);
|
|
58
58
|
const o2 = l2.currentService.returnValues;
|
|
@@ -68,9 +68,9 @@ function u(e2, t2, s2) {
|
|
|
68
68
|
}
|
|
69
69
|
o2.push(m2);
|
|
70
70
|
}
|
|
71
|
-
m2.type != t2 ?
|
|
72
|
-
c(m2, t2,
|
|
73
|
-
}) : c(m2, t2,
|
|
71
|
+
m2.type != t2 ? s.confirm("服务中返回值类型将根据设置修改,确定要继续吗?", "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e3 }) => {
|
|
72
|
+
c(m2, t2, i2);
|
|
73
|
+
}) : c(m2, t2, i2);
|
|
74
74
|
}
|
|
75
75
|
function c(e2, t2, n2) {
|
|
76
76
|
if (e2.type != t2) {
|
|
@@ -82,19 +82,19 @@ function c(e2, t2, n2) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
e2.type = t2, e2.items || (e2.items = []);
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
85
|
+
let s2 = e2.items;
|
|
86
|
+
if (s2 = s2 && s2.length > 0 && s2[0].isArrayElement ? s2[0].items : s2, n2) {
|
|
87
87
|
const t3 = {};
|
|
88
|
-
for (let e3 of
|
|
89
|
-
const
|
|
88
|
+
for (let e3 of s2) e3.value && (t3[e3.value] = e3);
|
|
89
|
+
const r2 = e2.value ? e2.value.replace("${", "").replace("}", "") : "";
|
|
90
90
|
for (let e3 of n2) {
|
|
91
|
-
const n3 = "${" +
|
|
91
|
+
const n3 = "${" + r2 + "." + e3.name + "}";
|
|
92
92
|
if (t3[n3]) continue;
|
|
93
|
-
const l2 = { code:
|
|
94
|
-
|
|
93
|
+
const l2 = { code: i(), name: e3.name, alias: e3.alias, type: e3.type, value: n3, items: [] };
|
|
94
|
+
s2.push(l2), t3[n3] = l2;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
r.success("更新服务返回值成功!");
|
|
98
98
|
}
|
|
99
99
|
function f(e2, t2) {
|
|
100
100
|
if (!e2) return null;
|
|
@@ -108,7 +108,7 @@ function f(e2, t2) {
|
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
110
|
function p() {
|
|
111
|
-
return { code:
|
|
111
|
+
return { code: i(), name: "", type: "any", value: "", items: [] };
|
|
112
112
|
}
|
|
113
113
|
function y(e2, n2) {
|
|
114
114
|
if (n2) return e2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "service-flow-designer",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12-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.50",
|
|
65
65
|
"codemirror": "^6.0.1",
|
|
66
66
|
"nprogress": "^0.2.0",
|
|
67
67
|
"pinia": "^2.1.7",
|