@fecp/designer 5.3.4 → 5.3.6
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 +208 -179
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/FilterConfigDisplay.vue.mjs +5 -3
- package/es/packages/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +2 -2
- package/es/packages/designer/src/packages/dataLinkage/index.vue.mjs +85 -75
- package/es/packages/designer/src/packages/dialogGlobal/index.vue.mjs +2 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/TableChildRefresh.vue2.mjs +94 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/TableRowDelete.vue2.mjs +54 -0
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +12 -1
- package/es/packages/designer/src/packages/formulaEditor/index.vue2.mjs +10 -1
- package/es/packages/designer/src/packages/table/headerBtn.vue.mjs +2 -0
- package/es/packages/designer/src/packages/table/queryModule/DynamicModeConfig.vue.mjs +12 -5
- package/es/packages/designer/src/packages/table/queryModule/index.vue.mjs +11 -16
- package/es/packages/vue/src/components/bus/approvalHistory/ApprovalHistory.vue.mjs +5 -4
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +246 -139
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +20 -3
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +5 -6
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +12 -6
- package/es/packages/vue/src/components/table/CustomButtons.vue.mjs +11 -3
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +16 -8
- package/es/packages/vue/src/components/table/Table.vue.mjs +7 -5
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +88 -2
- package/es/packages/vue/src/utils/parseFilterConfig.mjs +44 -0
- package/lib/designer.css +208 -179
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/FilterConfigDisplay.vue.js +5 -3
- package/lib/packages/designer/src/packages/advancedFilter/ValueInput.vue2.js +2 -2
- package/lib/packages/designer/src/packages/dataLinkage/index.vue.js +93 -83
- package/lib/packages/designer/src/packages/dialogGlobal/index.vue.js +2 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/TableChildRefresh.vue2.js +94 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/TableRowDelete.vue2.js +54 -0
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +12 -1
- package/lib/packages/designer/src/packages/formulaEditor/index.vue2.js +10 -1
- package/lib/packages/designer/src/packages/table/headerBtn.vue.js +2 -0
- package/lib/packages/designer/src/packages/table/queryModule/DynamicModeConfig.vue.js +12 -5
- package/lib/packages/designer/src/packages/table/queryModule/index.vue.js +11 -16
- package/lib/packages/vue/src/components/bus/approvalHistory/ApprovalHistory.vue.js +5 -4
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +244 -137
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +19 -2
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +5 -6
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +12 -6
- package/lib/packages/vue/src/components/table/CustomButtons.vue.js +11 -3
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +16 -8
- package/lib/packages/vue/src/components/table/Table.vue.js +7 -5
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +94 -8
- package/lib/packages/vue/src/utils/parseFilterConfig.js +44 -0
- package/package.json +1 -1
|
@@ -52,7 +52,10 @@ const _hoisted_5 = {
|
|
|
52
52
|
class: "tab-display-section"
|
|
53
53
|
};
|
|
54
54
|
const _hoisted_6 = { class: "search-display-section" };
|
|
55
|
-
const _hoisted_7 = {
|
|
55
|
+
const _hoisted_7 = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "search-input-group"
|
|
58
|
+
};
|
|
56
59
|
const _hoisted_8 = { class: "expand-filter-section" };
|
|
57
60
|
const _hoisted_9 = { class: "filter-form-section" };
|
|
58
61
|
const _hoisted_10 = { class: "form-items-draggable" };
|
|
@@ -74,6 +77,10 @@ const _sfc_main = {
|
|
|
74
77
|
isSubTable: {
|
|
75
78
|
type: Boolean,
|
|
76
79
|
default: false
|
|
80
|
+
},
|
|
81
|
+
readOnly: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false
|
|
77
84
|
}
|
|
78
85
|
},
|
|
79
86
|
emits: ["click", "search"],
|
|
@@ -251,7 +258,7 @@ const _sfc_main = {
|
|
|
251
258
|
})
|
|
252
259
|
])) : vue.createCommentVNode("", true),
|
|
253
260
|
__props.localConfig.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, vue.toDisplayString(__props.localConfig.templateName), 1)) : vue.createCommentVNode("", true),
|
|
254
|
-
tabConfigs.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
261
|
+
queryConfig.value.enabled && tabConfigs.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
255
262
|
vue.createVNode(_component_el_tabs, {
|
|
256
263
|
modelValue: activeTab.value,
|
|
257
264
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTab.value = $event),
|
|
@@ -270,7 +277,7 @@ const _sfc_main = {
|
|
|
270
277
|
}, 8, ["modelValue"])
|
|
271
278
|
])) : vue.createCommentVNode("", true),
|
|
272
279
|
vue.createElementVNode("div", _hoisted_6, [
|
|
273
|
-
vue.
|
|
280
|
+
queryConfig.value.enabled ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
274
281
|
vue.createVNode(_component_el_input, {
|
|
275
282
|
modelValue: searchInputValue.value,
|
|
276
283
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchInputValue.value = $event),
|
|
@@ -295,10 +302,11 @@ const _sfc_main = {
|
|
|
295
302
|
key: "0"
|
|
296
303
|
} : void 0
|
|
297
304
|
]), 1032, ["modelValue", "prefix-icon"])
|
|
298
|
-
]),
|
|
299
|
-
rightButtons.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.VxeToolbar), {
|
|
300
|
-
key:
|
|
301
|
-
ref: "toolbarRef"
|
|
305
|
+
])) : vue.createCommentVNode("", true),
|
|
306
|
+
!__props.readOnly && !__props.isSubTable && rightButtons.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.VxeToolbar), {
|
|
307
|
+
key: 1,
|
|
308
|
+
ref: "toolbarRef",
|
|
309
|
+
style: { "margin-bottom": "8px" }
|
|
302
310
|
}, {
|
|
303
311
|
tools: vue.withCtx(() => [
|
|
304
312
|
!__props.isSubTable && rightButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(rightButtons.value, (btn) => {
|
|
@@ -425,5 +433,5 @@ const _sfc_main = {
|
|
|
425
433
|
};
|
|
426
434
|
}
|
|
427
435
|
};
|
|
428
|
-
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
436
|
+
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-cc8f1fb6"]]);
|
|
429
437
|
exports.default = DynamicQuery;
|
|
@@ -566,21 +566,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
566
566
|
onSearch: handleFilterSearch,
|
|
567
567
|
onReset: handleFilterReset
|
|
568
568
|
}, null, 8, ["query-config", "fields-data"]),
|
|
569
|
-
|
|
570
|
-
key: 0,
|
|
569
|
+
vue.createVNode(CustomButtons.default, {
|
|
571
570
|
"custom-btns": localConfig.value.customBtns,
|
|
572
571
|
localConfig: localConfig.value,
|
|
572
|
+
readonly: __props.readonly,
|
|
573
|
+
isSubTable: __props.isSubTable,
|
|
573
574
|
onClick: handleCustomBtnClick
|
|
574
|
-
}, null, 8, ["custom-btns", "localConfig"
|
|
575
|
+
}, null, 8, ["custom-btns", "localConfig", "readonly", "isSubTable"])
|
|
575
576
|
], 64)) : vue.createCommentVNode("", true),
|
|
576
577
|
localConfig.value.queryConfig.mode == "dynamic" ? (vue.openBlock(), vue.createBlock(DynamicQuery.default, {
|
|
577
578
|
key: 1,
|
|
579
|
+
readonly: __props.readonly,
|
|
578
580
|
isSubTable: __props.isSubTable,
|
|
579
581
|
localConfig: localConfig.value,
|
|
580
582
|
"fields-data": fieldsData.value,
|
|
581
583
|
onSearch: handleFilterSearch,
|
|
582
584
|
onClick: handleCustomBtnClick
|
|
583
|
-
}, null, 8, ["isSubTable", "localConfig", "fields-data"])) : vue.createCommentVNode("", true),
|
|
585
|
+
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data"])) : vue.createCommentVNode("", true),
|
|
584
586
|
vue.createElementVNode("div", _hoisted_1, [
|
|
585
587
|
vue.createVNode(vue.unref(index$1.VxeTable), {
|
|
586
588
|
ref_key: "tableRef",
|
|
@@ -645,5 +647,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
645
647
|
};
|
|
646
648
|
}
|
|
647
649
|
});
|
|
648
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
650
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8f3c46b5"]]);
|
|
649
651
|
exports.default = _Table;
|
|
@@ -10,8 +10,8 @@ const index = require("../../api/index.js");
|
|
|
10
10
|
;/* empty css */
|
|
11
11
|
;/* empty css */
|
|
12
12
|
;/* empty css */
|
|
13
|
-
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/message/index.js");
|
|
14
|
-
const index$3 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message
|
|
13
|
+
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/message-box/index.js");
|
|
14
|
+
const index$3 = 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");
|
|
15
15
|
async function handlePageJump(node, data, fields, context) {
|
|
16
16
|
const dialogDoms = document.querySelectorAll(".el-modal-dialog");
|
|
17
17
|
if ((dialogDoms == null ? void 0 : dialogDoms.length) > 0) {
|
|
@@ -93,7 +93,7 @@ async function handlePageGoBack(node, data, fields, context) {
|
|
|
93
93
|
};
|
|
94
94
|
if (config.showConfirm) {
|
|
95
95
|
try {
|
|
96
|
-
await index$
|
|
96
|
+
await index$2.ElMessageBox.confirm(
|
|
97
97
|
config.confirmMessage,
|
|
98
98
|
config.confirmTitle,
|
|
99
99
|
{
|
|
@@ -199,7 +199,7 @@ async function handleConfirm(node, data, fields, context) {
|
|
|
199
199
|
cancelAction: basic.cancelAction || "stop"
|
|
200
200
|
};
|
|
201
201
|
try {
|
|
202
|
-
await index$
|
|
202
|
+
await index$2.ElMessageBox.confirm(
|
|
203
203
|
config.message,
|
|
204
204
|
config.title,
|
|
205
205
|
{
|
|
@@ -241,17 +241,17 @@ async function handleMessage(node, data, fields, context) {
|
|
|
241
241
|
const message = node.basic.message || "操作成功";
|
|
242
242
|
switch (messageType) {
|
|
243
243
|
case "success":
|
|
244
|
-
index$
|
|
244
|
+
index$3.ElMessage.success(message);
|
|
245
245
|
break;
|
|
246
246
|
case "warning":
|
|
247
|
-
index$
|
|
247
|
+
index$3.ElMessage.warning(message);
|
|
248
248
|
break;
|
|
249
249
|
case "error":
|
|
250
|
-
index$
|
|
250
|
+
index$3.ElMessage.error(message);
|
|
251
251
|
break;
|
|
252
252
|
case "info":
|
|
253
253
|
default:
|
|
254
|
-
index$
|
|
254
|
+
index$3.ElMessage.info(message);
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -290,6 +290,88 @@ async function handleTableRefresh(node, data, fields, context) {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
+
async function handleTableChildRefresh(node, data, fields, context) {
|
|
294
|
+
var _a, _b, _c, _d;
|
|
295
|
+
console.log("[EventFlow] 执行子表格刷新:", node.basic);
|
|
296
|
+
const basic = node.basic || {};
|
|
297
|
+
const formComponent = (_a = context.components) == null ? void 0 : _a.form;
|
|
298
|
+
const getFormItemRefMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.getFormItemRef;
|
|
299
|
+
if (typeof getFormItemRefMethod === "function") {
|
|
300
|
+
const subTableRef = getFormItemRefMethod(String(basic.selectSubTableFieldId));
|
|
301
|
+
context.components.table = {
|
|
302
|
+
$: {
|
|
303
|
+
exposed: {
|
|
304
|
+
refresh: (_d = subTableRef == null ? void 0 : subTableRef.subTableRef) == null ? void 0 : _d.refresh
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
return await handleTableRefresh(node, data, fields, context);
|
|
309
|
+
} else {
|
|
310
|
+
console.error("[EventFlow] 未找到表单组件的 getFormItemRef 方法");
|
|
311
|
+
return {
|
|
312
|
+
success: false,
|
|
313
|
+
message: "表单组件未正确配置或 getFormItemRef 方法未暴露",
|
|
314
|
+
shouldShowError: true
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
async function handleTableRowDelete(node, data, fields, context) {
|
|
319
|
+
var _a, _b, _c;
|
|
320
|
+
console.log("[EventFlow] 执行表格行删除:", node.basic);
|
|
321
|
+
const basic = node.basic || {};
|
|
322
|
+
if (basic.showConfirmDeleteMessage) {
|
|
323
|
+
try {
|
|
324
|
+
await index$2.ElMessageBox.confirm(
|
|
325
|
+
"此操作将永久删除该记录, 是否继续",
|
|
326
|
+
"确认操作",
|
|
327
|
+
{
|
|
328
|
+
type: "warning",
|
|
329
|
+
draggable: true,
|
|
330
|
+
showClose: false
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
} catch (error) {
|
|
334
|
+
return {
|
|
335
|
+
success: false,
|
|
336
|
+
message: "用户已取消",
|
|
337
|
+
confirmed: false,
|
|
338
|
+
shouldShowError: false
|
|
339
|
+
// 用户取消不提示错误
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
const result = await handleApiCall(node, data, fields, context);
|
|
344
|
+
if (!result.success) {
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
if (basic.resetTableAfterDelete) {
|
|
348
|
+
const tableComponent = (_a = context.components) == null ? void 0 : _a.table;
|
|
349
|
+
const refreshMethod = (_c = (_b = tableComponent == null ? void 0 : tableComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.refresh;
|
|
350
|
+
if (typeof refreshMethod === "function") {
|
|
351
|
+
const refreshOptions = {
|
|
352
|
+
resetSort: false,
|
|
353
|
+
resetFilter: false,
|
|
354
|
+
resetPagination: false
|
|
355
|
+
};
|
|
356
|
+
await refreshMethod(refreshOptions);
|
|
357
|
+
return {
|
|
358
|
+
success: true,
|
|
359
|
+
message: "表格已刷新"
|
|
360
|
+
};
|
|
361
|
+
} else {
|
|
362
|
+
console.error("[EventFlow] 未找到表格组件的 refresh 方法");
|
|
363
|
+
return {
|
|
364
|
+
success: false,
|
|
365
|
+
message: "表格组件未正确配置或 refresh 方法未暴露",
|
|
366
|
+
shouldShowError: true
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
success: true,
|
|
372
|
+
message: "列表数据已删除"
|
|
373
|
+
};
|
|
374
|
+
}
|
|
293
375
|
async function handleCustomAction(node, data, fields, context) {
|
|
294
376
|
console.log("[EventFlow] 执行自定义动作:", node.basic);
|
|
295
377
|
return {
|
|
@@ -492,6 +574,8 @@ const defaultActionHandlers = {
|
|
|
492
574
|
"ui-confirm": handleConfirm,
|
|
493
575
|
"ui-message": handleMessage,
|
|
494
576
|
"table-refresh": handleTableRefresh,
|
|
577
|
+
"table-row-delete": handleTableRowDelete,
|
|
578
|
+
"table-child-refresh": handleTableChildRefresh,
|
|
495
579
|
"form-setValue": handleFormSetValue,
|
|
496
580
|
"form-submit": handleFormSubmit,
|
|
497
581
|
"custom": handleCustomAction,
|
|
@@ -506,4 +590,6 @@ exports.handleDialog = handleDialog;
|
|
|
506
590
|
exports.handleMessage = handleMessage;
|
|
507
591
|
exports.handlePageGoBack = handlePageGoBack;
|
|
508
592
|
exports.handlePageJump = handlePageJump;
|
|
593
|
+
exports.handleTableChildRefresh = handleTableChildRefresh;
|
|
509
594
|
exports.handleTableRefresh = handleTableRefresh;
|
|
595
|
+
exports.handleTableRowDelete = handleTableRowDelete;
|
|
@@ -73,4 +73,48 @@ function checkConditionMatch(condition, data, fields) {
|
|
|
73
73
|
return dataValue == parsedValue;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
function checkFieldInFilterConfig(filterConfig, fieldId) {
|
|
77
|
+
if (!fieldId) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
return checkFieldInGroup(filterConfig, fieldId);
|
|
81
|
+
}
|
|
82
|
+
function checkFieldInGroup(group, targetFieldId) {
|
|
83
|
+
const { conditions, groups } = group;
|
|
84
|
+
if (conditions && conditions.length > 0) {
|
|
85
|
+
const foundInConditions = conditions.some((cond) => cond.field === targetFieldId);
|
|
86
|
+
if (foundInConditions) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (groups && groups.length > 0) {
|
|
91
|
+
return groups.some((g) => checkFieldInGroup(g, targetFieldId));
|
|
92
|
+
}
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
function checkFieldInResultConfig(resultConfig, fieldId, fields = []) {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
if (!fieldId || !Array.isArray(resultConfig)) {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
let fieldName = fieldId;
|
|
101
|
+
if (fields && fields.length > 0) {
|
|
102
|
+
const field = fields.find((f) => f.id == fieldId);
|
|
103
|
+
if (field) {
|
|
104
|
+
fieldName = field.fieldName;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
for (const item of resultConfig) {
|
|
108
|
+
if ((_b = (_a = item.formula) == null ? void 0 : _a.value) == null ? void 0 : _b.text) {
|
|
109
|
+
const formulaText = item.formula.value.text;
|
|
110
|
+
const fieldPattern = new RegExp(`\\{${fieldName}\\}`, "i");
|
|
111
|
+
if (fieldPattern.test(formulaText)) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
exports.checkFieldInFilterConfig = checkFieldInFilterConfig;
|
|
119
|
+
exports.checkFieldInResultConfig = checkFieldInResultConfig;
|
|
76
120
|
exports.checkFilterMatch = checkFilterMatch;
|