@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
|
@@ -125,8 +125,12 @@ const _sfc_main = {
|
|
|
125
125
|
desc: "让字段在特定条件成立时显示,反之隐藏"
|
|
126
126
|
},
|
|
127
127
|
{ label: "必填", name: "required", desc: "让字段在特定条件成立时变为必填" },
|
|
128
|
-
{
|
|
129
|
-
|
|
128
|
+
{
|
|
129
|
+
label: "只读",
|
|
130
|
+
name: "disabled",
|
|
131
|
+
desc: "让字段在特定条件成立时变为不可编辑"
|
|
132
|
+
},
|
|
133
|
+
// { label: "禁用", name: "disabled", desc: "让字段在特定条件成立时变为禁用" },
|
|
130
134
|
{ label: "属性", name: "property", desc: "让字段的其他属性根据条件动态变化" }
|
|
131
135
|
]);
|
|
132
136
|
const activeTab = ref("dataLink");
|
|
@@ -138,14 +142,14 @@ const _sfc_main = {
|
|
|
138
142
|
const editingRuleIndex = ref(-1);
|
|
139
143
|
const fieldAssignments = ref([]);
|
|
140
144
|
const filterTitle = ref("");
|
|
141
|
-
const filterSuccessDesc = ref("
|
|
145
|
+
const filterSuccessDesc = ref("条件满足时或不设置条件,数据联动赋值以下字段");
|
|
142
146
|
function handleAddRule(tab) {
|
|
143
147
|
const name = tab.name;
|
|
144
148
|
filterTitle.value = `${tab.label}联动规则`;
|
|
145
149
|
editingRuleIndex.value = -1;
|
|
146
150
|
switch (name) {
|
|
147
151
|
case "dataLink":
|
|
148
|
-
filterSuccessDesc.value =
|
|
152
|
+
filterSuccessDesc.value = `条件满足时或不设置条件,数据联动赋值以下字段`;
|
|
149
153
|
break;
|
|
150
154
|
case "visibility":
|
|
151
155
|
filterSuccessDesc.value = `条件满足时,显示以下字段`;
|
|
@@ -321,68 +325,71 @@ const _sfc_main = {
|
|
|
321
325
|
class: "rule-card",
|
|
322
326
|
shadow: "hover"
|
|
323
327
|
}, {
|
|
324
|
-
default: withCtx(() =>
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
createElementVNode("div",
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
328
|
+
default: withCtx(() => {
|
|
329
|
+
var _a3;
|
|
330
|
+
return [
|
|
331
|
+
createElementVNode("div", _hoisted_5, [
|
|
332
|
+
createElementVNode("div", _hoisted_6, [
|
|
333
|
+
createVNode(_component_el_button, {
|
|
334
|
+
type: "primary",
|
|
335
|
+
link: "",
|
|
336
|
+
size: "small",
|
|
337
|
+
onClick: ($event) => handleEditRule(tab, item, idx)
|
|
338
|
+
}, {
|
|
339
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
340
|
+
createTextVNode(" 编辑 ")
|
|
341
|
+
])),
|
|
342
|
+
_: 2
|
|
343
|
+
}, 1032, ["onClick"]),
|
|
344
|
+
createVNode(_component_el_button, {
|
|
345
|
+
type: "danger",
|
|
346
|
+
link: "",
|
|
347
|
+
size: "small",
|
|
348
|
+
onClick: ($event) => handleDeleteRule(tab, idx)
|
|
349
|
+
}, {
|
|
350
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
351
|
+
createTextVNode(" 删除 ")
|
|
352
|
+
])),
|
|
353
|
+
_: 2
|
|
354
|
+
}, 1032, ["onClick"])
|
|
355
|
+
]),
|
|
356
|
+
item.filterConfig && ((_a3 = item.filterConfig.conditions) == null ? void 0 : _a3.length) ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
357
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "rule-section-title" }, "触发条件", -1)),
|
|
358
|
+
createElementVNode("div", _hoisted_8, [
|
|
359
|
+
createElementVNode("div", _hoisted_9, [
|
|
360
|
+
createVNode(FilterConfigDisplay, {
|
|
361
|
+
config: item.filterConfig,
|
|
362
|
+
"field-label-getter": getFieldLabel
|
|
363
|
+
}, null, 8, ["config"])
|
|
364
|
+
])
|
|
365
|
+
])
|
|
366
|
+
])) : createCommentVNode("", true),
|
|
367
|
+
createElementVNode("div", _hoisted_10, [
|
|
368
|
+
createElementVNode("div", _hoisted_11, toDisplayString(getFieldTitle(tab.name)), 1),
|
|
369
|
+
createElementVNode("div", _hoisted_12, [
|
|
370
|
+
tab.name === "dataLink" && item.fieldAssignments && item.fieldAssignments.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
371
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.fieldAssignments, (assignment, index) => {
|
|
372
|
+
return openBlock(), createElementBlock("div", {
|
|
373
|
+
key: index,
|
|
374
|
+
class: "field-assignment-display-item"
|
|
375
|
+
}, [
|
|
376
|
+
createElementVNode("span", _hoisted_14, "「" + toDisplayString(getFieldLabel(assignment.fieldId)) + "」", 1),
|
|
377
|
+
_cache[6] || (_cache[6] = createElementVNode("span", { class: "field-operator" }, "=", -1)),
|
|
378
|
+
createElementVNode("span", _hoisted_15, [
|
|
379
|
+
assignment.isField ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
380
|
+
createTextVNode(" 「" + toDisplayString(getFieldLabel(assignment.value)) + "」 ", 1)
|
|
381
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
382
|
+
createTextVNode(toDisplayString(formatFormulaText(assignment)), 1)
|
|
383
|
+
], 64))
|
|
384
|
+
])
|
|
385
|
+
]);
|
|
386
|
+
}), 128))
|
|
387
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString(item.dataLinkFieldList.map((fieldId) => `${getFieldLabel(fieldId)}`).join(", ")), 1))
|
|
358
388
|
])
|
|
359
|
-
])
|
|
360
|
-
])) : createCommentVNode("", true),
|
|
361
|
-
createElementVNode("div", _hoisted_10, [
|
|
362
|
-
createElementVNode("div", _hoisted_11, toDisplayString(getFieldTitle(tab.name)), 1),
|
|
363
|
-
createElementVNode("div", _hoisted_12, [
|
|
364
|
-
tab.name === "dataLink" && item.fieldAssignments && item.fieldAssignments.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
365
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(item.fieldAssignments, (assignment, index) => {
|
|
366
|
-
return openBlock(), createElementBlock("div", {
|
|
367
|
-
key: index,
|
|
368
|
-
class: "field-assignment-display-item"
|
|
369
|
-
}, [
|
|
370
|
-
createElementVNode("span", _hoisted_14, "「" + toDisplayString(getFieldLabel(assignment.fieldId)) + "」", 1),
|
|
371
|
-
_cache[6] || (_cache[6] = createElementVNode("span", { class: "field-operator" }, "=", -1)),
|
|
372
|
-
createElementVNode("span", _hoisted_15, [
|
|
373
|
-
assignment.isField ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
374
|
-
createTextVNode(" 「" + toDisplayString(getFieldLabel(assignment.value)) + "」 ", 1)
|
|
375
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
376
|
-
createTextVNode(toDisplayString(formatFormulaText(assignment)), 1)
|
|
377
|
-
], 64))
|
|
378
|
-
])
|
|
379
|
-
]);
|
|
380
|
-
}), 128))
|
|
381
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString(item.dataLinkFieldList.map((fieldId) => `${getFieldLabel(fieldId)}`).join(", ")), 1))
|
|
382
389
|
])
|
|
383
390
|
])
|
|
384
|
-
]
|
|
385
|
-
|
|
391
|
+
];
|
|
392
|
+
}),
|
|
386
393
|
_: 2
|
|
387
394
|
}, 1024);
|
|
388
395
|
}), 128))
|
|
@@ -433,7 +440,7 @@ const _sfc_main = {
|
|
|
433
440
|
title: unref(filterTitle)
|
|
434
441
|
}, {
|
|
435
442
|
default: withCtx(({ filterConfigData }) => {
|
|
436
|
-
var _a, _b
|
|
443
|
+
var _a, _b;
|
|
437
444
|
return [
|
|
438
445
|
createElementVNode("span", _hoisted_18, toDisplayString(unref(filterSuccessDesc)), 1),
|
|
439
446
|
unref(currentTab).name !== "dataLink" ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
@@ -528,14 +535,13 @@ const _sfc_main = {
|
|
|
528
535
|
link: "",
|
|
529
536
|
icon: "CirclePlus",
|
|
530
537
|
onClick: addFieldAssignment,
|
|
531
|
-
class: "add-assignment-btn"
|
|
532
|
-
disabled: !filterConfigData || ((_c = filterConfigData.conditions) == null ? void 0 : _c.length) === 0
|
|
538
|
+
class: "add-assignment-btn"
|
|
533
539
|
}, {
|
|
534
540
|
default: withCtx(() => _cache[7] || (_cache[7] = [
|
|
535
541
|
createTextVNode(" 添加字段赋值 ")
|
|
536
542
|
])),
|
|
537
|
-
_:
|
|
538
|
-
}
|
|
543
|
+
_: 1
|
|
544
|
+
})
|
|
539
545
|
]))
|
|
540
546
|
];
|
|
541
547
|
}),
|
|
@@ -545,7 +551,7 @@ const _sfc_main = {
|
|
|
545
551
|
};
|
|
546
552
|
}
|
|
547
553
|
};
|
|
548
|
-
const DataLinkage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
554
|
+
const DataLinkage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2626b920"]]);
|
|
549
555
|
export {
|
|
550
556
|
DataLinkage as default
|
|
551
557
|
};
|
|
@@ -73,6 +73,7 @@ import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescr
|
|
|
73
73
|
/* empty css */
|
|
74
74
|
/* empty css */
|
|
75
75
|
import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
76
|
+
/* empty css */
|
|
76
77
|
/* empty css */
|
|
77
78
|
/* empty css */
|
|
78
79
|
import "../../axios/config.mjs";
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { ref, watch, computed, createElementBlock, openBlock, Fragment, createVNode, createCommentVNode, withCtx, createTextVNode, renderList,
|
|
13
|
+
import { ref, watch, computed, createElementBlock, openBlock, Fragment, createVNode, createBlock, createCommentVNode, withCtx, createTextVNode, renderList, unref } from "vue";
|
|
14
14
|
import { getEditConfigData } from "../../../utils/common.mjs";
|
|
15
15
|
import FieldSetMapping from "../../../../components/FieldSetMapping.vue2.mjs";
|
|
16
16
|
import OnlyFLowConfigButton from "../../../../components/OnlyFLowConfigButton.vue2.mjs";
|
|
@@ -59,6 +59,11 @@ const _sfc_main = {
|
|
|
59
59
|
},
|
|
60
60
|
{ immediate: true }
|
|
61
61
|
);
|
|
62
|
+
function handleDialogSourceChange() {
|
|
63
|
+
props.formData.dialogId = null;
|
|
64
|
+
currDialog.value = {};
|
|
65
|
+
tableOptions.value = null;
|
|
66
|
+
}
|
|
62
67
|
const handleDialogChange = async (dialogId) => {
|
|
63
68
|
if (!dialogId) {
|
|
64
69
|
currDialog.value = {};
|
|
@@ -81,6 +86,8 @@ const _sfc_main = {
|
|
|
81
86
|
console.error("🚀 ~ 获取表格配置失败:", error);
|
|
82
87
|
}
|
|
83
88
|
}
|
|
89
|
+
} else if (currDialog.value.contentSource === "form") {
|
|
90
|
+
props.formData.subFormMode = currDialog.value.subFormMode;
|
|
84
91
|
} else {
|
|
85
92
|
tableOptions.value = null;
|
|
86
93
|
}
|
|
@@ -120,17 +127,18 @@ const _sfc_main = {
|
|
|
120
127
|
default: withCtx(() => [
|
|
121
128
|
createVNode(_component_el_radio_group, {
|
|
122
129
|
modelValue: __props.formData.dialogSource,
|
|
123
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.formData.dialogSource = $event)
|
|
130
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.formData.dialogSource = $event),
|
|
131
|
+
onChange: handleDialogSourceChange
|
|
124
132
|
}, {
|
|
125
133
|
default: withCtx(() => [
|
|
126
134
|
createVNode(_component_el_radio_button, { value: "global" }, {
|
|
127
|
-
default: withCtx(() => _cache[
|
|
135
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
128
136
|
createTextVNode("全局")
|
|
129
137
|
])),
|
|
130
138
|
_: 1
|
|
131
139
|
}),
|
|
132
140
|
createVNode(_component_el_radio_button, { value: "custom" }, {
|
|
133
|
-
default: withCtx(() => _cache[
|
|
141
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
|
134
142
|
createTextVNode("自定义")
|
|
135
143
|
])),
|
|
136
144
|
_: 1
|
|
@@ -167,7 +175,7 @@ const _sfc_main = {
|
|
|
167
175
|
]),
|
|
168
176
|
_: 1
|
|
169
177
|
}),
|
|
170
|
-
__props.formData.dialogSource == "global" && __props.formData.dialogId ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
178
|
+
__props.formData.dialogSource == "global" && __props.formData.dialogId && currDialog.value.contentSource == "table" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
171
179
|
createVNode(_component_el_form_item, { label: "选择模式" }, {
|
|
172
180
|
default: withCtx(() => [
|
|
173
181
|
createVNode(_component_el_radio_group, {
|
|
@@ -176,19 +184,19 @@ const _sfc_main = {
|
|
|
176
184
|
}, {
|
|
177
185
|
default: withCtx(() => [
|
|
178
186
|
createVNode(_component_el_radio_button, { value: "none" }, {
|
|
179
|
-
default: withCtx(() => _cache[
|
|
187
|
+
default: withCtx(() => _cache[10] || (_cache[10] = [
|
|
180
188
|
createTextVNode("无")
|
|
181
189
|
])),
|
|
182
190
|
_: 1
|
|
183
191
|
}),
|
|
184
192
|
createVNode(_component_el_radio_button, { value: "single" }, {
|
|
185
|
-
default: withCtx(() => _cache[
|
|
193
|
+
default: withCtx(() => _cache[11] || (_cache[11] = [
|
|
186
194
|
createTextVNode("单选")
|
|
187
195
|
])),
|
|
188
196
|
_: 1
|
|
189
197
|
}),
|
|
190
198
|
createVNode(_component_el_radio_button, { value: "multiple" }, {
|
|
191
|
-
default: withCtx(() => _cache[
|
|
199
|
+
default: withCtx(() => _cache[12] || (_cache[12] = [
|
|
192
200
|
createTextVNode("多选")
|
|
193
201
|
])),
|
|
194
202
|
_: 1
|
|
@@ -236,7 +244,10 @@ const _sfc_main = {
|
|
|
236
244
|
_: 1
|
|
237
245
|
})
|
|
238
246
|
], 64)) : createCommentVNode("", true),
|
|
239
|
-
|
|
247
|
+
__props.formData.selectionMode != "none" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
248
|
+
key: 1,
|
|
249
|
+
label: "回调事件配置"
|
|
250
|
+
}, {
|
|
240
251
|
default: withCtx(() => [
|
|
241
252
|
createVNode(OnlyFLowConfigButton, {
|
|
242
253
|
config: __props.formData.callbackEventConfig,
|
|
@@ -244,8 +255,35 @@ const _sfc_main = {
|
|
|
244
255
|
}, null, 8, ["config"])
|
|
245
256
|
]),
|
|
246
257
|
_: 1
|
|
247
|
-
})
|
|
248
|
-
], 64)) :
|
|
258
|
+
})) : createCommentVNode("", true)
|
|
259
|
+
], 64)) : currDialog.value.contentSource == "form" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
260
|
+
key: 1,
|
|
261
|
+
label: "表单模式"
|
|
262
|
+
}, {
|
|
263
|
+
default: withCtx(() => [
|
|
264
|
+
createVNode(_component_el_radio_group, {
|
|
265
|
+
modelValue: __props.formData.subFormMode,
|
|
266
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => __props.formData.subFormMode = $event)
|
|
267
|
+
}, {
|
|
268
|
+
default: withCtx(() => [
|
|
269
|
+
createVNode(_component_el_radio_button, { value: "edit" }, {
|
|
270
|
+
default: withCtx(() => _cache[13] || (_cache[13] = [
|
|
271
|
+
createTextVNode("编辑")
|
|
272
|
+
])),
|
|
273
|
+
_: 1
|
|
274
|
+
}),
|
|
275
|
+
createVNode(_component_el_radio_button, { value: "query" }, {
|
|
276
|
+
default: withCtx(() => _cache[14] || (_cache[14] = [
|
|
277
|
+
createTextVNode("查看")
|
|
278
|
+
])),
|
|
279
|
+
_: 1
|
|
280
|
+
})
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
}, 8, ["modelValue"])
|
|
284
|
+
]),
|
|
285
|
+
_: 1
|
|
286
|
+
})) : createCommentVNode("", true)
|
|
249
287
|
], 64);
|
|
250
288
|
};
|
|
251
289
|
}
|
|
@@ -57,8 +57,8 @@ const menuData = [
|
|
|
57
57
|
index: "form",
|
|
58
58
|
label: "表单",
|
|
59
59
|
items: [
|
|
60
|
-
{ index: "form-setValue", label: "
|
|
61
|
-
{ index: "form-submit", label: "
|
|
60
|
+
{ index: "form-setValue", label: "请求表单赋值", desc: "通过请求设置表单字段的值", component: FormSetValue, default: { fieldMapping: [] } },
|
|
61
|
+
{ index: "form-submit", label: "请求表单提交", desc: "提交表单数据到后台服务", component: FormSubmit, default: { formValidate: true, fieldMapping: [], extraParams: [] } }
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -4,7 +4,6 @@ import { DocumentAdd as document_add_default, Document as document_default } fro
|
|
|
4
4
|
import H2Wrapper from "./H2Wrapper.vue.mjs";
|
|
5
5
|
import SubTitle from "./SubTitle.vue.mjs";
|
|
6
6
|
/* empty css */
|
|
7
|
-
/* empty css */
|
|
8
7
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
8
|
import { ElIcon } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.mjs";
|
|
10
9
|
const _hoisted_1 = { class: "sub-form-container" };
|
|
@@ -39,13 +38,40 @@ const _sfc_main = {
|
|
|
39
38
|
const mode = ((_a = props.componentData) == null ? void 0 : _a.titleMode) || "none";
|
|
40
39
|
return mode;
|
|
41
40
|
});
|
|
42
|
-
const
|
|
41
|
+
const formSource = computed(() => {
|
|
43
42
|
var _a;
|
|
44
|
-
return ((_a = props.componentData) == null ? void 0 : _a.
|
|
43
|
+
return ((_a = props.componentData) == null ? void 0 : _a.formSource) || "select";
|
|
44
|
+
});
|
|
45
|
+
const formName = computed(() => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
if (formSource.value === "select") {
|
|
48
|
+
return ((_a = props.componentData) == null ? void 0 : _a.subFormName) || "";
|
|
49
|
+
} else if (formSource.value === "dynamic") {
|
|
50
|
+
const dynamicValue = (_b = props.componentData) == null ? void 0 : _b.dynamicSubFormKey;
|
|
51
|
+
if (dynamicValue && typeof dynamicValue === "object" && dynamicValue !== null) {
|
|
52
|
+
return dynamicValue.label || "";
|
|
53
|
+
}
|
|
54
|
+
return dynamicValue || "";
|
|
55
|
+
}
|
|
56
|
+
return "";
|
|
45
57
|
});
|
|
46
58
|
const formKey = computed(() => {
|
|
47
59
|
var _a;
|
|
48
|
-
|
|
60
|
+
if (formSource.value === "select") {
|
|
61
|
+
return ((_a = props.componentData) == null ? void 0 : _a.subFormKey) || "";
|
|
62
|
+
} else if (formSource.value === "dynamic") {
|
|
63
|
+
return "动态表单";
|
|
64
|
+
}
|
|
65
|
+
return "";
|
|
66
|
+
});
|
|
67
|
+
const hasForm = computed(() => {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (formSource.value === "select") {
|
|
70
|
+
return !!((_a = props.componentData) == null ? void 0 : _a.subFormName);
|
|
71
|
+
} else if (formSource.value === "dynamic") {
|
|
72
|
+
return !!((_b = props.componentData) == null ? void 0 : _b.dynamicSubFormKey);
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
49
75
|
});
|
|
50
76
|
return (_ctx, _cache) => {
|
|
51
77
|
const _component_el_icon = ElIcon;
|
|
@@ -60,9 +86,9 @@ const _sfc_main = {
|
|
|
60
86
|
}, null, 8, ["componentData"])) : createCommentVNode("", true)
|
|
61
87
|
])) : createCommentVNode("", true),
|
|
62
88
|
createElementVNode("div", {
|
|
63
|
-
class: normalizeClass(["sub-form-display", { "is-empty": !
|
|
89
|
+
class: normalizeClass(["sub-form-display", { "is-empty": !hasForm.value, "has-form": hasForm.value }])
|
|
64
90
|
}, [
|
|
65
|
-
!
|
|
91
|
+
!hasForm.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
66
92
|
createVNode(_component_el_icon, { class: "icon" }, {
|
|
67
93
|
default: withCtx(() => [
|
|
68
94
|
createVNode(unref(document_add_default))
|
|
@@ -95,7 +121,7 @@ const _sfc_main = {
|
|
|
95
121
|
};
|
|
96
122
|
}
|
|
97
123
|
};
|
|
98
|
-
const SubForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
124
|
+
const SubForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cd333a16"]]);
|
|
99
125
|
export {
|
|
100
126
|
SubForm as default
|
|
101
127
|
};
|
|
@@ -328,6 +328,16 @@ const _sfc_main = {
|
|
|
328
328
|
var _a;
|
|
329
329
|
return ((_a = gridLayout.value) == null ? void 0 : _a.state.isDragging) || false;
|
|
330
330
|
});
|
|
331
|
+
function isLinkedVisibility(id) {
|
|
332
|
+
var _a;
|
|
333
|
+
const linkedVisibility = ((_a = editConfigData.value.linkedConfig) == null ? void 0 : _a.visibility) || [];
|
|
334
|
+
for (const item of linkedVisibility) {
|
|
335
|
+
if (item.dataLinkFieldList.includes(id)) {
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
331
341
|
__expose({
|
|
332
342
|
onFormDragMove
|
|
333
343
|
});
|
|
@@ -517,7 +527,10 @@ const _sfc_main = {
|
|
|
517
527
|
createElementVNode("div", {
|
|
518
528
|
class: normalizeClass(["component-content", {
|
|
519
529
|
"is-disabled": item.component.disabled,
|
|
520
|
-
"is-readonly": item.component.readOnly && !item.component.disabled
|
|
530
|
+
"is-readonly": item.component.readOnly && !item.component.disabled,
|
|
531
|
+
"is-linked-visibility": isLinkedVisibility(
|
|
532
|
+
item.component.id
|
|
533
|
+
)
|
|
521
534
|
}])
|
|
522
535
|
}, [
|
|
523
536
|
item.component.fieldType == "subTitle" ? (openBlock(), createBlock(SubTitle, {
|
|
@@ -567,7 +580,7 @@ const _sfc_main = {
|
|
|
567
580
|
};
|
|
568
581
|
}
|
|
569
582
|
};
|
|
570
|
-
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
583
|
+
const formWorkArea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f689abe4"]]);
|
|
571
584
|
export {
|
|
572
585
|
formWorkArea as default
|
|
573
586
|
};
|
|
@@ -12,6 +12,7 @@ import { computed, ref, createBlock, openBlock, unref, isRef, withCtx, createVNo
|
|
|
12
12
|
import { getCurrentItem, getEditConfigData } from "../../utils/common.mjs";
|
|
13
13
|
import TemplateSelector from "../../../components/TemplateSelector.vue.mjs";
|
|
14
14
|
import emitter from "../../utils/eventBus.mjs";
|
|
15
|
+
import ValueSelector from "../../../components/ValueSelector.vue2.mjs";
|
|
15
16
|
import { ElCollapse, ElCollapseItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/collapse/index.mjs";
|
|
16
17
|
import { ElForm, ElFormItem } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.mjs";
|
|
17
18
|
import { ElInput } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.mjs";
|
|
@@ -48,7 +49,7 @@ const _sfc_main = {
|
|
|
48
49
|
return openBlock(), createBlock(_component_el_collapse, {
|
|
49
50
|
class: "setting",
|
|
50
51
|
modelValue: unref(activeName),
|
|
51
|
-
"onUpdate:modelValue": _cache[
|
|
52
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(activeName) ? activeName.value = $event : null)
|
|
52
53
|
}, {
|
|
53
54
|
default: withCtx(() => [
|
|
54
55
|
createVNode(_component_el_collapse_item, {
|
|
@@ -85,19 +86,19 @@ const _sfc_main = {
|
|
|
85
86
|
}, {
|
|
86
87
|
default: withCtx(() => [
|
|
87
88
|
createVNode(_component_el_radio_button, { value: "none" }, {
|
|
88
|
-
default: withCtx(() => _cache[
|
|
89
|
+
default: withCtx(() => _cache[12] || (_cache[12] = [
|
|
89
90
|
createTextVNode("无")
|
|
90
91
|
])),
|
|
91
92
|
_: 1
|
|
92
93
|
}),
|
|
93
94
|
createVNode(_component_el_radio_button, { value: "label" }, {
|
|
94
|
-
default: withCtx(() => _cache[
|
|
95
|
+
default: withCtx(() => _cache[13] || (_cache[13] = [
|
|
95
96
|
createTextVNode("标题")
|
|
96
97
|
])),
|
|
97
98
|
_: 1
|
|
98
99
|
}),
|
|
99
100
|
createVNode(_component_el_radio_button, { value: "subLabel" }, {
|
|
100
|
-
default: withCtx(() => _cache[
|
|
101
|
+
default: withCtx(() => _cache[14] || (_cache[14] = [
|
|
101
102
|
createTextVNode("子标题")
|
|
102
103
|
])),
|
|
103
104
|
_: 1
|
|
@@ -134,7 +135,7 @@ const _sfc_main = {
|
|
|
134
135
|
}, {
|
|
135
136
|
default: withCtx(() => [
|
|
136
137
|
createVNode(_component_el_radio_button, { value: "main" }, {
|
|
137
|
-
default: withCtx(() => _cache[
|
|
138
|
+
default: withCtx(() => _cache[15] || (_cache[15] = [
|
|
138
139
|
createTextVNode("主页面获取")
|
|
139
140
|
])),
|
|
140
141
|
_: 1
|
|
@@ -143,7 +144,7 @@ const _sfc_main = {
|
|
|
143
144
|
value: "self",
|
|
144
145
|
disabled: ""
|
|
145
146
|
}, {
|
|
146
|
-
default: withCtx(() => _cache[
|
|
147
|
+
default: withCtx(() => _cache[16] || (_cache[16] = [
|
|
147
148
|
createTextVNode("子表单自加载")
|
|
148
149
|
])),
|
|
149
150
|
_: 1
|
|
@@ -172,20 +173,61 @@ const _sfc_main = {
|
|
|
172
173
|
]),
|
|
173
174
|
_: 1
|
|
174
175
|
}),
|
|
175
|
-
createVNode(_component_el_form_item, { label: "
|
|
176
|
+
createVNode(_component_el_form_item, { label: "表单来源" }, {
|
|
177
|
+
default: withCtx(() => [
|
|
178
|
+
createVNode(_component_el_radio_group, {
|
|
179
|
+
modelValue: unref(currentItem).formSource,
|
|
180
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(currentItem).formSource = $event),
|
|
181
|
+
size: "small"
|
|
182
|
+
}, {
|
|
183
|
+
default: withCtx(() => [
|
|
184
|
+
createVNode(_component_el_radio_button, { value: "select" }, {
|
|
185
|
+
default: withCtx(() => _cache[17] || (_cache[17] = [
|
|
186
|
+
createTextVNode("选择表单")
|
|
187
|
+
])),
|
|
188
|
+
_: 1
|
|
189
|
+
}),
|
|
190
|
+
createVNode(_component_el_radio_button, { value: "dynamic" }, {
|
|
191
|
+
default: withCtx(() => _cache[18] || (_cache[18] = [
|
|
192
|
+
createTextVNode("动态表单")
|
|
193
|
+
])),
|
|
194
|
+
_: 1
|
|
195
|
+
})
|
|
196
|
+
]),
|
|
197
|
+
_: 1
|
|
198
|
+
}, 8, ["modelValue"])
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}),
|
|
202
|
+
unref(currentItem).formSource == "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
203
|
+
key: 1,
|
|
204
|
+
label: "选择子表单"
|
|
205
|
+
}, {
|
|
176
206
|
default: withCtx(() => [
|
|
177
207
|
createVNode(TemplateSelector, {
|
|
178
208
|
modelValue: unref(currentItem).subFormName,
|
|
179
|
-
"onUpdate:modelValue": _cache[
|
|
209
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(currentItem).subFormName = $event),
|
|
180
210
|
templateKey: unref(currentItem).subFormKey,
|
|
181
|
-
"onUpdate:templateKey": _cache[
|
|
211
|
+
"onUpdate:templateKey": _cache[8] || (_cache[8] = ($event) => unref(currentItem).subFormKey = $event),
|
|
182
212
|
templateId: unref(currentItem).subFormId,
|
|
183
|
-
"onUpdate:templateId": _cache[
|
|
213
|
+
"onUpdate:templateId": _cache[9] || (_cache[9] = ($event) => unref(currentItem).subFormId = $event),
|
|
184
214
|
templateType: "form"
|
|
185
215
|
}, null, 8, ["modelValue", "templateKey", "templateId"])
|
|
186
216
|
]),
|
|
187
217
|
_: 1
|
|
188
|
-
})
|
|
218
|
+
})) : unref(currentItem).formSource == "dynamic" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
219
|
+
key: 2,
|
|
220
|
+
label: "表单标识"
|
|
221
|
+
}, {
|
|
222
|
+
default: withCtx(() => [
|
|
223
|
+
createVNode(ValueSelector, {
|
|
224
|
+
modelValue: unref(currentItem).dynamicSubFormKey,
|
|
225
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(currentItem).dynamicSubFormKey = $event),
|
|
226
|
+
size: "default"
|
|
227
|
+
}, null, 8, ["modelValue"])
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
})) : createCommentVNode("", true)
|
|
189
231
|
]),
|
|
190
232
|
_: 1
|
|
191
233
|
}, 8, ["model"]))
|
|
@@ -31,7 +31,8 @@ const _sfc_main = {
|
|
|
31
31
|
multipleSelection: "数组",
|
|
32
32
|
checkbox: "数组",
|
|
33
33
|
date: "日期",
|
|
34
|
-
switch: "布尔值"
|
|
34
|
+
switch: "布尔值",
|
|
35
|
+
hidden: "隐藏域"
|
|
35
36
|
};
|
|
36
37
|
const searchVariable = ref("");
|
|
37
38
|
const filterFieldList = ref([]);
|
|
@@ -78,7 +79,7 @@ const _sfc_main = {
|
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
81
|
};
|
|
81
|
-
const FieldVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
82
|
+
const FieldVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c2ceeb58"]]);
|
|
82
83
|
export {
|
|
83
84
|
FieldVariable as default
|
|
84
85
|
};
|
|
@@ -41,6 +41,7 @@ import "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescr
|
|
|
41
41
|
/* empty css */
|
|
42
42
|
import { Connection as connection_default, Grid as grid_default, ChatLineSquare as chat_line_square_default, Document as document_default } from "../../../../../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.mjs";
|
|
43
43
|
/* empty css */
|
|
44
|
+
/* empty css */
|
|
44
45
|
import "../../store/index.mjs";
|
|
45
46
|
/* empty css */
|
|
46
47
|
/* empty css */
|