@fecp/designer 5.3.9 → 5.3.11
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 +270 -235
- package/es/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 +20 -0
- 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/layout/header/index.vue.mjs +4 -0
- package/es/packages/designer/src/packages/dataSource/dataSource.vue.mjs +65 -45
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +2 -0
- 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/index.vue.mjs +29 -110
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +2 -0
- 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/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/utils/datasource.mjs +4 -0
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +105 -5
- package/lib/designer.css +270 -235
- package/lib/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.js +20 -0
- 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/layout/header/index.vue.js +4 -0
- package/lib/packages/designer/src/packages/dataSource/dataSource.vue.js +64 -44
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +2 -0
- 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/index.vue.js +32 -113
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +2 -0
- 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/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/utils/datasource.js +4 -0
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +104 -4
- package/package.json +1 -1
|
@@ -4,13 +4,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
;/* empty css */
|
|
5
5
|
;/* empty css */
|
|
6
6
|
;/* empty css */
|
|
7
|
-
;/* empty css */
|
|
8
|
-
;/* empty css */
|
|
9
|
-
;/* empty css */
|
|
10
|
-
;/* empty css */
|
|
11
|
-
require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-dropdown-menu.css.js");
|
|
12
|
-
;/* empty css */
|
|
13
|
-
;/* empty css */
|
|
14
7
|
const vue = require("vue");
|
|
15
8
|
const eventBus = require("../utils/eventBus.js");
|
|
16
9
|
require("../../../../../node_modules/.pnpm/grid-layout-plus@1.1.1_vue@3.5.13_typescript@5.7.3_/node_modules/grid-layout-plus/es/index.js");
|
|
@@ -35,11 +28,8 @@ const index$1 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_v
|
|
|
35
28
|
const index$2 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.js");
|
|
36
29
|
const gridLayout_vue = require("../../../../../node_modules/.pnpm/grid-layout-plus@1.1.1_vue@3.5.13_typescript@5.7.3_/node_modules/grid-layout-plus/es/components/grid-layout.vue.js");
|
|
37
30
|
const index$3 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.js");
|
|
38
|
-
const index$5 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/
|
|
39
|
-
const index$6 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/
|
|
40
|
-
const index$7 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/checkbox/index.js");
|
|
41
|
-
const index$8 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/divider/index.js");
|
|
42
|
-
const index$9 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
|
|
31
|
+
const index$5 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/divider/index.js");
|
|
32
|
+
const index$6 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
|
|
43
33
|
const _hoisted_1 = { class: "form-work-area" };
|
|
44
34
|
const _hoisted_2 = { class: "form-grid-container" };
|
|
45
35
|
const _hoisted_3 = ["onMouseenter", "onClick"];
|
|
@@ -48,22 +38,19 @@ const _hoisted_4 = {
|
|
|
48
38
|
class: "component-toolbar"
|
|
49
39
|
};
|
|
50
40
|
const _hoisted_5 = ["onClick"];
|
|
51
|
-
const _hoisted_6 =
|
|
52
|
-
const _hoisted_7 =
|
|
53
|
-
const _hoisted_8 =
|
|
54
|
-
const _hoisted_9 = { class: "
|
|
55
|
-
const _hoisted_10 =
|
|
56
|
-
const _hoisted_11 = ["onClick"];
|
|
57
|
-
const _hoisted_12 = { class: "status-tags" };
|
|
58
|
-
const _hoisted_13 = {
|
|
41
|
+
const _hoisted_6 = ["onClick"];
|
|
42
|
+
const _hoisted_7 = ["onClick"];
|
|
43
|
+
const _hoisted_8 = ["onClick"];
|
|
44
|
+
const _hoisted_9 = { class: "status-tags" };
|
|
45
|
+
const _hoisted_10 = {
|
|
59
46
|
key: 0,
|
|
60
47
|
class: "field-name-tag"
|
|
61
48
|
};
|
|
62
|
-
const
|
|
49
|
+
const _hoisted_11 = {
|
|
63
50
|
key: 1,
|
|
64
51
|
class: "status-tag disabled-tag"
|
|
65
52
|
};
|
|
66
|
-
const
|
|
53
|
+
const _hoisted_12 = {
|
|
67
54
|
key: 2,
|
|
68
55
|
class: "status-tag readonly-tag"
|
|
69
56
|
};
|
|
@@ -182,7 +169,7 @@ const _sfc_main = {
|
|
|
182
169
|
};
|
|
183
170
|
editConfigData.value.deletedFields.push(deletedField);
|
|
184
171
|
layoutData.value.splice(index2, 1);
|
|
185
|
-
index$
|
|
172
|
+
index$6.ElMessage.success("字段已移至回收站");
|
|
186
173
|
}
|
|
187
174
|
}
|
|
188
175
|
function handleHide(item) {
|
|
@@ -319,13 +306,7 @@ const _sfc_main = {
|
|
|
319
306
|
eventBus.default.on("resizeEvent", () => {
|
|
320
307
|
gridLayout.value.resizeEvent();
|
|
321
308
|
});
|
|
322
|
-
|
|
323
|
-
function getDropdownVisible(itemId) {
|
|
324
|
-
return dropdownVisibleMap.value.get(itemId) || false;
|
|
325
|
-
}
|
|
326
|
-
function setDropdownVisible(itemId, visible) {
|
|
327
|
-
dropdownVisibleMap.value.set(itemId, visible);
|
|
328
|
-
}
|
|
309
|
+
vue.ref(/* @__PURE__ */ new Map());
|
|
329
310
|
const isDragging = vue.computed(() => {
|
|
330
311
|
var _a;
|
|
331
312
|
return ((_a = gridLayout.value) == null ? void 0 : _a.state.isDragging) || false;
|
|
@@ -345,12 +326,8 @@ const _sfc_main = {
|
|
|
345
326
|
});
|
|
346
327
|
return (_ctx, _cache) => {
|
|
347
328
|
const _component_el_icon = index$3.ElIcon;
|
|
348
|
-
const _component_el_input = index$6.ElInput;
|
|
349
|
-
const _component_el_checkbox = index$7.ElCheckbox;
|
|
350
|
-
const _component_el_dropdown_menu = index$5.ElDropdownMenu;
|
|
351
|
-
const _component_el_dropdown = index$5.ElDropdown;
|
|
352
329
|
const _component_Hide = vue.resolveComponent("Hide");
|
|
353
|
-
const _component_el_divider = index$
|
|
330
|
+
const _component_el_divider = index$5.ElDivider;
|
|
354
331
|
const _component_el_form = index$2.ElForm;
|
|
355
332
|
const _component_el_scrollbar = index$1.ElScrollbar;
|
|
356
333
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -413,76 +390,18 @@ const _sfc_main = {
|
|
|
413
390
|
_: 2
|
|
414
391
|
}, 1024)
|
|
415
392
|
], 10, _hoisted_5),
|
|
416
|
-
vue.
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
_cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "setting-label" }, "标题:", -1)),
|
|
429
|
-
vue.createVNode(_component_el_input, {
|
|
430
|
-
modelValue: item.component.label,
|
|
431
|
-
"onUpdate:modelValue": ($event) => item.component.label = $event,
|
|
432
|
-
size: "small",
|
|
433
|
-
class: "setting-input"
|
|
434
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
435
|
-
]),
|
|
436
|
-
vue.createElementVNode("div", _hoisted_8, [
|
|
437
|
-
_cache[4] || (_cache[4] = vue.createElementVNode("span", { class: "setting-label" }, "字段:", -1)),
|
|
438
|
-
vue.createVNode(_component_el_input, {
|
|
439
|
-
modelValue: item.component.fieldName,
|
|
440
|
-
"onUpdate:modelValue": ($event) => item.component.fieldName = $event,
|
|
441
|
-
size: "small",
|
|
442
|
-
class: "setting-input"
|
|
443
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
444
|
-
]),
|
|
445
|
-
vue.createElementVNode("div", _hoisted_9, [
|
|
446
|
-
vue.createVNode(_component_el_checkbox, {
|
|
447
|
-
modelValue: item.component.required,
|
|
448
|
-
"onUpdate:modelValue": ($event) => item.component.required = $event,
|
|
449
|
-
label: "必填",
|
|
450
|
-
size: "small"
|
|
451
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
452
|
-
vue.createVNode(_component_el_checkbox, {
|
|
453
|
-
modelValue: item.component.readOnly,
|
|
454
|
-
"onUpdate:modelValue": ($event) => item.component.readOnly = $event,
|
|
455
|
-
label: "只读",
|
|
456
|
-
size: "small"
|
|
457
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
458
|
-
vue.createVNode(_component_el_checkbox, {
|
|
459
|
-
modelValue: item.component.disabled,
|
|
460
|
-
"onUpdate:modelValue": ($event) => item.component.disabled = $event,
|
|
461
|
-
label: "禁用",
|
|
462
|
-
size: "small"
|
|
463
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
464
|
-
])
|
|
465
|
-
])
|
|
466
|
-
]),
|
|
467
|
-
_: 2
|
|
468
|
-
}, 1024)) : vue.createCommentVNode("", true)
|
|
469
|
-
]),
|
|
470
|
-
default: vue.withCtx(() => [
|
|
471
|
-
item.component.fieldType != "blank" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
472
|
-
key: 0,
|
|
473
|
-
class: vue.normalizeClass(["toolbar-btn settings-btn", { "is-active": getDropdownVisible(item.id) }]),
|
|
474
|
-
title: "快捷设置"
|
|
475
|
-
}, [
|
|
476
|
-
vue.createVNode(_component_el_icon, null, {
|
|
477
|
-
default: vue.withCtx(() => [
|
|
478
|
-
vue.createVNode(vue.unref(index$4.Setting))
|
|
479
|
-
]),
|
|
480
|
-
_: 1
|
|
481
|
-
})
|
|
482
|
-
], 2)) : vue.createCommentVNode("", true)
|
|
483
|
-
]),
|
|
484
|
-
_: 2
|
|
485
|
-
}, 1032, ["popper-class", "onVisibleChange"]),
|
|
393
|
+
vue.createElementVNode("span", {
|
|
394
|
+
class: vue.normalizeClass(["toolbar-btn disabled-btn", { "is-disabled": item.component.disabled }]),
|
|
395
|
+
title: "设置只读",
|
|
396
|
+
onClick: vue.withModifiers(($event) => item.component.disabled = !item.component.disabled, ["stop"])
|
|
397
|
+
}, [
|
|
398
|
+
vue.createVNode(_component_el_icon, null, {
|
|
399
|
+
default: vue.withCtx(() => [
|
|
400
|
+
item.component.disabled ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.Lock), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.Unlock), { key: 1 }))
|
|
401
|
+
]),
|
|
402
|
+
_: 2
|
|
403
|
+
}, 1024)
|
|
404
|
+
], 10, _hoisted_6),
|
|
486
405
|
vue.createElementVNode("span", {
|
|
487
406
|
class: "toolbar-btn settings-btn",
|
|
488
407
|
title: "放进隐藏域",
|
|
@@ -494,7 +413,7 @@ const _sfc_main = {
|
|
|
494
413
|
]),
|
|
495
414
|
_: 1
|
|
496
415
|
})
|
|
497
|
-
], 8,
|
|
416
|
+
], 8, _hoisted_7),
|
|
498
417
|
vue.createElementVNode("span", {
|
|
499
418
|
class: "toolbar-btn delete-btn",
|
|
500
419
|
title: "删除组件",
|
|
@@ -506,18 +425,18 @@ const _sfc_main = {
|
|
|
506
425
|
]),
|
|
507
426
|
_: 1
|
|
508
427
|
})
|
|
509
|
-
], 8,
|
|
428
|
+
], 8, _hoisted_8)
|
|
510
429
|
])) : vue.createCommentVNode("", true),
|
|
511
|
-
vue.createElementVNode("div",
|
|
512
|
-
editConfigData.value.showFieldName && item.component.fieldName ? (vue.openBlock(), vue.createElementBlock("div",
|
|
513
|
-
item.component.disabled ? (vue.openBlock(), vue.createElementBlock("div",
|
|
430
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
431
|
+
editConfigData.value.showFieldName && item.component.fieldName ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, vue.toDisplayString(item.component.fieldType == "blank" ? "空白占位" : item.component.fieldName), 1)) : vue.createCommentVNode("", true),
|
|
432
|
+
item.component.disabled ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
514
433
|
vue.createVNode(_component_el_icon, null, {
|
|
515
434
|
default: vue.withCtx(() => [
|
|
516
435
|
vue.createVNode(vue.unref(index$4.Lock))
|
|
517
436
|
]),
|
|
518
437
|
_: 1
|
|
519
438
|
})
|
|
520
|
-
])) : item.component.readOnly ? (vue.openBlock(), vue.createElementBlock("div",
|
|
439
|
+
])) : item.component.readOnly ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
521
440
|
vue.createVNode(_component_el_icon, null, {
|
|
522
441
|
default: vue.withCtx(() => [
|
|
523
442
|
vue.createVNode(vue.unref(index$4.View))
|
|
@@ -554,7 +473,7 @@ const _sfc_main = {
|
|
|
554
473
|
key: 5,
|
|
555
474
|
"border-style": "dashed"
|
|
556
475
|
}, {
|
|
557
|
-
default: vue.withCtx(() => _cache[
|
|
476
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
558
477
|
vue.createTextVNode(" 此处为分割线,阻止下方组件自动向上补齐,解析时不显示 ")
|
|
559
478
|
])),
|
|
560
479
|
_: 1
|
|
@@ -582,5 +501,5 @@ const _sfc_main = {
|
|
|
582
501
|
};
|
|
583
502
|
}
|
|
584
503
|
};
|
|
585
|
-
const formWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
504
|
+
const formWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-1d0d8388"]]);
|
|
586
505
|
exports.default = formWorkArea;
|
|
@@ -76,6 +76,8 @@ require("../../axios/config.js");
|
|
|
76
76
|
require("../../../../../_virtual/FileSaver.min.js");
|
|
77
77
|
require("../../../../../_virtual/index.js");
|
|
78
78
|
;/* empty css */
|
|
79
|
+
;/* empty css */
|
|
80
|
+
;/* empty css */
|
|
79
81
|
const useAdvancedFilterDialog = require("../advancedFilter/useAdvancedFilterDialog.js");
|
|
80
82
|
;/* empty css */
|
|
81
83
|
;/* empty css */
|
|
@@ -261,6 +261,7 @@ const _sfc_main = {
|
|
|
261
261
|
]),
|
|
262
262
|
vue.createElementVNode("div", _hoisted_10, [
|
|
263
263
|
vue.createVNode(_component_el_dropdown, {
|
|
264
|
+
"max-height": 500,
|
|
264
265
|
"popper-class": `quick-operation-dropdown-${item.id}`,
|
|
265
266
|
trigger: "click",
|
|
266
267
|
placement: "bottom",
|
|
@@ -470,5 +471,5 @@ const _sfc_main = {
|
|
|
470
471
|
};
|
|
471
472
|
}
|
|
472
473
|
};
|
|
473
|
-
const tableWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
474
|
+
const tableWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f581ce52"]]);
|
|
474
475
|
exports.default = tableWorkArea;
|
|
@@ -85,15 +85,6 @@ const _sfc_main = {
|
|
|
85
85
|
]),
|
|
86
86
|
_: 1
|
|
87
87
|
}),
|
|
88
|
-
vue.createVNode(_component_el_form_item, { label: "显示条件" }, {
|
|
89
|
-
default: vue.withCtx(() => [
|
|
90
|
-
vue.createVNode(ConditionConfigButton.default, {
|
|
91
|
-
condition: vue.unref(currentItem).showCondition,
|
|
92
|
-
onConfirm: (data) => vue.unref(currentItem).showCondition = data
|
|
93
|
-
}, null, 8, ["condition", "onConfirm"])
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}),
|
|
97
88
|
vue.createVNode(_component_el_form_item, { label: "风格" }, {
|
|
98
89
|
default: vue.withCtx(() => [
|
|
99
90
|
vue.createVNode(_component_el_select, {
|
|
@@ -265,6 +265,7 @@ const _sfc_main = {
|
|
|
265
265
|
queryConfig.value.mode === "dynamic" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
266
266
|
vue.createVNode(_component_el_divider, { direction: "vertical" }),
|
|
267
267
|
vue.createVNode(_component_el_dropdown, {
|
|
268
|
+
"max-height": 500,
|
|
268
269
|
trigger: "click",
|
|
269
270
|
"popper-class": "tab-config-dropdown",
|
|
270
271
|
onVisibleChange: _cache[7] || (_cache[7] = (visible) => tabConfigDropdownVisible.value = visible)
|
|
@@ -386,6 +387,7 @@ const _sfc_main = {
|
|
|
386
387
|
}),
|
|
387
388
|
vue.createVNode(_component_el_divider, { direction: "vertical" }),
|
|
388
389
|
vue.createVNode(_component_el_dropdown, {
|
|
390
|
+
"max-height": 500,
|
|
389
391
|
trigger: "click",
|
|
390
392
|
placement: "bottom",
|
|
391
393
|
"hide-on-click": false
|
|
@@ -553,5 +555,5 @@ const _sfc_main = {
|
|
|
553
555
|
};
|
|
554
556
|
}
|
|
555
557
|
};
|
|
556
|
-
const QueryModule = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
558
|
+
const QueryModule = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e569e134"]]);
|
|
557
559
|
exports.default = QueryModule;
|
|
@@ -271,6 +271,7 @@ const _sfc_main = {
|
|
|
271
271
|
]),
|
|
272
272
|
vue.createElementVNode("div", _hoisted_3, [
|
|
273
273
|
vue.createVNode(_component_el_dropdown, {
|
|
274
|
+
"max-height": 500,
|
|
274
275
|
trigger: "click",
|
|
275
276
|
"popper-class": "sort-config-dropdown",
|
|
276
277
|
onVisibleChange: _cache[6] || (_cache[6] = (visible) => sortConfigDropdownVisible.value = visible)
|
|
@@ -466,5 +467,5 @@ const _sfc_main = {
|
|
|
466
467
|
};
|
|
467
468
|
}
|
|
468
469
|
};
|
|
469
|
-
const TableSetting = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
470
|
+
const TableSetting = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-70f62793"]]);
|
|
470
471
|
exports.default = TableSetting;
|
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const vue = require("vue");
|
|
11
|
-
;/* empty css */
|
|
12
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
13
11
|
;/* empty css */
|
|
14
12
|
;/* empty css */
|
|
15
13
|
;/* empty css */
|
|
16
14
|
;/* empty css */
|
|
17
15
|
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/index.js");
|
|
@@ -154,6 +154,10 @@ class DataSourceManager {
|
|
|
154
154
|
case "post":
|
|
155
155
|
if (currentDs.contentType === "formData") {
|
|
156
156
|
response = await this.http.postForm(url, params, requestConfig);
|
|
157
|
+
} else if (currentDs.contentType === "download") {
|
|
158
|
+
await this.http.download(url, params, requestConfig);
|
|
159
|
+
} else if (currentDs.contentType === "upload") {
|
|
160
|
+
response = await this.http.upload(url, params, requestConfig);
|
|
157
161
|
} else {
|
|
158
162
|
response = await this.http.post(url, params, requestConfig);
|
|
159
163
|
}
|
|
@@ -380,7 +380,7 @@ async function handleCustomAction(node, data, fields, context) {
|
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
382
|
async function handleFormSetValue(node, data, fields, context) {
|
|
383
|
-
var _a, _b, _c;
|
|
383
|
+
var _a, _b, _c, _d;
|
|
384
384
|
const basic = node.basic || {};
|
|
385
385
|
if (!(basic == null ? void 0 : basic.dataSourceId)) {
|
|
386
386
|
console.error("form-setValue: 缺少 dataSourceId 配置");
|
|
@@ -410,8 +410,8 @@ async function handleFormSetValue(node, data, fields, context) {
|
|
|
410
410
|
formData = common.removeEmptyValues(formData);
|
|
411
411
|
delete formData.pageNo;
|
|
412
412
|
delete formData.pageSize;
|
|
413
|
-
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
414
|
-
const setFormDataMethod = (
|
|
413
|
+
const formComponent = ((_a = context.components) == null ? void 0 : _a.form) || ((_b = context.components) == null ? void 0 : _b.table);
|
|
414
|
+
const setFormDataMethod = (_d = (_c = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _c.exposed) == null ? void 0 : _d.setFormData;
|
|
415
415
|
if (typeof setFormDataMethod === "function") {
|
|
416
416
|
setFormDataMethod(formData);
|
|
417
417
|
return {
|
|
@@ -569,6 +569,104 @@ async function handleDialog(node, data, fields, context) {
|
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
+
async function handleUpload(node, data, fields, context) {
|
|
573
|
+
const basic = node.basic || {};
|
|
574
|
+
console.log("[EventFlow] 执行文件上传动作:", basic);
|
|
575
|
+
const dataSourceId = basic.dataSourceId || "";
|
|
576
|
+
const acceptType = basic.acceptType || [];
|
|
577
|
+
const maxSize = basic.maxSize || 0;
|
|
578
|
+
const multipleUpload = basic.multipleUpload || false;
|
|
579
|
+
if (!dataSourceId) {
|
|
580
|
+
return {
|
|
581
|
+
success: false,
|
|
582
|
+
message: "文件上传动作缺少必要的数据源配置(dataSourceId)",
|
|
583
|
+
shouldShowError: true
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
const acceptArr = [];
|
|
587
|
+
if (acceptType.includes("image")) {
|
|
588
|
+
acceptArr.push("image/*");
|
|
589
|
+
}
|
|
590
|
+
if (acceptType.includes("video")) {
|
|
591
|
+
acceptArr.push("video/*");
|
|
592
|
+
}
|
|
593
|
+
if (acceptType.includes("audio")) {
|
|
594
|
+
acceptArr.push("audio/*");
|
|
595
|
+
}
|
|
596
|
+
if (acceptType.includes("text")) {
|
|
597
|
+
acceptArr.push("text/plain");
|
|
598
|
+
}
|
|
599
|
+
if (acceptType.includes("doc")) {
|
|
600
|
+
acceptArr.push(".doc");
|
|
601
|
+
acceptArr.push(".docx");
|
|
602
|
+
}
|
|
603
|
+
if (acceptType.includes("xls")) {
|
|
604
|
+
acceptArr.push(".xls");
|
|
605
|
+
acceptArr.push(".xlsx");
|
|
606
|
+
}
|
|
607
|
+
if (acceptType.includes("ppt")) {
|
|
608
|
+
acceptArr.push(".ppt");
|
|
609
|
+
acceptArr.push(".pptx");
|
|
610
|
+
}
|
|
611
|
+
if (acceptType.includes("pdf")) {
|
|
612
|
+
acceptArr.push("application/pdf");
|
|
613
|
+
}
|
|
614
|
+
if (acceptType.includes("zip")) {
|
|
615
|
+
acceptArr.push("application/zip");
|
|
616
|
+
acceptArr.push("application/x-rar-compressed");
|
|
617
|
+
}
|
|
618
|
+
let accept = "";
|
|
619
|
+
if (acceptArr.length < 13) {
|
|
620
|
+
accept = acceptArr.join(",");
|
|
621
|
+
}
|
|
622
|
+
const files = await new Promise((resolve, reject) => {
|
|
623
|
+
const input = document.createElement("input");
|
|
624
|
+
input.type = "file";
|
|
625
|
+
input.multiple = multipleUpload;
|
|
626
|
+
input.accept = accept;
|
|
627
|
+
input.click();
|
|
628
|
+
input.onchange = () => {
|
|
629
|
+
let files2 = Array.from(input.files || []);
|
|
630
|
+
if (files2.length === 0) return resolve([]);
|
|
631
|
+
if (maxSize > 0) {
|
|
632
|
+
const maxByte = maxSize * 1024 * 1024;
|
|
633
|
+
const invalidFiles = files2.some((f) => f.size > maxByte);
|
|
634
|
+
if (invalidFiles) {
|
|
635
|
+
reject(new Error(`文件不能超过 ${maxSize}MB`));
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
resolve(files2);
|
|
640
|
+
};
|
|
641
|
+
});
|
|
642
|
+
if (!files || files.length === 0) {
|
|
643
|
+
return { success: false, message: "未选择文件" };
|
|
644
|
+
}
|
|
645
|
+
try {
|
|
646
|
+
const params = multipleUpload ? { files } : { file: files[0] };
|
|
647
|
+
const result = await handleApiCall(node, data, fields, context, params);
|
|
648
|
+
if (!result.success) {
|
|
649
|
+
return result;
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
success: true,
|
|
653
|
+
message: `文件上传成功'}`,
|
|
654
|
+
data: {
|
|
655
|
+
dataSourceId,
|
|
656
|
+
acceptType,
|
|
657
|
+
maxSize,
|
|
658
|
+
multipleUpload,
|
|
659
|
+
acceptType
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
} catch (error) {
|
|
663
|
+
return {
|
|
664
|
+
success: false,
|
|
665
|
+
message: "上传失败",
|
|
666
|
+
shouldShowError: true
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
}
|
|
572
670
|
const defaultActionHandlers = {
|
|
573
671
|
"page-jump": handlePageJump,
|
|
574
672
|
"page-go-back": handlePageGoBack,
|
|
@@ -581,7 +679,8 @@ const defaultActionHandlers = {
|
|
|
581
679
|
"form-setValue": handleFormSetValue,
|
|
582
680
|
"form-submit": handleFormSubmit,
|
|
583
681
|
"custom": handleCustomAction,
|
|
584
|
-
"ui-dialog": handleDialog
|
|
682
|
+
"ui-dialog": handleDialog,
|
|
683
|
+
"ui-upload": handleUpload
|
|
585
684
|
};
|
|
586
685
|
exports.default = defaultActionHandlers;
|
|
587
686
|
exports.defaultActionHandlers = defaultActionHandlers;
|
|
@@ -595,3 +694,4 @@ exports.handlePageJump = handlePageJump;
|
|
|
595
694
|
exports.handleTableChildRefresh = handleTableChildRefresh;
|
|
596
695
|
exports.handleTableRefresh = handleTableRefresh;
|
|
597
696
|
exports.handleTableRowDelete = handleTableRowDelete;
|
|
697
|
+
exports.handleUpload = handleUpload;
|