@fecp/designer 5.5.72 → 5.5.73
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/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.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 -2
- 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 +186 -63
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- 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/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/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.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 -2
- 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 +186 -63
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- 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/utils/eventFlow/actionHandlers.js +32 -4
- package/package.json +1 -1
|
@@ -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-d3057435"]]);
|
|
1219
1235
|
exports.default = _Form;
|
|
@@ -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);
|