@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
|
@@ -57,6 +57,15 @@ const _sfc_main = {
|
|
|
57
57
|
const tableConfig = vue.computed(() => {
|
|
58
58
|
return common.getEditConfigData();
|
|
59
59
|
});
|
|
60
|
+
const hiddenFields = vue.computed(() => {
|
|
61
|
+
var _a;
|
|
62
|
+
const fields = ((_a = tableConfig.value) == null ? void 0 : _a.hiddenFields) || [];
|
|
63
|
+
return fields.map((item) => ({
|
|
64
|
+
id: item == null ? void 0 : item.id,
|
|
65
|
+
fieldName: item == null ? void 0 : item.fieldName,
|
|
66
|
+
label: item == null ? void 0 : item.label
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
60
69
|
const dataSources = vue.computed(() => {
|
|
61
70
|
return tableConfig.value.dataSources || [];
|
|
62
71
|
});
|
|
@@ -106,6 +115,7 @@ const _sfc_main = {
|
|
|
106
115
|
const _component_el_radio_button = index.ElRadioButton;
|
|
107
116
|
const _component_el_radio_group = index.ElRadioGroup;
|
|
108
117
|
const _component_el_option = index$1.ElOption;
|
|
118
|
+
const _component_el_option_group = index$1.ElOptionGroup;
|
|
109
119
|
const _component_el_select = index$1.ElSelect;
|
|
110
120
|
const _component_el_switch = index$2.ElSwitch;
|
|
111
121
|
const _component_el_input_number = index$3.ElInputNumber;
|
|
@@ -158,13 +168,36 @@ const _sfc_main = {
|
|
|
158
168
|
style: { "width": "100px" }
|
|
159
169
|
}, {
|
|
160
170
|
default: vue.withCtx(() => [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
vue.unref(tableConfig).fieldsData.length > 0 ? (vue.openBlock(), vue.createBlock(_component_el_option_group, {
|
|
172
|
+
key: 0,
|
|
173
|
+
label: "列表字段"
|
|
174
|
+
}, {
|
|
175
|
+
default: vue.withCtx(() => [
|
|
176
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableConfig).fieldsData, (field) => {
|
|
177
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
178
|
+
key: field.fieldName,
|
|
179
|
+
label: field.label,
|
|
180
|
+
value: field.fieldName
|
|
181
|
+
}, null, 8, ["label", "value"]);
|
|
182
|
+
}), 128))
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
})) : vue.createCommentVNode("", true),
|
|
186
|
+
vue.unref(hiddenFields).length > 0 ? (vue.openBlock(), vue.createBlock(_component_el_option_group, {
|
|
187
|
+
key: 1,
|
|
188
|
+
label: "隐藏域"
|
|
189
|
+
}, {
|
|
190
|
+
default: vue.withCtx(() => [
|
|
191
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(hiddenFields), (hidden) => {
|
|
192
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
193
|
+
key: hidden.id,
|
|
194
|
+
label: hidden.label,
|
|
195
|
+
value: hidden.fieldName
|
|
196
|
+
}, null, 8, ["label", "value"]);
|
|
197
|
+
}), 128))
|
|
198
|
+
]),
|
|
199
|
+
_: 1
|
|
200
|
+
})) : vue.createCommentVNode("", true)
|
|
168
201
|
]),
|
|
169
202
|
_: 1
|
|
170
203
|
}, 8, ["modelValue"])
|
|
@@ -322,13 +355,36 @@ const _sfc_main = {
|
|
|
322
355
|
"append-to": ".sort-config-dropdown"
|
|
323
356
|
}, {
|
|
324
357
|
default: vue.withCtx(() => [
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
358
|
+
vue.unref(tableConfig).fieldsData.length > 0 ? (vue.openBlock(), vue.createBlock(_component_el_option_group, {
|
|
359
|
+
key: 0,
|
|
360
|
+
label: "列表字段"
|
|
361
|
+
}, {
|
|
362
|
+
default: vue.withCtx(() => [
|
|
363
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableConfig).fieldsData, (col) => {
|
|
364
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
365
|
+
key: col.id,
|
|
366
|
+
label: col.label,
|
|
367
|
+
value: col.fieldName
|
|
368
|
+
}, null, 8, ["label", "value"]);
|
|
369
|
+
}), 128))
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
})) : vue.createCommentVNode("", true),
|
|
373
|
+
vue.unref(hiddenFields).length > 0 ? (vue.openBlock(), vue.createBlock(_component_el_option_group, {
|
|
374
|
+
key: 1,
|
|
375
|
+
label: "隐藏域"
|
|
376
|
+
}, {
|
|
377
|
+
default: vue.withCtx(() => [
|
|
378
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(hiddenFields), (hidden) => {
|
|
379
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
380
|
+
key: hidden.id,
|
|
381
|
+
label: hidden.label,
|
|
382
|
+
value: hidden.fieldName
|
|
383
|
+
}, null, 8, ["label", "value"]);
|
|
384
|
+
}), 128))
|
|
385
|
+
]),
|
|
386
|
+
_: 1
|
|
387
|
+
})) : vue.createCommentVNode("", true)
|
|
332
388
|
]),
|
|
333
389
|
_: 2
|
|
334
390
|
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
@@ -467,5 +523,5 @@ const _sfc_main = {
|
|
|
467
523
|
};
|
|
468
524
|
}
|
|
469
525
|
};
|
|
470
|
-
const TableSetting = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
526
|
+
const TableSetting = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-06015f89"]]);
|
|
471
527
|
exports.default = TableSetting;
|
|
@@ -10,8 +10,8 @@ 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 */
|
|
14
|
+
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
16
|
;/* empty css */
|
|
17
17
|
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
@@ -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;
|
|
@@ -559,6 +559,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
559
559
|
(_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
560
560
|
);
|
|
561
561
|
};
|
|
562
|
+
const hasSaveButton = () => {
|
|
563
|
+
var _a, _b;
|
|
564
|
+
return (_b = (_a = localConfig.value.pageFooterConfig) == null ? void 0 : _a.actions) == null ? void 0 : _b.some(
|
|
565
|
+
(item) => item.isApproval
|
|
566
|
+
);
|
|
567
|
+
};
|
|
562
568
|
const handleApprovalEvent = () => {
|
|
563
569
|
return new Promise((resolve, reject) => {
|
|
564
570
|
var _a, _b;
|
|
@@ -922,7 +928,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
922
928
|
getFormItemRef,
|
|
923
929
|
formRef,
|
|
924
930
|
localConfig,
|
|
925
|
-
handleApprovalEvent
|
|
931
|
+
handleApprovalEvent,
|
|
932
|
+
hasSaveButton
|
|
926
933
|
});
|
|
927
934
|
return (_ctx, _cache) => {
|
|
928
935
|
const _component_el_form = index$5.ElForm;
|
|
@@ -1007,5 +1014,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1007
1014
|
};
|
|
1008
1015
|
}
|
|
1009
1016
|
});
|
|
1010
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1017
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8929b8a7"]]);
|
|
1011
1018
|
exports.default = _Form;
|
|
@@ -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,8 +4,8 @@ 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 */
|
|
8
|
+
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const index$3 = require("../../dialog/index.js");
|
|
11
11
|
const index$2 = require("../../../api/index.js");
|
|
@@ -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) => {
|
|
@@ -561,106 +564,109 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
561
564
|
"data-pkId": localConfig.value.pkId,
|
|
562
565
|
"data-version": "v5"
|
|
563
566
|
}, {
|
|
564
|
-
default: vue.withCtx(() =>
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
"
|
|
583
|
-
|
|
567
|
+
default: vue.withCtx(() => {
|
|
568
|
+
var _a, _b, _c, _d;
|
|
569
|
+
return [
|
|
570
|
+
!configLoading.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
571
|
+
key: 0,
|
|
572
|
+
ref_key: "tableContainer",
|
|
573
|
+
ref: tableContainer,
|
|
574
|
+
class: "fec-table-container",
|
|
575
|
+
style: vue.normalizeStyle(
|
|
576
|
+
props.height && props.height > 0 ? { height: `${props.height}px` } : {}
|
|
577
|
+
)
|
|
578
|
+
}, [
|
|
579
|
+
((_b = (_a = localConfig.value) == null ? void 0 : _a.queryConfig) == null ? void 0 : _b.mode) == "fixed" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
580
|
+
vue.createVNode(TableFilter.default, {
|
|
581
|
+
"query-config": localConfig.value.queryConfig,
|
|
582
|
+
"fields-data": fieldsData.value,
|
|
583
|
+
onSearch: handleFilterSearch,
|
|
584
|
+
onReset: handleFilterReset
|
|
585
|
+
}, null, 8, ["query-config", "fields-data"]),
|
|
586
|
+
vue.createVNode(CustomButtons.default, {
|
|
587
|
+
"custom-btns": localConfig.value.customBtns,
|
|
588
|
+
localConfig: localConfig.value,
|
|
589
|
+
readonly: __props.readonly,
|
|
590
|
+
isSubTable: __props.titleMode == "label",
|
|
591
|
+
onClick: handleCustomBtnClick,
|
|
592
|
+
hiddenFormData: hiddenFormData.value
|
|
593
|
+
}, null, 8, ["custom-btns", "localConfig", "readonly", "isSubTable", "hiddenFormData"])
|
|
594
|
+
], 64)) : vue.createCommentVNode("", true),
|
|
595
|
+
((_d = (_c = localConfig.value) == null ? void 0 : _c.queryConfig) == null ? void 0 : _d.mode) == "dynamic" ? (vue.openBlock(), vue.createBlock(DynamicQuery.default, {
|
|
596
|
+
key: 1,
|
|
584
597
|
readonly: __props.readonly,
|
|
585
598
|
isSubTable: __props.titleMode == "label",
|
|
599
|
+
localConfig: localConfig.value,
|
|
600
|
+
"fields-data": fieldsData.value,
|
|
601
|
+
onSearch: handleFilterSearch,
|
|
586
602
|
onClick: handleCustomBtnClick,
|
|
587
603
|
hiddenFormData: hiddenFormData.value
|
|
588
|
-
}, null, 8, ["
|
|
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
|
-
|
|
649
|
-
|
|
650
|
-
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
651
|
-
]),
|
|
652
|
-
isPagination.value ? (vue.openBlock(), vue.createBlock(Pagination.default, {
|
|
653
|
-
key: 2,
|
|
654
|
-
config: localConfig.value.paginationConfig,
|
|
655
|
-
pagination: displayPagination.value,
|
|
656
|
-
onChange: handlePageChange
|
|
657
|
-
}, null, 8, ["config", "pagination"])) : vue.createCommentVNode("", true)
|
|
658
|
-
], 4)) : vue.createCommentVNode("", true)
|
|
659
|
-
]),
|
|
604
|
+
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data", "hiddenFormData"])) : vue.createCommentVNode("", true),
|
|
605
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
606
|
+
vue.createVNode(vue.unref(index$1.VxeTable), {
|
|
607
|
+
ref_key: "tableRef",
|
|
608
|
+
ref: tableRef,
|
|
609
|
+
data: displayData.value,
|
|
610
|
+
"auto-resize": autoResize.value,
|
|
611
|
+
height: tableHeight.value,
|
|
612
|
+
"empty-text": "暂无数据",
|
|
613
|
+
"export-config": vue.unref(exportConfig),
|
|
614
|
+
"row-config": rowConfig.value,
|
|
615
|
+
"radio-config": vue.unref(radioConfig),
|
|
616
|
+
"checkbox-config": vue.unref(checkboxConfig),
|
|
617
|
+
onSortChange: handleSortChange,
|
|
618
|
+
onCheckboxChange: handleCheckboxChange,
|
|
619
|
+
onCheckboxAll: handleCheckboxAll,
|
|
620
|
+
onRadioChange: handleRadioChange
|
|
621
|
+
}, {
|
|
622
|
+
default: vue.withCtx(() => {
|
|
623
|
+
var _a2;
|
|
624
|
+
return [
|
|
625
|
+
vue.createVNode(TableColumn.default, {
|
|
626
|
+
"fields-data": fieldsData.value,
|
|
627
|
+
"show-index": localConfig.value.showIndex,
|
|
628
|
+
"select-mode": __props.selectMode || localConfig.value.selectMode,
|
|
629
|
+
"is-opt-btns": localConfig.value.isOptBtns,
|
|
630
|
+
"opt-btns": localConfig.value.optBtns,
|
|
631
|
+
"mode-key": currentMode.value,
|
|
632
|
+
modes: localConfig.value.mode,
|
|
633
|
+
"data-source-options": dataSourceOptions.value,
|
|
634
|
+
"dictionary-options": dictionaryOptions.value,
|
|
635
|
+
localConfig: localConfig.value,
|
|
636
|
+
"table-ref": (_a2 = vue.unref(instance)) == null ? void 0 : _a2.proxy,
|
|
637
|
+
"table-data": displayData.value,
|
|
638
|
+
readonly: __props.readonly,
|
|
639
|
+
isDialog: __props.isDialog,
|
|
640
|
+
hiddenFormData: hiddenFormData.value,
|
|
641
|
+
btnRollbackEvent: __props.btnRollbackEvent
|
|
642
|
+
}, vue.createSlots({ _: 2 }, [
|
|
643
|
+
vue.renderList(fieldsData.value, (field) => {
|
|
644
|
+
return {
|
|
645
|
+
name: `cell-${field.fieldName}`,
|
|
646
|
+
fn: vue.withCtx((scope) => [
|
|
647
|
+
vue.renderSlot(_ctx.$slots, `cell-${field.fieldName}`, vue.normalizeProps(vue.guardReactiveProps(scope)), void 0, true)
|
|
648
|
+
])
|
|
649
|
+
};
|
|
650
|
+
})
|
|
651
|
+
]), 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"])
|
|
652
|
+
];
|
|
653
|
+
}),
|
|
654
|
+
_: 3
|
|
655
|
+
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
656
|
+
]),
|
|
657
|
+
isPagination.value ? (vue.openBlock(), vue.createBlock(Pagination.default, {
|
|
658
|
+
key: 2,
|
|
659
|
+
config: localConfig.value.paginationConfig,
|
|
660
|
+
pagination: displayPagination.value,
|
|
661
|
+
onChange: handlePageChange
|
|
662
|
+
}, null, 8, ["config", "pagination"])) : vue.createCommentVNode("", true)
|
|
663
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
664
|
+
];
|
|
665
|
+
}),
|
|
660
666
|
_: 3
|
|
661
667
|
}, 8, ["data-id", "data-name", "data-pkId"]);
|
|
662
668
|
};
|
|
663
669
|
}
|
|
664
670
|
});
|
|
665
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
671
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3badb1f8"]]);
|
|
666
672
|
exports.default = _Table;
|
|
@@ -8,8 +8,8 @@ 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 */
|
|
12
|
+
;/* empty css */
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
@@ -3,8 +3,8 @@ 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 */
|
|
7
|
+
;/* empty css */
|
|
8
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");
|
|
@@ -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;
|