@fecp/designer 5.3.22 → 5.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/components/ValueSelector.vue.mjs +191 -0
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/aside/index.mjs +2 -1
- package/es/designer/src/packages/table/default.mjs +51 -53
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer/src/packages/table/index.vue.mjs +3 -1
- package/es/designer/src/packages/table/tableSummary.vue.mjs +112 -0
- package/es/designer.css +101 -78
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +2 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +130 -10
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +1 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/components/ValueSelector.vue.js +191 -0
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
- package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/aside/index.js +2 -1
- package/lib/designer/src/packages/table/default.js +51 -53
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer/src/packages/table/index.vue.js +3 -1
- package/lib/designer/src/packages/table/tableSummary.vue.js +112 -0
- package/lib/designer.css +101 -78
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +2 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +130 -10
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +1 -1
- package/package.json +1 -1
|
@@ -173,7 +173,93 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
173
173
|
}
|
|
174
174
|
return localConfig.value.height || 500;
|
|
175
175
|
});
|
|
176
|
-
const
|
|
176
|
+
const summaryConfig = computed(() => {
|
|
177
|
+
return localConfig.value.summaryConfig || {
|
|
178
|
+
enabled: false,
|
|
179
|
+
mode: "current",
|
|
180
|
+
summaryFields: []
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
const allSummaryData = ref({});
|
|
184
|
+
const footerData = computed(() => {
|
|
185
|
+
const config = summaryConfig.value;
|
|
186
|
+
const { enabled, mode, summaryFields = [] } = config;
|
|
187
|
+
if (!enabled) return [];
|
|
188
|
+
const firstItem = fieldsData.value.find((item) => item.isShow);
|
|
189
|
+
if (!firstItem) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
const firstSummaryField = firstItem.fieldName;
|
|
193
|
+
const footerRow = { _isFooter: true };
|
|
194
|
+
if (firstSummaryField) {
|
|
195
|
+
footerRow[firstSummaryField] = "合计";
|
|
196
|
+
}
|
|
197
|
+
if (mode === "current") {
|
|
198
|
+
summaryFields.forEach((fieldName) => {
|
|
199
|
+
const sum = displayData.value.reduce((total, item) => {
|
|
200
|
+
const value = parseFloat(item[fieldName]);
|
|
201
|
+
return total + (isNaN(value) ? 0 : value);
|
|
202
|
+
}, 0);
|
|
203
|
+
if (isNaN(sum)) {
|
|
204
|
+
footerRow[fieldName] = "";
|
|
205
|
+
} else {
|
|
206
|
+
const field = fieldsData.value.find((f) => f.fieldName === fieldName);
|
|
207
|
+
footerRow[fieldName] = formatSummaryValue(sum, field);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
} else if (mode === "all") {
|
|
211
|
+
summaryFields.forEach((fieldName) => {
|
|
212
|
+
const sum = allSummaryData.value[fieldName];
|
|
213
|
+
if (sum !== void 0 && sum !== null) {
|
|
214
|
+
const field = fieldsData.value.find((f) => f.fieldName === fieldName);
|
|
215
|
+
footerRow[fieldName] = formatSummaryValue(sum, field);
|
|
216
|
+
} else {
|
|
217
|
+
footerRow[fieldName] = "加载中...";
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return [footerRow];
|
|
222
|
+
});
|
|
223
|
+
function formatSummaryValue(value, field) {
|
|
224
|
+
if (!field) {
|
|
225
|
+
return value;
|
|
226
|
+
}
|
|
227
|
+
const format = field.format;
|
|
228
|
+
field.hasDecimalPlaces;
|
|
229
|
+
field.decimalPlaces ?? 2;
|
|
230
|
+
let result = value;
|
|
231
|
+
switch (format) {
|
|
232
|
+
case "yuan":
|
|
233
|
+
result = value;
|
|
234
|
+
break;
|
|
235
|
+
case "wan":
|
|
236
|
+
result = value / 1e4;
|
|
237
|
+
break;
|
|
238
|
+
case "million":
|
|
239
|
+
result = value / 1e6;
|
|
240
|
+
break;
|
|
241
|
+
case "percentage":
|
|
242
|
+
result = value * 100;
|
|
243
|
+
break;
|
|
244
|
+
case "permillage":
|
|
245
|
+
result = value * 1e3;
|
|
246
|
+
break;
|
|
247
|
+
case "permillion":
|
|
248
|
+
result = value * 1e4;
|
|
249
|
+
break;
|
|
250
|
+
default:
|
|
251
|
+
result = value;
|
|
252
|
+
}
|
|
253
|
+
if (field.format == "yuan" || field.format == "wan" || field.format == "million") {
|
|
254
|
+
const formatted = result.toLocaleString("en-US", {
|
|
255
|
+
minimumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 0,
|
|
256
|
+
maximumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 20
|
|
257
|
+
});
|
|
258
|
+
return formatted;
|
|
259
|
+
}
|
|
260
|
+
return result;
|
|
261
|
+
}
|
|
262
|
+
const initDataSourceManager = async () => {
|
|
177
263
|
var _a, _b;
|
|
178
264
|
if (!((_a = localConfig.value.dataSources) == null ? void 0 : _a.length)) return;
|
|
179
265
|
dataSourceManager.value = createDataSource({
|
|
@@ -197,7 +283,36 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
197
283
|
emit("data-error", err);
|
|
198
284
|
});
|
|
199
285
|
if (!props.tableData || props.tableData.length === 0) {
|
|
200
|
-
|
|
286
|
+
tableDataFetch();
|
|
287
|
+
if (localConfig.value.summaryConfig.enabled && localConfig.value.summaryConfig.mode == "all") {
|
|
288
|
+
const summaryAllDataManager = createDataSource({
|
|
289
|
+
http: ctx.$http,
|
|
290
|
+
initSearchData: searchData.value,
|
|
291
|
+
dataSources: localConfig.value.dataSources,
|
|
292
|
+
currentDataSourceId: localConfig.value.dataSourceId,
|
|
293
|
+
pagination: {
|
|
294
|
+
pageNo: 1,
|
|
295
|
+
pageSize: 0
|
|
296
|
+
// 获取全部数据
|
|
297
|
+
},
|
|
298
|
+
data: hiddenFormData.value,
|
|
299
|
+
fields: fieldsData.value,
|
|
300
|
+
sortRules: localConfig.value.sortRules,
|
|
301
|
+
templateId: localConfig.value.templateKey
|
|
302
|
+
});
|
|
303
|
+
const data = await summaryAllDataManager.fetch();
|
|
304
|
+
const summaryFields = localConfig.value.summaryConfig.summaryFields || [];
|
|
305
|
+
const allList = (data == null ? void 0 : data.list) || [];
|
|
306
|
+
const summaryResult = {};
|
|
307
|
+
summaryFields.forEach((fieldName) => {
|
|
308
|
+
const sum = allList.reduce((total, item) => {
|
|
309
|
+
const value = parseFloat(item[fieldName]);
|
|
310
|
+
return total + (isNaN(value) ? 0 : value);
|
|
311
|
+
}, 0);
|
|
312
|
+
summaryResult[fieldName] = sum;
|
|
313
|
+
});
|
|
314
|
+
allSummaryData.value = summaryResult;
|
|
315
|
+
}
|
|
201
316
|
}
|
|
202
317
|
loadFieldDataSources();
|
|
203
318
|
};
|
|
@@ -329,14 +444,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
329
444
|
const orderValue = order ? order.replace("ending", "") : "";
|
|
330
445
|
if (dataSourceManager.value) {
|
|
331
446
|
dataSourceManager.value.updateSort(property, orderValue);
|
|
332
|
-
|
|
447
|
+
tableDataFetch();
|
|
333
448
|
}
|
|
334
449
|
emit("sort-change", { field: property, order: orderValue });
|
|
335
450
|
};
|
|
336
451
|
const handlePageChange = ({ pageNo, pageSize }) => {
|
|
337
452
|
if (dataSourceManager.value) {
|
|
338
453
|
dataSourceManager.value.updatePagination(pageNo, pageSize);
|
|
339
|
-
|
|
454
|
+
tableDataFetch();
|
|
340
455
|
}
|
|
341
456
|
emit("page-change", { pageNo, pageSize });
|
|
342
457
|
};
|
|
@@ -352,7 +467,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
352
467
|
const handleFilterSearch = (filters) => {
|
|
353
468
|
if (dataSourceManager.value) {
|
|
354
469
|
dataSourceManager.value.updateParams(filters);
|
|
355
|
-
|
|
470
|
+
tableDataFetch();
|
|
356
471
|
clearSelection();
|
|
357
472
|
} else {
|
|
358
473
|
searchData.value = filters;
|
|
@@ -361,7 +476,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
361
476
|
const handleFilterReset = () => {
|
|
362
477
|
if (dataSourceManager.value) {
|
|
363
478
|
dataSourceManager.value.clearParams();
|
|
364
|
-
|
|
479
|
+
tableDataFetch();
|
|
365
480
|
clearSelection();
|
|
366
481
|
}
|
|
367
482
|
};
|
|
@@ -392,7 +507,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
392
507
|
$table.clearFilter();
|
|
393
508
|
}
|
|
394
509
|
}
|
|
395
|
-
|
|
510
|
+
tableDataFetch();
|
|
396
511
|
}
|
|
397
512
|
};
|
|
398
513
|
const reset = () => {
|
|
@@ -407,9 +522,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
407
522
|
$table.clearSort();
|
|
408
523
|
}
|
|
409
524
|
dataSourceManager.value.clearSort();
|
|
410
|
-
|
|
525
|
+
tableDataFetch();
|
|
411
526
|
}
|
|
412
527
|
};
|
|
528
|
+
async function tableDataFetch() {
|
|
529
|
+
await dataSourceManager.value.fetch();
|
|
530
|
+
}
|
|
413
531
|
const exportConfig = reactive({
|
|
414
532
|
modes: ["current", "selected", "all", "empty"],
|
|
415
533
|
original: false
|
|
@@ -619,6 +737,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
619
737
|
"row-config": rowConfig.value,
|
|
620
738
|
"radio-config": unref(radioConfig),
|
|
621
739
|
"checkbox-config": unref(checkboxConfig),
|
|
740
|
+
"show-footer": summaryConfig.value.enabled,
|
|
741
|
+
"footer-data": footerData.value,
|
|
622
742
|
onSortChange: handleSortChange,
|
|
623
743
|
onCheckboxChange: handleCheckboxChange,
|
|
624
744
|
onCheckboxAll: handleCheckboxAll,
|
|
@@ -657,7 +777,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
657
777
|
];
|
|
658
778
|
}),
|
|
659
779
|
_: 3
|
|
660
|
-
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
780
|
+
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config", "show-footer", "footer-data"])
|
|
661
781
|
]),
|
|
662
782
|
isPagination.value ? (openBlock(), createBlock(Pagination, {
|
|
663
783
|
key: 2,
|
|
@@ -673,7 +793,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
673
793
|
};
|
|
674
794
|
}
|
|
675
795
|
});
|
|
676
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
796
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aa3130aa"]]);
|
|
677
797
|
export {
|
|
678
798
|
_Table as default
|
|
679
799
|
};
|
|
@@ -399,7 +399,7 @@ const _sfc_main = {
|
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
-
const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
402
|
+
const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e5372d4"]]);
|
|
403
403
|
export {
|
|
404
404
|
TableColumn as default
|
|
405
405
|
};
|
|
@@ -6,7 +6,7 @@ require("../../../node_modules/element-plus/es/index.js");
|
|
|
6
6
|
;/* empty css */
|
|
7
7
|
const vue = require("vue");
|
|
8
8
|
const index$1 = require("../../../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
9
|
-
const ValueSelector = require("./ValueSelector.
|
|
9
|
+
const ValueSelector = require("./ValueSelector.vue.js");
|
|
10
10
|
;/* empty css */
|
|
11
11
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
12
12
|
const index = require("../../../node_modules/element-plus/es/components/button/index.js");
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
require("../../../node_modules/element-plus/es/index.js");
|
|
5
|
+
const ValueSelectorPopover = require("./ValueSelectorPopover.vue2.js");
|
|
6
|
+
const common = require("../packages/utils/common.js");
|
|
7
|
+
;/* empty css */
|
|
8
|
+
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
9
|
+
const index = require("../../../node_modules/element-plus/es/components/input-tag/index.js");
|
|
10
|
+
const index$1 = require("../../../node_modules/element-plus/es/components/input/index.js");
|
|
11
|
+
const _sfc_main = {
|
|
12
|
+
__name: "ValueSelector",
|
|
13
|
+
props: {
|
|
14
|
+
// modelValue 的格式:
|
|
15
|
+
// 单选:{ type: 'field', value: '字段ID' }
|
|
16
|
+
// 多选:[{ type: 'field', value: '字段ID1' }, { type: 'field', value: '字段ID2' }]
|
|
17
|
+
modelValue: {
|
|
18
|
+
default: () => null
|
|
19
|
+
},
|
|
20
|
+
placeholder: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "请输入或选择值"
|
|
23
|
+
},
|
|
24
|
+
readOnly: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
multiple: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "small"
|
|
39
|
+
}
|
|
40
|
+
// // 可选的字段列表(从父组件传入)
|
|
41
|
+
// availableFields: {
|
|
42
|
+
// type: Array,
|
|
43
|
+
// default: () => [],
|
|
44
|
+
// validator: (value) => Array.isArray(value),
|
|
45
|
+
// },
|
|
46
|
+
},
|
|
47
|
+
emits: ["update:modelValue"],
|
|
48
|
+
setup(__props, { emit: __emit }) {
|
|
49
|
+
const props = __props;
|
|
50
|
+
const emit = __emit;
|
|
51
|
+
const inputComponent = vue.computed(() => {
|
|
52
|
+
return props.multiple ? index.ElInputTag : index$1.ElInput;
|
|
53
|
+
});
|
|
54
|
+
const hiddenFieldsData = vue.computed(() => {
|
|
55
|
+
const editConfigData = common.getEditConfigData();
|
|
56
|
+
return (editConfigData == null ? void 0 : editConfigData.hiddenFields) || [];
|
|
57
|
+
});
|
|
58
|
+
const availableFields = vue.computed(() => {
|
|
59
|
+
const fields = common.getEditConfigDataFields() || [];
|
|
60
|
+
return fields.map((item) => ({
|
|
61
|
+
id: item.id,
|
|
62
|
+
label: item.label,
|
|
63
|
+
fieldName: item.fieldName,
|
|
64
|
+
fieldType: item.fieldType
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
const displayText = vue.computed(() => {
|
|
68
|
+
if (!props.modelValue) return "";
|
|
69
|
+
if (!props.multiple && typeof props.modelValue === "object" && !Array.isArray(props.modelValue)) {
|
|
70
|
+
const val = props.modelValue;
|
|
71
|
+
if (val.label) return val.label;
|
|
72
|
+
const field = availableFields.value.find((f) => f.id === val.value);
|
|
73
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || val.value;
|
|
74
|
+
} else if (!props.multiple && typeof props.modelValue === "string") {
|
|
75
|
+
return props.modelValue;
|
|
76
|
+
}
|
|
77
|
+
return "";
|
|
78
|
+
});
|
|
79
|
+
const tags = vue.computed({
|
|
80
|
+
get() {
|
|
81
|
+
if (!props.multiple || !Array.isArray(props.modelValue)) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
return props.modelValue.map((item) => {
|
|
85
|
+
if (item.label) return item.label;
|
|
86
|
+
const field = availableFields.value.find((f) => f.id === item.value);
|
|
87
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || item.value;
|
|
88
|
+
}).filter(Boolean);
|
|
89
|
+
},
|
|
90
|
+
set(val) {
|
|
91
|
+
if (Array.isArray(props.modelValue)) {
|
|
92
|
+
const newModelValue = props.modelValue.filter((item) => {
|
|
93
|
+
const itemLabel = item.label || (() => {
|
|
94
|
+
const field = [
|
|
95
|
+
...availableFields.value,
|
|
96
|
+
...hiddenFieldsData.value
|
|
97
|
+
].find((f) => f.id === item.value);
|
|
98
|
+
return (field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || item.value;
|
|
99
|
+
})();
|
|
100
|
+
return val.includes(itemLabel);
|
|
101
|
+
});
|
|
102
|
+
emit("update:modelValue", newModelValue);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const unifiedInputValue = vue.computed({
|
|
107
|
+
get() {
|
|
108
|
+
return props.multiple ? tags.value : displayText.value;
|
|
109
|
+
},
|
|
110
|
+
set(val) {
|
|
111
|
+
if (props.multiple && Array.isArray(val)) {
|
|
112
|
+
tags.value = val;
|
|
113
|
+
} else if (!props.multiple && typeof val === "string") {
|
|
114
|
+
emit("update:modelValue", val);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const handleConfirm = (selected) => {
|
|
119
|
+
let result = null;
|
|
120
|
+
if (selected.type === "field") {
|
|
121
|
+
const field = [...availableFields.value, ...hiddenFieldsData.value].find(
|
|
122
|
+
(f) => f.id === selected.value
|
|
123
|
+
);
|
|
124
|
+
result = {
|
|
125
|
+
label: `\${${(field == null ? void 0 : field.label) || (field == null ? void 0 : field.fieldName) || selected.value}}`,
|
|
126
|
+
type: "field",
|
|
127
|
+
value: selected.value
|
|
128
|
+
};
|
|
129
|
+
} else if (selected.type === "userInfo") {
|
|
130
|
+
result = {
|
|
131
|
+
label: `\${用户信息: ${getUserInfoLabel(selected.value)}}`,
|
|
132
|
+
type: "userInfo",
|
|
133
|
+
value: selected.value
|
|
134
|
+
};
|
|
135
|
+
} else if (selected.type === "urlParam") {
|
|
136
|
+
result = {
|
|
137
|
+
label: `\${路由参数: ${selected.value}}`,
|
|
138
|
+
type: "urlParam",
|
|
139
|
+
value: selected.value
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (!result) return;
|
|
143
|
+
if (props.multiple) {
|
|
144
|
+
const currentValue = Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
145
|
+
const exists = currentValue.some((item) => item.value === result.value);
|
|
146
|
+
if (!exists) {
|
|
147
|
+
emit("update:modelValue", [...currentValue, result]);
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
emit("update:modelValue", result);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const getUserInfoLabel = (key) => {
|
|
154
|
+
const labels = {
|
|
155
|
+
userCode: "用户编号",
|
|
156
|
+
userName: "用户名称",
|
|
157
|
+
roleCode: "角色编号",
|
|
158
|
+
roleName: "角色名称",
|
|
159
|
+
orgCode: "机构编号",
|
|
160
|
+
orgName: "机构名称"
|
|
161
|
+
};
|
|
162
|
+
return labels[key] || key;
|
|
163
|
+
};
|
|
164
|
+
return (_ctx, _cache) => {
|
|
165
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(inputComponent.value), {
|
|
166
|
+
modelValue: unifiedInputValue.value,
|
|
167
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unifiedInputValue.value = $event),
|
|
168
|
+
placeholder: __props.placeholder,
|
|
169
|
+
disabled: __props.disabled,
|
|
170
|
+
readonly: __props.readOnly,
|
|
171
|
+
trigger: __props.multiple ? "Space" : void 0,
|
|
172
|
+
"collapse-tags": "",
|
|
173
|
+
"collapse-tags-tooltip": "",
|
|
174
|
+
"max-collapse-tags": 1,
|
|
175
|
+
class: "value-selector-input",
|
|
176
|
+
size: __props.size
|
|
177
|
+
}, {
|
|
178
|
+
suffix: vue.withCtx(() => [
|
|
179
|
+
vue.createVNode(ValueSelectorPopover.default, {
|
|
180
|
+
"available-fields": availableFields.value,
|
|
181
|
+
disabled: __props.disabled,
|
|
182
|
+
onConfirm: handleConfirm
|
|
183
|
+
}, null, 8, ["available-fields", "disabled"])
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger", "size"]);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const ValueSelector = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e5b87efa"]]);
|
|
191
|
+
exports.default = ValueSelector;
|
|
@@ -18,7 +18,7 @@ const index$2 = require("../../../../node_modules/@element-plus/icons-vue/dist/i
|
|
|
18
18
|
const common = require("../../packages/utils/common.js");
|
|
19
19
|
const index$5 = require("../../packages/form/aside/index.js");
|
|
20
20
|
const index$6 = require("../../packages/table/aside/index.js");
|
|
21
|
-
const ValueSelector = require("../../components/ValueSelector.
|
|
21
|
+
const ValueSelector = require("../../components/ValueSelector.vue.js");
|
|
22
22
|
;/* empty css */
|
|
23
23
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
24
24
|
const index = require("../../../../node_modules/element-plus/es/components/dialog/index.js");
|
|
@@ -16,7 +16,7 @@ require("../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.js");
|
|
|
16
16
|
require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js");
|
|
17
17
|
const vue = require("vue");
|
|
18
18
|
const index = require("../../../../node_modules/@vueuse/core/dist/index.js");
|
|
19
|
-
const ValueSelector = require("../../components/ValueSelector.
|
|
19
|
+
const ValueSelector = require("../../components/ValueSelector.vue.js");
|
|
20
20
|
const index$1 = require("../../api/index.js");
|
|
21
21
|
const common = require("../utils/common.js");
|
|
22
22
|
const datasource = require("../utils/datasource.js");
|
|
@@ -32,7 +32,7 @@ require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js
|
|
|
32
32
|
;/* empty css */
|
|
33
33
|
;/* empty css */
|
|
34
34
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
35
|
-
;/* empty css
|
|
35
|
+
;/* empty css */
|
|
36
36
|
require("../../axios/config.js");
|
|
37
37
|
require("../../../../_virtual/FileSaver.min.js");
|
|
38
38
|
require("../../../../_virtual/index.js");
|
|
@@ -81,7 +81,7 @@ require("../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.js
|
|
|
81
81
|
require("../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.js");
|
|
82
82
|
;/* empty css */
|
|
83
83
|
;/* empty css */
|
|
84
|
-
;/* empty css
|
|
84
|
+
;/* empty css */
|
|
85
85
|
require("../../axios/config.js");
|
|
86
86
|
;/* empty css */
|
|
87
87
|
;/* empty css */
|
|
@@ -13,7 +13,7 @@ require("../../../../../node_modules/element-plus/es/index.js");
|
|
|
13
13
|
const vue = require("vue");
|
|
14
14
|
const common = require("../../utils/common.js");
|
|
15
15
|
const eventBus = require("../../utils/eventBus.js");
|
|
16
|
-
const ValueSelector = require("../../../components/ValueSelector.
|
|
16
|
+
const ValueSelector = require("../../../components/ValueSelector.vue.js");
|
|
17
17
|
const index = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
|
|
18
18
|
const index$1 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
|
|
19
19
|
const index$2 = require("../../../../../node_modules/element-plus/es/components/input/index.js");
|
|
@@ -15,7 +15,7 @@ const vue = require("vue");
|
|
|
15
15
|
const common = require("../../utils/common.js");
|
|
16
16
|
const TemplateSelector = require("../../../components/TemplateSelector.vue.js");
|
|
17
17
|
const eventBus = require("../../utils/eventBus.js");
|
|
18
|
-
const ValueSelector = require("../../../components/ValueSelector.
|
|
18
|
+
const ValueSelector = require("../../../components/ValueSelector.vue.js");
|
|
19
19
|
const index = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
|
|
20
20
|
const index$1 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
|
|
21
21
|
const index$2 = require("../../../../../node_modules/element-plus/es/components/input/index.js");
|
|
@@ -16,7 +16,7 @@ require("../../../../node_modules/element-plus/es/index.js");
|
|
|
16
16
|
const vue = require("vue");
|
|
17
17
|
const index$6 = require("../../../../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
18
18
|
const common = require("../utils/common.js");
|
|
19
|
-
const ValueSelector = require("../../components/ValueSelector.
|
|
19
|
+
const ValueSelector = require("../../components/ValueSelector.vue.js");
|
|
20
20
|
const index = require("../../api/index.js");
|
|
21
21
|
;/* empty css */
|
|
22
22
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const defaultTableConfig = {
|
|
4
|
-
|
|
4
|
+
fieldsData: [
|
|
5
5
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
fieldType: "text",
|
|
7
|
+
label: "文本",
|
|
8
|
+
fieldName: "fieldName",
|
|
9
|
+
format: "number",
|
|
10
|
+
hasDecimalPlaces: true,
|
|
11
|
+
decimalPlaces: 2,
|
|
12
|
+
optionStyle: "default",
|
|
13
|
+
dateType: "date",
|
|
14
|
+
widthMode: "auto",
|
|
15
|
+
minWidth: 80,
|
|
16
|
+
headerAlign: "center",
|
|
17
|
+
align: "center",
|
|
18
|
+
isShow: true,
|
|
19
|
+
id: 1770347203793,
|
|
20
|
+
type: "widgets"
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
showTitle: true,
|
|
24
|
+
isOptBtns: true,
|
|
25
|
+
optBtns: [
|
|
26
26
|
// {
|
|
27
27
|
// "id": 1770347228880,
|
|
28
28
|
// "label": "修改",
|
|
@@ -36,8 +36,8 @@ const defaultTableConfig = {
|
|
|
36
36
|
// "btnStyle": "default"
|
|
37
37
|
// }
|
|
38
38
|
],
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
customBtns: {
|
|
40
|
+
left: [
|
|
41
41
|
// {
|
|
42
42
|
// "id": 1770347217788,
|
|
43
43
|
// "label": "新增",
|
|
@@ -46,40 +46,38 @@ const defaultTableConfig = {
|
|
|
46
46
|
// "btnStyle": "default"
|
|
47
47
|
// }
|
|
48
48
|
],
|
|
49
|
-
|
|
49
|
+
right: []
|
|
50
50
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
selectMode: "none",
|
|
52
|
+
showIndex: false,
|
|
53
|
+
heightMode: "auto",
|
|
54
|
+
height: 500,
|
|
55
|
+
editable: false,
|
|
56
|
+
events: {},
|
|
57
|
+
dataSourceId: "",
|
|
58
|
+
sortRules: [],
|
|
59
|
+
paginationConfig: {
|
|
60
|
+
enabled: true,
|
|
61
|
+
pageSize: 10,
|
|
62
|
+
pageSizes: [10, 20, 50, 100, 200, 500],
|
|
63
|
+
layout: "full",
|
|
64
|
+
background: true,
|
|
65
|
+
size: "small"
|
|
66
|
+
},
|
|
67
|
+
mode: [],
|
|
68
|
+
dataSources: [],
|
|
69
|
+
dialogs: [],
|
|
70
|
+
queryConfig: {
|
|
71
|
+
enabled: true,
|
|
72
|
+
mode: "fixed",
|
|
73
|
+
columnCount: 4,
|
|
74
|
+
collapseRows: 2,
|
|
75
|
+
filterFields: []
|
|
73
76
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"enabled": true,
|
|
79
|
-
"mode": "fixed",
|
|
80
|
-
"columnCount": 4,
|
|
81
|
-
"collapseRows": 2,
|
|
82
|
-
"filterFields": []
|
|
77
|
+
summaryConfig: {
|
|
78
|
+
enabled: false,
|
|
79
|
+
mode: "current",
|
|
80
|
+
summaryFields: []
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
83
|
const defaultCustomBtn = {
|