@fecp/designer 5.4.19 → 5.4.21
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/DialogSelect.vue.mjs +122 -0
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- 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/index.vue.mjs +58 -41
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +62 -43
- package/es/designer/src/packages/event/pageEvent.vue.mjs +18 -3
- package/es/designer/src/packages/eventFlow/dialog/action/Dialog.vue.mjs +9 -29
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
- package/es/designer/src/packages/form/aside/index.mjs +1 -0
- 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 +13 -15
- package/es/designer/src/packages/form/property/widgets.vue.mjs +28 -26
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +3 -3
- package/es/designer.css +970 -967
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +49 -28
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +25 -2
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +1 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DialogSelect.vue.js +122 -0
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- 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/index.vue.js +58 -41
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +62 -43
- package/lib/designer/src/packages/event/pageEvent.vue.js +26 -11
- package/lib/designer/src/packages/eventFlow/dialog/action/Dialog.vue.js +11 -31
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
- package/lib/designer/src/packages/form/aside/index.js +1 -0
- 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 +13 -15
- package/lib/designer/src/packages/form/property/widgets.vue.js +23 -21
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +3 -3
- package/lib/designer.css +970 -967
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +48 -27
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +25 -2
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +1 -1
- package/package.json +1 -1
|
@@ -127,6 +127,9 @@ const _sfc_main = {
|
|
|
127
127
|
},
|
|
128
128
|
(val) => {
|
|
129
129
|
dialogVisible.value = val;
|
|
130
|
+
if (val) {
|
|
131
|
+
loadComponentByPath(currentDialogConfig.value.componentPath);
|
|
132
|
+
}
|
|
130
133
|
},
|
|
131
134
|
{
|
|
132
135
|
immediate: true
|
|
@@ -135,21 +138,31 @@ const _sfc_main = {
|
|
|
135
138
|
vue.watch(dialogVisible, (val) => {
|
|
136
139
|
emit("update:modelValue", val);
|
|
137
140
|
});
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
const componentParams = vue.computed(() => {
|
|
142
|
+
var _a;
|
|
143
|
+
const params = parseRouteParams.parseRouteParams(
|
|
144
|
+
((_a = currentDialogConfig.value) == null ? void 0 : _a.componentParams) || [],
|
|
145
|
+
props.formData,
|
|
146
|
+
props.fieldsList
|
|
147
|
+
);
|
|
148
|
+
return params;
|
|
149
|
+
});
|
|
150
|
+
const currentComponent = vue.ref(null);
|
|
151
|
+
function loadComponentByPath(path) {
|
|
152
|
+
console.log("🚀 ~ loadComponentByPath ~ path:", path);
|
|
153
|
+
debugger;
|
|
154
|
+
const route = props.componentCtx.$router.getRoutes().find((item) => item.path === path);
|
|
155
|
+
if (!route) return;
|
|
156
|
+
const comp = route.components.default;
|
|
157
|
+
if (!comp) return;
|
|
158
|
+
if (typeof comp === "function") {
|
|
159
|
+
comp().then((module2) => {
|
|
160
|
+
currentComponent.value = module2.default;
|
|
161
|
+
});
|
|
162
|
+
} else {
|
|
163
|
+
currentComponent.value = comp;
|
|
151
164
|
}
|
|
152
|
-
}
|
|
165
|
+
}
|
|
153
166
|
const handleSubmit = (data) => {
|
|
154
167
|
emit("confirm", data);
|
|
155
168
|
};
|
|
@@ -318,9 +331,22 @@ const _sfc_main = {
|
|
|
318
331
|
return (_ctx, _cache) => {
|
|
319
332
|
const _component_el_button = index$3.ElButton;
|
|
320
333
|
const _component_el_dialog = index.ElDialog;
|
|
321
|
-
return vue.openBlock(), vue.createBlock(
|
|
334
|
+
return __props.dialogConfig.componentIsDialog ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(currentComponent.value), vue.mergeProps({
|
|
335
|
+
key: 0,
|
|
322
336
|
modelValue: dialogVisible.value,
|
|
323
|
-
"onUpdate:modelValue": _cache[
|
|
337
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
|
|
338
|
+
width: dialogWidth.value,
|
|
339
|
+
draggable: true,
|
|
340
|
+
"close-on-click-modal": false,
|
|
341
|
+
"append-to-body": ""
|
|
342
|
+
}, componentParams.value, {
|
|
343
|
+
formData: __props.formData,
|
|
344
|
+
onClose: handleClose,
|
|
345
|
+
onSubmit: handleSubmit
|
|
346
|
+
}), null, 16, ["modelValue", "width", "formData"])) : (vue.openBlock(), vue.createBlock(_component_el_dialog, {
|
|
347
|
+
key: 1,
|
|
348
|
+
modelValue: dialogVisible.value,
|
|
349
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dialogVisible.value = $event),
|
|
324
350
|
width: dialogWidth.value,
|
|
325
351
|
draggable: true,
|
|
326
352
|
"close-on-click-modal": false,
|
|
@@ -339,7 +365,7 @@ const _sfc_main = {
|
|
|
339
365
|
var _a, _b, _c;
|
|
340
366
|
return [
|
|
341
367
|
vue.createVNode(_component_el_button, { onClick: handleCancel }, {
|
|
342
|
-
default: vue.withCtx(() => _cache[
|
|
368
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
343
369
|
vue.createTextVNode("取消")
|
|
344
370
|
])),
|
|
345
371
|
_: 1
|
|
@@ -350,7 +376,7 @@ const _sfc_main = {
|
|
|
350
376
|
type: "primary",
|
|
351
377
|
onClick: handleConfirm
|
|
352
378
|
}, {
|
|
353
|
-
default: vue.withCtx(() => _cache[
|
|
379
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
354
380
|
vue.createTextVNode("确定")
|
|
355
381
|
])),
|
|
356
382
|
_: 1
|
|
@@ -407,26 +433,21 @@ const _sfc_main = {
|
|
|
407
433
|
templateKey: __props.dialogConfig.subFormKey,
|
|
408
434
|
isDialog: "",
|
|
409
435
|
modelValue: initDialogParams.value,
|
|
410
|
-
"onUpdate:modelValue": _cache[
|
|
436
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => initDialogParams.value = $event),
|
|
411
437
|
onLoaded: subFormLoaded,
|
|
412
438
|
initFormMode: __props.dialogConfig.subFormMode,
|
|
413
439
|
ref_key: "dialogFormRef",
|
|
414
440
|
ref: dialogFormRef
|
|
415
441
|
}, null, 8, ["templateKey", "modelValue", "initFormMode"])) : ((_d = __props.dialogConfig) == null ? void 0 : _d.contentSource) === "component" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
416
|
-
|
|
417
|
-
key: 0,
|
|
418
|
-
"dialog-params": __props.dialogConfig.dialogParams,
|
|
419
|
-
onClose: handleClose,
|
|
420
|
-
onSubmit: handleSubmit
|
|
421
|
-
}, null, 40, ["dialog-params"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + vue.toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
|
|
442
|
+
currentComponent.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(currentComponent.value), vue.normalizeProps(vue.mergeProps({ key: 0 }, componentParams.value)), null, 16)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, " 组件加载失败,请检查组件路径: " + vue.toDisplayString((_e = __props.dialogConfig) == null ? void 0 : _e.componentPath), 1))
|
|
422
443
|
], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, "请配置弹层内容"))
|
|
423
444
|
], 6)
|
|
424
445
|
];
|
|
425
446
|
}),
|
|
426
447
|
_: 1
|
|
427
|
-
}, 8, ["modelValue", "width"]);
|
|
448
|
+
}, 8, ["modelValue", "width"]));
|
|
428
449
|
};
|
|
429
450
|
}
|
|
430
451
|
};
|
|
431
|
-
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
452
|
+
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8f4f0d44"]]);
|
|
432
453
|
exports.default = DialogRenderer;
|
|
@@ -5,6 +5,7 @@ const index$2 = require("../form/index.js");
|
|
|
5
5
|
const index$1 = require("../subTitle/index.js");
|
|
6
6
|
const index = require("../h2/index.js");
|
|
7
7
|
const common = require("../../../utils/common.js");
|
|
8
|
+
const parseRouteParams = require("../../../utils/parseRouteParams.js");
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 0,
|
|
10
11
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -55,11 +56,33 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
55
56
|
const setFormItemHeight = vue.inject("setFormItemHeight");
|
|
56
57
|
const subFormData = vue.computed({
|
|
57
58
|
get: () => {
|
|
59
|
+
if (props.config.dataSourceFrom == "self") {
|
|
60
|
+
return common.cloneDeep(subFormParams.value);
|
|
61
|
+
}
|
|
58
62
|
return common.cloneDeep(formData.value);
|
|
59
63
|
},
|
|
60
64
|
set: (val) => {
|
|
61
|
-
|
|
65
|
+
if (props.config.dataSourceFrom != "self") {
|
|
66
|
+
formData.value = { ...formData.value, ...val };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const fieldList = vue.computed(() => {
|
|
71
|
+
return [
|
|
72
|
+
...props.localConfig.fieldsData.map((item) => item.component),
|
|
73
|
+
...props.localConfig.hiddenFields
|
|
74
|
+
];
|
|
75
|
+
});
|
|
76
|
+
const subFormParams = vue.computed(() => {
|
|
77
|
+
if (props.config.dataSourceFrom == "self") {
|
|
78
|
+
const params = parseRouteParams.parseRouteParams(
|
|
79
|
+
props.config.subFormParams,
|
|
80
|
+
formData.value,
|
|
81
|
+
fieldList.value
|
|
82
|
+
);
|
|
83
|
+
return params;
|
|
62
84
|
}
|
|
85
|
+
return {};
|
|
63
86
|
});
|
|
64
87
|
const templateKey = vue.computed(() => {
|
|
65
88
|
if (props.config.formSource == "dynamic") {
|
|
@@ -128,7 +151,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
151
|
templateKey: vue.unref(templateKey),
|
|
129
152
|
isSubForm: "",
|
|
130
153
|
onLayoutUpdated: subFormLoaded,
|
|
131
|
-
canPageEvent: __props.config.
|
|
154
|
+
canPageEvent: __props.config.dataSourceFrom == "self",
|
|
132
155
|
initFormMode: __props.formMode,
|
|
133
156
|
modelValue: vue.unref(subFormData),
|
|
134
157
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(subFormData) ? subFormData.value = $event : null)
|
|
@@ -262,5 +262,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
|
-
const _Text = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
265
|
+
const _Text = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-185ddd14"]]);
|
|
266
266
|
exports.default = _Text;
|