service-flow-designer 1.1.3 → 1.1.5
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/file-upload.css +7 -0
- package/dist/es/designer/common/components/file-upload.vue.d.ts +20 -0
- package/dist/es/designer/common/components/file-upload.vue.js +7 -0
- package/dist/es/designer/common/components/file-upload.vue2.js +99 -0
- package/dist/es/designer/common/components/json-view/index.d.ts +4 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue.d.ts +36 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue.js +61 -0
- package/dist/es/designer/common/components/json-view/json-view-dialog.vue2.js +4 -0
- package/dist/es/designer/common/components/json-view/json-view.vue.d.ts +32 -0
- package/dist/es/designer/common/components/json-view/json-view.vue.js +142 -0
- package/dist/es/designer/common/components/json-view/json-view.vue2.js +4 -0
- package/dist/es/designer/common/components/value-set-input/index.d.ts +3 -0
- package/dist/es/designer/common/components/value-set-input/index.js +4 -0
- package/dist/es/designer/common/components/value-set-input/option.d.ts +12 -0
- package/dist/es/designer/common/components/value-set-input/option.js +62 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.css +14 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.d.ts +145 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue.js +7 -0
- package/dist/es/designer/common/components/value-set-input/value-set-input.vue2.js +420 -0
- package/dist/es/designer/common/types/common-type.d.ts +18 -0
- package/dist/es/designer/common/types/select.d.ts +7 -0
- package/dist/es/designer/common/util/node-util.d.ts +27 -0
- package/dist/es/designer/common/util/node-util.js +56 -0
- package/dist/es/designer/desginer-index.css +23 -3
- package/dist/es/designer/desginer-index.vue.d.ts +13 -1
- package/dist/es/designer/desginer-index.vue.js +1 -1
- package/dist/es/designer/desginer-index.vue2.js +94 -10
- package/dist/es/designer/flow/edge/CustomLine.d.ts +25 -0
- package/dist/es/designer/flow/edge/CustomLine.js +49 -0
- package/dist/es/designer/service-flow-view/flow-tool-util.d.ts +2 -0
- package/dist/es/designer/service-flow-view/flow-tool-util.js +44 -0
- package/dist/es/designer/service-flow-view/flow-util.d.ts +53 -0
- package/dist/es/designer/service-flow-view/flow-util.js +111 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.css +130 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue.d.ts +33 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-flow-tool.vue2.js +188 -0
- package/dist/es/designer/service-flow-view/service-node-config.css +10 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue.d.ts +49 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-node-config.vue2.js +139 -0
- package/dist/es/designer/service-flow-view/service-params.vue.d.ts +18 -0
- package/dist/es/designer/service-flow-view/service-params.vue.js +387 -0
- package/dist/es/designer/service-flow-view/service-params.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-result.vue.d.ts +18 -0
- package/dist/es/designer/service-flow-view/service-result.vue.js +274 -0
- package/dist/es/designer/service-flow-view/service-result.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue.d.ts +16 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue.js +309 -0
- package/dist/es/designer/service-flow-view/service-test/request-params.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue.d.ts +47 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue.js +440 -0
- package/dist/es/designer/service-flow-view/service-test/service-test.vue2.js +4 -0
- package/dist/es/designer/service-flow-view/service-update-log.css +5 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue.d.ts +41 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue.js +7 -0
- package/dist/es/designer/service-flow-view/service-update-log.vue2.js +205 -0
- package/dist/es/designer/service-flow-view/view-index.css +102 -0
- package/dist/es/designer/service-flow-view/view-index.vue.d.ts +40 -0
- package/dist/es/designer/service-flow-view/view-index.vue.js +7 -0
- package/dist/es/designer/service-flow-view/view-index.vue2.js +347 -0
- package/dist/es/designer/service-panel/component-panel.css +66 -0
- package/dist/es/designer/service-panel/component-panel.vue.d.ts +6 -0
- package/dist/es/designer/service-panel/component-panel.vue.js +7 -0
- package/dist/es/designer/service-panel/component-panel.vue2.js +87 -0
- package/dist/es/designer/service-panel/service-list.css +36 -0
- package/dist/es/designer/service-panel/service-list.vue.d.ts +22 -0
- package/dist/es/designer/service-panel/service-list.vue.js +7 -0
- package/dist/es/designer/service-panel/service-list.vue2.js +341 -0
- package/dist/es/designer/service-panel/service-panel.css +41 -0
- package/dist/es/designer/service-panel/service-panel.vue.d.ts +35 -0
- package/dist/es/designer/service-panel/service-panel.vue.js +7 -0
- package/dist/es/designer/service-panel/service-panel.vue2.js +80 -0
- package/dist/es/stores/page-store.d.ts +23 -0
- package/dist/es/stores/page-store.js +79 -0
- package/dist/lib/designer/common/components/file-upload.css +7 -0
- package/dist/lib/designer/common/components/file-upload.vue.d.ts +20 -0
- package/dist/lib/designer/common/components/file-upload.vue.js +6 -0
- package/dist/lib/designer/common/components/file-upload.vue2.js +98 -0
- package/dist/lib/designer/common/components/json-view/index.d.ts +4 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue.d.ts +36 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue.js +60 -0
- package/dist/lib/designer/common/components/json-view/json-view-dialog.vue2.js +3 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue.d.ts +32 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue.js +141 -0
- package/dist/lib/designer/common/components/json-view/json-view.vue2.js +3 -0
- package/dist/lib/designer/common/components/value-set-input/index.d.ts +3 -0
- package/dist/lib/designer/common/components/value-set-input/index.js +3 -0
- package/dist/lib/designer/common/components/value-set-input/option.d.ts +12 -0
- package/dist/lib/designer/common/components/value-set-input/option.js +62 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.css +14 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue.d.ts +145 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue.js +6 -0
- package/dist/lib/designer/common/components/value-set-input/value-set-input.vue2.js +419 -0
- package/dist/lib/designer/common/types/common-type.d.ts +18 -0
- package/dist/lib/designer/common/types/select.d.ts +7 -0
- package/dist/lib/designer/common/util/node-util.d.ts +27 -0
- package/dist/lib/designer/common/util/node-util.js +56 -0
- package/dist/lib/designer/desginer-index.css +23 -3
- package/dist/lib/designer/desginer-index.vue.d.ts +13 -1
- package/dist/lib/designer/desginer-index.vue.js +1 -1
- package/dist/lib/designer/desginer-index.vue2.js +93 -9
- package/dist/lib/designer/flow/edge/CustomLine.d.ts +25 -0
- package/dist/lib/designer/flow/edge/CustomLine.js +48 -0
- package/dist/lib/designer/service-flow-view/flow-tool-util.d.ts +2 -0
- package/dist/lib/designer/service-flow-view/flow-tool-util.js +44 -0
- package/dist/lib/designer/service-flow-view/flow-util.d.ts +53 -0
- package/dist/lib/designer/service-flow-view/flow-util.js +111 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.css +130 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue.d.ts +33 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-flow-tool.vue2.js +187 -0
- package/dist/lib/designer/service-flow-view/service-node-config.css +10 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue.d.ts +49 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-node-config.vue2.js +138 -0
- package/dist/lib/designer/service-flow-view/service-params.vue.d.ts +18 -0
- package/dist/lib/designer/service-flow-view/service-params.vue.js +386 -0
- package/dist/lib/designer/service-flow-view/service-params.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-result.vue.d.ts +18 -0
- package/dist/lib/designer/service-flow-view/service-result.vue.js +273 -0
- package/dist/lib/designer/service-flow-view/service-result.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue.d.ts +16 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue.js +308 -0
- package/dist/lib/designer/service-flow-view/service-test/request-params.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue.d.ts +47 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue.js +439 -0
- package/dist/lib/designer/service-flow-view/service-test/service-test.vue2.js +3 -0
- package/dist/lib/designer/service-flow-view/service-update-log.css +5 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue.d.ts +41 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/service-update-log.vue2.js +204 -0
- package/dist/lib/designer/service-flow-view/view-index.css +102 -0
- package/dist/lib/designer/service-flow-view/view-index.vue.d.ts +40 -0
- package/dist/lib/designer/service-flow-view/view-index.vue.js +6 -0
- package/dist/lib/designer/service-flow-view/view-index.vue2.js +346 -0
- package/dist/lib/designer/service-panel/component-panel.css +66 -0
- package/dist/lib/designer/service-panel/component-panel.vue.d.ts +6 -0
- package/dist/lib/designer/service-panel/component-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/component-panel.vue2.js +86 -0
- package/dist/lib/designer/service-panel/service-list.css +36 -0
- package/dist/lib/designer/service-panel/service-list.vue.d.ts +22 -0
- package/dist/lib/designer/service-panel/service-list.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-list.vue2.js +340 -0
- package/dist/lib/designer/service-panel/service-panel.css +41 -0
- package/dist/lib/designer/service-panel/service-panel.vue.d.ts +35 -0
- package/dist/lib/designer/service-panel/service-panel.vue.js +6 -0
- package/dist/lib/designer/service-panel/service-panel.vue2.js +79 -0
- package/dist/lib/stores/page-store.d.ts +23 -0
- package/dist/lib/stores/page-store.js +79 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (...args: any[]) => void;
|
|
8
|
+
"on-success": (...args: any[]) => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
}>> & {
|
|
15
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
16
|
+
"onOn-success"?: (...args: any[]) => any;
|
|
17
|
+
}, {
|
|
18
|
+
modelValue: Record<string, any>;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./file-upload.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const fileUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2d06523b"]]);
|
|
5
|
+
export {
|
|
6
|
+
fileUpload as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, unref } from "vue";
|
|
2
|
+
import { Upload } from "@element-plus/icons-vue";
|
|
3
|
+
import { genFileId } from "element-plus";
|
|
4
|
+
import { getToken } from "agilebuilder-ui/src/utils/auth";
|
|
5
|
+
import { useServiceFlowStore } from "../../../stores/page-store.js";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "file-upload",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue", "on-success"],
|
|
17
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
|
+
const serviceFlowStoreUtil = useServiceFlowStore();
|
|
19
|
+
const emits = __emit;
|
|
20
|
+
const props = __props;
|
|
21
|
+
const systemCode = ref("");
|
|
22
|
+
systemCode.value = serviceFlowStoreUtil.pageContext.systemCode;
|
|
23
|
+
if (!props.modelValue || typeof props.modelValue !== "object") {
|
|
24
|
+
emits("update:modelValue", {});
|
|
25
|
+
}
|
|
26
|
+
const upload = ref();
|
|
27
|
+
const headers = { Authorization: getToken() };
|
|
28
|
+
const uploadUrl = window["$vueApp"].config.globalProperties.baseAPI + "/component/super-form/uploads";
|
|
29
|
+
const fileList = ref([]);
|
|
30
|
+
if (props.modelValue && props.modelValue.fileUuid) {
|
|
31
|
+
fileList.value.push({
|
|
32
|
+
name: props.modelValue.name,
|
|
33
|
+
url: props.modelValue.fileUuid
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const fileChange = (file, fileList2) => {
|
|
37
|
+
console.log(file, fileList2, "fileChange");
|
|
38
|
+
};
|
|
39
|
+
const handleRemove = (file, uploadFiles) => {
|
|
40
|
+
console.log(file, uploadFiles);
|
|
41
|
+
props.modelValue.name = "";
|
|
42
|
+
props.modelValue.fileUuid = "";
|
|
43
|
+
};
|
|
44
|
+
const handleExceed = (files) => {
|
|
45
|
+
console.log("handleExceed", files);
|
|
46
|
+
upload.value.clearFiles();
|
|
47
|
+
const file = files[0];
|
|
48
|
+
file.uid = genFileId();
|
|
49
|
+
upload.value.handleStart(file);
|
|
50
|
+
upload.value.submit();
|
|
51
|
+
};
|
|
52
|
+
const handleSuccess = (response, file, fileList2) => {
|
|
53
|
+
console.log(response, file, fileList2);
|
|
54
|
+
props.modelValue.name = response.name;
|
|
55
|
+
props.modelValue.fileUuid = response.serverPath;
|
|
56
|
+
emits("on-success");
|
|
57
|
+
};
|
|
58
|
+
__expose({});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
61
|
+
const _component_el_button = resolveComponent("el-button");
|
|
62
|
+
const _component_el_upload = resolveComponent("el-upload");
|
|
63
|
+
return openBlock(), createBlock(_component_el_upload, {
|
|
64
|
+
ref_key: "upload",
|
|
65
|
+
ref: upload,
|
|
66
|
+
name: "file",
|
|
67
|
+
data: { systemCode: systemCode.value, isExport: true },
|
|
68
|
+
"auto-upload": true,
|
|
69
|
+
action: uploadUrl,
|
|
70
|
+
headers,
|
|
71
|
+
limit: 1,
|
|
72
|
+
"on-change": fileChange,
|
|
73
|
+
"on-exceed": handleExceed,
|
|
74
|
+
"on-remove": handleRemove,
|
|
75
|
+
"on-success": handleSuccess,
|
|
76
|
+
"file-list": fileList.value
|
|
77
|
+
}, {
|
|
78
|
+
default: withCtx(() => [
|
|
79
|
+
createVNode(_component_el_button, null, {
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createTextVNode(" 上传附件"),
|
|
82
|
+
createVNode(_component_el_icon, { class: "el-icon--right" }, {
|
|
83
|
+
default: withCtx(() => [
|
|
84
|
+
createVNode(unref(Upload))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
})
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
})
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 8, ["data", "file-list"]);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
_sfc_main as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
jsonObject: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => void;
|
|
5
|
+
};
|
|
6
|
+
appendToBody: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (...args: any[]) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
jsonObject: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
default: () => void;
|
|
20
|
+
};
|
|
21
|
+
appendToBody: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
31
|
+
}, {
|
|
32
|
+
modelValue: boolean;
|
|
33
|
+
appendToBody: boolean;
|
|
34
|
+
jsonObject: Record<string, any>;
|
|
35
|
+
}, {}>;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createVNode } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./json-view.vue.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
...{
|
|
5
|
+
name: "JsonViewDialog",
|
|
6
|
+
inheritAttrs: false
|
|
7
|
+
},
|
|
8
|
+
__name: "json-view-dialog",
|
|
9
|
+
props: {
|
|
10
|
+
jsonObject: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => {
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
appendToBody: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emits = __emit;
|
|
28
|
+
const showJsonVisible = ref(false);
|
|
29
|
+
watch(
|
|
30
|
+
() => props.modelValue,
|
|
31
|
+
(newVal) => {
|
|
32
|
+
if (newVal) {
|
|
33
|
+
showJsonVisible.value = true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
const close = () => {
|
|
38
|
+
showJsonVisible.value = false;
|
|
39
|
+
emits("update:modelValue", false);
|
|
40
|
+
};
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
43
|
+
return openBlock(), createBlock(_component_el_dialog, {
|
|
44
|
+
modelValue: showJsonVisible.value,
|
|
45
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showJsonVisible.value = $event),
|
|
46
|
+
"append-to-body": __props.appendToBody,
|
|
47
|
+
title: "格式化",
|
|
48
|
+
width: "600",
|
|
49
|
+
onClose: close
|
|
50
|
+
}, {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
createVNode(_sfc_main$1, { jsonObject: __props.jsonObject }, null, 8, ["jsonObject"])
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}, 8, ["modelValue", "append-to-body"]);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
_sfc_main as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
jsonObject: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => void;
|
|
5
|
+
};
|
|
6
|
+
height: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
theme: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
14
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
jsonObject: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
default: () => void;
|
|
18
|
+
};
|
|
19
|
+
height: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
theme: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: any;
|
|
26
|
+
};
|
|
27
|
+
}>>, {
|
|
28
|
+
height: number;
|
|
29
|
+
jsonObject: Record<string, any>;
|
|
30
|
+
theme: string;
|
|
31
|
+
}, {}>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, nextTick, openBlock, createElementBlock } from "vue";
|
|
2
|
+
import { EditorView, basicSetup } from "codemirror";
|
|
3
|
+
import { jsonLanguage } from "@codemirror/lang-json";
|
|
4
|
+
import { EditorState, Facet } from "@codemirror/state";
|
|
5
|
+
import { eclipse, githubDark, githubLight, dracula, vscodeDark, xcodeDark, xcodeLight } from "@uiw/codemirror-themes-all";
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
...{
|
|
8
|
+
name: "JsonView",
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
},
|
|
11
|
+
__name: "json-view",
|
|
12
|
+
props: {
|
|
13
|
+
jsonObject: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => {
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
height: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
theme: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: null
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const editor = ref(null);
|
|
30
|
+
const cfCodemirrorJsonViewRef = ref();
|
|
31
|
+
const codemirrorHeight = ref("400px");
|
|
32
|
+
watch(
|
|
33
|
+
() => props.jsonObject,
|
|
34
|
+
(newVal) => {
|
|
35
|
+
if (editor.value) {
|
|
36
|
+
loadEditor();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{ deep: true }
|
|
40
|
+
);
|
|
41
|
+
onMounted(() => {
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
loadEditor();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
function loadEditor() {
|
|
47
|
+
if (editor.value) {
|
|
48
|
+
editor.value.destroy();
|
|
49
|
+
}
|
|
50
|
+
const jsonStr = props.jsonObject ? JSON.stringify(props.jsonObject, null, 2) : "";
|
|
51
|
+
if (props.height) {
|
|
52
|
+
codemirrorHeight.value = props.height + "px";
|
|
53
|
+
} else {
|
|
54
|
+
if (cfCodemirrorJsonViewRef.value) {
|
|
55
|
+
const rect = cfCodemirrorJsonViewRef.value.getBoundingClientRect();
|
|
56
|
+
if (rect.y || rect.y === 0) {
|
|
57
|
+
console.log("window.innerHeight - rect.y", window.innerHeight, rect.y);
|
|
58
|
+
codemirrorHeight.value = window.innerHeight - rect.y - 100 + "px";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const state = getEditorState(jsonStr);
|
|
63
|
+
let element = document.getElementById("cf-codemirror-view-json");
|
|
64
|
+
if (element) {
|
|
65
|
+
editor.value = new EditorView({
|
|
66
|
+
state,
|
|
67
|
+
parent: element
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function getEditorState(jsonStr) {
|
|
72
|
+
const mytheme = getTheme();
|
|
73
|
+
const baseTheme = EditorView.theme({
|
|
74
|
+
".cm-content, .cm-gutter": { minHeight: codemirrorHeight.value },
|
|
75
|
+
"&": {
|
|
76
|
+
height: codemirrorHeight.value,
|
|
77
|
+
maxHeight: codemirrorHeight.value,
|
|
78
|
+
fontSize: "12px"
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return EditorState.create({
|
|
82
|
+
doc: jsonStr,
|
|
83
|
+
extensions: [
|
|
84
|
+
EditorState.tabSize.of(16),
|
|
85
|
+
basicSetup,
|
|
86
|
+
jsonLanguage,
|
|
87
|
+
mytheme,
|
|
88
|
+
baseTheme,
|
|
89
|
+
readOnlyFacet.of(true),
|
|
90
|
+
preventChanges
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const readOnlyFacet = Facet.define({ combine: (values) => values.some((a) => a) });
|
|
95
|
+
const preventChanges = EditorState.transactionFilter.of((tr) => {
|
|
96
|
+
if (tr.isUserEvent && tr.docChanged && tr.state.facet(readOnlyFacet)) {
|
|
97
|
+
return {
|
|
98
|
+
changes: {
|
|
99
|
+
from: tr.changes.from,
|
|
100
|
+
to: tr.changes.to,
|
|
101
|
+
insert: tr.startState.doc.sliceString(tr.changes.from, tr.changes.to)
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return tr;
|
|
106
|
+
});
|
|
107
|
+
function getTheme() {
|
|
108
|
+
if (props.theme) {
|
|
109
|
+
switch (props.theme) {
|
|
110
|
+
case "xcodeLight":
|
|
111
|
+
return xcodeLight;
|
|
112
|
+
case "xcodeDark":
|
|
113
|
+
return xcodeDark;
|
|
114
|
+
case "vscodeDark":
|
|
115
|
+
return vscodeDark;
|
|
116
|
+
case "dracula":
|
|
117
|
+
return dracula;
|
|
118
|
+
case "githubLight":
|
|
119
|
+
return githubLight;
|
|
120
|
+
case "githubDark":
|
|
121
|
+
return githubDark;
|
|
122
|
+
case "eclipse":
|
|
123
|
+
return eclipse;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return EditorView.theme({});
|
|
127
|
+
}
|
|
128
|
+
return (_ctx, _cache) => {
|
|
129
|
+
return openBlock(), createElementBlock("div", {
|
|
130
|
+
style: {
|
|
131
|
+
width: "100%"
|
|
132
|
+
},
|
|
133
|
+
ref_key: "cfCodemirrorJsonViewRef",
|
|
134
|
+
ref: cfCodemirrorJsonViewRef,
|
|
135
|
+
id: "cf-codemirror-view-json"
|
|
136
|
+
}, null, 512);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
export {
|
|
141
|
+
_sfc_main as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Option {
|
|
2
|
+
value: string | number | boolean;
|
|
3
|
+
label: string;
|
|
4
|
+
[otherProp: string]: any;
|
|
5
|
+
}
|
|
6
|
+
declare const contextVarOptions: Option[];
|
|
7
|
+
declare const taskVarOptions: Option[];
|
|
8
|
+
declare function getTypeOptions(types: Array<string>): {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
export { contextVarOptions, taskVarOptions, getTypeOptions };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const typeOptions = [
|
|
2
|
+
{
|
|
3
|
+
value: "request",
|
|
4
|
+
label: "请求参数"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
value: "data",
|
|
8
|
+
label: "数据模型"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "page",
|
|
12
|
+
label: "页面变量"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "task",
|
|
16
|
+
label: "流程变量"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: "service",
|
|
20
|
+
label: "服务变量"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "system",
|
|
24
|
+
label: "系统变量"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: "context",
|
|
28
|
+
label: "环境变量"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "fixed",
|
|
32
|
+
label: "固定值"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
const contextVarOptions = [
|
|
36
|
+
{ value: "currentTime", label: "当前时间" },
|
|
37
|
+
{ value: "currentDate", label: "当前日期" },
|
|
38
|
+
{ value: "currentTransactorId", label: "当前用户id" },
|
|
39
|
+
{ value: "currentTransactor", label: "当前用户登录名" },
|
|
40
|
+
{ value: "currentTransactorName", label: "当前用户姓名" },
|
|
41
|
+
{ value: "currentTransactorMainDepartmentId", label: "当前用户部门id" },
|
|
42
|
+
{ value: "currentTransactorMainDepartmentCode", label: "当前用户部门编码" },
|
|
43
|
+
{ value: "currentTransactorMainDepartment", label: "当前用户部门名称" }
|
|
44
|
+
];
|
|
45
|
+
const taskVarOptions = [
|
|
46
|
+
{ value: "transactor", label: "当前办理人" },
|
|
47
|
+
{ value: "nodeId", label: "环节名称" },
|
|
48
|
+
{ value: "nodeCode", label: "环节编码" },
|
|
49
|
+
{ value: "assigner", label: "当前指派人" },
|
|
50
|
+
{ value: "trustor", label: "当前委托人" }
|
|
51
|
+
];
|
|
52
|
+
function getTypeOptions(types) {
|
|
53
|
+
if (types && types.length > 0) {
|
|
54
|
+
return typeOptions.filter((item) => types.includes(item.value));
|
|
55
|
+
}
|
|
56
|
+
return typeOptions;
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
contextVarOptions,
|
|
60
|
+
getTypeOptions,
|
|
61
|
+
taskVarOptions
|
|
62
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
[data-v-53118ceb] .el-cascader-menu {
|
|
3
|
+
min-width: 120px !important;
|
|
4
|
+
}
|
|
5
|
+
.totalStyle[data-v-53118ceb] {
|
|
6
|
+
display: flex;
|
|
7
|
+
height: 15px;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
font-size: 10px;
|
|
11
|
+
}
|
|
12
|
+
[data-v-53118ceb] .el-input-group__append {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
declare function setSelectOptions(): void;
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: StringConstructor[];
|
|
5
|
+
default: any;
|
|
6
|
+
};
|
|
7
|
+
paramTypes: {
|
|
8
|
+
type: {
|
|
9
|
+
(arrayLength: number): string[];
|
|
10
|
+
(...items: string[]): string[];
|
|
11
|
+
new (arrayLength: number): string[];
|
|
12
|
+
new (...items: string[]): string[];
|
|
13
|
+
isArray(arg: any): arg is any[];
|
|
14
|
+
readonly prototype: any[];
|
|
15
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
16
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
17
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
18
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
19
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
20
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
21
|
+
};
|
|
22
|
+
default: () => any[];
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
inputSize: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
showLabel: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
width: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
customInputTypes: {
|
|
41
|
+
type: {
|
|
42
|
+
(arrayLength: number): any[];
|
|
43
|
+
(...items: any[]): any[];
|
|
44
|
+
new (arrayLength: number): any[];
|
|
45
|
+
new (...items: any[]): any[];
|
|
46
|
+
isArray(arg: any): arg is any[];
|
|
47
|
+
readonly prototype: any[];
|
|
48
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
49
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
50
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
51
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
52
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
53
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
54
|
+
};
|
|
55
|
+
default: any[];
|
|
56
|
+
};
|
|
57
|
+
customOptions: {
|
|
58
|
+
type: ObjectConstructor;
|
|
59
|
+
default: () => {};
|
|
60
|
+
};
|
|
61
|
+
showFileUpload: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
setSelectOptions: typeof setSelectOptions;
|
|
67
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
68
|
+
"update:modelValue": (...args: any[]) => void;
|
|
69
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
70
|
+
modelValue: {
|
|
71
|
+
type: StringConstructor[];
|
|
72
|
+
default: any;
|
|
73
|
+
};
|
|
74
|
+
paramTypes: {
|
|
75
|
+
type: {
|
|
76
|
+
(arrayLength: number): string[];
|
|
77
|
+
(...items: string[]): string[];
|
|
78
|
+
new (arrayLength: number): string[];
|
|
79
|
+
new (...items: string[]): string[];
|
|
80
|
+
isArray(arg: any): arg is any[];
|
|
81
|
+
readonly prototype: any[];
|
|
82
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
83
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
84
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
85
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
86
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
87
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
88
|
+
};
|
|
89
|
+
default: () => any[];
|
|
90
|
+
};
|
|
91
|
+
size: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
inputSize: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
showLabel: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
width: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
customInputTypes: {
|
|
108
|
+
type: {
|
|
109
|
+
(arrayLength: number): any[];
|
|
110
|
+
(...items: any[]): any[];
|
|
111
|
+
new (arrayLength: number): any[];
|
|
112
|
+
new (...items: any[]): any[];
|
|
113
|
+
isArray(arg: any): arg is any[];
|
|
114
|
+
readonly prototype: any[];
|
|
115
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
116
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
117
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
118
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
119
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
120
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
121
|
+
};
|
|
122
|
+
default: any[];
|
|
123
|
+
};
|
|
124
|
+
customOptions: {
|
|
125
|
+
type: ObjectConstructor;
|
|
126
|
+
default: () => {};
|
|
127
|
+
};
|
|
128
|
+
showFileUpload: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
}>> & {
|
|
133
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
134
|
+
}, {
|
|
135
|
+
size: string;
|
|
136
|
+
modelValue: string;
|
|
137
|
+
width: string;
|
|
138
|
+
paramTypes: string[];
|
|
139
|
+
inputSize: string;
|
|
140
|
+
showLabel: boolean;
|
|
141
|
+
customInputTypes: any[];
|
|
142
|
+
customOptions: Record<string, any>;
|
|
143
|
+
showFileUpload: boolean;
|
|
144
|
+
}, {}>;
|
|
145
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./value-set-input.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const ValueSetInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53118ceb"]]);
|
|
5
|
+
export {
|
|
6
|
+
ValueSetInput as default
|
|
7
|
+
};
|