@fecp/designer 5.4.81 → 5.4.83
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/packages/table/aside/index.mjs +1 -1
- package/es/designer/src/packages/table/index.vue.mjs +17 -166
- package/es/designer/src/packages/table/property/widgets.vue.mjs +37 -10
- package/es/designer/src/packages/table/queryModule/DynamicModeConfig.vue.mjs +18 -6
- package/es/designer/src/packages/utils/datasource.mjs +2 -3
- package/es/designer.css +231 -210
- package/es/packages/vue/src/components/forms/h2/H2.vue.mjs +1 -1
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +2 -3
- package/es/packages/vue/src/components/table/Table.vue.mjs +32 -5
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +6 -5
- package/es/packages/vue/src/components/table/TableFilter.vue.mjs +3 -3
- package/es/packages/vue/src/utils/datasource.mjs +4 -6
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/table/aside/index.js +1 -1
- package/lib/designer/src/packages/table/index.vue.js +24 -173
- package/lib/designer/src/packages/table/property/widgets.vue.js +37 -10
- package/lib/designer/src/packages/table/queryModule/DynamicModeConfig.vue.js +18 -6
- package/lib/designer/src/packages/utils/datasource.js +2 -3
- package/lib/designer.css +231 -210
- package/lib/packages/vue/src/components/forms/h2/H2.vue.js +1 -1
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +2 -3
- package/lib/packages/vue/src/components/table/Table.vue.js +38 -11
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +6 -5
- package/lib/packages/vue/src/components/table/TableFilter.vue.js +3 -3
- package/lib/packages/vue/src/utils/datasource.js +4 -6
- package/package.json +1 -1
|
@@ -38,5 +38,5 @@ const _sfc_main = {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
41
|
+
const _H2 = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6852826d"]]);
|
|
42
42
|
exports.default = _H2;
|
|
@@ -312,8 +312,7 @@ const _sfc_main = {
|
|
|
312
312
|
}, vue.createSlots({
|
|
313
313
|
suffix: vue.withCtx(() => [
|
|
314
314
|
vue.createVNode(_component_el_icon, {
|
|
315
|
-
class: "el-input__icon",
|
|
316
|
-
style: { "cursor": "pointer" },
|
|
315
|
+
class: "el-input__icon search",
|
|
317
316
|
onClick: handleSearch
|
|
318
317
|
}, {
|
|
319
318
|
default: vue.withCtx(() => [
|
|
@@ -472,5 +471,5 @@ const _sfc_main = {
|
|
|
472
471
|
};
|
|
473
472
|
}
|
|
474
473
|
};
|
|
475
|
-
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
474
|
+
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-fe7f988e"]]);
|
|
476
475
|
exports.default = DynamicQuery;
|
|
@@ -9,6 +9,7 @@ require("../../../../../node_modules/element-plus/es/index.js");
|
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const vue = require("vue");
|
|
11
11
|
require("../../../../../node_modules/vxe-table/es/components.js");
|
|
12
|
+
const index = require("../../../../../_virtual/index2.js");
|
|
12
13
|
;/* empty css */
|
|
13
14
|
const datasource = require("../../utils/datasource.js");
|
|
14
15
|
const Pagination = require("./Pagination.vue.js");
|
|
@@ -44,9 +45,9 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
|
|
|
44
45
|
;/* empty css */
|
|
45
46
|
const getJsonAsyncUtil = require("../../utils/getJsonAsyncUtil.js");
|
|
46
47
|
;/* empty css */
|
|
47
|
-
const index = require("../../../../../node_modules/element-plus/es/components/container/index.js");
|
|
48
|
-
const index$
|
|
49
|
-
const index$
|
|
48
|
+
const index$1 = require("../../../../../node_modules/element-plus/es/components/container/index.js");
|
|
49
|
+
const index$2 = require("../../../../../node_modules/vxe-table/es/table/index.js");
|
|
50
|
+
const index$3 = require("../../../../../node_modules/element-plus/es/components/message/index.js");
|
|
50
51
|
const _hoisted_1 = { class: "fec-vxe-table" };
|
|
51
52
|
const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
52
53
|
inheritAttrs: false
|
|
@@ -146,13 +147,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
146
147
|
}));
|
|
147
148
|
const dataSourceOptions = vue.ref({});
|
|
148
149
|
const dictionaryOptions = vue.ref({});
|
|
150
|
+
const staticSortData = vue.ref({});
|
|
149
151
|
const displayData = vue.computed(() => {
|
|
150
152
|
var _a;
|
|
151
153
|
if (props.tableData && props.tableData.length > 0) {
|
|
152
|
-
return props.tableData;
|
|
154
|
+
return sortDataWithStaticRules(props.tableData);
|
|
153
155
|
}
|
|
154
|
-
|
|
156
|
+
const data = ((_a = dataSourceManager.value) == null ? void 0 : _a.getData().list) || [];
|
|
157
|
+
return sortDataWithStaticRules(data);
|
|
155
158
|
});
|
|
159
|
+
const sortDataWithStaticRules = (data) => {
|
|
160
|
+
if (!data || data.length === 0) return data;
|
|
161
|
+
const sortFields = Object.keys(staticSortData.value);
|
|
162
|
+
if (sortFields.length === 0) return data;
|
|
163
|
+
const mockList = data.map((item) => ({ ...item }));
|
|
164
|
+
const fields = sortFields.map((field) => ({
|
|
165
|
+
field,
|
|
166
|
+
order: staticSortData.value[field]
|
|
167
|
+
}));
|
|
168
|
+
return index.default.orderBy(mockList, fields);
|
|
169
|
+
};
|
|
156
170
|
const isPagination = vue.computed(() => {
|
|
157
171
|
var _a;
|
|
158
172
|
if (props.isSubTable || props.isDialog) {
|
|
@@ -444,9 +458,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
444
458
|
};
|
|
445
459
|
const handleSortChange = ({ property, order }) => {
|
|
446
460
|
const orderValue = order ? order.replace("ending", "") : "";
|
|
447
|
-
|
|
461
|
+
const field = fieldsData.value.find((item) => item.fieldName == property);
|
|
462
|
+
if ((field == null ? void 0 : field.sortRule) == "server") {
|
|
448
463
|
dataSourceManager.value.updateSort(property, orderValue);
|
|
449
464
|
tableDataFetch();
|
|
465
|
+
} else if ((field == null ? void 0 : field.sortRule) == "static") {
|
|
466
|
+
if (orderValue) {
|
|
467
|
+
staticSortData.value[property] = orderValue;
|
|
468
|
+
} else {
|
|
469
|
+
delete staticSortData.value[property];
|
|
470
|
+
}
|
|
450
471
|
}
|
|
451
472
|
emit("sort-change", { field: property, order: orderValue });
|
|
452
473
|
};
|
|
@@ -582,6 +603,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
582
603
|
range: true,
|
|
583
604
|
reserve: true
|
|
584
605
|
});
|
|
606
|
+
const sortConfig = vue.reactive({
|
|
607
|
+
multiple: true,
|
|
608
|
+
chronological: true,
|
|
609
|
+
remote: true
|
|
610
|
+
});
|
|
585
611
|
const handlePersonalize = () => {
|
|
586
612
|
if (tableRef.value) {
|
|
587
613
|
tableRef.value.openCustom();
|
|
@@ -665,7 +691,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
665
691
|
emit("loaded", option);
|
|
666
692
|
} catch (error) {
|
|
667
693
|
console.error("加载配置失败:", error);
|
|
668
|
-
index$
|
|
694
|
+
index$3.ElMessage.error("加载配置失败");
|
|
669
695
|
} finally {
|
|
670
696
|
configLoading.value = false;
|
|
671
697
|
}
|
|
@@ -718,7 +744,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
718
744
|
handleCustomBtnClick
|
|
719
745
|
});
|
|
720
746
|
return (_ctx, _cache) => {
|
|
721
|
-
const _component_el_container = index.ElContainer;
|
|
747
|
+
const _component_el_container = index$1.ElContainer;
|
|
722
748
|
return vue.openBlock(), vue.createBlock(_component_el_container, {
|
|
723
749
|
direction: "vertical",
|
|
724
750
|
class: vue.normalizeClass(`fec-table ${__props.isSubTable ? "fec-table-sub" : ""}`),
|
|
@@ -766,7 +792,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
766
792
|
hiddenFormData: hiddenFormData.value
|
|
767
793
|
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data", "hiddenFormData"])) : vue.createCommentVNode("", true),
|
|
768
794
|
vue.createElementVNode("div", _hoisted_1, [
|
|
769
|
-
vue.createVNode(vue.unref(index$
|
|
795
|
+
vue.createVNode(vue.unref(index$2.VxeTable), {
|
|
770
796
|
ref_key: "tableRef",
|
|
771
797
|
ref: tableRef,
|
|
772
798
|
data: displayData.value,
|
|
@@ -777,6 +803,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
777
803
|
"row-config": rowConfig.value,
|
|
778
804
|
"radio-config": vue.unref(radioConfig),
|
|
779
805
|
"checkbox-config": vue.unref(checkboxConfig),
|
|
806
|
+
"sort-config": vue.unref(sortConfig),
|
|
780
807
|
"show-footer": summaryConfig.value.enabled,
|
|
781
808
|
"footer-data": footerData.value,
|
|
782
809
|
onSortChange: handleSortChange,
|
|
@@ -817,7 +844,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
817
844
|
];
|
|
818
845
|
}),
|
|
819
846
|
_: 3
|
|
820
|
-
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config", "show-footer", "footer-data"])
|
|
847
|
+
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config", "sort-config", "show-footer", "footer-data"])
|
|
821
848
|
]),
|
|
822
849
|
isPagination.value ? (vue.openBlock(), vue.createBlock(Pagination.default, {
|
|
823
850
|
key: 2,
|
|
@@ -833,5 +860,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
833
860
|
};
|
|
834
861
|
}
|
|
835
862
|
});
|
|
836
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
863
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-578f27a6"]]);
|
|
837
864
|
exports.default = _Table;
|
|
@@ -378,11 +378,12 @@ const _sfc_main = {
|
|
|
378
378
|
fixed: field.isFixed ? "left" : void 0,
|
|
379
379
|
align: field.align,
|
|
380
380
|
"header-align": field.headerAlign,
|
|
381
|
-
sortable: field.
|
|
381
|
+
sortable: field.sortRule && field.sortRule != "none",
|
|
382
382
|
resizable: false,
|
|
383
383
|
"show-header-overflow": "",
|
|
384
384
|
"show-footer-overflow": "",
|
|
385
|
-
"show-overflow": field.isOverflowWrap ? false : "title"
|
|
385
|
+
"show-overflow": field.isOverflowWrap ? false : "title",
|
|
386
|
+
"header-class-name": field.sortRule == "server" ? "serverSort" : ""
|
|
386
387
|
}, {
|
|
387
388
|
default: vue.withCtx(({ row }) => [
|
|
388
389
|
vue.renderSlot(_ctx.$slots, `cell-${field.fieldName}`, {
|
|
@@ -393,7 +394,7 @@ const _sfc_main = {
|
|
|
393
394
|
field.isLink ? (vue.openBlock(), vue.createBlock(_component_el_link, {
|
|
394
395
|
key: 1,
|
|
395
396
|
type: "primary",
|
|
396
|
-
underline:
|
|
397
|
+
underline: "never",
|
|
397
398
|
onClick: ($event) => handleButtonClick(row, field, field.linkConfig)
|
|
398
399
|
}, {
|
|
399
400
|
default: vue.withCtx(() => [
|
|
@@ -417,7 +418,7 @@ const _sfc_main = {
|
|
|
417
418
|
], true)
|
|
418
419
|
]),
|
|
419
420
|
_: 2
|
|
420
|
-
}, 1032, ["field", "title", "width", "min-width", "fixed", "align", "header-align", "sortable", "show-overflow"]);
|
|
421
|
+
}, 1032, ["field", "title", "width", "min-width", "fixed", "align", "header-align", "sortable", "show-overflow", "header-class-name"]);
|
|
421
422
|
}), 128)),
|
|
422
423
|
!__props.readonly && shouldShowOptColumn.value ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
423
424
|
key: 3,
|
|
@@ -448,5 +449,5 @@ const _sfc_main = {
|
|
|
448
449
|
};
|
|
449
450
|
}
|
|
450
451
|
};
|
|
451
|
-
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
452
|
+
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-5138d230"]]);
|
|
452
453
|
exports.default = TableColumn;
|
|
@@ -48,7 +48,7 @@ const _sfc_main = {
|
|
|
48
48
|
emits: ["search", "reset"],
|
|
49
49
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
50
50
|
vue.useCssVars((_ctx) => ({
|
|
51
|
-
"
|
|
51
|
+
"0b02222c": `${config.value.collapseRows * 90}px`
|
|
52
52
|
}));
|
|
53
53
|
const props = __props;
|
|
54
54
|
const emit = __emit;
|
|
@@ -242,7 +242,7 @@ const _sfc_main = {
|
|
|
242
242
|
onClick: handleSearch
|
|
243
243
|
}, {
|
|
244
244
|
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
245
|
-
vue.createTextVNode("
|
|
245
|
+
vue.createTextVNode("查询")
|
|
246
246
|
])),
|
|
247
247
|
_: 1
|
|
248
248
|
}),
|
|
@@ -284,5 +284,5 @@ const _sfc_main = {
|
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
287
|
+
const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b60de83e"]]);
|
|
288
288
|
exports.default = TableFilter;
|
|
@@ -257,19 +257,17 @@ class DataSourceManager {
|
|
|
257
257
|
* 更新排序
|
|
258
258
|
*/
|
|
259
259
|
updateSort(field, order) {
|
|
260
|
-
const existingIndex = this.sortRules.findIndex(
|
|
261
|
-
|
|
262
|
-
);
|
|
260
|
+
const existingIndex = this.sortRules.findIndex((rule) => rule.field === field);
|
|
261
|
+
debugger;
|
|
263
262
|
if (!order) {
|
|
264
263
|
if (existingIndex > -1) {
|
|
265
264
|
this.sortRules.splice(existingIndex, 1);
|
|
266
265
|
}
|
|
267
266
|
} else {
|
|
268
267
|
if (existingIndex > -1) {
|
|
269
|
-
this.sortRules
|
|
270
|
-
} else {
|
|
271
|
-
this.sortRules.push({ field, order });
|
|
268
|
+
this.sortRules.splice(existingIndex, 1);
|
|
272
269
|
}
|
|
270
|
+
this.sortRules.unshift({ field, order });
|
|
273
271
|
}
|
|
274
272
|
}
|
|
275
273
|
/**
|