@fecp/designer 5.5.72 → 5.5.74
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/package.json.mjs +1 -1
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- package/es/designer/src/components/OptionConfig.vue.mjs +2 -2
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +1 -1
- package/es/designer/src/packages/eventFlow/dialog/action/FormSubmit.vue2.mjs +17 -8
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +14 -5
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -1
- package/es/designer/src/packages/formulaEditor/core/calculate.mjs +0 -1
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer.css +222 -95
- package/es/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.mjs +4 -4
- package/es/packages/vue/src/components/bus/contract/Contract.vue.mjs +6 -1
- package/es/packages/vue/src/components/bus/document/Document.vue.mjs +15 -1
- package/es/packages/vue/src/components/details/main/Main.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +46 -30
- package/es/packages/vue/src/components/forms/form/FormAnchorNav.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/form/RightAnchorNav.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +4 -3
- package/es/packages/vue/src/components/forms/h2/H2.vue.mjs +2 -2
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +32 -4
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- package/lib/designer/src/components/OptionConfig.vue.js +2 -2
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +1 -1
- package/lib/designer/src/packages/eventFlow/dialog/action/FormSubmit.vue2.js +17 -8
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +14 -5
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
- package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -1
- package/lib/designer/src/packages/formulaEditor/core/calculate.js +0 -1
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer.css +222 -95
- package/lib/packages/mobile/src/components/navigation/actionBar/ActionBar.vue.js +3 -3
- package/lib/packages/vue/src/components/bus/contract/Contract.vue.js +6 -1
- package/lib/packages/vue/src/components/bus/document/Document.vue.js +15 -1
- package/lib/packages/vue/src/components/details/main/Main.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +45 -29
- package/lib/packages/vue/src/components/forms/form/FormAnchorNav.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/form/RightAnchorNav.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +4 -3
- package/lib/packages/vue/src/components/forms/h2/H2.vue.js +2 -2
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +32 -4
- package/package.json +1 -1
|
@@ -28,9 +28,9 @@ const _sfc_main = {
|
|
|
28
28
|
default: Vue.withCtx(() => [
|
|
29
29
|
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.actionBarOptions, (item) => {
|
|
30
30
|
return Vue.openBlock(), Vue.createBlock(_component_van_action_bar_button, {
|
|
31
|
-
|
|
31
|
+
class: Vue.normalizeClass(item.bgClass || "icon-blue"),
|
|
32
32
|
text: item.text
|
|
33
|
-
}, null, 8, ["
|
|
33
|
+
}, null, 8, ["class", "text"]);
|
|
34
34
|
}), 256))
|
|
35
35
|
]),
|
|
36
36
|
_: 1
|
|
@@ -38,5 +38,5 @@ const _sfc_main = {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
const _ActionBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
41
|
+
const _ActionBar = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-08956b7c"]]);
|
|
42
42
|
exports.default = _ActionBar;
|
|
@@ -5,6 +5,7 @@ require("../../forms/h2/index.js");
|
|
|
5
5
|
const getInstance = require("../../../utils/getInstance.js");
|
|
6
6
|
const parseRouteParams = require("../../../utils/parseRouteParams.js");
|
|
7
7
|
const common = require("../../../utils/common.js");
|
|
8
|
+
const eventBus = require("../../../utils/eventBus.js");
|
|
8
9
|
const _hoisted_1 = { class: "contract-content" };
|
|
9
10
|
const path = "/tech/ctr/components/DocCtrInfoComponent";
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
@@ -60,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
60
61
|
Vue.onMounted(() => {
|
|
61
62
|
common.loadComponentByPath(path, ctx.$router, currentComponent);
|
|
62
63
|
});
|
|
63
|
-
function loaded(dom) {
|
|
64
|
+
function loaded(dom, visibleData) {
|
|
64
65
|
const foundItem = props.localConfig.fieldsData.find(
|
|
65
66
|
(item) => item.id == props.config.id
|
|
66
67
|
);
|
|
@@ -70,6 +71,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
70
71
|
foundItem.h = dom.offsetHeight + titleHeight;
|
|
71
72
|
setFormItemHeight(props.config.id, true, dom.offsetHeight + titleHeight);
|
|
72
73
|
}
|
|
74
|
+
eventBus.default.emit("onSubTableDataLoaded", {
|
|
75
|
+
subTableConfig: props.config,
|
|
76
|
+
visibleData
|
|
77
|
+
});
|
|
73
78
|
}
|
|
74
79
|
return (_ctx, _cache) => {
|
|
75
80
|
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
29
29
|
default: ""
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
setup(__props) {
|
|
32
|
+
setup(__props, { expose: __expose }) {
|
|
33
33
|
const props = __props;
|
|
34
34
|
const ctx = getInstance.getCurrentVueInstance();
|
|
35
35
|
Vue.ref("");
|
|
@@ -115,6 +115,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
115
115
|
setFormItemHeight(props.config.id, true, dom.offsetHeight + titleHeight);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
+
const docRef = Vue.ref();
|
|
119
|
+
function validate() {
|
|
120
|
+
var _a;
|
|
121
|
+
if (currentComponent.value) {
|
|
122
|
+
return (_a = docRef.value) == null ? void 0 : _a.validateFile();
|
|
123
|
+
} else {
|
|
124
|
+
return Promise.resolve();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
__expose({
|
|
128
|
+
validate
|
|
129
|
+
});
|
|
118
130
|
return (_ctx, _cache) => {
|
|
119
131
|
return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
|
|
120
132
|
__props.config.titleMode != "none" ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -128,6 +140,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
140
|
])) : Vue.createCommentVNode("", true),
|
|
129
141
|
Vue.createElementVNode("div", _hoisted_2, [
|
|
130
142
|
(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(currentComponent)), {
|
|
143
|
+
ref_key: "docRef",
|
|
144
|
+
ref: docRef,
|
|
131
145
|
isEdit: __props.formMode != "query",
|
|
132
146
|
isSupplement: __props.config.isSupplement,
|
|
133
147
|
multiple: __props.config.multiple,
|
|
@@ -54,5 +54,5 @@ const _sfc_main = {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
57
|
+
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-0d3ae9b5"]]);
|
|
58
58
|
exports.default = component;
|
|
@@ -98,6 +98,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
98
98
|
isApproval: {
|
|
99
99
|
type: Boolean,
|
|
100
100
|
default: false
|
|
101
|
+
},
|
|
102
|
+
class: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: ""
|
|
101
105
|
}
|
|
102
106
|
},
|
|
103
107
|
emits: [
|
|
@@ -660,6 +664,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
660
664
|
subFormPromises.push((_a = formRef.value) == null ? void 0 : _a.validate());
|
|
661
665
|
return Promise.all(subFormPromises).then(() => getFormData());
|
|
662
666
|
};
|
|
667
|
+
const docValidate = () => {
|
|
668
|
+
const documentComps = gridLayoutFieldsData.value.filter((item) => item.component.fieldType == "document").map((item) => item.component);
|
|
669
|
+
const compPromises = documentComps.map((comp) => {
|
|
670
|
+
var _a;
|
|
671
|
+
const compRef = getFormItemRef(String(comp.id));
|
|
672
|
+
return ((_a = compRef == null ? void 0 : compRef.validate) == null ? void 0 : _a.call(compRef)) || Promise.resolve();
|
|
673
|
+
});
|
|
674
|
+
return Promise.all(compPromises);
|
|
675
|
+
};
|
|
663
676
|
const resetFields = () => {
|
|
664
677
|
var _a, _b;
|
|
665
678
|
(_a = formRef.value) == null ? void 0 : _a.clearValidate();
|
|
@@ -851,10 +864,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
851
864
|
};
|
|
852
865
|
const applyLinkageEffectsForChangedFields = (changedFieldNames) => {
|
|
853
866
|
var _a;
|
|
854
|
-
console.log(
|
|
855
|
-
"🚀 ~ applyLinkageEffectsForChangedFields ~ 变化的字段:",
|
|
856
|
-
changedFieldNames
|
|
857
|
-
);
|
|
858
867
|
const linkedConfig = localConfig.value.linkedConfig || {};
|
|
859
868
|
const fields = [...fieldsData.value, ...hiddenFields.value];
|
|
860
869
|
const relevantConfigs = filterRelevantLinkageConfigs(
|
|
@@ -930,40 +939,46 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
930
939
|
rules[fieldName] = prodRules.value[fieldName];
|
|
931
940
|
}
|
|
932
941
|
formRules.value = rules;
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
937
|
-
if (layoutFieldItem) {
|
|
938
|
-
layoutFieldItem.component.readOnly = false;
|
|
939
|
-
}
|
|
940
|
-
});
|
|
941
|
-
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
942
|
+
if (formMode.value != "query") {
|
|
943
|
+
relevantConfigs.readonly.forEach((item) => {
|
|
944
|
+
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
942
945
|
dataLinkFieldList.forEach((fieldId) => {
|
|
943
946
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
944
947
|
if (layoutFieldItem) {
|
|
945
|
-
layoutFieldItem.component.readOnly =
|
|
948
|
+
layoutFieldItem.component.readOnly = false;
|
|
946
949
|
}
|
|
947
950
|
});
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
951
|
+
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
952
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
953
|
+
const layoutFieldItem = updatedLayoutData.find(
|
|
954
|
+
(g) => g.id == fieldId
|
|
955
|
+
);
|
|
956
|
+
if (layoutFieldItem) {
|
|
957
|
+
layoutFieldItem.component.readOnly = true;
|
|
958
|
+
}
|
|
959
|
+
});
|
|
956
960
|
}
|
|
957
961
|
});
|
|
958
|
-
|
|
962
|
+
relevantConfigs.disabled.forEach((item) => {
|
|
963
|
+
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
959
964
|
dataLinkFieldList.forEach((fieldId) => {
|
|
960
965
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
961
966
|
if (layoutFieldItem) {
|
|
962
|
-
layoutFieldItem.component.disabled =
|
|
967
|
+
layoutFieldItem.component.disabled = false;
|
|
963
968
|
}
|
|
964
969
|
});
|
|
965
|
-
|
|
966
|
-
|
|
970
|
+
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
971
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
972
|
+
const layoutFieldItem = updatedLayoutData.find(
|
|
973
|
+
(g) => g.id == fieldId
|
|
974
|
+
);
|
|
975
|
+
if (layoutFieldItem) {
|
|
976
|
+
layoutFieldItem.component.disabled = true;
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
}
|
|
967
982
|
const fieldsConfigArr = updatedLayoutData.filter((item) => !item.hidden);
|
|
968
983
|
gridLayoutFieldsData.value = sortLayoutItems(fieldsConfigArr);
|
|
969
984
|
(_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
|
|
@@ -1079,6 +1094,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1079
1094
|
Vue.provide("getFormData", getFormData);
|
|
1080
1095
|
__expose({
|
|
1081
1096
|
validate,
|
|
1097
|
+
docValidate,
|
|
1082
1098
|
resetFields,
|
|
1083
1099
|
getFormData,
|
|
1084
1100
|
setFormData,
|
|
@@ -1095,7 +1111,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1095
1111
|
const _directive_fec_layout = Vue.resolveDirective("fec-layout");
|
|
1096
1112
|
return !configLoading.value ? Vue.withDirectives((Vue.openBlock(), Vue.createBlock(_component_el_container, {
|
|
1097
1113
|
key: 0,
|
|
1098
|
-
class: "fec-form",
|
|
1114
|
+
class: Vue.normalizeClass(["fec-form", __props.class]),
|
|
1099
1115
|
"data-id": localConfig.value.templateKey,
|
|
1100
1116
|
"data-name": localConfig.value.templateName,
|
|
1101
1117
|
"data-pkId": localConfig.value.pkId,
|
|
@@ -1209,11 +1225,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1209
1225
|
})) : Vue.createCommentVNode("", true)
|
|
1210
1226
|
]),
|
|
1211
1227
|
_: 1
|
|
1212
|
-
}, 8, ["data-id", "data-name", "data-pkId"])), [
|
|
1228
|
+
}, 8, ["class", "data-id", "data-name", "data-pkId"])), [
|
|
1213
1229
|
[_directive_fec_layout]
|
|
1214
1230
|
]) : Vue.createCommentVNode("", true);
|
|
1215
1231
|
};
|
|
1216
1232
|
}
|
|
1217
1233
|
});
|
|
1218
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1234
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-318c562a"]]);
|
|
1219
1235
|
exports.default = _Form;
|
|
@@ -48,7 +48,7 @@ const _sfc_main = {
|
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
emit("update:modelValue", link.id);
|
|
50
50
|
emit("change", link);
|
|
51
|
-
const element = document.getElementById(link.id);
|
|
51
|
+
const element = document.getElementById(`comp_${link.id}`);
|
|
52
52
|
if (element) {
|
|
53
53
|
isClickScrolling = true;
|
|
54
54
|
element.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
@@ -105,5 +105,5 @@ const _sfc_main = {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
const FormAnchorNav = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
108
|
+
const FormAnchorNav = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-fe427ccb"]]);
|
|
109
109
|
exports.default = FormAnchorNav;
|
|
@@ -45,7 +45,7 @@ const _sfc_main = {
|
|
|
45
45
|
e.preventDefault();
|
|
46
46
|
emit("update:modelValue", link.id);
|
|
47
47
|
emit("change", link);
|
|
48
|
-
const element = document.getElementById(link.id);
|
|
48
|
+
const element = document.getElementById(`comp_${link.id}`);
|
|
49
49
|
if (element) {
|
|
50
50
|
isClickScrolling = true;
|
|
51
51
|
element.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
@@ -122,5 +122,5 @@ const _sfc_main = {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
const RightAnchorNav = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
125
|
+
const RightAnchorNav = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8e0e370c"]]);
|
|
126
126
|
exports.default = RightAnchorNav;
|
|
@@ -162,7 +162,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
162
162
|
prop: __props.config.fieldName,
|
|
163
163
|
required: __props.config.required,
|
|
164
164
|
error: __props.error,
|
|
165
|
-
"label-width": 160
|
|
165
|
+
"label-width": 160,
|
|
166
|
+
id: `comp_${__props.config.id}`
|
|
166
167
|
}, Vue.createSlots({
|
|
167
168
|
default: Vue.withCtx(() => [
|
|
168
169
|
__props.config.labelMode != "label" ? (Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(componentType.value), Vue.mergeProps({
|
|
@@ -203,9 +204,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
203
204
|
}),
|
|
204
205
|
key: "0"
|
|
205
206
|
} : void 0
|
|
206
|
-
]), 1032, ["prop", "required", "error"]));
|
|
207
|
+
]), 1032, ["prop", "required", "error", "id"]));
|
|
207
208
|
};
|
|
208
209
|
}
|
|
209
210
|
});
|
|
210
|
-
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
211
|
+
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-08a3d7ce"]]);
|
|
211
212
|
exports.default = _FormItem;
|
|
@@ -22,7 +22,7 @@ const _sfc_main = {
|
|
|
22
22
|
return (_ctx, _cache) => {
|
|
23
23
|
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
24
24
|
class: "fec-h2",
|
|
25
|
-
id: __props.config.id
|
|
25
|
+
id: `comp_${__props.config.id}`
|
|
26
26
|
}, [
|
|
27
27
|
_cache[0] || (_cache[0] = Vue.createElementVNode("div", { class: "fec-label-line" }, null, -1)),
|
|
28
28
|
Vue.createElementVNode("div", _hoisted_2, [
|
|
@@ -41,5 +41,5 @@ const _sfc_main = {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
44
|
+
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e871241a"]]);
|
|
45
45
|
exports.default = _H2;
|
|
@@ -500,7 +500,7 @@ async function handleFormSetValue(node, data, fields, context) {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
async function handleFormSubmit(node, data, fields, context) {
|
|
503
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
503
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
504
504
|
const basic = node.basic || {};
|
|
505
505
|
if (!(basic == null ? void 0 : basic.dataSourceId)) {
|
|
506
506
|
console.error("form-setValue: 缺少 dataSourceId 配置");
|
|
@@ -529,6 +529,27 @@ async function handleFormSubmit(node, data, fields, context) {
|
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
+
if (basic == null ? void 0 : basic.docValidate) {
|
|
533
|
+
const docValidateMethod = (_g = (_f = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _f.exposed) == null ? void 0 : _g.docValidate;
|
|
534
|
+
try {
|
|
535
|
+
if (typeof docValidateMethod === "function") {
|
|
536
|
+
await docValidateMethod();
|
|
537
|
+
} else {
|
|
538
|
+
console.error("未找到表单组件的 docValidate 方法");
|
|
539
|
+
return {
|
|
540
|
+
success: false,
|
|
541
|
+
message: "表单组件未正确配置或 docValidate 方法未暴露",
|
|
542
|
+
shouldShowError: true
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
} catch (error) {
|
|
546
|
+
return {
|
|
547
|
+
success: false,
|
|
548
|
+
message: "要件校验失败!",
|
|
549
|
+
shouldShowError: false
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
}
|
|
532
553
|
if (typeof getFormDataMethod === "function") {
|
|
533
554
|
try {
|
|
534
555
|
let formData = getFormDataMethod();
|
|
@@ -555,8 +576,8 @@ async function handleFormSubmit(node, data, fields, context) {
|
|
|
555
576
|
formData = common.removeEmptyValues(result.data || {});
|
|
556
577
|
delete formData.pageNo;
|
|
557
578
|
delete formData.pageSize;
|
|
558
|
-
const formComponent2 = (
|
|
559
|
-
const setFormDataMethod = (
|
|
579
|
+
const formComponent2 = (_h = context.components) == null ? void 0 : _h.form;
|
|
580
|
+
const setFormDataMethod = (_j = (_i = formComponent2 == null ? void 0 : formComponent2.$) == null ? void 0 : _i.exposed) == null ? void 0 : _j.setFormData;
|
|
560
581
|
if (typeof setFormDataMethod === "function") {
|
|
561
582
|
setFormDataMethod(formData);
|
|
562
583
|
} else {
|
|
@@ -642,7 +663,7 @@ async function handleDialog(node, data, fields, context) {
|
|
|
642
663
|
}
|
|
643
664
|
}
|
|
644
665
|
async function handleRiskSchDialog(node, data, fields, context) {
|
|
645
|
-
var _a, _b, _c;
|
|
666
|
+
var _a, _b, _c, _d, _e, _f;
|
|
646
667
|
const basic = node.basic || {};
|
|
647
668
|
if (!(basic == null ? void 0 : basic.schNo)) {
|
|
648
669
|
console.error("风险拦截校验: 缺少 schNo 配置");
|
|
@@ -659,6 +680,13 @@ async function handleRiskSchDialog(node, data, fields, context) {
|
|
|
659
680
|
await validateMethod();
|
|
660
681
|
}
|
|
661
682
|
}
|
|
683
|
+
if (basic == null ? void 0 : basic.docValidate) {
|
|
684
|
+
const formComponent = (_d = context.components) == null ? void 0 : _d.form;
|
|
685
|
+
const docValidateMethod = (_f = (_e = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _e.exposed) == null ? void 0 : _f.docValidate;
|
|
686
|
+
if (typeof docValidateMethod === "function") {
|
|
687
|
+
await docValidateMethod();
|
|
688
|
+
}
|
|
689
|
+
}
|
|
662
690
|
const schNo = basic.schNo;
|
|
663
691
|
const paramList = parseRouteParams.parseRouteParams(basic == null ? void 0 : basic.params, data, fields);
|
|
664
692
|
const busNo = parseRouteParams.parseSingleParamValue(basic.busNo, data, fields);
|