@fecp/designer 5.3.22 → 5.4.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/package.json.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/index.vue.mjs +3 -1
- package/es/designer/src/packages/table/tableSummary.vue.mjs +112 -0
- package/es/designer.css +95 -72
- 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/packages/table/aside/index.js +2 -1
- package/lib/designer/src/packages/table/default.js +51 -53
- 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 +95 -72
- 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
|
@@ -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 = {
|
|
@@ -24,6 +24,7 @@ const index$7 = require("../../../../node_modules/@element-plus/icons-vue/dist/i
|
|
|
24
24
|
const TableSetting = require("./TableSetting.vue.js");
|
|
25
25
|
const index = ;/* empty css */
|
|
26
26
|
const tablePagination = require("./tablePagination.vue.js");
|
|
27
|
+
const tableSummary = require("./tableSummary.vue.js");
|
|
27
28
|
const common = require("../utils/common.js");
|
|
28
29
|
;/* empty css */
|
|
29
30
|
;/* empty css */
|
|
@@ -467,10 +468,11 @@ const _sfc_main = {
|
|
|
467
468
|
}, 8, ["modelValue"])
|
|
468
469
|
], 2)
|
|
469
470
|
]),
|
|
471
|
+
vue.createVNode(tableSummary.default),
|
|
470
472
|
vue.createVNode(tablePagination.default)
|
|
471
473
|
], 64);
|
|
472
474
|
};
|
|
473
475
|
}
|
|
474
476
|
};
|
|
475
|
-
const tableWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
477
|
+
const tableWorkArea = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-271403ad"]]);
|
|
476
478
|
exports.default = tableWorkArea;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
require("../../../../node_modules/element-plus/es/index.js");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
14
|
+
;/* empty css */
|
|
15
|
+
;/* empty css */
|
|
16
|
+
const vue = require("vue");
|
|
17
|
+
const common = require("../utils/common.js");
|
|
18
|
+
;/* empty css */
|
|
19
|
+
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
20
|
+
const index = require("../../../../node_modules/element-plus/es/components/switch/index.js");
|
|
21
|
+
const index$1 = require("../../../../node_modules/element-plus/es/components/divider/index.js");
|
|
22
|
+
const index$2 = require("../../../../node_modules/element-plus/es/components/select/index.js");
|
|
23
|
+
const index$3 = require("../../../../node_modules/element-plus/es/components/radio/index.js");
|
|
24
|
+
const _hoisted_1 = { class: "table-summary-config" };
|
|
25
|
+
const _hoisted_2 = { class: "config-row" };
|
|
26
|
+
const _sfc_main = {
|
|
27
|
+
__name: "tableSummary",
|
|
28
|
+
setup(__props) {
|
|
29
|
+
var _a;
|
|
30
|
+
const editConfigData = vue.computed(() => common.getEditConfigData());
|
|
31
|
+
const availableFields = vue.computed(() => {
|
|
32
|
+
var _a2;
|
|
33
|
+
const fields = ((_a2 = editConfigData.value) == null ? void 0 : _a2.fieldsData) || [];
|
|
34
|
+
return fields.filter((field) => field.isShow && field.fieldType === "number");
|
|
35
|
+
});
|
|
36
|
+
const summaryConfig = vue.reactive({
|
|
37
|
+
enabled: false,
|
|
38
|
+
mode: "current",
|
|
39
|
+
summaryFields: [],
|
|
40
|
+
...((_a = editConfigData.value) == null ? void 0 : _a.summaryConfig) || {}
|
|
41
|
+
});
|
|
42
|
+
vue.watch(
|
|
43
|
+
summaryConfig,
|
|
44
|
+
(val) => {
|
|
45
|
+
editConfigData.value.summaryConfig = val;
|
|
46
|
+
},
|
|
47
|
+
{ deep: true }
|
|
48
|
+
);
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
const _component_el_switch = index.ElSwitch;
|
|
51
|
+
const _component_el_divider = index$1.ElDivider;
|
|
52
|
+
const _component_el_option = index$2.ElOption;
|
|
53
|
+
const _component_el_select = index$2.ElSelect;
|
|
54
|
+
const _component_el_radio_button = index$3.ElRadioButton;
|
|
55
|
+
const _component_el_radio_group = index$3.ElRadioGroup;
|
|
56
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
57
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
58
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "config-label" }, "开启合计:", -1)),
|
|
59
|
+
vue.createVNode(_component_el_switch, {
|
|
60
|
+
modelValue: summaryConfig.enabled,
|
|
61
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => summaryConfig.enabled = $event),
|
|
62
|
+
size: "small"
|
|
63
|
+
}, null, 8, ["modelValue"]),
|
|
64
|
+
vue.createVNode(_component_el_divider, { direction: "vertical" }),
|
|
65
|
+
_cache[4] || (_cache[4] = vue.createElementVNode("span", { class: "config-label" }, "合计列:", -1)),
|
|
66
|
+
vue.createVNode(_component_el_select, {
|
|
67
|
+
modelValue: summaryConfig.summaryFields,
|
|
68
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => summaryConfig.summaryFields = $event),
|
|
69
|
+
multiple: "",
|
|
70
|
+
size: "small",
|
|
71
|
+
style: { "width": "200px" },
|
|
72
|
+
"collapse-tags": "",
|
|
73
|
+
"collapse-tags-tooltip": "",
|
|
74
|
+
placeholder: "请选择要合计的列"
|
|
75
|
+
}, {
|
|
76
|
+
default: vue.withCtx(() => [
|
|
77
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(availableFields.value, (field) => {
|
|
78
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
79
|
+
key: field.fieldName,
|
|
80
|
+
label: field.label || field.fieldName,
|
|
81
|
+
value: field.fieldName
|
|
82
|
+
}, null, 8, ["label", "value"]);
|
|
83
|
+
}), 128))
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["modelValue"]),
|
|
87
|
+
vue.createVNode(_component_el_divider, { direction: "vertical" }),
|
|
88
|
+
_cache[5] || (_cache[5] = vue.createElementVNode("span", { class: "config-label" }, "合计模式:", -1)),
|
|
89
|
+
vue.createVNode(_component_el_radio_group, {
|
|
90
|
+
modelValue: summaryConfig.mode,
|
|
91
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => summaryConfig.mode = $event),
|
|
92
|
+
size: "small"
|
|
93
|
+
}, {
|
|
94
|
+
default: vue.withCtx(() => [
|
|
95
|
+
vue.createVNode(_component_el_radio_button, {
|
|
96
|
+
label: "当前页数据",
|
|
97
|
+
value: "current"
|
|
98
|
+
}),
|
|
99
|
+
vue.createVNode(_component_el_radio_button, {
|
|
100
|
+
label: "全部数据",
|
|
101
|
+
value: "all"
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["modelValue"])
|
|
106
|
+
])
|
|
107
|
+
]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const TableSummary = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-95806c79"]]);
|
|
112
|
+
exports.default = TableSummary;
|