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