@fecp/designer 5.2.13 → 5.3.1
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 +160 -118
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/api/index.mjs +3 -0
- package/es/packages/designer/src/components/FieldSetMapping.vue2.mjs +2 -1
- package/es/packages/designer/src/components/ValueSelector.vue2.mjs +2 -2
- package/es/packages/designer/src/layout/header/index.vue.mjs +14 -3
- package/es/packages/designer/src/packages/dataSource/dataSource.vue.mjs +3 -3
- package/es/packages/designer/src/packages/eventFlow/dialog/action/config.mjs +1 -1
- package/es/packages/designer/src/packages/form/headerBtn.vue.mjs +40 -21
- package/es/packages/designer/src/packages/prod/index.vue.mjs +516 -0
- package/es/packages/designer/src/packages/prod/useProdDialog.mjs +16 -0
- package/es/packages/vue/src/api/index.mjs +3 -0
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +3 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +178 -10
- package/es/packages/vue/src/components/forms/h2/H2.vue.mjs +9 -2
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +64 -2
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +1 -1
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +6 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +9 -8
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +1 -1
- package/es/packages/vue/src/composables/usePageEvents.mjs +1 -1
- package/es/packages/vue/src/utils/datasource.mjs +1 -1
- package/lib/designer.css +160 -118
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/api/index.js +3 -0
- package/lib/packages/designer/src/components/FieldSetMapping.vue2.js +2 -1
- package/lib/packages/designer/src/components/ValueSelector.vue2.js +2 -2
- package/lib/packages/designer/src/layout/header/index.vue.js +14 -3
- package/lib/packages/designer/src/packages/dataSource/dataSource.vue.js +3 -3
- package/lib/packages/designer/src/packages/eventFlow/dialog/action/config.js +1 -1
- package/lib/packages/designer/src/packages/form/headerBtn.vue.js +39 -20
- package/lib/packages/designer/src/packages/prod/index.vue.js +516 -0
- package/lib/packages/designer/src/packages/prod/useProdDialog.js +16 -0
- package/lib/packages/vue/src/api/index.js +3 -0
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +3 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +178 -10
- package/lib/packages/vue/src/components/forms/h2/H2.vue.js +9 -2
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +64 -2
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +1 -1
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +6 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +9 -8
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +1 -1
- package/lib/packages/vue/src/composables/usePageEvents.js +1 -1
- package/lib/packages/vue/src/utils/datasource.js +1 -1
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ const eventFlowHandler = require("../../../utils/eventFlow/eventFlowHandler.js")
|
|
|
26
26
|
;/* empty css */
|
|
27
27
|
;/* empty css */
|
|
28
28
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
29
|
+
const index$6 = require("../../../api/index.js");
|
|
29
30
|
;/* empty css */
|
|
30
31
|
;/* empty css */
|
|
31
32
|
const usePageEvents = require("../../../composables/usePageEvents.js");
|
|
@@ -100,6 +101,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
100
101
|
const formRules = vue.ref({});
|
|
101
102
|
const dataSourceOptions = vue.ref({});
|
|
102
103
|
const dictionaryOptions = vue.ref({});
|
|
104
|
+
const productData = vue.ref({});
|
|
103
105
|
const fieldsData = vue.ref({});
|
|
104
106
|
const hiddenFields = vue.ref({});
|
|
105
107
|
const rowHeight = vue.ref(1);
|
|
@@ -146,8 +148,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
146
148
|
return item.component;
|
|
147
149
|
});
|
|
148
150
|
hiddenFields.value = option.hiddenFields || [];
|
|
149
|
-
loadFormData();
|
|
150
151
|
await loadFieldDataSources();
|
|
152
|
+
loadFormData();
|
|
151
153
|
loadEventFlow();
|
|
152
154
|
if (pageEvents && localConfig.value.pageEventConfig) {
|
|
153
155
|
const onCreatedEvent = localConfig.value.pageEventConfig.find(
|
|
@@ -158,6 +160,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
158
160
|
await pageEvents.executeEvent("onCreated");
|
|
159
161
|
}
|
|
160
162
|
}
|
|
163
|
+
await loadProductData();
|
|
164
|
+
applyProductConfigToForm();
|
|
165
|
+
mergeOptionsToFields();
|
|
161
166
|
} catch (error) {
|
|
162
167
|
console.error("加载配置失败:", error);
|
|
163
168
|
index$5.ElMessage.error("加载配置失败");
|
|
@@ -166,12 +171,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
166
171
|
}
|
|
167
172
|
};
|
|
168
173
|
const loadFormData = () => {
|
|
169
|
-
const
|
|
174
|
+
const defaultData = {};
|
|
170
175
|
const rules = {};
|
|
171
176
|
if (fieldsData.value) {
|
|
172
177
|
fieldsData.value.forEach((component) => {
|
|
173
178
|
if (component.fieldName) {
|
|
174
|
-
|
|
179
|
+
defaultData[component.fieldName] = component.defaultValue ? component.defaultValue : null;
|
|
175
180
|
}
|
|
176
181
|
if (component.fieldName) {
|
|
177
182
|
const fieldRules = validation.generateFieldRules(component);
|
|
@@ -184,11 +189,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
184
189
|
if (hiddenFields.value && hiddenFields.value.length > 0) {
|
|
185
190
|
hiddenFields.value.forEach((field) => {
|
|
186
191
|
if (field.fieldName) {
|
|
187
|
-
|
|
192
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
188
193
|
}
|
|
189
194
|
});
|
|
190
195
|
}
|
|
191
|
-
formData.value = { ...
|
|
196
|
+
formData.value = { ...defaultData, ...props.modelValue };
|
|
192
197
|
formRules.value = rules;
|
|
193
198
|
};
|
|
194
199
|
const loadFieldDataSources = async () => {
|
|
@@ -253,7 +258,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
253
258
|
console.error("Failed to load dictionary data:", error);
|
|
254
259
|
}
|
|
255
260
|
}
|
|
256
|
-
mergeOptionsToFields();
|
|
257
261
|
};
|
|
258
262
|
const mergeOptionsToFields = () => {
|
|
259
263
|
if (fieldsData.value) {
|
|
@@ -290,9 +294,159 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
290
294
|
} else if (optionSource === "custom") {
|
|
291
295
|
component.optionConfig.options = component.optionConfig.options || [];
|
|
292
296
|
}
|
|
297
|
+
applyProductConfigFilter(component);
|
|
293
298
|
});
|
|
294
299
|
}
|
|
295
300
|
};
|
|
301
|
+
const loadProductData = async () => {
|
|
302
|
+
if (!localConfig.value || !localConfig.value.prodConfig) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
const { prodId } = localConfig.value.prodConfig;
|
|
306
|
+
if (!prodId) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const field = [...fieldsData.value, ...hiddenFields.value].find(
|
|
310
|
+
(item) => item.id == prodId.value
|
|
311
|
+
);
|
|
312
|
+
if (!field) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
const prodIdValue = formData.value[field.fieldName];
|
|
316
|
+
if (!prodIdValue) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
try {
|
|
320
|
+
const response = await index$6.default.getProductData(ctx.$http, prodIdValue);
|
|
321
|
+
productData.value = response;
|
|
322
|
+
console.log("产品数据加载成功:", productData.value);
|
|
323
|
+
} catch (error) {
|
|
324
|
+
console.error("获取产品数据失败:", error);
|
|
325
|
+
productData.value = {};
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
const prodRules = vue.ref({});
|
|
329
|
+
const applyProductConfigToForm = () => {
|
|
330
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
const { defaultValueConfigs, validationConfigs } = localConfig.value.prodConfig;
|
|
334
|
+
if (defaultValueConfigs && defaultValueConfigs.length > 0) {
|
|
335
|
+
defaultValueConfigs.forEach((config) => {
|
|
336
|
+
if (config.pageField && config.productConfigField) {
|
|
337
|
+
const defaultValue = productData.value[config.productConfigField];
|
|
338
|
+
if (defaultValue !== void 0) {
|
|
339
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
340
|
+
(item) => item.id == config.pageField
|
|
341
|
+
);
|
|
342
|
+
if (formField && !formData.value[formField.fieldName]) {
|
|
343
|
+
formData.value[formField.fieldName] = defaultValue;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
if (validationConfigs && validationConfigs.length > 0) {
|
|
350
|
+
validationConfigs.forEach((config) => {
|
|
351
|
+
if (config.pageField && (config.minProductField || config.maxProductField)) {
|
|
352
|
+
const minValue = productData.value[config.minProductField];
|
|
353
|
+
const maxValue = productData.value[config.maxProductField];
|
|
354
|
+
if (minValue !== void 0 || maxValue !== void 0) {
|
|
355
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
356
|
+
(item) => item.id == config.pageField
|
|
357
|
+
);
|
|
358
|
+
if (formField && !prodRules.value[formField.fieldName]) {
|
|
359
|
+
prodRules.value[formField.fieldName] = [];
|
|
360
|
+
}
|
|
361
|
+
const customValidator = (rule, value, callback) => {
|
|
362
|
+
console.log(
|
|
363
|
+
"🚀 ~ customValidator 被调用 ~ 字段:",
|
|
364
|
+
formField == null ? void 0 : formField.fieldName,
|
|
365
|
+
"值:",
|
|
366
|
+
value,
|
|
367
|
+
"minValue:",
|
|
368
|
+
minValue,
|
|
369
|
+
"maxValue:",
|
|
370
|
+
maxValue
|
|
371
|
+
);
|
|
372
|
+
if (value === null || value === void 0 || value === "") {
|
|
373
|
+
callback();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const numValue = Number(value);
|
|
377
|
+
if (isNaN(numValue)) {
|
|
378
|
+
callback(new Error("请输入有效的数字"));
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
let errorMessage = "";
|
|
382
|
+
if (minValue !== void 0 && numValue < Number(minValue)) {
|
|
383
|
+
errorMessage = `不能小于 ${minValue}`;
|
|
384
|
+
}
|
|
385
|
+
if (maxValue !== void 0 && numValue > Number(maxValue)) {
|
|
386
|
+
if (errorMessage) {
|
|
387
|
+
errorMessage = `${errorMessage} 且 不能大于 ${maxValue}`;
|
|
388
|
+
} else {
|
|
389
|
+
errorMessage = `不能大于 ${maxValue}`;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (errorMessage) {
|
|
393
|
+
callback(new Error(errorMessage));
|
|
394
|
+
} else {
|
|
395
|
+
callback();
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const customRule = {
|
|
399
|
+
validator: customValidator,
|
|
400
|
+
trigger: "blur"
|
|
401
|
+
};
|
|
402
|
+
prodRules.value[formField.fieldName].push(customRule);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
for (let fieldName in prodRules.value) {
|
|
407
|
+
if (formRules.value[fieldName]) {
|
|
408
|
+
formRules.value[fieldName].push(...prodRules.value[fieldName]);
|
|
409
|
+
} else {
|
|
410
|
+
formRules.value[fieldName] = prodRules.value[fieldName];
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
const applyProductConfigFilter = (component) => {
|
|
416
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const { optionConfigs } = localConfig.value.prodConfig;
|
|
420
|
+
if (!optionConfigs || !component.optionConfig || !component.optionConfig.options) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const componentConfig = optionConfigs.find(
|
|
424
|
+
(item) => item.pageField == component.id
|
|
425
|
+
);
|
|
426
|
+
if (!componentConfig || !componentConfig.productConfigField) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
const fieldValue = productData.value[componentConfig.productConfigField];
|
|
430
|
+
if (!fieldValue) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const allowedValues = Array.isArray(fieldValue) ? fieldValue : fieldValue.split("|");
|
|
434
|
+
component.optionConfig.options = component.optionConfig.options.filter(
|
|
435
|
+
(option) => {
|
|
436
|
+
const optionValue = option.value !== void 0 ? option.value : option;
|
|
437
|
+
return allowedValues.includes(optionValue);
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
if (component.optionConfig.options.length === 0) {
|
|
441
|
+
component.optionConfig.options = [
|
|
442
|
+
{
|
|
443
|
+
label: `无可用选项(产品配置限制)`,
|
|
444
|
+
value: "",
|
|
445
|
+
disabled: true
|
|
446
|
+
}
|
|
447
|
+
];
|
|
448
|
+
}
|
|
449
|
+
};
|
|
296
450
|
const handleEvent = vue.ref(null);
|
|
297
451
|
function loadEventFlow() {
|
|
298
452
|
const {
|
|
@@ -413,6 +567,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
413
567
|
}
|
|
414
568
|
}
|
|
415
569
|
});
|
|
570
|
+
for (let fieldName in prodRules.value) {
|
|
571
|
+
rules[fieldName] = prodRules.value[fieldName];
|
|
572
|
+
}
|
|
416
573
|
formRules.value = rules;
|
|
417
574
|
const readonlyArr = (linkedConfig == null ? void 0 : linkedConfig.readonly) || [];
|
|
418
575
|
readonlyArr.forEach((item) => {
|
|
@@ -502,8 +659,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
502
659
|
const fieldType = field.fieldType;
|
|
503
660
|
const value = result[fieldName];
|
|
504
661
|
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
662
|
+
let splitStr = "|";
|
|
663
|
+
if (fieldType === "cascader" || fieldType === "area" || fieldType === "industry") {
|
|
664
|
+
splitStr = ",";
|
|
665
|
+
}
|
|
505
666
|
if (Array.isArray(value)) {
|
|
506
|
-
result[fieldName] = value.join(
|
|
667
|
+
result[fieldName] = value.join(splitStr);
|
|
507
668
|
}
|
|
508
669
|
} else if (fieldName && fieldType === "date" && value) {
|
|
509
670
|
const dateValueType = field.dateValueType;
|
|
@@ -542,10 +703,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
542
703
|
const processField = (field) => {
|
|
543
704
|
const fieldName = field.fieldName;
|
|
544
705
|
const fieldType = field.fieldType;
|
|
706
|
+
if (!processedData.hasOwnProperty(fieldName)) {
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
545
709
|
const value = processedData[fieldName];
|
|
546
710
|
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
547
|
-
|
|
548
|
-
|
|
711
|
+
let splitStr = "|";
|
|
712
|
+
if (fieldType === "cascader" || fieldType === "area" || fieldType === "industry") {
|
|
713
|
+
splitStr = ",";
|
|
714
|
+
}
|
|
715
|
+
if (typeof value === "string" && value.includes(splitStr)) {
|
|
716
|
+
processedData[fieldName] = value.split(splitStr);
|
|
549
717
|
} else if (typeof value === "string" && value !== "") {
|
|
550
718
|
processedData[fieldName] = [value];
|
|
551
719
|
} else if (value === "" || value === null || value === void 0) {
|
|
@@ -684,5 +852,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
684
852
|
};
|
|
685
853
|
}
|
|
686
854
|
});
|
|
687
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
855
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f1c90d7c"]]);
|
|
688
856
|
exports.default = _Form;
|
|
@@ -8,6 +8,8 @@ const _hoisted_2 = { class: "fec-label" };
|
|
|
8
8
|
const _hoisted_3 = { class: "fec-label-title" };
|
|
9
9
|
const _hoisted_4 = { class: "fec-label-sub-title" };
|
|
10
10
|
const _hoisted_5 = { class: "fec-buttons" };
|
|
11
|
+
const _hoisted_6 = { class: "left" };
|
|
12
|
+
const _hoisted_7 = { class: "right" };
|
|
11
13
|
const _sfc_main = {
|
|
12
14
|
__name: "H2",
|
|
13
15
|
props: {
|
|
@@ -25,11 +27,16 @@ const _sfc_main = {
|
|
|
25
27
|
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(__props.config.subLabel), 1)
|
|
26
28
|
]),
|
|
27
29
|
vue.createElementVNode("div", _hoisted_5, [
|
|
28
|
-
vue.
|
|
30
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
31
|
+
vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
32
|
+
]),
|
|
33
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
34
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
35
|
+
])
|
|
29
36
|
])
|
|
30
37
|
]);
|
|
31
38
|
};
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
|
-
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
41
|
+
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b5645d10"]]);
|
|
35
42
|
exports.default = _H2;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
3
5
|
const vue = require("vue");
|
|
4
6
|
const Table = require("../../table/Table.vue.js");
|
|
5
|
-
const index$
|
|
7
|
+
const index$2 = require("../subTitle/index.js");
|
|
6
8
|
const index = require("../h2/index.js");
|
|
7
9
|
const parseRouteParams = require("../../../utils/parseRouteParams.js");
|
|
10
|
+
const index$1 = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/button/index.js");
|
|
8
11
|
const _hoisted_1 = {
|
|
9
12
|
key: 0,
|
|
10
13
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -72,7 +75,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
72
75
|
}
|
|
73
76
|
return {};
|
|
74
77
|
});
|
|
78
|
+
const subTableOption = vue.ref({});
|
|
79
|
+
const customBtns = vue.computed(() => {
|
|
80
|
+
return subTableOption.value.customBtns || {};
|
|
81
|
+
});
|
|
75
82
|
function subTableLoaded(subOption) {
|
|
83
|
+
subTableOption.value = subOption;
|
|
84
|
+
console.log("🚀 ~ subTableLoaded ~ subOption:", subOption);
|
|
76
85
|
const foundItem = props.localConfig.fieldsData.find(
|
|
77
86
|
(item) => item.id == props.config.id
|
|
78
87
|
);
|
|
@@ -83,18 +92,71 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
83
92
|
gridLayout.value.resizeEvent();
|
|
84
93
|
}
|
|
85
94
|
}
|
|
95
|
+
const tableRef = vue.ref();
|
|
96
|
+
const handleClick = (btn, event) => {
|
|
97
|
+
var _a;
|
|
98
|
+
(_a = tableRef.value) == null ? void 0 : _a.handleCustomBtnClick({
|
|
99
|
+
btn,
|
|
100
|
+
event,
|
|
101
|
+
type: "custom"
|
|
102
|
+
});
|
|
103
|
+
};
|
|
86
104
|
return (_ctx, _cache) => {
|
|
105
|
+
const _component_el_button = index$1.ElButton;
|
|
87
106
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
88
107
|
__props.config.titleMode != "none" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
89
108
|
__props.config.titleMode == "label" ? (vue.openBlock(), vue.createBlock(vue.unref(index.H2), {
|
|
90
109
|
key: 0,
|
|
91
110
|
config: __props.config
|
|
92
|
-
},
|
|
111
|
+
}, vue.createSlots({
|
|
112
|
+
default: vue.withCtx(() => [
|
|
113
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(customBtns).right, (btn) => {
|
|
114
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
115
|
+
btn.btnType == "custom" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
116
|
+
key: btn.id,
|
|
117
|
+
link: "",
|
|
118
|
+
type: "primary",
|
|
119
|
+
onClick: ($event) => handleClick(btn, $event)
|
|
120
|
+
}, {
|
|
121
|
+
default: vue.withCtx(() => [
|
|
122
|
+
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1032, ["onClick"])) : vue.createCommentVNode("", true)
|
|
126
|
+
], 64);
|
|
127
|
+
}), 256))
|
|
128
|
+
]),
|
|
129
|
+
_: 2
|
|
130
|
+
}, [
|
|
131
|
+
vue.unref(customBtns).left ? {
|
|
132
|
+
name: "left",
|
|
133
|
+
fn: vue.withCtx(() => [
|
|
134
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(customBtns).left, (btn) => {
|
|
135
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
136
|
+
btn.btnType == "custom" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
137
|
+
key: btn.id,
|
|
138
|
+
link: "",
|
|
139
|
+
type: "primary",
|
|
140
|
+
onClick: ($event) => handleClick(btn, $event)
|
|
141
|
+
}, {
|
|
142
|
+
default: vue.withCtx(() => [
|
|
143
|
+
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
144
|
+
]),
|
|
145
|
+
_: 2
|
|
146
|
+
}, 1032, ["onClick"])) : vue.createCommentVNode("", true)
|
|
147
|
+
], 64);
|
|
148
|
+
}), 256))
|
|
149
|
+
]),
|
|
150
|
+
key: "0"
|
|
151
|
+
} : void 0
|
|
152
|
+
]), 1032, ["config"])) : __props.config.titleMode == "subLabel" ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.SubTitle), {
|
|
93
153
|
key: 1,
|
|
94
154
|
config: __props.config
|
|
95
155
|
}, null, 8, ["config"])) : vue.createCommentVNode("", true)
|
|
96
156
|
])) : vue.createCommentVNode("", true),
|
|
97
157
|
vue.createVNode(vue.unref(Table.default), {
|
|
158
|
+
ref_key: "tableRef",
|
|
159
|
+
ref: tableRef,
|
|
98
160
|
templateKey: __props.config.subTableKey,
|
|
99
161
|
isSubTable: "",
|
|
100
162
|
onLoaded: subTableLoaded,
|
|
@@ -4,9 +4,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
;/* empty css */
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const vue = require("vue");
|
|
7
|
-
;/* empty css */
|
|
8
7
|
;/* empty css */
|
|
9
8
|
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
10
|
const index$3 = require("../../dialog/index.js");
|
|
11
11
|
const index$2 = require("../../../api/index.js");
|
|
12
12
|
;/* empty css */
|
|
@@ -70,6 +70,10 @@ const _sfc_main = {
|
|
|
70
70
|
fieldsData: {
|
|
71
71
|
type: Array,
|
|
72
72
|
default: () => []
|
|
73
|
+
},
|
|
74
|
+
isSubTable: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
emits: ["click", "search"],
|
|
@@ -297,7 +301,7 @@ const _sfc_main = {
|
|
|
297
301
|
ref: "toolbarRef"
|
|
298
302
|
}, {
|
|
299
303
|
tools: vue.withCtx(() => [
|
|
300
|
-
rightButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(rightButtons.value, (btn) => {
|
|
304
|
+
!__props.isSubTable && rightButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(rightButtons.value, (btn) => {
|
|
301
305
|
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
302
306
|
key: btn.id,
|
|
303
307
|
type: getBtnType(btn),
|
|
@@ -421,5 +425,5 @@ const _sfc_main = {
|
|
|
421
425
|
};
|
|
422
426
|
}
|
|
423
427
|
};
|
|
424
|
-
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
428
|
+
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ba091c4f"]]);
|
|
425
429
|
exports.default = DynamicQuery;
|
|
@@ -536,7 +536,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
536
536
|
clearSelection,
|
|
537
537
|
exportData: handleExport,
|
|
538
538
|
localConfig,
|
|
539
|
-
setFormData
|
|
539
|
+
setFormData,
|
|
540
|
+
handleCustomBtnClick
|
|
540
541
|
});
|
|
541
542
|
return (_ctx, _cache) => {
|
|
542
543
|
const _component_el_container = index.ElContainer;
|
|
@@ -559,15 +560,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
559
560
|
)
|
|
560
561
|
}, [
|
|
561
562
|
localConfig.value.queryConfig.mode == "fixed" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
562
|
-
|
|
563
|
-
key: 0,
|
|
563
|
+
vue.createVNode(TableFilter.default, {
|
|
564
564
|
"query-config": localConfig.value.queryConfig,
|
|
565
565
|
"fields-data": fieldsData.value,
|
|
566
566
|
onSearch: handleFilterSearch,
|
|
567
567
|
onReset: handleFilterReset
|
|
568
|
-
}, null, 8, ["query-config", "fields-data"])
|
|
569
|
-
!__props.readonly ? (vue.openBlock(), vue.createBlock(CustomButtons.default, {
|
|
570
|
-
key:
|
|
568
|
+
}, null, 8, ["query-config", "fields-data"]),
|
|
569
|
+
!__props.readonly && !__props.isSubTable ? (vue.openBlock(), vue.createBlock(CustomButtons.default, {
|
|
570
|
+
key: 0,
|
|
571
571
|
"custom-btns": localConfig.value.customBtns,
|
|
572
572
|
localConfig: localConfig.value,
|
|
573
573
|
onClick: handleCustomBtnClick
|
|
@@ -575,11 +575,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
575
575
|
], 64)) : vue.createCommentVNode("", true),
|
|
576
576
|
localConfig.value.queryConfig.mode == "dynamic" ? (vue.openBlock(), vue.createBlock(DynamicQuery.default, {
|
|
577
577
|
key: 1,
|
|
578
|
+
isSubTable: __props.isSubTable,
|
|
578
579
|
localConfig: localConfig.value,
|
|
579
580
|
"fields-data": fieldsData.value,
|
|
580
581
|
onSearch: handleFilterSearch,
|
|
581
582
|
onClick: handleCustomBtnClick
|
|
582
|
-
}, null, 8, ["localConfig", "fields-data"])) : vue.createCommentVNode("", true),
|
|
583
|
+
}, null, 8, ["isSubTable", "localConfig", "fields-data"])) : vue.createCommentVNode("", true),
|
|
583
584
|
vue.createElementVNode("div", _hoisted_1, [
|
|
584
585
|
vue.createVNode(vue.unref(index$1.VxeTable), {
|
|
585
586
|
ref_key: "tableRef",
|
|
@@ -644,5 +645,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
644
645
|
};
|
|
645
646
|
}
|
|
646
647
|
});
|
|
647
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
648
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-d0a13549"]]);
|
|
648
649
|
exports.default = _Table;
|
|
@@ -7,9 +7,9 @@ const vue = require("vue");
|
|
|
7
7
|
require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/components.js");
|
|
8
8
|
const index$3 = require("../../../../../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.js");
|
|
9
9
|
const parseFilterConfig = require("../../utils/parseFilterConfig.js");
|
|
10
|
-
;/* empty css */
|
|
11
10
|
;/* empty css */
|
|
12
11
|
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
require("./index.js");
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const parseRouteParams = require("./parseRouteParams.js");
|
|
5
5
|
;/* empty css */
|
|
6
|
-
;/* empty css */
|
|
7
6
|
;/* empty css */
|
|
8
7
|
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
9
|
const index = require("../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/loading/index.js");
|
|
10
10
|
const index$1 = 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");
|
|
11
11
|
class DataSourceManager {
|