@fecp/designer 5.3.15 → 5.3.17
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 +188 -182
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/packages/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/packages/designer/src/layout/aside/index.vue.mjs +3 -3
- package/es/packages/designer/src/layout/header/index.vue.mjs +1 -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/dialog/index.vue.mjs +44 -32
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +2 -1
- 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/index.vue.mjs +1 -1
- 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 +2 -1
- 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/dialog/DialogRenderer.vue2.mjs +6 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +9 -2
- 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 +101 -95
- 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 +188 -182
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/packages/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/packages/designer/src/layout/aside/index.vue.js +2 -2
- package/lib/packages/designer/src/layout/header/index.vue.js +1 -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/dialog/index.vue.js +44 -32
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +2 -1
- 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/index.vue.js +1 -1
- 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 +2 -1
- 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/dialog/DialogRenderer.vue2.js +6 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +9 -2
- 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 +101 -95
- 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
|
@@ -26,7 +26,7 @@ import { VueDraggable as lo } from "../../../../../node_modules/.pnpm/vue-dragga
|
|
|
26
26
|
/* empty css */
|
|
27
27
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
28
28
|
import { ElRadioGroup, ElRadioButton, ElRadio } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/radio/index.mjs";
|
|
29
|
-
import { ElSelect, ElOption } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/select/index.mjs";
|
|
29
|
+
import { ElSelect, ElOptionGroup, ElOption } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/select/index.mjs";
|
|
30
30
|
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";
|
|
31
31
|
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";
|
|
32
32
|
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/dropdown/index.mjs";
|
|
@@ -55,6 +55,15 @@ const _sfc_main = {
|
|
|
55
55
|
const tableConfig = computed(() => {
|
|
56
56
|
return getEditConfigData();
|
|
57
57
|
});
|
|
58
|
+
const hiddenFields = computed(() => {
|
|
59
|
+
var _a;
|
|
60
|
+
const fields = ((_a = tableConfig.value) == null ? void 0 : _a.hiddenFields) || [];
|
|
61
|
+
return fields.map((item) => ({
|
|
62
|
+
id: item == null ? void 0 : item.id,
|
|
63
|
+
fieldName: item == null ? void 0 : item.fieldName,
|
|
64
|
+
label: item == null ? void 0 : item.label
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
58
67
|
const dataSources = computed(() => {
|
|
59
68
|
return tableConfig.value.dataSources || [];
|
|
60
69
|
});
|
|
@@ -104,6 +113,7 @@ const _sfc_main = {
|
|
|
104
113
|
const _component_el_radio_button = ElRadioButton;
|
|
105
114
|
const _component_el_radio_group = ElRadioGroup;
|
|
106
115
|
const _component_el_option = ElOption;
|
|
116
|
+
const _component_el_option_group = ElOptionGroup;
|
|
107
117
|
const _component_el_select = ElSelect;
|
|
108
118
|
const _component_el_switch = ElSwitch;
|
|
109
119
|
const _component_el_input_number = ElInputNumber;
|
|
@@ -156,13 +166,36 @@ const _sfc_main = {
|
|
|
156
166
|
style: { "width": "100px" }
|
|
157
167
|
}, {
|
|
158
168
|
default: withCtx(() => [
|
|
159
|
-
(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
unref(tableConfig).fieldsData.length > 0 ? (openBlock(), createBlock(_component_el_option_group, {
|
|
170
|
+
key: 0,
|
|
171
|
+
label: "列表字段"
|
|
172
|
+
}, {
|
|
173
|
+
default: withCtx(() => [
|
|
174
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableConfig).fieldsData, (field) => {
|
|
175
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
176
|
+
key: field.fieldName,
|
|
177
|
+
label: field.label,
|
|
178
|
+
value: field.fieldName
|
|
179
|
+
}, null, 8, ["label", "value"]);
|
|
180
|
+
}), 128))
|
|
181
|
+
]),
|
|
182
|
+
_: 1
|
|
183
|
+
})) : createCommentVNode("", true),
|
|
184
|
+
unref(hiddenFields).length > 0 ? (openBlock(), createBlock(_component_el_option_group, {
|
|
185
|
+
key: 1,
|
|
186
|
+
label: "隐藏域"
|
|
187
|
+
}, {
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(hiddenFields), (hidden) => {
|
|
190
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
191
|
+
key: hidden.id,
|
|
192
|
+
label: hidden.label,
|
|
193
|
+
value: hidden.fieldName
|
|
194
|
+
}, null, 8, ["label", "value"]);
|
|
195
|
+
}), 128))
|
|
196
|
+
]),
|
|
197
|
+
_: 1
|
|
198
|
+
})) : createCommentVNode("", true)
|
|
166
199
|
]),
|
|
167
200
|
_: 1
|
|
168
201
|
}, 8, ["modelValue"])
|
|
@@ -320,13 +353,36 @@ const _sfc_main = {
|
|
|
320
353
|
"append-to": ".sort-config-dropdown"
|
|
321
354
|
}, {
|
|
322
355
|
default: withCtx(() => [
|
|
323
|
-
(
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
356
|
+
unref(tableConfig).fieldsData.length > 0 ? (openBlock(), createBlock(_component_el_option_group, {
|
|
357
|
+
key: 0,
|
|
358
|
+
label: "列表字段"
|
|
359
|
+
}, {
|
|
360
|
+
default: withCtx(() => [
|
|
361
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableConfig).fieldsData, (col) => {
|
|
362
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
363
|
+
key: col.id,
|
|
364
|
+
label: col.label,
|
|
365
|
+
value: col.fieldName
|
|
366
|
+
}, null, 8, ["label", "value"]);
|
|
367
|
+
}), 128))
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
})) : createCommentVNode("", true),
|
|
371
|
+
unref(hiddenFields).length > 0 ? (openBlock(), createBlock(_component_el_option_group, {
|
|
372
|
+
key: 1,
|
|
373
|
+
label: "隐藏域"
|
|
374
|
+
}, {
|
|
375
|
+
default: withCtx(() => [
|
|
376
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(hiddenFields), (hidden) => {
|
|
377
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
378
|
+
key: hidden.id,
|
|
379
|
+
label: hidden.label,
|
|
380
|
+
value: hidden.fieldName
|
|
381
|
+
}, null, 8, ["label", "value"]);
|
|
382
|
+
}), 128))
|
|
383
|
+
]),
|
|
384
|
+
_: 1
|
|
385
|
+
})) : createCommentVNode("", true)
|
|
330
386
|
]),
|
|
331
387
|
_: 2
|
|
332
388
|
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
@@ -465,7 +521,7 @@ const _sfc_main = {
|
|
|
465
521
|
};
|
|
466
522
|
}
|
|
467
523
|
};
|
|
468
|
-
const TableSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
524
|
+
const TableSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-06015f89"]]);
|
|
469
525
|
export {
|
|
470
526
|
TableSetting as default
|
|
471
527
|
};
|
|
@@ -8,8 +8,8 @@ import { Form } from "../forms/form/index.mjs";
|
|
|
8
8
|
import { parseRouteParams } from "../../utils/parseRouteParams.mjs";
|
|
9
9
|
import { calculate } from "../../utils/formulajs/calculate.mjs";
|
|
10
10
|
import { useEventFlow, executeEventFlow } from "../../utils/eventFlow/eventFlowHandler.mjs";
|
|
11
|
-
/* empty css */
|
|
12
11
|
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
15
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
@@ -167,6 +167,10 @@ const _sfc_main = {
|
|
|
167
167
|
} else {
|
|
168
168
|
console.log("未配置参数字段: displayField");
|
|
169
169
|
}
|
|
170
|
+
const isRowDataAssignToForm = currentDialogConfig.value.isRowDataAssignToForm;
|
|
171
|
+
if (isRowDataAssignToForm) {
|
|
172
|
+
Object.assign(formData, tableSelectionRows.value[0]);
|
|
173
|
+
}
|
|
170
174
|
const fieldMapping = currentDialogConfig.value.fieldMapping;
|
|
171
175
|
if ((fieldMapping == null ? void 0 : fieldMapping.length) > 0) {
|
|
172
176
|
fieldMapping.forEach((item) => {
|
|
@@ -411,7 +415,7 @@ const _sfc_main = {
|
|
|
411
415
|
};
|
|
412
416
|
}
|
|
413
417
|
};
|
|
414
|
-
const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
418
|
+
const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-409d49b3"]]);
|
|
415
419
|
export {
|
|
416
420
|
DialogRenderer as default
|
|
417
421
|
};
|
|
@@ -557,6 +557,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
557
557
|
(_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
558
558
|
);
|
|
559
559
|
};
|
|
560
|
+
const hasSaveButton = () => {
|
|
561
|
+
var _a, _b;
|
|
562
|
+
return (_b = (_a = localConfig.value.pageFooterConfig) == null ? void 0 : _a.actions) == null ? void 0 : _b.some(
|
|
563
|
+
(item) => item.isApproval
|
|
564
|
+
);
|
|
565
|
+
};
|
|
560
566
|
const handleApprovalEvent = () => {
|
|
561
567
|
return new Promise((resolve, reject) => {
|
|
562
568
|
var _a, _b;
|
|
@@ -920,7 +926,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
920
926
|
getFormItemRef,
|
|
921
927
|
formRef,
|
|
922
928
|
localConfig,
|
|
923
|
-
handleApprovalEvent
|
|
929
|
+
handleApprovalEvent,
|
|
930
|
+
hasSaveButton
|
|
924
931
|
});
|
|
925
932
|
return (_ctx, _cache) => {
|
|
926
933
|
const _component_el_form = ElForm;
|
|
@@ -1005,7 +1012,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1005
1012
|
};
|
|
1006
1013
|
}
|
|
1007
1014
|
});
|
|
1008
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1015
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8929b8a7"]]);
|
|
1009
1016
|
export {
|
|
1010
1017
|
_Form as default
|
|
1011
1018
|
};
|
|
@@ -63,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
63
63
|
...props.localConfig.hiddenFields
|
|
64
64
|
];
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const initSearchData = computed(() => {
|
|
67
67
|
if (props.config.dataSourceFrom == "self") {
|
|
68
68
|
const params = parseRouteParams(
|
|
69
69
|
props.config.subTableParams,
|
|
@@ -88,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
88
88
|
if (!item.showCondition) return true;
|
|
89
89
|
return checkFilterMatch(
|
|
90
90
|
item.showCondition,
|
|
91
|
-
|
|
91
|
+
initSearchData.value,
|
|
92
92
|
subTableFieldsData.value
|
|
93
93
|
);
|
|
94
94
|
});
|
|
@@ -99,7 +99,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
99
99
|
if (!item.showCondition) return true;
|
|
100
100
|
return checkFilterMatch(
|
|
101
101
|
item.showCondition,
|
|
102
|
-
|
|
102
|
+
initSearchData.value,
|
|
103
103
|
subTableFieldsData.value
|
|
104
104
|
);
|
|
105
105
|
});
|
|
@@ -196,11 +196,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
196
196
|
hasPagination: __props.config.isSubTablePagination,
|
|
197
197
|
height: __props.config.subTableHeight,
|
|
198
198
|
tableData: unref(subTableData),
|
|
199
|
-
|
|
199
|
+
initSearchData: unref(initSearchData),
|
|
200
200
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
201
201
|
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query",
|
|
202
202
|
btnRollbackEvent: unref(btnRollbackEvent)
|
|
203
|
-
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "
|
|
203
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initSearchData", "canLoadBySearchData", "readonly", "btnRollbackEvent"])
|
|
204
204
|
], 64);
|
|
205
205
|
};
|
|
206
206
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { computed, getCurrentInstance, inject, createElementBlock, openBlock, createVNode, createCommentVNode, mergeProps, toHandlers, createSlots, withCtx, createElementVNode, toDisplayString, createBlock, createTextVNode, unref } from "vue";
|
|
5
|
-
/* empty css */
|
|
6
5
|
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { openDialog } from "../../dialog/index.mjs";
|
|
9
9
|
import api from "../../../api/index.mjs";
|
|
@@ -125,7 +125,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
125
125
|
const configLoading = ref(true);
|
|
126
126
|
const localConfig = ref({});
|
|
127
127
|
const fieldsData = ref({});
|
|
128
|
-
const hiddenFormData = computed(() =>
|
|
128
|
+
const hiddenFormData = computed(() => ({
|
|
129
|
+
...props.initHiddenData,
|
|
130
|
+
...props.initSearchData
|
|
131
|
+
}));
|
|
129
132
|
const dataSourceOptions = ref({});
|
|
130
133
|
const dictionaryOptions = ref({});
|
|
131
134
|
const displayData = computed(() => {
|
|
@@ -518,7 +521,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
518
521
|
initDataSourceManager();
|
|
519
522
|
});
|
|
520
523
|
});
|
|
521
|
-
const searchData = ref(
|
|
524
|
+
const searchData = ref({});
|
|
522
525
|
watch(
|
|
523
526
|
() => props.initSearchData,
|
|
524
527
|
(newVal, oldVal) => {
|
|
@@ -559,108 +562,111 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
559
562
|
"data-pkId": localConfig.value.pkId,
|
|
560
563
|
"data-version": "v5"
|
|
561
564
|
}, {
|
|
562
|
-
default: withCtx(() =>
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
"
|
|
581
|
-
|
|
565
|
+
default: withCtx(() => {
|
|
566
|
+
var _a, _b, _c, _d;
|
|
567
|
+
return [
|
|
568
|
+
!configLoading.value ? (openBlock(), createElementBlock("div", {
|
|
569
|
+
key: 0,
|
|
570
|
+
ref_key: "tableContainer",
|
|
571
|
+
ref: tableContainer,
|
|
572
|
+
class: "fec-table-container",
|
|
573
|
+
style: normalizeStyle(
|
|
574
|
+
props.height && props.height > 0 ? { height: `${props.height}px` } : {}
|
|
575
|
+
)
|
|
576
|
+
}, [
|
|
577
|
+
((_b = (_a = localConfig.value) == null ? void 0 : _a.queryConfig) == null ? void 0 : _b.mode) == "fixed" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
578
|
+
createVNode(TableFilter, {
|
|
579
|
+
"query-config": localConfig.value.queryConfig,
|
|
580
|
+
"fields-data": fieldsData.value,
|
|
581
|
+
onSearch: handleFilterSearch,
|
|
582
|
+
onReset: handleFilterReset
|
|
583
|
+
}, null, 8, ["query-config", "fields-data"]),
|
|
584
|
+
createVNode(CustomButtons, {
|
|
585
|
+
"custom-btns": localConfig.value.customBtns,
|
|
586
|
+
localConfig: localConfig.value,
|
|
587
|
+
readonly: __props.readonly,
|
|
588
|
+
isSubTable: __props.titleMode == "label",
|
|
589
|
+
onClick: handleCustomBtnClick,
|
|
590
|
+
hiddenFormData: hiddenFormData.value
|
|
591
|
+
}, null, 8, ["custom-btns", "localConfig", "readonly", "isSubTable", "hiddenFormData"])
|
|
592
|
+
], 64)) : createCommentVNode("", true),
|
|
593
|
+
((_d = (_c = localConfig.value) == null ? void 0 : _c.queryConfig) == null ? void 0 : _d.mode) == "dynamic" ? (openBlock(), createBlock(DynamicQuery, {
|
|
594
|
+
key: 1,
|
|
582
595
|
readonly: __props.readonly,
|
|
583
596
|
isSubTable: __props.titleMode == "label",
|
|
597
|
+
localConfig: localConfig.value,
|
|
598
|
+
"fields-data": fieldsData.value,
|
|
599
|
+
onSearch: handleFilterSearch,
|
|
584
600
|
onClick: handleCustomBtnClick,
|
|
585
601
|
hiddenFormData: hiddenFormData.value
|
|
586
|
-
}, null, 8, ["
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
649
|
-
]),
|
|
650
|
-
isPagination.value ? (openBlock(), createBlock(Pagination, {
|
|
651
|
-
key: 2,
|
|
652
|
-
config: localConfig.value.paginationConfig,
|
|
653
|
-
pagination: displayPagination.value,
|
|
654
|
-
onChange: handlePageChange
|
|
655
|
-
}, null, 8, ["config", "pagination"])) : createCommentVNode("", true)
|
|
656
|
-
], 4)) : createCommentVNode("", true)
|
|
657
|
-
]),
|
|
602
|
+
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data", "hiddenFormData"])) : createCommentVNode("", true),
|
|
603
|
+
createElementVNode("div", _hoisted_1, [
|
|
604
|
+
createVNode(unref(VxeTable), {
|
|
605
|
+
ref_key: "tableRef",
|
|
606
|
+
ref: tableRef,
|
|
607
|
+
data: displayData.value,
|
|
608
|
+
"auto-resize": autoResize.value,
|
|
609
|
+
height: tableHeight.value,
|
|
610
|
+
"empty-text": "暂无数据",
|
|
611
|
+
"export-config": unref(exportConfig),
|
|
612
|
+
"row-config": rowConfig.value,
|
|
613
|
+
"radio-config": unref(radioConfig),
|
|
614
|
+
"checkbox-config": unref(checkboxConfig),
|
|
615
|
+
onSortChange: handleSortChange,
|
|
616
|
+
onCheckboxChange: handleCheckboxChange,
|
|
617
|
+
onCheckboxAll: handleCheckboxAll,
|
|
618
|
+
onRadioChange: handleRadioChange
|
|
619
|
+
}, {
|
|
620
|
+
default: withCtx(() => {
|
|
621
|
+
var _a2;
|
|
622
|
+
return [
|
|
623
|
+
createVNode(TableColumn, {
|
|
624
|
+
"fields-data": fieldsData.value,
|
|
625
|
+
"show-index": localConfig.value.showIndex,
|
|
626
|
+
"select-mode": __props.selectMode || localConfig.value.selectMode,
|
|
627
|
+
"is-opt-btns": localConfig.value.isOptBtns,
|
|
628
|
+
"opt-btns": localConfig.value.optBtns,
|
|
629
|
+
"mode-key": currentMode.value,
|
|
630
|
+
modes: localConfig.value.mode,
|
|
631
|
+
"data-source-options": dataSourceOptions.value,
|
|
632
|
+
"dictionary-options": dictionaryOptions.value,
|
|
633
|
+
localConfig: localConfig.value,
|
|
634
|
+
"table-ref": (_a2 = unref(instance)) == null ? void 0 : _a2.proxy,
|
|
635
|
+
"table-data": displayData.value,
|
|
636
|
+
readonly: __props.readonly,
|
|
637
|
+
isDialog: __props.isDialog,
|
|
638
|
+
hiddenFormData: hiddenFormData.value,
|
|
639
|
+
btnRollbackEvent: __props.btnRollbackEvent
|
|
640
|
+
}, createSlots({ _: 2 }, [
|
|
641
|
+
renderList(fieldsData.value, (field) => {
|
|
642
|
+
return {
|
|
643
|
+
name: `cell-${field.fieldName}`,
|
|
644
|
+
fn: withCtx((scope) => [
|
|
645
|
+
renderSlot(_ctx.$slots, `cell-${field.fieldName}`, normalizeProps(guardReactiveProps(scope)), void 0, true)
|
|
646
|
+
])
|
|
647
|
+
};
|
|
648
|
+
})
|
|
649
|
+
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent"])
|
|
650
|
+
];
|
|
651
|
+
}),
|
|
652
|
+
_: 3
|
|
653
|
+
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
654
|
+
]),
|
|
655
|
+
isPagination.value ? (openBlock(), createBlock(Pagination, {
|
|
656
|
+
key: 2,
|
|
657
|
+
config: localConfig.value.paginationConfig,
|
|
658
|
+
pagination: displayPagination.value,
|
|
659
|
+
onChange: handlePageChange
|
|
660
|
+
}, null, 8, ["config", "pagination"])) : createCommentVNode("", true)
|
|
661
|
+
], 4)) : createCommentVNode("", true)
|
|
662
|
+
];
|
|
663
|
+
}),
|
|
658
664
|
_: 3
|
|
659
665
|
}, 8, ["data-id", "data-name", "data-pkId"]);
|
|
660
666
|
};
|
|
661
667
|
}
|
|
662
668
|
});
|
|
663
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
669
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3badb1f8"]]);
|
|
664
670
|
export {
|
|
665
671
|
_Table as default
|
|
666
672
|
};
|
|
@@ -6,8 +6,8 @@ import "../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescrip
|
|
|
6
6
|
import { CopyDocument as copy_document_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";
|
|
7
7
|
import { checkFilterMatch } from "../../utils/parseFilterConfig.mjs";
|
|
8
8
|
import { removeEmptyValues } from "../../utils/common.mjs";
|
|
9
|
-
/* empty css */
|
|
10
9
|
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { reactive } from "vue";
|
|
2
2
|
import { parseRouteParams } from "./parseRouteParams.mjs";
|
|
3
3
|
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
4
|
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { ElLoading } from "../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/loading/index.mjs";
|
|
8
8
|
import { ElMessage } from "../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.mjs";
|
|
@@ -313,6 +313,66 @@ async function handleTableChildRefresh(node, data, fields, context) {
|
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
+
async function handleTableChildSelection(node, data, fields, context) {
|
|
317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
318
|
+
console.log("[EventFlow] 执行子表格选择赋值:", node.basic);
|
|
319
|
+
const basic = node.basic || {};
|
|
320
|
+
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
321
|
+
const getFormDataMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.getFormData;
|
|
322
|
+
const setFormDataMethod = (_e = (_d = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _d.exposed) == null ? void 0 : _e.setFormData;
|
|
323
|
+
const getFormItemRefMethod = (_g = (_f = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _f.exposed) == null ? void 0 : _g.getFormItemRef;
|
|
324
|
+
if (typeof getFormItemRefMethod === "function") {
|
|
325
|
+
const subTableRef = getFormItemRefMethod(String(basic.selectSubTableFieldId));
|
|
326
|
+
const getSelectionMethod = (_h = subTableRef == null ? void 0 : subTableRef.subTableRef) == null ? void 0 : _h.getSelection;
|
|
327
|
+
if (typeof getSelectionMethod === "function") {
|
|
328
|
+
const rows = await getSelectionMethod();
|
|
329
|
+
const fieldMapping = basic.subTableSelectionFieldMapping;
|
|
330
|
+
if (fieldMapping && Array.isArray(fieldMapping)) {
|
|
331
|
+
let formData = getFormDataMethod();
|
|
332
|
+
fieldMapping.forEach((mapping) => {
|
|
333
|
+
const { field, value } = mapping;
|
|
334
|
+
const targetField = fields.find((item) => item.id == field);
|
|
335
|
+
if (!targetField) {
|
|
336
|
+
return {
|
|
337
|
+
success: false,
|
|
338
|
+
message: `未找到字段: ${field}`
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
const values = rows.map((row) => row[value]);
|
|
342
|
+
formData[targetField.fieldName] = values.join(",");
|
|
343
|
+
});
|
|
344
|
+
if (typeof setFormDataMethod === "function") {
|
|
345
|
+
setFormDataMethod(formData);
|
|
346
|
+
return {
|
|
347
|
+
success: true,
|
|
348
|
+
message: "赋值成功"
|
|
349
|
+
};
|
|
350
|
+
} else {
|
|
351
|
+
console.error("未找到表单组件的 setFormData 方法");
|
|
352
|
+
return {
|
|
353
|
+
success: false,
|
|
354
|
+
message: "表单组件未正确配置或 setFormData 方法未暴露",
|
|
355
|
+
shouldShowError: true
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
} else {
|
|
360
|
+
console.error("[EventFlow] 未找到子列表组件的 getSelection 方法");
|
|
361
|
+
return {
|
|
362
|
+
success: false,
|
|
363
|
+
message: "子列表组件未正确配置或 getSelection 方法未暴露",
|
|
364
|
+
shouldShowError: true
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
console.error("[EventFlow] 未找到表单组件的 getFormItemRef 方法");
|
|
369
|
+
return {
|
|
370
|
+
success: false,
|
|
371
|
+
message: "表单组件未正确配置或 getFormItemRef 方法未暴露",
|
|
372
|
+
shouldShowError: true
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
}
|
|
316
376
|
async function handleTableRowDelete(node, data, fields, context) {
|
|
317
377
|
var _a, _b, _c;
|
|
318
378
|
console.log("[EventFlow] 执行表格行删除:", node.basic);
|
|
@@ -673,6 +733,7 @@ const defaultActionHandlers = {
|
|
|
673
733
|
"table-refresh": handleTableRefresh,
|
|
674
734
|
"table-row-delete": handleTableRowDelete,
|
|
675
735
|
"table-child-refresh": handleTableChildRefresh,
|
|
736
|
+
"table-child-selection": handleTableChildSelection,
|
|
676
737
|
"form-setValue": handleFormSetValue,
|
|
677
738
|
"form-submit": handleFormSubmit,
|
|
678
739
|
"custom": handleCustomAction,
|
|
@@ -690,6 +751,7 @@ export {
|
|
|
690
751
|
handlePageGoBack,
|
|
691
752
|
handlePageJump,
|
|
692
753
|
handleTableChildRefresh,
|
|
754
|
+
handleTableChildSelection,
|
|
693
755
|
handleTableRefresh,
|
|
694
756
|
handleTableRowDelete,
|
|
695
757
|
handleUpload
|