@fecp/designer 5.3.14 → 5.3.16
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 +107 -101
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/layout/header/index.vue.mjs +1 -0
- package/es/packages/designer/src/packages/dialog/index.vue.mjs +44 -32
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +1 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/TableChildSelection.vue2.mjs +100 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +4 -0
- package/es/packages/designer/src/packages/form/property/pageFooterBtn.vue.mjs +13 -1
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +1 -0
- package/es/packages/designer/src/packages/table/property/widgets.vue.mjs +8 -1
- package/es/packages/designer/src/packages/table/tableSetting.vue.mjs +72 -16
- package/es/packages/vue/src/components/details/header/Header.vue.mjs +14 -6
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +6 -2
- package/es/packages/vue/src/components/forms/checkbox/Checkbox.vue.mjs +2 -3
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +28 -4
- package/es/packages/vue/src/components/forms/radio/Radio.vue.mjs +2 -3
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +5 -5
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +1 -1
- package/es/packages/vue/src/components/table/Table.vue.mjs +6 -3
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +1 -1
- package/es/packages/vue/src/composables/usePageEvents.mjs +1 -1
- package/es/packages/vue/src/utils/datasource.mjs +1 -1
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +62 -0
- package/lib/designer.css +107 -101
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/layout/header/index.vue.js +1 -0
- package/lib/packages/designer/src/packages/dialog/index.vue.js +44 -32
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +1 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/TableChildSelection.vue2.js +100 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +4 -0
- package/lib/packages/designer/src/packages/form/property/pageFooterBtn.vue.js +13 -1
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +1 -0
- package/lib/packages/designer/src/packages/table/property/widgets.vue.js +8 -1
- package/lib/packages/designer/src/packages/table/tableSetting.vue.js +71 -15
- package/lib/packages/vue/src/components/details/header/Header.vue.js +13 -5
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +6 -2
- package/lib/packages/vue/src/components/forms/checkbox/Checkbox.vue.js +2 -3
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +28 -4
- package/lib/packages/vue/src/components/forms/radio/Radio.vue.js +2 -3
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +5 -5
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +1 -1
- package/lib/packages/vue/src/components/table/Table.vue.js +6 -3
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +1 -1
- package/lib/packages/vue/src/composables/usePageEvents.js +1 -1
- package/lib/packages/vue/src/utils/datasource.js +1 -1
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +62 -0
- package/package.json +1 -1
|
@@ -20,6 +20,10 @@ const _sfc_main = {
|
|
|
20
20
|
pageHeaderConfig: {
|
|
21
21
|
type: Object,
|
|
22
22
|
required: true
|
|
23
|
+
},
|
|
24
|
+
isApproval: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
emits: ["action-click"],
|
|
@@ -27,6 +31,10 @@ const _sfc_main = {
|
|
|
27
31
|
const props = __props;
|
|
28
32
|
const ctx = getInstance.getCurrentVueInstance();
|
|
29
33
|
const emit = __emit;
|
|
34
|
+
const canBack = vue.computed(() => {
|
|
35
|
+
var _a;
|
|
36
|
+
return !props.isApproval && ((_a = props.pageHeaderConfig) == null ? void 0 : _a.canBack);
|
|
37
|
+
});
|
|
30
38
|
const getButtonType = (btnStyle) => {
|
|
31
39
|
return "primary";
|
|
32
40
|
};
|
|
@@ -55,14 +63,14 @@ const _sfc_main = {
|
|
|
55
63
|
emit("action-click", action);
|
|
56
64
|
};
|
|
57
65
|
return (_ctx, _cache) => {
|
|
58
|
-
var _a, _b, _c
|
|
66
|
+
var _a, _b, _c;
|
|
59
67
|
const _component_el_button = index$2.ElButton;
|
|
60
68
|
const _component_el_page_header = index.ElPageHeader;
|
|
61
69
|
return ((_a = __props.pageHeaderConfig) == null ? void 0 : _a.enabled) ? (vue.openBlock(), vue.createBlock(_component_el_page_header, {
|
|
62
70
|
key: 0,
|
|
63
|
-
icon: (
|
|
71
|
+
icon: vue.unref(canBack) ? vue.unref(index$1.ArrowLeft) : null,
|
|
64
72
|
onBack: handleBack,
|
|
65
|
-
class: vue.normalizeClass(["fec-header", { "can-not-back": !(
|
|
73
|
+
class: vue.normalizeClass(["fec-header", { "can-not-back": !vue.unref(canBack) }])
|
|
66
74
|
}, vue.createSlots({
|
|
67
75
|
content: vue.withCtx(() => {
|
|
68
76
|
var _a2, _b2;
|
|
@@ -73,7 +81,7 @@ const _sfc_main = {
|
|
|
73
81
|
}),
|
|
74
82
|
_: 2
|
|
75
83
|
}, [
|
|
76
|
-
((
|
|
84
|
+
((_c = (_b = __props.pageHeaderConfig) == null ? void 0 : _b.actions) == null ? void 0 : _c.length) ? {
|
|
77
85
|
name: "extra",
|
|
78
86
|
fn: vue.withCtx(() => {
|
|
79
87
|
var _a2;
|
|
@@ -98,5 +106,5 @@ const _sfc_main = {
|
|
|
98
106
|
};
|
|
99
107
|
}
|
|
100
108
|
};
|
|
101
|
-
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
109
|
+
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-d2665303"]]);
|
|
102
110
|
exports.default = component;
|
|
@@ -10,9 +10,9 @@ const index$2 = require("../forms/form/index.js");
|
|
|
10
10
|
const parseRouteParams = require("../../utils/parseRouteParams.js");
|
|
11
11
|
const calculate = require("../../utils/formulajs/calculate.js");
|
|
12
12
|
const eventFlowHandler = require("../../utils/eventFlow/eventFlowHandler.js");
|
|
13
|
-
;/* empty css */
|
|
14
13
|
;/* empty css */
|
|
15
14
|
;/* empty css */
|
|
15
|
+
;/* empty css */
|
|
16
16
|
;/* empty css */
|
|
17
17
|
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
;/* empty css */
|
|
@@ -169,6 +169,10 @@ const _sfc_main = {
|
|
|
169
169
|
} else {
|
|
170
170
|
console.log("未配置参数字段: displayField");
|
|
171
171
|
}
|
|
172
|
+
const isRowDataAssignToForm = currentDialogConfig.value.isRowDataAssignToForm;
|
|
173
|
+
if (isRowDataAssignToForm) {
|
|
174
|
+
Object.assign(formData, tableSelectionRows.value[0]);
|
|
175
|
+
}
|
|
172
176
|
const fieldMapping = currentDialogConfig.value.fieldMapping;
|
|
173
177
|
if ((fieldMapping == null ? void 0 : fieldMapping.length) > 0) {
|
|
174
178
|
fieldMapping.forEach((item) => {
|
|
@@ -413,5 +417,5 @@ const _sfc_main = {
|
|
|
413
417
|
};
|
|
414
418
|
}
|
|
415
419
|
};
|
|
416
|
-
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
420
|
+
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-409d49b3"]]);
|
|
417
421
|
exports.default = DialogRenderer;
|
|
@@ -71,9 +71,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
71
71
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(options.value, (option) => {
|
|
72
72
|
return vue.openBlock(), vue.createBlock(_component_el_checkbox, {
|
|
73
73
|
value: option.value,
|
|
74
|
-
label: option.label
|
|
75
|
-
|
|
76
|
-
}, null, 8, ["value", "label", "disabled"]);
|
|
74
|
+
label: option.label
|
|
75
|
+
}, null, 8, ["value", "label"]);
|
|
77
76
|
}), 256))
|
|
78
77
|
]),
|
|
79
78
|
_: 1
|
|
@@ -80,6 +80,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
80
80
|
initFormMode: {
|
|
81
81
|
type: String,
|
|
82
82
|
default: ""
|
|
83
|
+
},
|
|
84
|
+
isApproval: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
83
87
|
}
|
|
84
88
|
},
|
|
85
89
|
emits: [
|
|
@@ -555,6 +559,24 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
555
559
|
(_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
556
560
|
);
|
|
557
561
|
};
|
|
562
|
+
const handleApprovalEvent = () => {
|
|
563
|
+
return new Promise((resolve, reject) => {
|
|
564
|
+
var _a, _b;
|
|
565
|
+
const actions = ((_a = localConfig.value.pageFooterConfig) == null ? void 0 : _a.actions) || [];
|
|
566
|
+
const approvalAction = actions.find((item) => item.isApproval);
|
|
567
|
+
if (approvalAction) {
|
|
568
|
+
handleEvent.value(
|
|
569
|
+
formData.value,
|
|
570
|
+
approvalAction,
|
|
571
|
+
(_b = approvalAction.eventConfig) == null ? void 0 : _b.find((item) => item.name == "Click")
|
|
572
|
+
).then(() => {
|
|
573
|
+
resolve();
|
|
574
|
+
}).catch((error) => {
|
|
575
|
+
reject(error);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
};
|
|
558
580
|
const validate = () => {
|
|
559
581
|
var _a;
|
|
560
582
|
return (_a = formRef.value) == null ? void 0 : _a.validate();
|
|
@@ -899,7 +921,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
899
921
|
setFormData,
|
|
900
922
|
getFormItemRef,
|
|
901
923
|
formRef,
|
|
902
|
-
localConfig
|
|
924
|
+
localConfig,
|
|
925
|
+
handleApprovalEvent
|
|
903
926
|
});
|
|
904
927
|
return (_ctx, _cache) => {
|
|
905
928
|
const _component_el_form = index$5.ElForm;
|
|
@@ -915,8 +938,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
915
938
|
default: vue.withCtx(() => [
|
|
916
939
|
!configLoading.value && !__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.header), {
|
|
917
940
|
key: 0,
|
|
941
|
+
isApproval: __props.isApproval,
|
|
918
942
|
pageHeaderConfig: localConfig.value.pageHeaderConfig
|
|
919
|
-
}, null, 8, ["pageHeaderConfig"])) : vue.createCommentVNode("", true),
|
|
943
|
+
}, null, 8, ["isApproval", "pageHeaderConfig"])) : vue.createCommentVNode("", true),
|
|
920
944
|
vue.createVNode(vue.unref(index$4.main), null, {
|
|
921
945
|
default: vue.withCtx(() => [
|
|
922
946
|
vue.createVNode(_component_el_form, {
|
|
@@ -971,7 +995,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
971
995
|
]),
|
|
972
996
|
_: 1
|
|
973
997
|
}),
|
|
974
|
-
!__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.footer), {
|
|
998
|
+
!__props.isSubForm && !__props.isDialog && !__props.isApproval ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.footer), {
|
|
975
999
|
key: 1,
|
|
976
1000
|
formMode: formMode.value,
|
|
977
1001
|
pageFooterConfig: localConfig.value.pageFooterConfig,
|
|
@@ -983,5 +1007,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
983
1007
|
};
|
|
984
1008
|
}
|
|
985
1009
|
});
|
|
986
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1010
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bf001c7c"]]);
|
|
987
1011
|
exports.default = _Form;
|
|
@@ -66,9 +66,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
66
66
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(options.value, (option) => {
|
|
67
67
|
return vue.openBlock(), vue.createBlock(_component_el_radio, {
|
|
68
68
|
value: option.value,
|
|
69
|
-
label: option.label
|
|
70
|
-
|
|
71
|
-
}, null, 8, ["value", "label", "disabled"]);
|
|
69
|
+
label: option.label
|
|
70
|
+
}, null, 8, ["value", "label"]);
|
|
72
71
|
}), 256))
|
|
73
72
|
]),
|
|
74
73
|
_: 1
|
|
@@ -65,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
65
65
|
...props.localConfig.hiddenFields
|
|
66
66
|
];
|
|
67
67
|
});
|
|
68
|
-
const
|
|
68
|
+
const initSearchData = vue.computed(() => {
|
|
69
69
|
if (props.config.dataSourceFrom == "self") {
|
|
70
70
|
const params = parseRouteParams.parseRouteParams(
|
|
71
71
|
props.config.subTableParams,
|
|
@@ -90,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
90
90
|
if (!item.showCondition) return true;
|
|
91
91
|
return parseFilterConfig.checkFilterMatch(
|
|
92
92
|
item.showCondition,
|
|
93
|
-
|
|
93
|
+
initSearchData.value,
|
|
94
94
|
subTableFieldsData.value
|
|
95
95
|
);
|
|
96
96
|
});
|
|
@@ -101,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
101
101
|
if (!item.showCondition) return true;
|
|
102
102
|
return parseFilterConfig.checkFilterMatch(
|
|
103
103
|
item.showCondition,
|
|
104
|
-
|
|
104
|
+
initSearchData.value,
|
|
105
105
|
subTableFieldsData.value
|
|
106
106
|
);
|
|
107
107
|
});
|
|
@@ -198,11 +198,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
198
198
|
hasPagination: __props.config.isSubTablePagination,
|
|
199
199
|
height: __props.config.subTableHeight,
|
|
200
200
|
tableData: vue.unref(subTableData),
|
|
201
|
-
|
|
201
|
+
initSearchData: vue.unref(initSearchData),
|
|
202
202
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
203
203
|
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query",
|
|
204
204
|
btnRollbackEvent: vue.unref(btnRollbackEvent)
|
|
205
|
-
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "
|
|
205
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initSearchData", "canLoadBySearchData", "readonly", "btnRollbackEvent"])
|
|
206
206
|
], 64);
|
|
207
207
|
};
|
|
208
208
|
}
|
|
@@ -4,9 +4,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
;/* empty css */
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const vue = require("vue");
|
|
7
|
-
;/* empty css */
|
|
8
7
|
;/* empty css */
|
|
9
8
|
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
10
|
const index$3 = require("../../dialog/index.js");
|
|
11
11
|
const index$2 = require("../../../api/index.js");
|
|
12
12
|
;/* empty css */
|
|
@@ -127,7 +127,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
127
127
|
const configLoading = vue.ref(true);
|
|
128
128
|
const localConfig = vue.ref({});
|
|
129
129
|
const fieldsData = vue.ref({});
|
|
130
|
-
const hiddenFormData = vue.computed(() =>
|
|
130
|
+
const hiddenFormData = vue.computed(() => ({
|
|
131
|
+
...props.initHiddenData,
|
|
132
|
+
...props.initSearchData
|
|
133
|
+
}));
|
|
131
134
|
const dataSourceOptions = vue.ref({});
|
|
132
135
|
const dictionaryOptions = vue.ref({});
|
|
133
136
|
const displayData = vue.computed(() => {
|
|
@@ -520,7 +523,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
520
523
|
initDataSourceManager();
|
|
521
524
|
});
|
|
522
525
|
});
|
|
523
|
-
const searchData = vue.ref(
|
|
526
|
+
const searchData = vue.ref({});
|
|
524
527
|
vue.watch(
|
|
525
528
|
() => props.initSearchData,
|
|
526
529
|
(newVal, oldVal) => {
|
|
@@ -662,5 +665,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
662
665
|
};
|
|
663
666
|
}
|
|
664
667
|
});
|
|
665
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
668
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-23e9627d"]]);
|
|
666
669
|
exports.default = _Table;
|
|
@@ -8,9 +8,9 @@ require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescri
|
|
|
8
8
|
const index$3 = require("../../../../../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");
|
|
9
9
|
const parseFilterConfig = require("../../utils/parseFilterConfig.js");
|
|
10
10
|
const common = require("../../utils/common.js");
|
|
11
|
-
;/* empty css */
|
|
12
11
|
;/* empty css */
|
|
13
12
|
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
16
|
require("./index.js");
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const parseRouteParams = require("./parseRouteParams.js");
|
|
5
5
|
;/* empty css */
|
|
6
|
-
;/* empty css */
|
|
7
6
|
;/* empty css */
|
|
8
7
|
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
9
|
const index = require("../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/loading/index.js");
|
|
10
10
|
const index$1 = 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");
|
|
11
11
|
class DataSourceManager {
|
|
@@ -315,6 +315,66 @@ async function handleTableChildRefresh(node, data, fields, context) {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
+
async function handleTableChildSelection(node, data, fields, context) {
|
|
319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
320
|
+
console.log("[EventFlow] 执行子表格选择赋值:", node.basic);
|
|
321
|
+
const basic = node.basic || {};
|
|
322
|
+
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
323
|
+
const getFormDataMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.getFormData;
|
|
324
|
+
const setFormDataMethod = (_e = (_d = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _d.exposed) == null ? void 0 : _e.setFormData;
|
|
325
|
+
const getFormItemRefMethod = (_g = (_f = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _f.exposed) == null ? void 0 : _g.getFormItemRef;
|
|
326
|
+
if (typeof getFormItemRefMethod === "function") {
|
|
327
|
+
const subTableRef = getFormItemRefMethod(String(basic.selectSubTableFieldId));
|
|
328
|
+
const getSelectionMethod = (_h = subTableRef == null ? void 0 : subTableRef.subTableRef) == null ? void 0 : _h.getSelection;
|
|
329
|
+
if (typeof getSelectionMethod === "function") {
|
|
330
|
+
const rows = await getSelectionMethod();
|
|
331
|
+
const fieldMapping = basic.subTableSelectionFieldMapping;
|
|
332
|
+
if (fieldMapping && Array.isArray(fieldMapping)) {
|
|
333
|
+
let formData = getFormDataMethod();
|
|
334
|
+
fieldMapping.forEach((mapping) => {
|
|
335
|
+
const { field, value } = mapping;
|
|
336
|
+
const targetField = fields.find((item) => item.id == field);
|
|
337
|
+
if (!targetField) {
|
|
338
|
+
return {
|
|
339
|
+
success: false,
|
|
340
|
+
message: `未找到字段: ${field}`
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
const values = rows.map((row) => row[value]);
|
|
344
|
+
formData[targetField.fieldName] = values.join(",");
|
|
345
|
+
});
|
|
346
|
+
if (typeof setFormDataMethod === "function") {
|
|
347
|
+
setFormDataMethod(formData);
|
|
348
|
+
return {
|
|
349
|
+
success: true,
|
|
350
|
+
message: "赋值成功"
|
|
351
|
+
};
|
|
352
|
+
} else {
|
|
353
|
+
console.error("未找到表单组件的 setFormData 方法");
|
|
354
|
+
return {
|
|
355
|
+
success: false,
|
|
356
|
+
message: "表单组件未正确配置或 setFormData 方法未暴露",
|
|
357
|
+
shouldShowError: true
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
} else {
|
|
362
|
+
console.error("[EventFlow] 未找到子列表组件的 getSelection 方法");
|
|
363
|
+
return {
|
|
364
|
+
success: false,
|
|
365
|
+
message: "子列表组件未正确配置或 getSelection 方法未暴露",
|
|
366
|
+
shouldShowError: true
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
} else {
|
|
370
|
+
console.error("[EventFlow] 未找到表单组件的 getFormItemRef 方法");
|
|
371
|
+
return {
|
|
372
|
+
success: false,
|
|
373
|
+
message: "表单组件未正确配置或 getFormItemRef 方法未暴露",
|
|
374
|
+
shouldShowError: true
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}
|
|
318
378
|
async function handleTableRowDelete(node, data, fields, context) {
|
|
319
379
|
var _a, _b, _c;
|
|
320
380
|
console.log("[EventFlow] 执行表格行删除:", node.basic);
|
|
@@ -675,6 +735,7 @@ const defaultActionHandlers = {
|
|
|
675
735
|
"table-refresh": handleTableRefresh,
|
|
676
736
|
"table-row-delete": handleTableRowDelete,
|
|
677
737
|
"table-child-refresh": handleTableChildRefresh,
|
|
738
|
+
"table-child-selection": handleTableChildSelection,
|
|
678
739
|
"form-setValue": handleFormSetValue,
|
|
679
740
|
"form-submit": handleFormSubmit,
|
|
680
741
|
"custom": handleCustomAction,
|
|
@@ -691,6 +752,7 @@ exports.handleMessage = handleMessage;
|
|
|
691
752
|
exports.handlePageGoBack = handlePageGoBack;
|
|
692
753
|
exports.handlePageJump = handlePageJump;
|
|
693
754
|
exports.handleTableChildRefresh = handleTableChildRefresh;
|
|
755
|
+
exports.handleTableChildSelection = handleTableChildSelection;
|
|
694
756
|
exports.handleTableRefresh = handleTableRefresh;
|
|
695
757
|
exports.handleTableRowDelete = handleTableRowDelete;
|
|
696
758
|
exports.handleUpload = handleUpload;
|