@fecp/designer 5.3.5 → 5.3.7
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 +197 -240
- package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs +1 -1
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/FilterConfigDisplay.vue.mjs +2 -3
- package/es/packages/designer/src/components/FormulaEditorInput.vue.mjs +33 -8
- package/es/packages/designer/src/components/ValueSelectorPopover.vue2.mjs +62 -39
- package/es/packages/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +3 -3
- package/es/packages/designer/src/layout/header/index.vue.mjs +1 -1
- package/es/packages/designer/src/packages/advancedFilter/AdvancedFilter.vue2.mjs +4 -4
- package/es/packages/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +34 -28
- package/es/packages/designer/src/packages/dataLinkage/index.vue.mjs +75 -69
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +1 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/Dialog.vue.mjs +49 -11
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +2 -2
- package/es/packages/designer/src/packages/form/aside/index.mjs +1 -0
- package/es/packages/designer/src/packages/form/components/SubForm.vue.mjs +33 -7
- package/es/packages/designer/src/packages/form/index.vue.mjs +15 -2
- package/es/packages/designer/src/packages/form/property/subForm.vue.mjs +53 -11
- package/es/packages/designer/src/packages/formulaEditor/components/FieldVariable.vue2.mjs +3 -2
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +1 -0
- package/es/packages/vue/src/components/bus/approvalHistory/ApprovalHistory.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +35 -12
- package/es/packages/vue/src/components/forms/form/validation.mjs +18 -6
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +33 -5
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +1 -1
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +10 -3
- package/lib/designer.css +197 -240
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/FilterConfigDisplay.vue.js +2 -3
- package/lib/packages/designer/src/components/FormulaEditorInput.vue.js +32 -7
- package/lib/packages/designer/src/components/ValueSelectorPopover.vue2.js +68 -45
- package/lib/packages/designer/src/layout/aside/HiddenFieldDialog.vue.js +3 -3
- package/lib/packages/designer/src/layout/header/index.vue.js +1 -1
- package/lib/packages/designer/src/packages/advancedFilter/AdvancedFilter.vue2.js +4 -4
- package/lib/packages/designer/src/packages/advancedFilter/ValueInput.vue2.js +34 -28
- package/lib/packages/designer/src/packages/dataLinkage/index.vue.js +75 -69
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +1 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/Dialog.vue.js +48 -10
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +2 -2
- package/lib/packages/designer/src/packages/form/aside/index.js +1 -0
- package/lib/packages/designer/src/packages/form/components/SubForm.vue.js +33 -7
- package/lib/packages/designer/src/packages/form/index.vue.js +15 -2
- package/lib/packages/designer/src/packages/form/property/subForm.vue.js +53 -11
- package/lib/packages/designer/src/packages/formulaEditor/components/FieldVariable.vue2.js +3 -2
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +1 -0
- package/lib/packages/vue/src/components/bus/approvalHistory/ApprovalHistory.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +47 -24
- package/lib/packages/vue/src/components/forms/form/validation.js +18 -6
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +32 -4
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +1 -1
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +10 -3
- package/package.json +1 -1
|
@@ -26,20 +26,20 @@ const eventFlowHandler = require("../../../utils/eventFlow/eventFlowHandler.js")
|
|
|
26
26
|
;/* empty css */
|
|
27
27
|
;/* empty css */
|
|
28
28
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
29
|
-
const index$
|
|
29
|
+
const index$1 = require("../../../api/index.js");
|
|
30
30
|
;/* empty css */
|
|
31
31
|
;/* empty css */
|
|
32
32
|
const usePageEvents = require("../../../composables/usePageEvents.js");
|
|
33
|
-
const index$
|
|
34
|
-
const index$
|
|
35
|
-
const index$
|
|
33
|
+
const index$3 = require("../../details/header/index.js");
|
|
34
|
+
const index$4 = require("../../details/main/index.js");
|
|
35
|
+
const index$6 = require("../../details/footer/index.js");
|
|
36
36
|
const parseFilterConfig = require("../../../utils/parseFilterConfig.js");
|
|
37
37
|
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
38
38
|
;/* empty css */
|
|
39
|
-
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/
|
|
40
|
-
const index$
|
|
39
|
+
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/message/index.js");
|
|
40
|
+
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/container/index.js");
|
|
41
|
+
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/form/index.js");
|
|
41
42
|
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");
|
|
42
|
-
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/message/index.js");
|
|
43
43
|
const _hoisted_1 = ["name", "value"];
|
|
44
44
|
const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
45
45
|
inheritAttrs: false
|
|
@@ -121,6 +121,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
121
121
|
pageEvents.handleUnmounted();
|
|
122
122
|
}
|
|
123
123
|
const formMode = vue.ref("");
|
|
124
|
+
vue.watch(
|
|
125
|
+
() => props.templateKey,
|
|
126
|
+
(key) => {
|
|
127
|
+
if (key) {
|
|
128
|
+
loadConfig();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
);
|
|
124
132
|
const loadConfig = async () => {
|
|
125
133
|
if (!props.templateKey) {
|
|
126
134
|
return;
|
|
@@ -154,6 +162,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
154
162
|
mergeOptionsToFields();
|
|
155
163
|
loadFormData();
|
|
156
164
|
loadEventFlow();
|
|
165
|
+
initGridLayoutDataConfig();
|
|
157
166
|
if (pageEvents && localConfig.value.pageEventConfig) {
|
|
158
167
|
const onCreatedEvent = localConfig.value.pageEventConfig.find(
|
|
159
168
|
(e) => e.name === "onCreated"
|
|
@@ -165,7 +174,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
165
174
|
}
|
|
166
175
|
} catch (error) {
|
|
167
176
|
console.error("加载配置失败:", error);
|
|
168
|
-
index
|
|
177
|
+
index.ElMessage.error("加载配置失败");
|
|
169
178
|
} finally {
|
|
170
179
|
configLoading.value = false;
|
|
171
180
|
}
|
|
@@ -183,7 +192,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
183
192
|
defaultData[component.fieldName] = defaultValue;
|
|
184
193
|
}
|
|
185
194
|
if (component.fieldName) {
|
|
186
|
-
const fieldRules = validation.generateFieldRules(component
|
|
195
|
+
const fieldRules = validation.generateFieldRules(component, formData, [
|
|
196
|
+
...fieldsData.value,
|
|
197
|
+
...hiddenFields.value
|
|
198
|
+
]);
|
|
187
199
|
if (fieldRules.length > 0) {
|
|
188
200
|
rules[component.fieldName] = fieldRules;
|
|
189
201
|
}
|
|
@@ -321,7 +333,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
321
333
|
return;
|
|
322
334
|
}
|
|
323
335
|
try {
|
|
324
|
-
const response = await index$
|
|
336
|
+
const response = await index$1.default.getProductData(ctx.$http, prodIdValue);
|
|
325
337
|
productData.value = response;
|
|
326
338
|
console.log("产品数据加载成功:", productData.value);
|
|
327
339
|
} catch (error) {
|
|
@@ -710,6 +722,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
710
722
|
return result;
|
|
711
723
|
};
|
|
712
724
|
const applyLinkageEffectsForChangedFields = (changedFieldNames) => {
|
|
725
|
+
var _a;
|
|
713
726
|
console.log(
|
|
714
727
|
"🚀 ~ applyLinkageEffectsForChangedFields ~ 变化的字段:",
|
|
715
728
|
changedFieldNames
|
|
@@ -725,9 +738,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
725
738
|
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
726
739
|
const fieldAssignments = item.fieldAssignments || [];
|
|
727
740
|
fieldAssignments.forEach((assignment) => {
|
|
728
|
-
var
|
|
741
|
+
var _a2, _b;
|
|
729
742
|
const fieldId = assignment.fieldId;
|
|
730
|
-
const formulaText = (_b = (
|
|
743
|
+
const formulaText = (_b = (_a2 = assignment.formula) == null ? void 0 : _a2.value) == null ? void 0 : _b.text;
|
|
731
744
|
const field = fields.find((f) => f.id == fieldId);
|
|
732
745
|
if (field && formulaText) {
|
|
733
746
|
const calcResult = calculate.calculate({
|
|
@@ -780,7 +793,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
780
793
|
const rules = {};
|
|
781
794
|
updatedLayoutData.forEach(({ component }) => {
|
|
782
795
|
if (component.fieldName) {
|
|
783
|
-
const fieldRules = validation.generateFieldRules(component);
|
|
796
|
+
const fieldRules = validation.generateFieldRules(component, formData, fields);
|
|
784
797
|
if (fieldRules.length > 0) {
|
|
785
798
|
rules[component.fieldName] = fieldRules;
|
|
786
799
|
}
|
|
@@ -827,11 +840,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
827
840
|
}
|
|
828
841
|
});
|
|
829
842
|
gridLayoutFieldsData.value = updatedLayoutData.filter((item) => !item.hidden);
|
|
843
|
+
(_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
|
|
830
844
|
};
|
|
831
845
|
vue.watch(
|
|
832
846
|
formData,
|
|
833
847
|
(newVal, oldVal) => {
|
|
834
|
-
initGridLayoutDataConfig();
|
|
835
848
|
const changedFields = findChangedFields(newVal, prevFormData.value);
|
|
836
849
|
if (changedFields.length > 0) {
|
|
837
850
|
applyLinkageEffectsForChangedFields(changedFields);
|
|
@@ -841,11 +854,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
841
854
|
},
|
|
842
855
|
{ deep: true }
|
|
843
856
|
);
|
|
844
|
-
function setFormItemHeight(id, h) {
|
|
857
|
+
function setFormItemHeight(id, fixedH, h) {
|
|
858
|
+
var _a;
|
|
845
859
|
const item = gridLayoutFieldsData.value.find((item2) => item2.id == id);
|
|
846
|
-
if (
|
|
847
|
-
item.h = h;
|
|
848
|
-
}
|
|
860
|
+
if (!fixedH) {
|
|
861
|
+
item.h = h * 60;
|
|
862
|
+
} else if (fixedH) {
|
|
863
|
+
item.h = h / (localConfig.value.labelPosition == "top" ? 1.5 : 1);
|
|
864
|
+
}
|
|
865
|
+
const oriItem = oriGridLayoutData.value.find((item2) => item2.id == id);
|
|
866
|
+
if (!fixedH) {
|
|
867
|
+
oriItem.h = h * 60;
|
|
868
|
+
} else if (fixedH) {
|
|
869
|
+
oriItem.h = h / (localConfig.value.labelPosition == "top" ? 1.5 : 1);
|
|
870
|
+
}
|
|
871
|
+
(_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
|
|
849
872
|
}
|
|
850
873
|
vue.provide("formData", formData);
|
|
851
874
|
vue.provide("localConfig", localConfig);
|
|
@@ -866,8 +889,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
866
889
|
localConfig
|
|
867
890
|
});
|
|
868
891
|
return (_ctx, _cache) => {
|
|
869
|
-
const _component_el_form = index$
|
|
870
|
-
const _component_el_container = index.ElContainer;
|
|
892
|
+
const _component_el_form = index$5.ElForm;
|
|
893
|
+
const _component_el_container = index$2.ElContainer;
|
|
871
894
|
return vue.openBlock(), vue.createBlock(_component_el_container, {
|
|
872
895
|
direction: "vertical",
|
|
873
896
|
class: "fec-form",
|
|
@@ -877,11 +900,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
877
900
|
"data-version": "v5"
|
|
878
901
|
}, {
|
|
879
902
|
default: vue.withCtx(() => [
|
|
880
|
-
!configLoading.value && !__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
903
|
+
!configLoading.value && !__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.header), {
|
|
881
904
|
key: 0,
|
|
882
905
|
pageHeaderConfig: localConfig.value.pageHeaderConfig
|
|
883
906
|
}, null, 8, ["pageHeaderConfig"])) : vue.createCommentVNode("", true),
|
|
884
|
-
vue.createVNode(vue.unref(index$
|
|
907
|
+
vue.createVNode(vue.unref(index$4.main), null, {
|
|
885
908
|
default: vue.withCtx(() => [
|
|
886
909
|
vue.createVNode(_component_el_form, {
|
|
887
910
|
ref_key: "formRef",
|
|
@@ -935,7 +958,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
935
958
|
]),
|
|
936
959
|
_: 1
|
|
937
960
|
}),
|
|
938
|
-
!__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
961
|
+
!__props.isSubForm && !__props.isDialog ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.footer), {
|
|
939
962
|
key: 1,
|
|
940
963
|
formMode: formMode.value,
|
|
941
964
|
pageFooterConfig: localConfig.value.pageFooterConfig,
|
|
@@ -947,5 +970,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
947
970
|
};
|
|
948
971
|
}
|
|
949
972
|
});
|
|
950
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
973
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-63966ae6"]]);
|
|
951
974
|
exports.default = _Form;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const parseFilterConfig = require("../../../utils/parseFilterConfig.js");
|
|
3
4
|
const VALIDATION_RULES = {
|
|
4
5
|
// 身份证
|
|
5
6
|
idCard: {
|
|
@@ -47,7 +48,7 @@ const VALIDATION_RULES = {
|
|
|
47
48
|
message: "请输入正确的联系电话"
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
function generateFieldRules(component) {
|
|
51
|
+
function generateFieldRules(component, formData, fields) {
|
|
51
52
|
const rules = [];
|
|
52
53
|
if (!component.fieldName) {
|
|
53
54
|
return rules;
|
|
@@ -60,16 +61,27 @@ function generateFieldRules(component) {
|
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
if (component.validationType && component.validationType !== "none") {
|
|
63
|
-
if (component.validationType === "regex" && component.
|
|
64
|
+
if (component.validationType === "regex" && component.validationPattern) {
|
|
64
65
|
try {
|
|
65
|
-
const
|
|
66
|
+
const validator = (_rule, _value, callback) => {
|
|
67
|
+
try {
|
|
68
|
+
const isMatch = parseFilterConfig.checkFilterMatch(component.validationPattern, formData.value, fields);
|
|
69
|
+
if (!isMatch) {
|
|
70
|
+
callback(new Error(component.validationMessage || "校验失败"));
|
|
71
|
+
} else {
|
|
72
|
+
callback();
|
|
73
|
+
}
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error("Validation function error:", error);
|
|
76
|
+
callback(new Error(component.validationMessage || "校验函数执行出错"));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
66
79
|
rules.push({
|
|
67
|
-
|
|
68
|
-
message: component.regexMessage || "输入格式不正确",
|
|
80
|
+
validator,
|
|
69
81
|
trigger: "blur"
|
|
70
82
|
});
|
|
71
83
|
} catch (e) {
|
|
72
|
-
console.error("Invalid
|
|
84
|
+
console.error("Invalid validation pattern:", component.validationPattern, e);
|
|
73
85
|
}
|
|
74
86
|
} else if (component.validationType === "custom" && component.customValidator) {
|
|
75
87
|
try {
|
|
@@ -52,6 +52,35 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
52
52
|
vue.inject("rowHeight");
|
|
53
53
|
vue.inject("gridLayout");
|
|
54
54
|
const setFormItemHeight = vue.inject("setFormItemHeight");
|
|
55
|
+
const templateKey = vue.computed(() => {
|
|
56
|
+
if (props.config.formSource == "dynamic") {
|
|
57
|
+
const dynamicSubFormKey = props.config.dynamicSubFormKey;
|
|
58
|
+
if (dynamicSubFormKey) {
|
|
59
|
+
if (typeof dynamicSubFormKey === "object") {
|
|
60
|
+
const fieldId = dynamicSubFormKey.value;
|
|
61
|
+
const fieldsData = props.localConfig.fieldsData.map((item) => {
|
|
62
|
+
return item.component;
|
|
63
|
+
});
|
|
64
|
+
const hiddenFields = props.localConfig.hiddenFields;
|
|
65
|
+
const formItem = [...fieldsData, ...hiddenFields].find(
|
|
66
|
+
(item) => item.id == fieldId
|
|
67
|
+
);
|
|
68
|
+
if (formItem != null) {
|
|
69
|
+
const key = formData.value[formItem.fieldName];
|
|
70
|
+
return key ? key + "V5" : "";
|
|
71
|
+
} else {
|
|
72
|
+
return "";
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
return dynamicSubFormKey;
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
return "";
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
return props.config.subFormKey;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
55
84
|
function subFormLoaded(subOption) {
|
|
56
85
|
const fieldsData = subOption.fieldsData;
|
|
57
86
|
console.log("🚀 ~ loaded ~ subOption:", subOption);
|
|
@@ -61,11 +90,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
61
90
|
const foundItem = props.localConfig.fieldsData.find(
|
|
62
91
|
(item) => item.id == props.config.id
|
|
63
92
|
);
|
|
64
|
-
const y = 1;
|
|
65
93
|
const titleHeight = props.config.titleMode != "none" ? 1 : 0;
|
|
66
94
|
if (foundItem) {
|
|
67
|
-
foundItem.h = maxY +
|
|
68
|
-
setFormItemHeight(props.config.id, maxY +
|
|
95
|
+
foundItem.h = maxY + titleHeight;
|
|
96
|
+
setFormItemHeight(props.config.id, false, maxY + titleHeight);
|
|
69
97
|
}
|
|
70
98
|
}
|
|
71
99
|
return (_ctx, _cache) => {
|
|
@@ -80,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
80
108
|
}, null, 8, ["config"])) : vue.createCommentVNode("", true)
|
|
81
109
|
])) : vue.createCommentVNode("", true),
|
|
82
110
|
vue.createVNode(vue.unref(index$2.Form), {
|
|
83
|
-
templateKey:
|
|
111
|
+
templateKey: vue.unref(templateKey),
|
|
84
112
|
isSubForm: "",
|
|
85
113
|
onLoaded: subFormLoaded,
|
|
86
114
|
canPageEvent: __props.config.triggerSubFormPageEvent,
|
|
@@ -81,7 +81,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
81
81
|
});
|
|
82
82
|
function subTableLoaded(subOption) {
|
|
83
83
|
subTableOption.value = subOption;
|
|
84
|
-
console.log("🚀 ~ subTableLoaded ~ subOption:", subOption);
|
|
85
84
|
const foundItem = props.localConfig.fieldsData.find(
|
|
86
85
|
(item) => item.id == props.config.id
|
|
87
86
|
);
|
|
@@ -91,6 +90,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
91
90
|
foundItem.h = props.config.subTableHeight + titleHeight;
|
|
92
91
|
setFormItemHeight(
|
|
93
92
|
props.config.id,
|
|
93
|
+
true,
|
|
94
94
|
props.config.subTableHeight + titleHeight
|
|
95
95
|
);
|
|
96
96
|
}
|
|
@@ -264,7 +264,7 @@ async function handleTableRefresh(node, data, fields, context) {
|
|
|
264
264
|
var _a, _b, _c;
|
|
265
265
|
console.log("[EventFlow] 执行表格刷新:", node.basic);
|
|
266
266
|
const basic = node.basic || {};
|
|
267
|
-
const
|
|
267
|
+
const refreshOptions = {
|
|
268
268
|
resetSort: basic.resetSort !== false,
|
|
269
269
|
// 默认 true
|
|
270
270
|
resetFilter: basic.resetFilter !== false,
|
|
@@ -272,11 +272,11 @@ async function handleTableRefresh(node, data, fields, context) {
|
|
|
272
272
|
resetPagination: basic.resetPagination !== false
|
|
273
273
|
// 默认 true
|
|
274
274
|
};
|
|
275
|
-
console.log("[EventFlow] 刷新选项:",
|
|
275
|
+
console.log("[EventFlow] 刷新选项:", refreshOptions);
|
|
276
276
|
const tableComponent = (_a = context.components) == null ? void 0 : _a.table;
|
|
277
277
|
const refreshMethod = (_c = (_b = tableComponent == null ? void 0 : tableComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.refresh;
|
|
278
278
|
if (typeof refreshMethod === "function") {
|
|
279
|
-
await refreshMethod(
|
|
279
|
+
await refreshMethod(refreshOptions);
|
|
280
280
|
return {
|
|
281
281
|
success: true,
|
|
282
282
|
message: "表格已刷新"
|
|
@@ -348,6 +348,11 @@ async function handleTableRowDelete(node, data, fields, context) {
|
|
|
348
348
|
const tableComponent = (_a = context.components) == null ? void 0 : _a.table;
|
|
349
349
|
const refreshMethod = (_c = (_b = tableComponent == null ? void 0 : tableComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.refresh;
|
|
350
350
|
if (typeof refreshMethod === "function") {
|
|
351
|
+
const refreshOptions = {
|
|
352
|
+
resetSort: false,
|
|
353
|
+
resetFilter: false,
|
|
354
|
+
resetPagination: false
|
|
355
|
+
};
|
|
351
356
|
await refreshMethod(refreshOptions);
|
|
352
357
|
return {
|
|
353
358
|
success: true,
|
|
@@ -533,6 +538,8 @@ async function handleDialog(node, data, fields, context) {
|
|
|
533
538
|
} else if (basic.dialogSource == "custom") {
|
|
534
539
|
const dialogList = context.localConfig.dialogs || [];
|
|
535
540
|
dialog = dialogList.find((item) => item.id == (basic == null ? void 0 : basic.dialogId));
|
|
541
|
+
dialog.subFormMode = basic.subFormMode;
|
|
542
|
+
dialog.selectionMode = basic.selectionMode;
|
|
536
543
|
}
|
|
537
544
|
if (!dialog) {
|
|
538
545
|
console.error("ui-dialog: 未找到匹配的弹层配置," + (basic == null ? void 0 : basic.dialogId));
|