@fecp/designer 5.3.10 → 5.3.12
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/es/designer.css +405 -386
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/FieldSetMapping.vue2.mjs +3 -1
- package/es/packages/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/packages/designer/src/components/ValueSelector.vue.mjs +190 -0
- package/es/packages/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +4 -3
- package/es/packages/designer/src/layout/header/index.vue.mjs +4 -0
- package/es/packages/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/packages/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/dataSource/dataSource.vue.mjs +65 -45
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +3 -1
- package/es/packages/designer/src/packages/event/index.vue2.mjs +3 -1
- package/es/packages/designer/src/packages/eventFlow/dialog/action/Upload.vue2.mjs +179 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +18 -3
- package/es/packages/designer/src/packages/form/components/ComponentPreviewWrapper.vue.mjs +2 -2
- package/es/packages/designer/src/packages/form/index.vue.mjs +2 -13
- package/es/packages/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/packages/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/packages/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +3 -1
- package/es/packages/designer/src/packages/table/index.vue.mjs +2 -1
- package/es/packages/designer/src/packages/table/property/optBtn.vue.mjs +0 -9
- package/es/packages/designer/src/packages/table/queryModule/index.vue.mjs +3 -1
- package/es/packages/designer/src/packages/table/tableSetting.vue.mjs +2 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +12 -2
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +2 -2
- package/es/packages/vue/src/utils/datasource.mjs +4 -0
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +105 -6
- package/es/packages/vue/src/utils/parseRouteParams.mjs +1 -1
- package/lib/designer.css +405 -386
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/FieldSetMapping.vue2.js +3 -1
- package/lib/packages/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/packages/designer/src/components/ValueSelector.vue.js +190 -0
- package/lib/packages/designer/src/layout/aside/HiddenFieldDialog.vue.js +4 -3
- package/lib/packages/designer/src/layout/header/index.vue.js +4 -0
- package/lib/packages/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/packages/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/dataSource/dataSource.vue.js +64 -44
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +3 -1
- package/lib/packages/designer/src/packages/event/index.vue2.js +3 -1
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/Upload.vue2.js +179 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +18 -3
- package/lib/packages/designer/src/packages/form/components/ComponentPreviewWrapper.vue.js +2 -2
- package/lib/packages/designer/src/packages/form/index.vue.js +1 -12
- package/lib/packages/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/packages/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/packages/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +3 -1
- package/lib/packages/designer/src/packages/table/index.vue.js +2 -1
- package/lib/packages/designer/src/packages/table/property/optBtn.vue.js +0 -9
- package/lib/packages/designer/src/packages/table/queryModule/index.vue.js +3 -1
- package/lib/packages/designer/src/packages/table/tableSetting.vue.js +2 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +12 -2
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +2 -2
- package/lib/packages/vue/src/utils/datasource.js +4 -0
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +104 -5
- package/lib/packages/vue/src/utils/parseRouteParams.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { ref, computed, createElementBlock, openBlock, Fragment, createVNode, withCtx, createElementVNode, createTextVNode } from "vue";
|
|
9
|
+
import _sfc_main$1 from "../../../../components/DataSourceSelect.vue.mjs";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import _export_sfc from "../../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
12
|
+
import { ElFormItem } from "../../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
13
|
+
import { ElCheckbox, ElCheckboxGroup } from "../../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/checkbox/index.mjs";
|
|
14
|
+
import { ElInputNumber } from "../../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input-number/index.mjs";
|
|
15
|
+
import { ElSwitch } from "../../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/switch/index.mjs";
|
|
16
|
+
const _hoisted_1 = { class: "accept-type-container" };
|
|
17
|
+
const _hoisted_2 = { class: "quick-options" };
|
|
18
|
+
const _hoisted_3 = { class: "type-category" };
|
|
19
|
+
const _hoisted_4 = { class: "type-category" };
|
|
20
|
+
const _hoisted_5 = { class: "type-category" };
|
|
21
|
+
const _hoisted_6 = { class: "desc-content" };
|
|
22
|
+
const _sfc_main = {
|
|
23
|
+
__name: "Upload",
|
|
24
|
+
props: {
|
|
25
|
+
formData: Object
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const allFileTypes = ref([
|
|
30
|
+
"doc",
|
|
31
|
+
"xls",
|
|
32
|
+
"ppt",
|
|
33
|
+
"pdf",
|
|
34
|
+
"text",
|
|
35
|
+
"image",
|
|
36
|
+
"video",
|
|
37
|
+
"audio",
|
|
38
|
+
"zip"
|
|
39
|
+
]);
|
|
40
|
+
const isAllSelected = computed(() => {
|
|
41
|
+
return allFileTypes.value.every(
|
|
42
|
+
(type) => {
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = formData.value.acceptType) == null ? void 0 : _a.includes(type);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
const toggleSelectAll = () => {
|
|
49
|
+
if (isAllSelected.value) {
|
|
50
|
+
formData.value.acceptType = [];
|
|
51
|
+
} else {
|
|
52
|
+
formData.value.acceptType = [...allFileTypes.value];
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const formData = ref(props.formData);
|
|
56
|
+
if (!formData.value.acceptType) {
|
|
57
|
+
formData.value.acceptType = [];
|
|
58
|
+
}
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
const _component_el_form_item = ElFormItem;
|
|
61
|
+
const _component_el_checkbox = ElCheckbox;
|
|
62
|
+
const _component_el_checkbox_group = ElCheckboxGroup;
|
|
63
|
+
const _component_el_input_number = ElInputNumber;
|
|
64
|
+
const _component_el_switch = ElSwitch;
|
|
65
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
66
|
+
createVNode(_component_el_form_item, { label: "选择数据源" }, {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createVNode(_sfc_main$1, {
|
|
69
|
+
modelValue: formData.value.dataSourceId,
|
|
70
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.dataSourceId = $event)
|
|
71
|
+
}, null, 8, ["modelValue"])
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}),
|
|
75
|
+
createVNode(_component_el_form_item, { label: "允许上传的文件类型" }, {
|
|
76
|
+
default: withCtx(() => [
|
|
77
|
+
createElementVNode("div", _hoisted_1, [
|
|
78
|
+
createElementVNode("div", _hoisted_2, [
|
|
79
|
+
createVNode(_component_el_checkbox, {
|
|
80
|
+
"model-value": isAllSelected.value,
|
|
81
|
+
onChange: toggleSelectAll,
|
|
82
|
+
size: "small",
|
|
83
|
+
class: "select-all-checkbox"
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
86
|
+
createTextVNode(" 全部 ")
|
|
87
|
+
])),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["model-value"])
|
|
90
|
+
]),
|
|
91
|
+
createVNode(_component_el_checkbox_group, {
|
|
92
|
+
modelValue: formData.value.acceptType,
|
|
93
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value.acceptType = $event),
|
|
94
|
+
size: "small",
|
|
95
|
+
class: "type-checkbox-group"
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [
|
|
98
|
+
createElementVNode("div", _hoisted_3, [
|
|
99
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "category-title" }, "文档类", -1)),
|
|
100
|
+
createVNode(_component_el_checkbox, {
|
|
101
|
+
label: "Word文档",
|
|
102
|
+
value: "doc"
|
|
103
|
+
}),
|
|
104
|
+
createVNode(_component_el_checkbox, {
|
|
105
|
+
label: "Excel文档",
|
|
106
|
+
value: "xls"
|
|
107
|
+
}),
|
|
108
|
+
createVNode(_component_el_checkbox, {
|
|
109
|
+
label: "PowerPoint文档",
|
|
110
|
+
value: "ppt"
|
|
111
|
+
}),
|
|
112
|
+
createVNode(_component_el_checkbox, {
|
|
113
|
+
label: "PDF文档",
|
|
114
|
+
value: "pdf"
|
|
115
|
+
}),
|
|
116
|
+
createVNode(_component_el_checkbox, {
|
|
117
|
+
label: "文本文件",
|
|
118
|
+
value: "text"
|
|
119
|
+
})
|
|
120
|
+
]),
|
|
121
|
+
createElementVNode("div", _hoisted_4, [
|
|
122
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "category-title" }, "媒体类", -1)),
|
|
123
|
+
createVNode(_component_el_checkbox, {
|
|
124
|
+
label: "图片",
|
|
125
|
+
value: "image"
|
|
126
|
+
}),
|
|
127
|
+
createVNode(_component_el_checkbox, {
|
|
128
|
+
label: "视频",
|
|
129
|
+
value: "video"
|
|
130
|
+
}),
|
|
131
|
+
createVNode(_component_el_checkbox, {
|
|
132
|
+
label: "音频",
|
|
133
|
+
value: "audio"
|
|
134
|
+
})
|
|
135
|
+
]),
|
|
136
|
+
createElementVNode("div", _hoisted_5, [
|
|
137
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "category-title" }, "其他", -1)),
|
|
138
|
+
createVNode(_component_el_checkbox, {
|
|
139
|
+
label: "压缩包",
|
|
140
|
+
value: "zip"
|
|
141
|
+
})
|
|
142
|
+
])
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
}, 8, ["modelValue"])
|
|
146
|
+
])
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
}),
|
|
150
|
+
createVNode(_component_el_form_item, { label: "文件大小限制" }, {
|
|
151
|
+
default: withCtx(() => [
|
|
152
|
+
createElementVNode("div", _hoisted_6, [
|
|
153
|
+
createVNode(_component_el_input_number, {
|
|
154
|
+
modelValue: formData.value.maxSize,
|
|
155
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.value.maxSize = $event),
|
|
156
|
+
min: 0
|
|
157
|
+
}, null, 8, ["modelValue"]),
|
|
158
|
+
_cache[8] || (_cache[8] = createElementVNode("div", { class: "condition-desc" }, "单位 MB, 填0不限制。", -1))
|
|
159
|
+
])
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}),
|
|
163
|
+
createVNode(_component_el_form_item, { label: "允许多选" }, {
|
|
164
|
+
default: withCtx(() => [
|
|
165
|
+
createVNode(_component_el_switch, {
|
|
166
|
+
modelValue: formData.value.multipleUpload,
|
|
167
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => formData.value.multipleUpload = $event)
|
|
168
|
+
}, null, 8, ["modelValue"])
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
})
|
|
172
|
+
], 64);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9d73883f"]]);
|
|
177
|
+
export {
|
|
178
|
+
Upload as default
|
|
179
|
+
};
|
|
@@ -9,6 +9,7 @@ import TableRefresh from "./TableRefresh.vue2.mjs";
|
|
|
9
9
|
import TableChildRefresh from "./TableChildRefresh.vue2.mjs";
|
|
10
10
|
import TableRowDelete from "./TableRowDelete.vue2.mjs";
|
|
11
11
|
import _sfc_main$2 from "./Dialog.vue.mjs";
|
|
12
|
+
import Upload from "./Upload.vue2.mjs";
|
|
12
13
|
const menuData = [
|
|
13
14
|
{
|
|
14
15
|
index: "page",
|
|
@@ -50,6 +51,21 @@ const menuData = [
|
|
|
50
51
|
cancelText: "取消",
|
|
51
52
|
showCancel: true,
|
|
52
53
|
confirmAction: "continue"
|
|
54
|
+
} },
|
|
55
|
+
{ index: "ui-upload", label: "文件上传", desc: "上传文件到服务器", component: Upload, default: {
|
|
56
|
+
acceptType: [
|
|
57
|
+
"doc",
|
|
58
|
+
"xls",
|
|
59
|
+
"ppt",
|
|
60
|
+
"pdf",
|
|
61
|
+
"text",
|
|
62
|
+
"image",
|
|
63
|
+
"video",
|
|
64
|
+
"audio",
|
|
65
|
+
"zip"
|
|
66
|
+
],
|
|
67
|
+
maxSize: "0",
|
|
68
|
+
multipleUpload: false
|
|
53
69
|
} }
|
|
54
70
|
]
|
|
55
71
|
},
|
|
@@ -70,7 +86,7 @@ const menuData = [
|
|
|
70
86
|
resetFilter: false,
|
|
71
87
|
resetPagination: false
|
|
72
88
|
} },
|
|
73
|
-
{ index: "table-row-delete", label: "
|
|
89
|
+
{ index: "table-row-delete", label: "行数据删除", desc: "删除列表的行数据", component: TableRowDelete, default: {
|
|
74
90
|
showConfirmDeleteMessage: true,
|
|
75
91
|
resetTableAfterDelete: true
|
|
76
92
|
} },
|
|
@@ -85,8 +101,7 @@ const menuData = [
|
|
|
85
101
|
index: "request",
|
|
86
102
|
label: "请求",
|
|
87
103
|
items: [
|
|
88
|
-
{ index: "request-send", label: "发送请求", desc: "通过数据源发送API请求", component: _sfc_main$5, default: { showSuccessMessage: false } }
|
|
89
|
-
{ index: "request-handle", label: "接口返回数据处理", desc: "对接口返回的数据进行加工处理" }
|
|
104
|
+
{ index: "request-send", label: "发送请求", desc: "通过数据源发送API请求", component: _sfc_main$5, default: { showSuccessMessage: false } }
|
|
90
105
|
]
|
|
91
106
|
},
|
|
92
107
|
{
|
|
@@ -165,7 +165,7 @@ const _sfc_main = {
|
|
|
165
165
|
]),
|
|
166
166
|
key: "1"
|
|
167
167
|
} : void 0,
|
|
168
|
-
!__props.componentData.
|
|
168
|
+
!__props.componentData.disabled && __props.componentData.suffixButton && __props.componentData.suffixButton != "none" ? {
|
|
169
169
|
name: "append",
|
|
170
170
|
fn: withCtx(() => [
|
|
171
171
|
createVNode(_component_el_button, { class: "suffixButton" }, {
|
|
@@ -298,7 +298,7 @@ const _sfc_main = {
|
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
const ComponentPreviewWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
301
|
+
const ComponentPreviewWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09ce9664"]]);
|
|
302
302
|
export {
|
|
303
303
|
ComponentPreviewWrapper as default
|
|
304
304
|
};
|
|
@@ -15,7 +15,7 @@ import H2Wrapper from "./components/H2Wrapper.vue.mjs";
|
|
|
15
15
|
import SubForm from "./components/SubForm.vue.mjs";
|
|
16
16
|
import ApprovalHistory from "./components/ApprovalHistory.vue.mjs";
|
|
17
17
|
import SubTable from "./components/SubTable.vue.mjs";
|
|
18
|
-
import { StarFilled as star_filled_default, Star as star_default, Lock as lock_default, Unlock as unlock_default, Delete as delete_default
|
|
18
|
+
import { StarFilled as star_filled_default, Star as star_default, Lock as lock_default, Unlock as unlock_default, Delete as delete_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
19
19
|
import { getEditConfigData, setSelectedItem, setHoverItem, getCurrentClass, isSelectedItem } from "../utils/common.mjs";
|
|
20
20
|
import { throttle as eo } from "../../../../../node_modules/.pnpm/@vexip-ui_utils@2.16.4/node_modules/@vexip-ui/utils/dist/index.mjs";
|
|
21
21
|
/* empty css */
|
|
@@ -48,10 +48,6 @@ const _hoisted_11 = {
|
|
|
48
48
|
key: 1,
|
|
49
49
|
class: "status-tag disabled-tag"
|
|
50
50
|
};
|
|
51
|
-
const _hoisted_12 = {
|
|
52
|
-
key: 2,
|
|
53
|
-
class: "status-tag readonly-tag"
|
|
54
|
-
};
|
|
55
51
|
const dropId = "drop";
|
|
56
52
|
const _sfc_main = {
|
|
57
53
|
__name: "index",
|
|
@@ -434,13 +430,6 @@ const _sfc_main = {
|
|
|
434
430
|
]),
|
|
435
431
|
_: 1
|
|
436
432
|
})
|
|
437
|
-
])) : item.component.readOnly ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
438
|
-
createVNode(_component_el_icon, null, {
|
|
439
|
-
default: withCtx(() => [
|
|
440
|
-
createVNode(unref(view_default))
|
|
441
|
-
]),
|
|
442
|
-
_: 1
|
|
443
|
-
})
|
|
444
433
|
])) : createCommentVNode("", true)
|
|
445
434
|
]),
|
|
446
435
|
createElementVNode("div", {
|
|
@@ -499,7 +488,7 @@ const _sfc_main = {
|
|
|
499
488
|
};
|
|
500
489
|
}
|
|
501
490
|
};
|
|
502
|
-
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
491
|
+
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7bfeb0a"]]);
|
|
503
492
|
export {
|
|
504
493
|
formWorkArea as default
|
|
505
494
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { computed, ref, watch, createBlock, openBlock, unref, isRef, withCtx, createVNode, createElementBlock, createCommentVNode, createTextVNode, Fragment } from "vue";
|
|
11
11
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
12
12
|
import emitter from "../../utils/eventBus.mjs";
|
|
13
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
13
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
14
14
|
import { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
15
15
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
16
16
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -12,7 +12,7 @@ import { computed, ref, createBlock, openBlock, unref, isRef, withCtx, createVNo
|
|
|
12
12
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
13
13
|
import TemplateSelector from "../../../components/TemplateSelector.vue.mjs";
|
|
14
14
|
import emitter from "../../utils/eventBus.mjs";
|
|
15
|
-
import ValueSelector from "../../../components/ValueSelector.
|
|
15
|
+
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
|
|
16
16
|
import { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
17
17
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
18
18
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { useModel, ref, watch, computed, createBlock, openBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, unref } from "vue";
|
|
14
14
|
import { Plus as plus_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
15
15
|
import { getEditConfigData, getEditConfigDataFields, setEditConfigData } from "../utils/common.mjs";
|
|
16
|
-
import ValueSelector from "../../components/ValueSelector.
|
|
16
|
+
import ValueSelector from "../../components/ValueSelector.vue.mjs";
|
|
17
17
|
import api from "../../api/index.mjs";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
@@ -44,7 +44,7 @@ import { Connection as connection_default, Grid as grid_default, ChatLineSquare
|
|
|
44
44
|
/* empty css */
|
|
45
45
|
import "../../store/index.mjs";
|
|
46
46
|
/* empty css */
|
|
47
|
-
/* empty css
|
|
47
|
+
/* empty css */
|
|
48
48
|
/* empty css */
|
|
49
49
|
/* empty css */
|
|
50
50
|
/* empty css */
|
|
@@ -74,6 +74,8 @@ import "../../axios/config.mjs";
|
|
|
74
74
|
import "../../../../../_virtual/FileSaver.min.mjs";
|
|
75
75
|
import "../../../../../_virtual/index.mjs";
|
|
76
76
|
/* empty css */
|
|
77
|
+
/* empty css */
|
|
78
|
+
/* empty css */
|
|
77
79
|
import { useAdvancedFilterDialog } from "../advancedFilter/useAdvancedFilterDialog.mjs";
|
|
78
80
|
/* empty css */
|
|
79
81
|
/* empty css */
|
|
@@ -259,6 +259,7 @@ const _sfc_main = {
|
|
|
259
259
|
]),
|
|
260
260
|
createElementVNode("div", _hoisted_10, [
|
|
261
261
|
createVNode(_component_el_dropdown, {
|
|
262
|
+
"max-height": 500,
|
|
262
263
|
"popper-class": `quick-operation-dropdown-${item.id}`,
|
|
263
264
|
trigger: "click",
|
|
264
265
|
placement: "bottom",
|
|
@@ -468,7 +469,7 @@ const _sfc_main = {
|
|
|
468
469
|
};
|
|
469
470
|
}
|
|
470
471
|
};
|
|
471
|
-
const tableWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
472
|
+
const tableWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f581ce52"]]);
|
|
472
473
|
export {
|
|
473
474
|
tableWorkArea as default
|
|
474
475
|
};
|
|
@@ -83,15 +83,6 @@ const _sfc_main = {
|
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
85
|
}),
|
|
86
|
-
createVNode(_component_el_form_item, { label: "显示条件" }, {
|
|
87
|
-
default: withCtx(() => [
|
|
88
|
-
createVNode(ConditionConfigButton, {
|
|
89
|
-
condition: unref(currentItem).showCondition,
|
|
90
|
-
onConfirm: (data) => unref(currentItem).showCondition = data
|
|
91
|
-
}, null, 8, ["condition", "onConfirm"])
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
}),
|
|
95
86
|
createVNode(_component_el_form_item, { label: "风格" }, {
|
|
96
87
|
default: withCtx(() => [
|
|
97
88
|
createVNode(_component_el_select, {
|
|
@@ -263,6 +263,7 @@ const _sfc_main = {
|
|
|
263
263
|
queryConfig.value.mode === "dynamic" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
264
264
|
createVNode(_component_el_divider, { direction: "vertical" }),
|
|
265
265
|
createVNode(_component_el_dropdown, {
|
|
266
|
+
"max-height": 500,
|
|
266
267
|
trigger: "click",
|
|
267
268
|
"popper-class": "tab-config-dropdown",
|
|
268
269
|
onVisibleChange: _cache[7] || (_cache[7] = (visible) => tabConfigDropdownVisible.value = visible)
|
|
@@ -384,6 +385,7 @@ const _sfc_main = {
|
|
|
384
385
|
}),
|
|
385
386
|
createVNode(_component_el_divider, { direction: "vertical" }),
|
|
386
387
|
createVNode(_component_el_dropdown, {
|
|
388
|
+
"max-height": 500,
|
|
387
389
|
trigger: "click",
|
|
388
390
|
placement: "bottom",
|
|
389
391
|
"hide-on-click": false
|
|
@@ -551,7 +553,7 @@ const _sfc_main = {
|
|
|
551
553
|
};
|
|
552
554
|
}
|
|
553
555
|
};
|
|
554
|
-
const QueryModule = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
556
|
+
const QueryModule = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e569e134"]]);
|
|
555
557
|
export {
|
|
556
558
|
QueryModule as default
|
|
557
559
|
};
|
|
@@ -269,6 +269,7 @@ const _sfc_main = {
|
|
|
269
269
|
]),
|
|
270
270
|
createElementVNode("div", _hoisted_3, [
|
|
271
271
|
createVNode(_component_el_dropdown, {
|
|
272
|
+
"max-height": 500,
|
|
272
273
|
trigger: "click",
|
|
273
274
|
"popper-class": "sort-config-dropdown",
|
|
274
275
|
onVisibleChange: _cache[6] || (_cache[6] = (visible) => sortConfigDropdownVisible.value = visible)
|
|
@@ -464,7 +465,7 @@ const _sfc_main = {
|
|
|
464
465
|
};
|
|
465
466
|
}
|
|
466
467
|
};
|
|
467
|
-
const TableSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
468
|
+
const TableSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70f62793"]]);
|
|
468
469
|
export {
|
|
469
470
|
TableSetting as default
|
|
470
471
|
};
|
|
@@ -12,6 +12,7 @@ import getJsonAsyncUtil from "../../../utils/getJsonAsyncUtil.mjs";
|
|
|
12
12
|
import _FormItem from "../formItem/FormItem.vue.mjs";
|
|
13
13
|
import { createDataSource } from "../../../utils/datasource.mjs";
|
|
14
14
|
import { generateFieldRules } from "./validation.mjs";
|
|
15
|
+
import { parseSingleParamValue } from "../../../utils/parseRouteParams.mjs";
|
|
15
16
|
import { cloneDeep } from "../../../utils/common.mjs";
|
|
16
17
|
/* empty css */
|
|
17
18
|
/* empty css */
|
|
@@ -203,7 +204,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
203
204
|
if (hiddenFields.value && hiddenFields.value.length > 0) {
|
|
204
205
|
hiddenFields.value.forEach((field) => {
|
|
205
206
|
if (field.fieldName) {
|
|
206
|
-
|
|
207
|
+
if (typeof field.value == "object") {
|
|
208
|
+
debugger;
|
|
209
|
+
const value = parseSingleParamValue(field.value, defaultData, [
|
|
210
|
+
...fieldsData.value,
|
|
211
|
+
...hiddenFields.value
|
|
212
|
+
]);
|
|
213
|
+
defaultData[field.fieldName] = value !== void 0 ? value : null;
|
|
214
|
+
} else {
|
|
215
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
216
|
+
}
|
|
207
217
|
}
|
|
208
218
|
});
|
|
209
219
|
}
|
|
@@ -971,7 +981,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
971
981
|
};
|
|
972
982
|
}
|
|
973
983
|
});
|
|
974
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
984
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e047372a"]]);
|
|
975
985
|
export {
|
|
976
986
|
_Form as default
|
|
977
987
|
};
|
|
@@ -199,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
199
199
|
}, toHandlers(__props.config.eventHandlers), {
|
|
200
200
|
placeholder: __props.placeholder,
|
|
201
201
|
disabled: __props.disabled,
|
|
202
|
-
readonly: __props.suffixButton == "dialog" ? true :
|
|
202
|
+
readonly: __props.suffixButton == "dialog" ? true : false,
|
|
203
203
|
maxlength: __props.maxLength,
|
|
204
204
|
"show-word-limit": __props.showWordCount,
|
|
205
205
|
onChange: handleChange,
|
|
@@ -249,7 +249,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
252
|
+
const _Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b0a06421"]]);
|
|
253
253
|
export {
|
|
254
254
|
_Text as default
|
|
255
255
|
};
|
|
@@ -152,6 +152,10 @@ class DataSourceManager {
|
|
|
152
152
|
case "post":
|
|
153
153
|
if (currentDs.contentType === "formData") {
|
|
154
154
|
response = await this.http.postForm(url, params, requestConfig);
|
|
155
|
+
} else if (currentDs.contentType === "download") {
|
|
156
|
+
await this.http.download(url, params, requestConfig);
|
|
157
|
+
} else if (currentDs.contentType === "upload") {
|
|
158
|
+
response = await this.http.upload(url, params, requestConfig);
|
|
155
159
|
} else {
|
|
156
160
|
response = await this.http.post(url, params, requestConfig);
|
|
157
161
|
}
|
|
@@ -378,7 +378,7 @@ async function handleCustomAction(node, data, fields, context) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
async function handleFormSetValue(node, data, fields, context) {
|
|
381
|
-
var _a, _b, _c;
|
|
381
|
+
var _a, _b, _c, _d;
|
|
382
382
|
const basic = node.basic || {};
|
|
383
383
|
if (!(basic == null ? void 0 : basic.dataSourceId)) {
|
|
384
384
|
console.error("form-setValue: 缺少 dataSourceId 配置");
|
|
@@ -408,8 +408,8 @@ async function handleFormSetValue(node, data, fields, context) {
|
|
|
408
408
|
formData = removeEmptyValues(formData);
|
|
409
409
|
delete formData.pageNo;
|
|
410
410
|
delete formData.pageSize;
|
|
411
|
-
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
412
|
-
const setFormDataMethod = (
|
|
411
|
+
const formComponent = ((_a = context.components) == null ? void 0 : _a.form) || ((_b = context.components) == null ? void 0 : _b.table);
|
|
412
|
+
const setFormDataMethod = (_d = (_c = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _c.exposed) == null ? void 0 : _d.setFormData;
|
|
413
413
|
if (typeof setFormDataMethod === "function") {
|
|
414
414
|
setFormDataMethod(formData);
|
|
415
415
|
return {
|
|
@@ -537,7 +537,6 @@ async function handleDialog(node, data, fields, context) {
|
|
|
537
537
|
const dialogList = context.localConfig.dialogs || [];
|
|
538
538
|
dialog = dialogList.find((item) => item.id == (basic == null ? void 0 : basic.dialogId));
|
|
539
539
|
dialog.subFormMode = basic.subFormMode;
|
|
540
|
-
dialog.selectionMode = basic.selectionMode;
|
|
541
540
|
}
|
|
542
541
|
if (!dialog) {
|
|
543
542
|
console.error("ui-dialog: 未找到匹配的弹层配置," + (basic == null ? void 0 : basic.dialogId));
|
|
@@ -567,6 +566,104 @@ async function handleDialog(node, data, fields, context) {
|
|
|
567
566
|
};
|
|
568
567
|
}
|
|
569
568
|
}
|
|
569
|
+
async function handleUpload(node, data, fields, context) {
|
|
570
|
+
const basic = node.basic || {};
|
|
571
|
+
console.log("[EventFlow] 执行文件上传动作:", basic);
|
|
572
|
+
const dataSourceId = basic.dataSourceId || "";
|
|
573
|
+
const acceptType = basic.acceptType || [];
|
|
574
|
+
const maxSize = basic.maxSize || 0;
|
|
575
|
+
const multipleUpload = basic.multipleUpload || false;
|
|
576
|
+
if (!dataSourceId) {
|
|
577
|
+
return {
|
|
578
|
+
success: false,
|
|
579
|
+
message: "文件上传动作缺少必要的数据源配置(dataSourceId)",
|
|
580
|
+
shouldShowError: true
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
const acceptArr = [];
|
|
584
|
+
if (acceptType.includes("image")) {
|
|
585
|
+
acceptArr.push("image/*");
|
|
586
|
+
}
|
|
587
|
+
if (acceptType.includes("video")) {
|
|
588
|
+
acceptArr.push("video/*");
|
|
589
|
+
}
|
|
590
|
+
if (acceptType.includes("audio")) {
|
|
591
|
+
acceptArr.push("audio/*");
|
|
592
|
+
}
|
|
593
|
+
if (acceptType.includes("text")) {
|
|
594
|
+
acceptArr.push("text/plain");
|
|
595
|
+
}
|
|
596
|
+
if (acceptType.includes("doc")) {
|
|
597
|
+
acceptArr.push(".doc");
|
|
598
|
+
acceptArr.push(".docx");
|
|
599
|
+
}
|
|
600
|
+
if (acceptType.includes("xls")) {
|
|
601
|
+
acceptArr.push(".xls");
|
|
602
|
+
acceptArr.push(".xlsx");
|
|
603
|
+
}
|
|
604
|
+
if (acceptType.includes("ppt")) {
|
|
605
|
+
acceptArr.push(".ppt");
|
|
606
|
+
acceptArr.push(".pptx");
|
|
607
|
+
}
|
|
608
|
+
if (acceptType.includes("pdf")) {
|
|
609
|
+
acceptArr.push("application/pdf");
|
|
610
|
+
}
|
|
611
|
+
if (acceptType.includes("zip")) {
|
|
612
|
+
acceptArr.push("application/zip");
|
|
613
|
+
acceptArr.push("application/x-rar-compressed");
|
|
614
|
+
}
|
|
615
|
+
let accept = "";
|
|
616
|
+
if (acceptArr.length < 13) {
|
|
617
|
+
accept = acceptArr.join(",");
|
|
618
|
+
}
|
|
619
|
+
const files = await new Promise((resolve, reject) => {
|
|
620
|
+
const input = document.createElement("input");
|
|
621
|
+
input.type = "file";
|
|
622
|
+
input.multiple = multipleUpload;
|
|
623
|
+
input.accept = accept;
|
|
624
|
+
input.click();
|
|
625
|
+
input.onchange = () => {
|
|
626
|
+
let files2 = Array.from(input.files || []);
|
|
627
|
+
if (files2.length === 0) return resolve([]);
|
|
628
|
+
if (maxSize > 0) {
|
|
629
|
+
const maxByte = maxSize * 1024 * 1024;
|
|
630
|
+
const invalidFiles = files2.some((f) => f.size > maxByte);
|
|
631
|
+
if (invalidFiles) {
|
|
632
|
+
reject(new Error(`文件不能超过 ${maxSize}MB`));
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
resolve(files2);
|
|
637
|
+
};
|
|
638
|
+
});
|
|
639
|
+
if (!files || files.length === 0) {
|
|
640
|
+
return { success: false, message: "未选择文件" };
|
|
641
|
+
}
|
|
642
|
+
try {
|
|
643
|
+
const params = multipleUpload ? { files } : { file: files[0] };
|
|
644
|
+
const result = await handleApiCall(node, data, fields, context, params);
|
|
645
|
+
if (!result.success) {
|
|
646
|
+
return result;
|
|
647
|
+
}
|
|
648
|
+
return {
|
|
649
|
+
success: true,
|
|
650
|
+
message: `文件上传成功'}`,
|
|
651
|
+
data: {
|
|
652
|
+
dataSourceId,
|
|
653
|
+
acceptType,
|
|
654
|
+
maxSize,
|
|
655
|
+
multipleUpload,
|
|
656
|
+
acceptType
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
} catch (error) {
|
|
660
|
+
return {
|
|
661
|
+
success: false,
|
|
662
|
+
message: "上传失败",
|
|
663
|
+
shouldShowError: true
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
}
|
|
570
667
|
const defaultActionHandlers = {
|
|
571
668
|
"page-jump": handlePageJump,
|
|
572
669
|
"page-go-back": handlePageGoBack,
|
|
@@ -579,7 +676,8 @@ const defaultActionHandlers = {
|
|
|
579
676
|
"form-setValue": handleFormSetValue,
|
|
580
677
|
"form-submit": handleFormSubmit,
|
|
581
678
|
"custom": handleCustomAction,
|
|
582
|
-
"ui-dialog": handleDialog
|
|
679
|
+
"ui-dialog": handleDialog,
|
|
680
|
+
"ui-upload": handleUpload
|
|
583
681
|
};
|
|
584
682
|
export {
|
|
585
683
|
defaultActionHandlers as default,
|
|
@@ -593,5 +691,6 @@ export {
|
|
|
593
691
|
handlePageJump,
|
|
594
692
|
handleTableChildRefresh,
|
|
595
693
|
handleTableRefresh,
|
|
596
|
-
handleTableRowDelete
|
|
694
|
+
handleTableRowDelete,
|
|
695
|
+
handleUpload
|
|
597
696
|
};
|
|
@@ -8,7 +8,7 @@ function parseSingleParamValue(value, data, fields) {
|
|
|
8
8
|
}
|
|
9
9
|
const type = value.type;
|
|
10
10
|
if (type === "field") {
|
|
11
|
-
const field = fields.find((f) => f.id
|
|
11
|
+
const field = fields.find((f) => f.id == value.value);
|
|
12
12
|
if (field) {
|
|
13
13
|
return data[field.fieldName];
|
|
14
14
|
}
|