service-flow-designer 2.1.46 → 2.1.53
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/sql-view/sql-view-dialog.vue.js +4 -1
- package/dist/es/designer/common/components/sql-view/sql-view.vue2.js +7 -1
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.d.ts +9 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.js +1 -1
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +9 -5
- 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 +73 -21
- package/dist/es/designer/service-flow-view/flow-util.js +6 -4
- package/dist/es/designer/service-flow-view/service-result.vue.js +1 -1
- package/dist/es/designer/service-panel/service-list.vue.js +1 -1
- package/dist/es/designer/service-panel/service-list.vue2.js +138 -18
- package/dist/es/style.css +313 -313
- package/package.json +2 -2
|
@@ -51,7 +51,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
onClose: close
|
|
52
52
|
}, {
|
|
53
53
|
default: withCtx(() => [
|
|
54
|
-
createVNode(_sfc_main$1, {
|
|
54
|
+
createVNode(_sfc_main$1, {
|
|
55
|
+
sql: __props.sql,
|
|
56
|
+
height: 400
|
|
57
|
+
}, null, 8, ["sql"])
|
|
55
58
|
]),
|
|
56
59
|
_: 1
|
|
57
60
|
}, 8, ["modelValue", "append-to-body"]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, nextTick, openBlock, createElementBlock } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, watch, openBlock, createElementBlock } from "vue";
|
|
2
2
|
import { EditorView, basicSetup } from "codemirror";
|
|
3
3
|
import { sql } from "@codemirror/lang-sql";
|
|
4
4
|
import { Facet, EditorState } from "@codemirror/state";
|
|
@@ -32,6 +32,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
loadEditor();
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
|
+
watch(
|
|
36
|
+
() => props.sql,
|
|
37
|
+
() => {
|
|
38
|
+
loadEditor();
|
|
39
|
+
}
|
|
40
|
+
);
|
|
35
41
|
function loadEditor() {
|
|
36
42
|
if (editor.value) {
|
|
37
43
|
editor.value.destroy();
|
|
@@ -66,6 +66,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
66
66
|
type: StringConstructor;
|
|
67
67
|
required: false;
|
|
68
68
|
};
|
|
69
|
+
placeholder: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
69
73
|
}, {
|
|
70
74
|
setSelectOptions: typeof setSelectOptions;
|
|
71
75
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -137,11 +141,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
137
141
|
type: StringConstructor;
|
|
138
142
|
required: false;
|
|
139
143
|
};
|
|
144
|
+
placeholder: {
|
|
145
|
+
type: StringConstructor;
|
|
146
|
+
default: string;
|
|
147
|
+
};
|
|
140
148
|
}>> & {
|
|
141
149
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
142
150
|
}, {
|
|
143
151
|
size: string;
|
|
144
152
|
modelValue: string;
|
|
153
|
+
placeholder: string;
|
|
145
154
|
width: string;
|
|
146
155
|
paramTypes: string[];
|
|
147
156
|
inputSize: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./value-set-input.vue2.js";
|
|
2
2
|
import "./value-set-input.vue3.js";
|
|
3
3
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ValueSetInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ValueSetInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-21f429a9"]]);
|
|
5
5
|
export {
|
|
6
6
|
ValueSetInput as default
|
|
7
7
|
};
|
|
@@ -18,7 +18,7 @@ import { useServiceFlowStore } from "../../../../stores/page-store.js";
|
|
|
18
18
|
import fileUpload from "../file-upload.vue.js";
|
|
19
19
|
import http from "agilebuilder-ui/src/utils/request";
|
|
20
20
|
import { ElMessage } from "element-plus";
|
|
21
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
21
|
+
const _withScopeId = (n) => (pushScopeId("data-v-21f429a9"), n = n(), popScopeId(), n);
|
|
22
22
|
const _hoisted_1 = { key: 0 };
|
|
23
23
|
const _hoisted_2 = { style: { "margin-top": "10px", "font-size": "10px", "display": "flex", "align-items": "center", "justify-self": "center" } };
|
|
24
24
|
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "margin-left": "5px" } }, "输入变量名后点击加号按钮添加", -1));
|
|
@@ -74,6 +74,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
autoCreateFieldType: {
|
|
75
75
|
type: String,
|
|
76
76
|
required: false
|
|
77
|
+
},
|
|
78
|
+
placeholder: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: "请选择"
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
emits: ["update:modelValue"],
|
|
@@ -345,8 +349,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
345
349
|
const tempOptions = [];
|
|
346
350
|
for (let result of results) {
|
|
347
351
|
tempOptions.push({
|
|
348
|
-
value: result.
|
|
349
|
-
label: result.
|
|
352
|
+
value: result.propKey,
|
|
353
|
+
label: result.propKey + " (" + result.propValue + ")"
|
|
350
354
|
});
|
|
351
355
|
}
|
|
352
356
|
selectOptions.value.systemVarOptions = tempOptions;
|
|
@@ -387,7 +391,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
387
391
|
"prefix-icon": unref(Search),
|
|
388
392
|
modelValue: defalutValue.value,
|
|
389
393
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => defalutValue.value = $event),
|
|
390
|
-
placeholder:
|
|
394
|
+
placeholder: __props.placeholder
|
|
391
395
|
}, {
|
|
392
396
|
append: withCtx(() => [
|
|
393
397
|
createVNode(_component_el_button, {
|
|
@@ -397,7 +401,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
397
401
|
}, null, 8, ["size", "icon"])
|
|
398
402
|
]),
|
|
399
403
|
_: 1
|
|
400
|
-
}, 8, ["style", "size", "prefix-icon", "modelValue"])
|
|
404
|
+
}, 8, ["style", "size", "prefix-icon", "modelValue", "placeholder"])
|
|
401
405
|
]),
|
|
402
406
|
default: withCtx(() => [
|
|
403
407
|
createVNode(_component_el_row, null, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./config.vue2.js";
|
|
2
2
|
import "./config.vue3.js";
|
|
3
3
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const config = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const config = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f9e164ec"]]);
|
|
5
5
|
export {
|
|
6
6
|
config as default
|
|
7
7
|
};
|
|
@@ -14,7 +14,7 @@ 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, ref, onMounted, openBlock, createElementBlock, createVNode, withCtx, unref, createElementVNode, createTextVNode, toDisplayString, createBlock, Fragment, renderList } from "vue";
|
|
17
|
+
import { defineComponent, ref, onMounted, openBlock, createElementBlock, createVNode, withCtx, unref, createElementVNode, createTextVNode, toDisplayString, createBlock, Fragment, renderList, createCommentVNode } from "vue";
|
|
18
18
|
import { Search, View, Plus, Minus } from "@element-plus/icons-vue";
|
|
19
19
|
import { getLabel, sqlOperators, logicOperators } from "../../util/common-options.js";
|
|
20
20
|
import ValueSetInput from "../../../common/components/value-set-input/value-set-input.vue.js";
|
|
@@ -88,9 +88,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
88
|
if (!props.properties.dataTable || props.properties.dataTable === serviceFlowStoreUtil.pageContext.tableName) {
|
|
89
89
|
dataTableColumns.value = serviceFlowStoreUtil.pageContext.modelFields;
|
|
90
90
|
} else {
|
|
91
|
-
|
|
91
|
+
const baseAPI = window["$vueApp"].config.globalProperties.baseAPI;
|
|
92
|
+
http.get(baseAPI + "/mms/systems/getPublishVersionsByCode/" + props.properties.dataTableSystemCode).then((systems) => {
|
|
92
93
|
http.get(
|
|
93
|
-
"/mms/data-tables/table-columns?tableName=" + props.properties.dataTable + "&systemCode=" + props.properties.dataTableSystemCode + "&publishVersion=" + systems[systems.length - 1].publishVersion
|
|
94
|
+
baseAPI + "/mms/data-tables/table-columns?tableName=" + props.properties.dataTable + "&systemCode=" + props.properties.dataTableSystemCode + "&publishVersion=" + systems[systems.length - 1].publishVersion
|
|
94
95
|
).then((res) => {
|
|
95
96
|
dataTableColumns.value = res;
|
|
96
97
|
});
|
|
@@ -100,8 +101,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
100
101
|
const rowDblclick = (row, column, event) => {
|
|
101
102
|
row.$editing = true;
|
|
102
103
|
};
|
|
103
|
-
const handleDelete = (index, row,
|
|
104
|
-
|
|
104
|
+
const handleDelete = (index, row, type) => {
|
|
105
|
+
if (type === "sort") {
|
|
106
|
+
props.properties.sort.splice(index, 1);
|
|
107
|
+
} else if (type === "search") {
|
|
108
|
+
props.properties.search.conditions.splice(index, 1);
|
|
109
|
+
}
|
|
105
110
|
};
|
|
106
111
|
const addSortColumn = () => {
|
|
107
112
|
if (!props.properties.sort) {
|
|
@@ -119,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
124
|
props.properties.dataTable = result.dataTable.name;
|
|
120
125
|
props.properties.dataTableSystemCode = result.system.code;
|
|
121
126
|
http.get(
|
|
122
|
-
"/mms/data-tables/table-columns?tableName=" + result.dataTable.name + "&systemCode=" + result.system.code + "&publishVersion=" + result.system.publishVersion
|
|
127
|
+
window["$vueApp"].config.globalProperties.baseAPI + "/mms/data-tables/table-columns?tableName=" + result.dataTable.name + "&systemCode=" + result.system.code + "&publishVersion=" + result.system.publishVersion
|
|
123
128
|
).then((res) => {
|
|
124
129
|
dataTableColumns.value = res;
|
|
125
130
|
});
|
|
@@ -450,7 +455,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
450
455
|
size: "small",
|
|
451
456
|
icon: unref(Minus),
|
|
452
457
|
circle: "",
|
|
453
|
-
onClick: ($event) => handleDelete(scope.$index, scope.row,
|
|
458
|
+
onClick: ($event) => handleDelete(scope.$index, scope.row, "search")
|
|
454
459
|
}, null, 8, ["icon", "onClick"])
|
|
455
460
|
]),
|
|
456
461
|
_: 2
|
|
@@ -462,6 +467,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
462
467
|
]),
|
|
463
468
|
_: 1
|
|
464
469
|
}, 8, ["data"]),
|
|
470
|
+
createVNode(_component_el_form_item, {
|
|
471
|
+
label: "",
|
|
472
|
+
style: { "width": "100%" }
|
|
473
|
+
}, {
|
|
474
|
+
label: withCtx((scope) => [
|
|
475
|
+
createVNode(_component_el_checkbox, {
|
|
476
|
+
modelValue: __props.properties.search.pageEnable,
|
|
477
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => __props.properties.search.pageEnable = $event),
|
|
478
|
+
label: "分页(offset)"
|
|
479
|
+
}, null, 8, ["modelValue"])
|
|
480
|
+
]),
|
|
481
|
+
default: withCtx(() => [
|
|
482
|
+
__props.properties.search.pageEnable ? (openBlock(), createBlock(unref(ValueSetInput), {
|
|
483
|
+
key: 0,
|
|
484
|
+
modelValue: __props.properties.search.page,
|
|
485
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => __props.properties.search.page = $event),
|
|
486
|
+
customInputTypes: ["data"],
|
|
487
|
+
size: "small",
|
|
488
|
+
placeholder: "从变量中获取分页信息"
|
|
489
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
490
|
+
]),
|
|
491
|
+
_: 1
|
|
492
|
+
}),
|
|
465
493
|
createVNode(_component_el_form_item, {
|
|
466
494
|
label: "",
|
|
467
495
|
style: { "width": "100%" }
|
|
@@ -469,18 +497,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
469
497
|
label: withCtx((scope) => [
|
|
470
498
|
createVNode(_component_el_checkbox, {
|
|
471
499
|
modelValue: __props.properties.search.limitEnable,
|
|
472
|
-
"onUpdate:modelValue": _cache[
|
|
473
|
-
label: "限制数量"
|
|
500
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => __props.properties.search.limitEnable = $event),
|
|
501
|
+
label: "限制数量(limit)"
|
|
474
502
|
}, null, 8, ["modelValue"])
|
|
475
503
|
]),
|
|
476
504
|
default: withCtx(() => [
|
|
477
|
-
|
|
478
|
-
|
|
505
|
+
__props.properties.search.limitEnable ? (openBlock(), createBlock(unref(ValueSetInput), {
|
|
506
|
+
key: 0,
|
|
479
507
|
modelValue: __props.properties.search.limit,
|
|
480
|
-
"onUpdate:modelValue": _cache[
|
|
481
|
-
|
|
508
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => __props.properties.search.limit = $event),
|
|
509
|
+
customInputTypes: ["data"],
|
|
510
|
+
size: "small",
|
|
511
|
+
placeholder: "从变量中获取分页大小"
|
|
512
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
}),
|
|
516
|
+
createVNode(_component_el_form_item, {
|
|
517
|
+
label: "",
|
|
518
|
+
style: { "width": "100%" }
|
|
519
|
+
}, {
|
|
520
|
+
label: withCtx((scope) => [
|
|
521
|
+
createVNode(_component_el_checkbox, {
|
|
522
|
+
modelValue: __props.properties.search.totalEnable,
|
|
523
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => __props.properties.search.totalEnable = $event),
|
|
524
|
+
label: "设置总条数到变量"
|
|
482
525
|
}, null, 8, ["modelValue"])
|
|
483
526
|
]),
|
|
527
|
+
default: withCtx(() => [
|
|
528
|
+
__props.properties.search.totalEnable ? (openBlock(), createBlock(unref(ValueSetInput), {
|
|
529
|
+
key: 0,
|
|
530
|
+
customInputTypes: ["data"],
|
|
531
|
+
size: "small",
|
|
532
|
+
modelValue: __props.properties.search.total,
|
|
533
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => __props.properties.search.total = $event)
|
|
534
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
535
|
+
]),
|
|
484
536
|
_: 1
|
|
485
537
|
}),
|
|
486
538
|
createVNode(_component_el_alert, {
|
|
@@ -572,7 +624,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
572
624
|
size: "small",
|
|
573
625
|
icon: unref(Plus),
|
|
574
626
|
circle: "",
|
|
575
|
-
onClick: _cache[
|
|
627
|
+
onClick: _cache[12] || (_cache[12] = ($event) => addSortColumn())
|
|
576
628
|
}, null, 8, ["icon"])
|
|
577
629
|
]),
|
|
578
630
|
_: 1
|
|
@@ -591,7 +643,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
591
643
|
size: "small",
|
|
592
644
|
icon: unref(Minus),
|
|
593
645
|
circle: "",
|
|
594
|
-
onClick: ($event) => handleDelete(scope.$index, scope.row,
|
|
646
|
+
onClick: ($event) => handleDelete(scope.$index, scope.row, "sort")
|
|
595
647
|
}, null, 8, ["icon", "onClick"])
|
|
596
648
|
]),
|
|
597
649
|
_: 2
|
|
@@ -617,7 +669,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
617
669
|
default: withCtx(() => [
|
|
618
670
|
createVNode(_component_el_radio_group, {
|
|
619
671
|
modelValue: __props.properties.result.valueSetScope,
|
|
620
|
-
"onUpdate:modelValue": _cache[
|
|
672
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => __props.properties.result.valueSetScope = $event),
|
|
621
673
|
class: "ml-4"
|
|
622
674
|
}, {
|
|
623
675
|
default: withCtx(() => [
|
|
@@ -649,7 +701,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
649
701
|
size: "small",
|
|
650
702
|
inputSize: "default",
|
|
651
703
|
modelValue: __props.properties.result.setTo,
|
|
652
|
-
"onUpdate:modelValue": _cache[
|
|
704
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => __props.properties.result.setTo = $event)
|
|
653
705
|
}, null, 8, ["modelValue"])
|
|
654
706
|
]),
|
|
655
707
|
_: 1
|
|
@@ -668,7 +720,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
668
720
|
default: withCtx(() => [
|
|
669
721
|
createVNode(_component_el_radio, {
|
|
670
722
|
modelValue: __props.properties.noData.action,
|
|
671
|
-
"onUpdate:modelValue": _cache[
|
|
723
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => __props.properties.noData.action = $event),
|
|
672
724
|
value: " ",
|
|
673
725
|
style: { "width": "150px" }
|
|
674
726
|
}, {
|
|
@@ -687,7 +739,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
687
739
|
label: withCtx((scope) => [
|
|
688
740
|
createVNode(_component_el_radio, {
|
|
689
741
|
modelValue: __props.properties.noData.action,
|
|
690
|
-
"onUpdate:modelValue": _cache[
|
|
742
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => __props.properties.noData.action = $event),
|
|
691
743
|
value: "throwException",
|
|
692
744
|
label: "无数据时抛异常"
|
|
693
745
|
}, null, 8, ["modelValue"])
|
|
@@ -696,7 +748,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
696
748
|
createVNode(_component_el_input, {
|
|
697
749
|
disabled: __props.properties.noData.action !== "throwException",
|
|
698
750
|
modelValue: __props.properties.noData.exceptionMessage,
|
|
699
|
-
"onUpdate:modelValue": _cache[
|
|
751
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => __props.properties.noData.exceptionMessage = $event),
|
|
700
752
|
placeholder: "自定义异常消息"
|
|
701
753
|
}, null, 8, ["disabled", "modelValue"])
|
|
702
754
|
]),
|
|
@@ -709,7 +761,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
709
761
|
createVNode(unref(_sfc_main$2), {
|
|
710
762
|
sql: sql.value,
|
|
711
763
|
"model-value": showSqlViewDialog.value,
|
|
712
|
-
"onUpdate:modelValue": _cache[
|
|
764
|
+
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => showSqlViewDialog.value = $event)
|
|
713
765
|
}, null, 8, ["sql", "model-value"])
|
|
714
766
|
]);
|
|
715
767
|
};
|
|
@@ -123,10 +123,12 @@ function getNodeRuntimeObject(node, service) {
|
|
|
123
123
|
tempNode.children = node.children;
|
|
124
124
|
}
|
|
125
125
|
tempNode.tos = [];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
if (service.flow) {
|
|
127
|
+
const nextNodes = getNextNodeById(node, service.flow);
|
|
128
|
+
nextNodes.forEach((nextNode) => {
|
|
129
|
+
tempNode.tos.push({ code: nextNode.id });
|
|
130
|
+
});
|
|
131
|
+
}
|
|
130
132
|
return tempNode;
|
|
131
133
|
}
|
|
132
134
|
export {
|
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
30
|
if (!props.service.returnValues) {
|
|
31
31
|
props.service.returnValues = [];
|
|
32
32
|
}
|
|
33
|
-
const typeOptions = ["any", "array", "object"];
|
|
33
|
+
const typeOptions = ["any", "array", "object", "string", "number", "date"];
|
|
34
34
|
let selEditRow = null;
|
|
35
35
|
const rowDblclick = (row) => {
|
|
36
36
|
row.$editing = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./service-list.vue2.js";
|
|
2
2
|
import "./service-list.vue3.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ServiceList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ServiceList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-da8fc67a"]]);
|
|
5
5
|
export {
|
|
6
6
|
ServiceList as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ElIcon, ElInput, ElCol, ElButton, ElTooltip,
|
|
1
|
+
import { ElIcon, ElInput, ElCol, ElRow, ElButton, ElTooltip, ElTree, ElFormItem, ElDialog } 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";
|
|
5
5
|
import "element-plus/es/components/tree/style/css";
|
|
6
|
-
import "element-plus/es/components/row/style/css";
|
|
7
6
|
import "element-plus/es/components/tooltip/style/css";
|
|
8
7
|
import "element-plus/es/components/button/style/css";
|
|
8
|
+
import "element-plus/es/components/row/style/css";
|
|
9
9
|
import "element-plus/es/components/col/style/css";
|
|
10
10
|
import "element-plus/es/components/input/style/css";
|
|
11
11
|
import "element-plus/es/components/icon/style/css";
|
|
12
|
-
import { defineComponent, ref, openBlock, createElementBlock, createVNode, withCtx, unref, createElementVNode, createBlock, toDisplayString,
|
|
12
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, withCtx, unref, createElementVNode, createTextVNode, createBlock, toDisplayString, createCommentVNode, withDirectives, vShow, pushScopeId, popScopeId } from "vue";
|
|
13
13
|
import { Search, Plus, Menu, Promotion } from "@element-plus/icons-vue";
|
|
14
14
|
import { v4 } from "uuid";
|
|
15
15
|
import http from "agilebuilder-ui/src/utils/request";
|
|
16
16
|
import { findServcieByCode } from "../common/util/node-util.js";
|
|
17
17
|
import { useServiceFlowStore } from "../../stores/page-store.js";
|
|
18
18
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
19
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
19
|
+
const _withScopeId = (n) => (pushScopeId("data-v-da8fc67a"), n = n(), popScopeId(), n);
|
|
20
20
|
const _hoisted_1 = { class: "custom-tree-node" };
|
|
21
21
|
const _hoisted_2 = { style: { "margin-left": "5px", "line-height": "14px", "font-size": "14px" } };
|
|
22
22
|
const _hoisted_3 = { class: "dialog-footer" };
|
|
@@ -77,11 +77,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
};
|
|
78
78
|
const addRootServiceMenu = () => {
|
|
79
79
|
editType.value = "MENU";
|
|
80
|
-
createService();
|
|
80
|
+
createService("root");
|
|
81
81
|
};
|
|
82
82
|
const addServce = (type) => {
|
|
83
83
|
editType.value = type;
|
|
84
|
-
createService();
|
|
84
|
+
createService("leaf");
|
|
85
85
|
};
|
|
86
86
|
const editServiceBaseInfo = () => {
|
|
87
87
|
editType.value = contextMenuData.value.type;
|
|
@@ -91,18 +91,89 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
}
|
|
92
92
|
dialogVisible.value = true;
|
|
93
93
|
};
|
|
94
|
-
const createService = () => {
|
|
94
|
+
const createService = (addType) => {
|
|
95
95
|
serviceFlow.value = {
|
|
96
96
|
code: v4(),
|
|
97
97
|
name: "",
|
|
98
98
|
customCode: "",
|
|
99
99
|
type: editType.value
|
|
100
100
|
};
|
|
101
|
-
if (contextMenuData.value.id) {
|
|
101
|
+
if (contextMenuData.value.id && addType === "leaf") {
|
|
102
102
|
serviceFlow.value.parentCode = contextMenuData.value.code;
|
|
103
103
|
}
|
|
104
104
|
dialogVisible.value = true;
|
|
105
105
|
};
|
|
106
|
+
const selectIds = ref([]);
|
|
107
|
+
const handleCheckChange = (data, checked, indeterminate) => {
|
|
108
|
+
if (checked) {
|
|
109
|
+
selectIds.value.push(data.id);
|
|
110
|
+
if (data.children && data.children.length > 0) {
|
|
111
|
+
data.children.forEach((item) => {
|
|
112
|
+
if (selectIds.value.indexOf(item.id) == -1) {
|
|
113
|
+
selectIds.value.push(item.id);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
selectIds.value.splice(selectIds.value.indexOf(data.id), 1);
|
|
119
|
+
if (data.children && data.children.length > 0) {
|
|
120
|
+
data.children.forEach((item) => {
|
|
121
|
+
let index = selectIds.value.indexOf(item.id);
|
|
122
|
+
if (index > -1) {
|
|
123
|
+
selectIds.value.splice(index, 1);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const systemCode = serviceFlowStoreUtil.pageContext.systemCode;
|
|
130
|
+
const publishVersion = serviceFlowStoreUtil.pageContext.systemVersion;
|
|
131
|
+
const derive = () => {
|
|
132
|
+
if (selectIds.value.length > 0) {
|
|
133
|
+
http({
|
|
134
|
+
url: window["$vueApp"].config.globalProperties.baseAPI + `/component/super-page-design/service-flow/export/${systemCode}/${publishVersion}`,
|
|
135
|
+
method: "post",
|
|
136
|
+
data: selectIds.value,
|
|
137
|
+
responseType: "blob"
|
|
138
|
+
}).then((res) => {
|
|
139
|
+
let blob = new Blob([res], {
|
|
140
|
+
type: "application/zip"
|
|
141
|
+
});
|
|
142
|
+
let link = document.createElement("a");
|
|
143
|
+
link.href = window.URL.createObjectURL(blob);
|
|
144
|
+
link.download = "服务编排.zip";
|
|
145
|
+
link.click();
|
|
146
|
+
window.URL.revokeObjectURL(link.href);
|
|
147
|
+
});
|
|
148
|
+
} else {
|
|
149
|
+
ElMessage.warning("请选择服务或菜单");
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const processFile = ref(null);
|
|
153
|
+
const selectDataFile = (command) => {
|
|
154
|
+
processFile.value.click();
|
|
155
|
+
};
|
|
156
|
+
const importPage = () => {
|
|
157
|
+
const fileObj = processFile.value.files[0];
|
|
158
|
+
if (fileObj) {
|
|
159
|
+
processFile.value.value = null;
|
|
160
|
+
const param = new FormData();
|
|
161
|
+
param.append("multipartFile", fileObj);
|
|
162
|
+
http({
|
|
163
|
+
url: window["$vueApp"].config.globalProperties.baseAPI + `/component/super-page-design/service-flow/import/${systemCode}/${publishVersion}`,
|
|
164
|
+
method: "post",
|
|
165
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
166
|
+
data: param
|
|
167
|
+
}).then(() => {
|
|
168
|
+
ElMessage.success("导入成功");
|
|
169
|
+
emits("load-tree-data");
|
|
170
|
+
}).catch((error) => {
|
|
171
|
+
console.log("error==", error);
|
|
172
|
+
});
|
|
173
|
+
} else {
|
|
174
|
+
ElMessage.warning("未选择文件");
|
|
175
|
+
}
|
|
176
|
+
};
|
|
106
177
|
const saveServiceBaseInfo = () => {
|
|
107
178
|
if (!serviceFlow.value.name) {
|
|
108
179
|
ElMessage.warning("名称不能为空");
|
|
@@ -198,16 +269,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
198
269
|
const _component_el_icon = ElIcon;
|
|
199
270
|
const _component_el_input = ElInput;
|
|
200
271
|
const _component_el_col = ElCol;
|
|
272
|
+
const _component_el_row = ElRow;
|
|
201
273
|
const _component_el_button = ElButton;
|
|
202
274
|
const _component_el_tooltip = ElTooltip;
|
|
203
|
-
const _component_el_row = ElRow;
|
|
204
275
|
const _component_el_tree = ElTree;
|
|
205
276
|
const _component_el_form_item = ElFormItem;
|
|
206
277
|
const _component_el_dialog = ElDialog;
|
|
207
278
|
return openBlock(), createElementBlock("div", null, [
|
|
208
|
-
createVNode(_component_el_row,
|
|
279
|
+
createVNode(_component_el_row, { style: { "margin-bottom": "10px" } }, {
|
|
209
280
|
default: withCtx(() => [
|
|
210
|
-
createVNode(_component_el_col, { span:
|
|
281
|
+
createVNode(_component_el_col, { span: 24 }, {
|
|
211
282
|
default: withCtx(() => [
|
|
212
283
|
createVNode(_component_el_input, {
|
|
213
284
|
modelValue: search.value,
|
|
@@ -226,12 +297,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
226
297
|
}, 8, ["modelValue"])
|
|
227
298
|
]),
|
|
228
299
|
_: 1
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
300
|
+
})
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}),
|
|
304
|
+
createVNode(_component_el_row, null, {
|
|
305
|
+
default: withCtx(() => [
|
|
306
|
+
createVNode(_component_el_col, { span: 24 }, {
|
|
234
307
|
default: withCtx(() => [
|
|
308
|
+
createVNode(_component_el_tooltip, {
|
|
309
|
+
effect: "dark",
|
|
310
|
+
content: "导入",
|
|
311
|
+
placement: "top"
|
|
312
|
+
}, {
|
|
313
|
+
default: withCtx(() => [
|
|
314
|
+
createVNode(_component_el_button, {
|
|
315
|
+
type: "primary",
|
|
316
|
+
onClick: selectDataFile
|
|
317
|
+
}, {
|
|
318
|
+
default: withCtx(() => [
|
|
319
|
+
createElementVNode("input", {
|
|
320
|
+
ref_key: "processFile",
|
|
321
|
+
ref: processFile,
|
|
322
|
+
accept: ".zip",
|
|
323
|
+
name: "processFile",
|
|
324
|
+
style: { "display": "none" },
|
|
325
|
+
type: "file",
|
|
326
|
+
onChange: importPage
|
|
327
|
+
}, null, 544),
|
|
328
|
+
createTextVNode(" 导入 ")
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
})
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
}),
|
|
335
|
+
createVNode(_component_el_tooltip, {
|
|
336
|
+
effect: "dark",
|
|
337
|
+
content: "导出",
|
|
338
|
+
placement: "top"
|
|
339
|
+
}, {
|
|
340
|
+
default: withCtx(() => [
|
|
341
|
+
createVNode(_component_el_button, {
|
|
342
|
+
type: "primary",
|
|
343
|
+
onClick: derive
|
|
344
|
+
}, {
|
|
345
|
+
default: withCtx(() => [
|
|
346
|
+
createTextVNode("导出")
|
|
347
|
+
]),
|
|
348
|
+
_: 1
|
|
349
|
+
})
|
|
350
|
+
]),
|
|
351
|
+
_: 1
|
|
352
|
+
}),
|
|
235
353
|
createVNode(_component_el_tooltip, {
|
|
236
354
|
effect: "dark",
|
|
237
355
|
content: "添加根菜单",
|
|
@@ -257,13 +375,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
257
375
|
ref_key: "serviceTreeRef",
|
|
258
376
|
ref: serviceTreeRef,
|
|
259
377
|
data: __props.serviceTreeData,
|
|
378
|
+
"node-key": "id",
|
|
260
379
|
props: treeProps,
|
|
380
|
+
"show-checkbox": "",
|
|
261
381
|
"expand-on-click-node": false,
|
|
262
382
|
"default-expand-all": true,
|
|
263
|
-
"check-strictly": true,
|
|
264
383
|
"highlight-current": "",
|
|
265
384
|
onNodeClick: nodeClick,
|
|
266
|
-
onNodeContextmenu: nodeContextmenu
|
|
385
|
+
onNodeContextmenu: nodeContextmenu,
|
|
386
|
+
onCheckChange: handleCheckChange
|
|
267
387
|
}, {
|
|
268
388
|
default: withCtx(({ node, data }) => [
|
|
269
389
|
createElementVNode("span", _hoisted_1, [
|