super-page-runtime 2.1.933 → 2.2.3
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/dist/es/_virtual/_plugin-vue_export-helper.js +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -300
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +846 -2285
- package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +296 -630
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +137 -368
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +1 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +242 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +191 -511
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +310 -800
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +255 -592
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
- package/dist/es/components/runtime/views/super-page.vue.js +235 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -1,520 +1,200 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow, withCtx, Fragment, renderList, createBlock, createCommentVNode, h } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { getChartDatasFromPage, getValueFromVariable, isPromise, setValueForVariableName, updateChartDatasourcesByComponent, caculateShowCondition } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { getCustomFunc } from "../../../../utils/events/event-util.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getSummaryTitleColumn
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(__props, { expose: __expose }) {
|
|
26
|
-
var _a;
|
|
27
|
-
const props = __props;
|
|
28
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
29
|
-
const runtimeStyle = runtimeInfo.style;
|
|
30
|
-
const runtimeClass = runtimeInfo.class;
|
|
31
|
-
const dataConfig = runtimeInfo.dataConfig;
|
|
32
|
-
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
33
|
-
const headerRef = ref(null);
|
|
34
|
-
const isEnableGroupHeader = ref(runtimeInfo.props.isEnableGroupHeader);
|
|
35
|
-
const tableData = ref([]);
|
|
36
|
-
const tableColumnsConfig = ref([]);
|
|
37
|
-
const groupColumnsConfig = ref([]);
|
|
38
|
-
const columnsConfigKeyValues = ref({});
|
|
39
|
-
const showSummary = ref(false);
|
|
40
|
-
const tableSummaryTitle = ref({});
|
|
41
|
-
const tableSummaryColumns = ref({});
|
|
42
|
-
const groupSummaryColumns = ref({});
|
|
43
|
-
const groupSummaryDataRowIndex = [];
|
|
44
|
-
const columnStyleSourceConfig = ref({});
|
|
45
|
-
const dataFormulaMapping = ref({});
|
|
46
|
-
const gridRef = ref(null);
|
|
47
|
-
const total = ref(0);
|
|
48
|
-
let tmpTableData = [];
|
|
49
|
-
if (!props.configure.props.modelCustom) {
|
|
50
|
-
if (!isEnableGroupHeader.value) {
|
|
51
|
-
tableColumnsConfig.value = props.configure.items;
|
|
52
|
-
} else {
|
|
53
|
-
groupColumnsConfig.value = props.configure.props.groupHeaders;
|
|
54
|
-
}
|
|
55
|
-
(_a = props.configure.items) == null ? void 0 : _a.forEach((item) => {
|
|
56
|
-
columnsConfigKeyValues.value[item.uuid] = item;
|
|
57
|
-
if (Object.keys(item.style).length > 0) {
|
|
58
|
-
columnStyleSourceConfig.value[item.props.base.prop] = {
|
|
59
|
-
cellStyle: item.style,
|
|
60
|
-
titleStyle: item.titleStyle
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
if (item.formula && item.formula.trim() !== "") {
|
|
64
|
-
dataFormulaMapping.value[item.props.base.prop] = item.formula;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
showSummary.value = props.configure.props.base.showSummary;
|
|
69
|
-
if (showSummary.value || props.configure.props.highOrder.groupField && props.configure.props.highOrder.groupField.length > 0) {
|
|
70
|
-
tableSummaryTitle.value = getSummaryTitleColumn(props.configure);
|
|
71
|
-
if (showSummary.value) {
|
|
72
|
-
tableSummaryColumns.value = getSummaryDataColumn(props.configure, "table");
|
|
73
|
-
}
|
|
74
|
-
if (props.configure.props.highOrder.groupField && props.configure.props.highOrder.groupField.length > 0) {
|
|
75
|
-
groupSummaryColumns.value = getSummaryDataColumn(props.configure, "group");
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
onMounted(() => {
|
|
79
|
-
const resultData = getChartDatasFromPage(props.pageContext, props.configure);
|
|
80
|
-
if (resultData) {
|
|
81
|
-
updateChartDatas(resultData);
|
|
82
|
-
} else {
|
|
83
|
-
if (props.configure.props.dataOrigin.dataSource === "variable") {
|
|
84
|
-
watchVariableDataChange();
|
|
85
|
-
const tmpTableData2 = getValueFromVariable(
|
|
86
|
-
props.pageContext.entity,
|
|
87
|
-
props.configure.props.dataOrigin.variable
|
|
88
|
-
);
|
|
89
|
-
if (tmpTableData2) {
|
|
90
|
-
loadTable(tmpTableData2, resultData);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, openBlock as a, createElementBlock as i, normalizeStyle as u, unref as p, normalizeClass as l, withDirectives as s, createVNode as c, vShow as g, withCtx as f, Fragment as m, renderList as d, createBlock as h, createCommentVNode as v, h as y } from "vue";
|
|
2
|
+
import C from "../common/common-chart-header.vue.js";
|
|
3
|
+
import { getSizeConfig as b, getChartDatasFromPage as x, getValueFromVariable as O, isPromise as S, setValueForVariableName as w, updateChartDatasourcesByComponent as j, caculateShowCondition as F } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { getCustomFunc as k } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import E from "./group-column.vue.js";
|
|
6
|
+
import I from "./normal-column.vue.js";
|
|
7
|
+
import R from "./table-pageination.vue.js";
|
|
8
|
+
import { getSummaryTitleColumn as $, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, summaryStatistics as P, replacePlaceholders as K, getHeaderCellStyleUtil as N, getRowStyleUtil as A, getCellStyleUtil as J, getIndexColumn as U, formatColContent as V } from "./chart-table-util.js";
|
|
9
|
+
import { deepCopy as G } from "../../../../utils/common-util.js";
|
|
10
|
+
const L = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: L2 }) {
|
|
11
|
+
var _a;
|
|
12
|
+
const q = e2, B = q.configure.runtime ? q.configure.runtime : {}, M = B.style, Q = B.class, W = B.dataConfig, X = B.headerInfo ? B.headerInfo : {}, Y = o(null), Z = o(B.props.isEnableGroupHeader), ee = o([]), oe = o([]), ne = o([]), re = o({}), te = o(false), ae = o({}), ie = o({}), ue = o({}), pe = [], le = o({}), se = o({}), ce = o(null), ge = o(0);
|
|
13
|
+
let fe, me = [];
|
|
14
|
+
q.configure.props.modelCustom || (Z.value ? ne.value = q.configure.props.groupHeaders : oe.value = q.configure.items, (_a = q.configure.items) == null ? void 0 : _a.forEach((e3) => {
|
|
15
|
+
re.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (le.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (se.value[e3.props.base.prop] = e3.formula);
|
|
16
|
+
})), te.value = q.configure.props.base.showSummary, (te.value || q.configure.props.highOrder.groupField && q.configure.props.highOrder.groupField.length > 0) && (ae.value = $(q.configure), te.value && (ie.value = H(q.configure, "table")), q.configure.props.highOrder.groupField && q.configure.props.highOrder.groupField.length > 0 && (ue.value = H(q.configure, "group")));
|
|
17
|
+
let de = b(q.pageContext, q.configure);
|
|
18
|
+
function he() {
|
|
19
|
+
const e3 = q.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
|
|
20
|
+
r(() => o2.reduce((e4, o3) => e4[o3], q.pageContext.entity), (e4) => {
|
|
21
|
+
e4 ? ye(JSON.parse(JSON.stringify(e4)), null) : (ee.value = [], q.configure.props.modelCustom ? Re(null) : Z.value ? ne.value = q.configure.props.groupHeaders : oe.value = q.configure.items);
|
|
94
22
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
resultData = [];
|
|
114
|
-
}
|
|
115
|
-
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
116
|
-
if (!resultData) {
|
|
117
|
-
resultData = {};
|
|
118
|
-
}
|
|
119
|
-
if (resultData.hasRender) {
|
|
120
|
-
resultData.hasRender = true;
|
|
121
|
-
console.log("重复更新!", resultData);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
updateTable(resultData);
|
|
125
|
-
resultData.hasRender = true;
|
|
126
|
-
if (dataConfig) {
|
|
127
|
-
dataConfig.autoRefresh = false;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
function updateTable(resultData) {
|
|
131
|
-
setCustomColumns(resultData);
|
|
132
|
-
if (props.configure.props.dataOrigin.dataSource === "service" && resultData.result) {
|
|
133
|
-
tmpTableData = resultData.result[props.configure.props.dataOrigin.service.serviceDataField];
|
|
134
|
-
} else if (props.configure.props.dataOrigin.dataSource === "variable") {
|
|
135
|
-
watchVariableDataChange();
|
|
136
|
-
tmpTableData = getValueFromVariable(
|
|
137
|
-
props.pageContext.entity,
|
|
138
|
-
props.configure.props.dataOrigin.variable
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
if (tmpTableData) {
|
|
142
|
-
loadTable(tmpTableData, resultData);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function loadTable(tmpTableData2, resultData) {
|
|
146
|
-
var _a2;
|
|
147
|
-
if (enableTransition("rowToColumn")) {
|
|
148
|
-
tmpTableData2 = rowDataToColumn(tmpTableData2, props.configure);
|
|
149
|
-
if (!isEnableGroupHeader.value) {
|
|
150
|
-
const updatedColumnConfig = updateColumnConfig(
|
|
151
|
-
tableColumnsConfig.value,
|
|
152
|
-
tmpTableData2,
|
|
153
|
-
props.configure.props.dataOrigin.rowToColumn.titleColumns,
|
|
154
|
-
props.configure.props.dataOrigin.rowToColumn.dataColumns
|
|
155
|
-
);
|
|
156
|
-
tableColumnsConfig.value = updatedColumnConfig;
|
|
157
|
-
}
|
|
158
|
-
} else if (enableTransition("columnToRow")) {
|
|
159
|
-
if (!isEnableGroupHeader.value) {
|
|
160
|
-
tableColumnsConfig.value = getColumnToRowTableConfig(props.configure);
|
|
161
|
-
}
|
|
162
|
-
tmpTableData2 = colDataToRow(tmpTableData2, props.configure);
|
|
163
|
-
}
|
|
164
|
-
if (props.configure.props.dataOrigin.dataFormatting) {
|
|
165
|
-
const func = getCustomFunc(props.pageContext, props.configure.props.dataOrigin.dataFormatting);
|
|
166
|
-
if (func) {
|
|
167
|
-
const resultValue = func.apply(func, [{ tableData: tmpTableData2 }]);
|
|
168
|
-
if (resultValue) {
|
|
169
|
-
tmpTableData2 = resultValue;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (Object.keys(dataFormulaMapping.value).length > 0 && tmpTableData2 && tmpTableData2.length > 0) {
|
|
174
|
-
computeFormula(dataFormulaMapping.value, tmpTableData2, props.pageContext.entity);
|
|
175
|
-
}
|
|
176
|
-
if ((_a2 = props.configure.pageination) == null ? void 0 : _a2.enable) {
|
|
177
|
-
tableDataPageination(resultData);
|
|
178
|
-
} else {
|
|
179
|
-
tableData.value = tmpTableData2;
|
|
180
|
-
}
|
|
181
|
-
if (props.configure.props.highOrder.groupField && props.configure.props.highOrder.groupField.length > 0) {
|
|
182
|
-
const groupField = props.configure.props.highOrder.groupField;
|
|
183
|
-
tableData.value = groupAndAddTotals(tableData.value, groupField);
|
|
184
|
-
}
|
|
185
|
-
pushTableIndexColumn(tableColumnsConfig.value);
|
|
186
|
-
}
|
|
187
|
-
function enableTransition(type) {
|
|
188
|
-
return props.configure.props.dataOrigin.transition === type && props.configure.props.dataOrigin.groupField && props.configure.props.dataOrigin.groupField.length > 0 && props.configure.props.dataOrigin[type].titleColumns && props.configure.props.dataOrigin[type].titleColumns.length > 0 && props.configure.props.dataOrigin[type].dataColumns && props.configure.props.dataOrigin[type].dataColumns.length > 0;
|
|
189
|
-
}
|
|
190
|
-
function getHeaderCellStyle(data) {
|
|
191
|
-
const cellTitleStyle = columnStyleSourceConfig.value[data.column.property] ? columnStyleSourceConfig.value[data.column.property].titleStyle : null;
|
|
192
|
-
const rowTitleStyle = runtimeStyle == null ? void 0 : runtimeStyle.titleStyle;
|
|
193
|
-
return getHeaderCellStyleUtil(
|
|
194
|
-
data,
|
|
195
|
-
{ cellTitleStyle, titleStyle: rowTitleStyle },
|
|
196
|
-
props
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
function getRowStyle(data) {
|
|
200
|
-
return getRowStyleUtil(data, groupSummaryDataRowIndex, props);
|
|
201
|
-
}
|
|
202
|
-
function getCellStyle(data) {
|
|
203
|
-
const cellStyles = columnStyleSourceConfig.value[data.column.property] ? columnStyleSourceConfig.value[data.column.property].cellStyle : null;
|
|
204
|
-
return getCellStyleUtil(data, cellStyles, props);
|
|
205
|
-
}
|
|
206
|
-
const getSummaries = (param) => {
|
|
207
|
-
const { columns, data } = param;
|
|
208
|
-
const sums = [];
|
|
209
|
-
columns.forEach((column, index) => {
|
|
210
|
-
if (tableSummaryTitle.value[column.property]) {
|
|
211
|
-
const label = tableSummaryTitle.value[column.property].label;
|
|
212
|
-
sums[index] = h("div", {}, [replacePlaceholders(label, data)]);
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
if (tableSummaryColumns.value[column.property]) {
|
|
216
|
-
const scientificData = data.filter((item, index2) => !groupSummaryDataRowIndex.includes(index2));
|
|
217
|
-
sums[index] = summaryStatistics(
|
|
218
|
-
tableSummaryColumns.value[column.property],
|
|
219
|
-
scientificData,
|
|
220
|
-
column.property,
|
|
221
|
-
props.pageContext
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
return sums;
|
|
226
|
-
};
|
|
227
|
-
function spanMethod({ row, column, rowIndex, columnIndex }) {
|
|
228
|
-
const property = column.property;
|
|
229
|
-
const highOrder = props.configure.props.highOrder;
|
|
230
|
-
if (highOrder.scopeFunc) {
|
|
231
|
-
const func = getCustomFunc(props.pageContext, highOrder.scopeFunc);
|
|
232
|
-
if (func) {
|
|
233
|
-
const resultValue = func.apply(func, [
|
|
234
|
-
{ tableData: tableData.value, row, column, rowIndex, columnIndex }
|
|
235
|
-
]);
|
|
236
|
-
if (resultValue) {
|
|
237
|
-
return resultValue;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
if (highOrder && highOrder.mergeColumn) ;
|
|
242
|
-
if (highOrder && highOrder.mergeRow && highOrder.mergeRow.includes(property)) {
|
|
243
|
-
if (rowIndex === 0) {
|
|
244
|
-
return {
|
|
245
|
-
rowspan: tableData.value.length,
|
|
246
|
-
colspan: 1
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
function updateColumnConfig(columnConfig, pivotedData, columnFields, valueFields) {
|
|
253
|
-
const updatedConfig = [...columnConfig].filter(
|
|
254
|
-
(item) => !columnFields.includes(item.props.base.prop) && !valueFields.includes(item.props.base.prop)
|
|
255
|
-
);
|
|
256
|
-
const valueFieldsRegex = new RegExp(`(${valueFields.join("|")})$`);
|
|
257
|
-
const columnCombinations = /* @__PURE__ */ new Set();
|
|
258
|
-
pivotedData.forEach((record) => {
|
|
259
|
-
Object.keys(record).forEach((key) => {
|
|
260
|
-
if (valueFields.some((valueField) => key.includes(valueField))) {
|
|
261
|
-
const parts = key.split(valueFieldsRegex);
|
|
262
|
-
const combination = parts[0];
|
|
263
|
-
columnCombinations.add(combination);
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
columnCombinations.forEach((combination) => {
|
|
268
|
-
valueFields.forEach((valueField) => {
|
|
269
|
-
var _a2;
|
|
270
|
-
const name = (_a2 = tableColumnsConfig.value.find((item) => item.props.base.prop === valueField)) == null ? void 0 : _a2.props.base.name;
|
|
271
|
-
const newConfigItem = {
|
|
272
|
-
uuid: (/* @__PURE__ */ new Date()).getTime(),
|
|
273
|
-
// 生成新的UUID
|
|
274
|
-
name: "",
|
|
275
|
-
props: {
|
|
276
|
-
base: {
|
|
277
|
-
prop: `${combination}${valueField}`,
|
|
278
|
-
name: `${combination}${name}`,
|
|
279
|
-
displayOrder: updatedConfig.length + 1,
|
|
280
|
-
// 更新显示顺序
|
|
281
|
-
sortable: true,
|
|
282
|
-
headerAlign: "center",
|
|
283
|
-
align: "center",
|
|
284
|
-
fixed: false,
|
|
285
|
-
visible: true,
|
|
286
|
-
dataType: typeof pivotedData[0][`${combination}${valueField}`] === "number" ? "number" : "string"
|
|
287
|
-
},
|
|
288
|
-
format: {},
|
|
289
|
-
size: {
|
|
290
|
-
pc: {}
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
style: {},
|
|
294
|
-
componentIndex: 0,
|
|
295
|
-
// 根据实际情况设置
|
|
296
|
-
runtime: {
|
|
297
|
-
common: {
|
|
298
|
-
class: "",
|
|
299
|
-
style: {
|
|
300
|
-
pc_style: {},
|
|
301
|
-
pc_class: ""
|
|
302
|
-
}
|
|
23
|
+
}
|
|
24
|
+
function ve(e3) {
|
|
25
|
+
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
|
|
26
|
+
Re(e4), "service" === q.configure.props.dataOrigin.dataSource && e4.result ? me = e4.result[q.configure.props.dataOrigin.service.serviceDataField] : "variable" === q.configure.props.dataOrigin.dataSource && (he(), me = O(q.pageContext.entity, q.configure.props.dataOrigin.variable));
|
|
27
|
+
me && ye(me, e4);
|
|
28
|
+
}(e3), e3.hasRender = true, W && (W.autoRefresh = false));
|
|
29
|
+
}
|
|
30
|
+
function ye(e3, o2) {
|
|
31
|
+
var _a2;
|
|
32
|
+
if (Ce("rowToColumn")) {
|
|
33
|
+
if (e3 = T(e3, q.configure), !Z.value) {
|
|
34
|
+
const o3 = function(e4, o4, n2, r2) {
|
|
35
|
+
const t2 = [...e4].filter((e5) => !n2.includes(e5.props.base.prop) && !r2.includes(e5.props.base.prop)), a2 = new RegExp(`(${r2.join("|")})$`), i2 = /* @__PURE__ */ new Set();
|
|
36
|
+
return o4.forEach((e5) => {
|
|
37
|
+
Object.keys(e5).forEach((e6) => {
|
|
38
|
+
if (r2.some((o5) => e6.includes(o5))) {
|
|
39
|
+
const o5 = e6.split(a2)[0];
|
|
40
|
+
i2.add(o5);
|
|
303
41
|
}
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
updatedConfig.push(newConfigItem);
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
return updatedConfig;
|
|
310
|
-
}
|
|
311
|
-
function groupAndAddTotals(data, groupFields) {
|
|
312
|
-
var _a2, _b;
|
|
313
|
-
if (groupSummaryColumns.value.length === 0) {
|
|
314
|
-
return data;
|
|
315
|
-
}
|
|
316
|
-
const result = [];
|
|
317
|
-
const groupColumns = (_a2 = props.configure.items) == null ? void 0 : _a2.filter(
|
|
318
|
-
(item) => groupFields.includes(item.props.base.prop)
|
|
319
|
-
);
|
|
320
|
-
const summaryColumns = (_b = props.configure.items) == null ? void 0 : _b.filter(
|
|
321
|
-
(item) => item.props.base.groupSummary === true
|
|
322
|
-
);
|
|
323
|
-
const groupedData = {};
|
|
324
|
-
data.forEach((item) => {
|
|
325
|
-
const key = groupFields.map((field) => item[field]).join("|");
|
|
326
|
-
if (!groupedData[key]) {
|
|
327
|
-
groupedData[key] = [];
|
|
328
|
-
}
|
|
329
|
-
groupedData[key].push(item);
|
|
330
|
-
});
|
|
331
|
-
const groupResult = Object.values(groupedData);
|
|
332
|
-
for (let i = 0; i < groupResult.length; i++) {
|
|
333
|
-
const group = groupResult[i];
|
|
334
|
-
const total2 = {};
|
|
335
|
-
summaryColumns == null ? void 0 : summaryColumns.forEach((column) => {
|
|
336
|
-
const prop = column.props.base.prop;
|
|
337
|
-
const res = summaryStatistics(groupSummaryColumns.value[prop], group, prop, props.pageContext);
|
|
338
|
-
total2[prop] = res;
|
|
339
|
-
});
|
|
340
|
-
result.push(...group);
|
|
341
|
-
groupColumns == null ? void 0 : groupColumns.forEach((column) => {
|
|
342
|
-
const prop = column.props.base.prop;
|
|
343
|
-
total2[prop] = replacePlaceholders(column.props.base.summaryTitle, group[0]);
|
|
344
|
-
});
|
|
345
|
-
result.push(total2);
|
|
346
|
-
groupSummaryDataRowIndex.push(result.length - 1);
|
|
347
|
-
}
|
|
348
|
-
return result;
|
|
349
|
-
}
|
|
350
|
-
function pushTableIndexColumn(tableColumnsConfig2) {
|
|
351
|
-
if (props.configure.props.base.showIndex && tableColumnsConfig2.findIndex((item) => item.props.base.prop === "$index") === -1) {
|
|
352
|
-
const indexColumn = getIndexColumn();
|
|
353
|
-
if (indexColumn) {
|
|
354
|
-
tableColumnsConfig2.unshift(indexColumn);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
function tableDataPageination(resultData) {
|
|
359
|
-
if (props.configure.pageination.type === "frontend") {
|
|
360
|
-
total.value = tmpTableData.length;
|
|
361
|
-
frontendPageination(1, props.configure.pageination.pageSize);
|
|
362
|
-
} else if (props.configure.pageination.type === "backend") {
|
|
363
|
-
tableData.value = tmpTableData;
|
|
364
|
-
if (props.configure.pageination.totalFrom) {
|
|
365
|
-
total.value = resultData.result[props.configure.pageination.totalFrom];
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function pageChange(currentPage, pageSize) {
|
|
370
|
-
if (props.configure.pageination.type === "frontend") {
|
|
371
|
-
frontendPageination(currentPage, pageSize);
|
|
372
|
-
} else {
|
|
373
|
-
backendPageination(currentPage, pageSize);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
function pageSizeChange(currentPage, pageSize) {
|
|
377
|
-
if (props.configure.pageination.type === "frontend") {
|
|
378
|
-
frontendPageination(currentPage, pageSize);
|
|
379
|
-
} else {
|
|
380
|
-
backendPageination(currentPage, pageSize);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
function frontendPageination(currentPage, pageSize) {
|
|
384
|
-
if (tmpTableData) {
|
|
385
|
-
tableData.value = tmpTableData.slice((currentPage - 1) * pageSize, currentPage * pageSize);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function backendPageination(currentPage, pageSize) {
|
|
389
|
-
if (props.configure.pageination.currentPageSet) {
|
|
390
|
-
setValueForVariableName(
|
|
391
|
-
props.pageContext.entity,
|
|
392
|
-
props.configure.pageination.currentPageSet,
|
|
393
|
-
currentPage
|
|
394
|
-
);
|
|
395
|
-
}
|
|
396
|
-
if (props.configure.pageination.pageSizeSet) {
|
|
397
|
-
setValueForVariableName(
|
|
398
|
-
props.pageContext.entity,
|
|
399
|
-
props.configure.pageination.pageSizeSet,
|
|
400
|
-
pageSize
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
updateChartDatasourcesByComponent(props.pageContext, props.configure.uuid);
|
|
404
|
-
}
|
|
405
|
-
function calacShowColumn(column) {
|
|
406
|
-
const showCondition = column.showCondition;
|
|
407
|
-
return caculateShowCondition(props.pageContext, showCondition);
|
|
408
|
-
}
|
|
409
|
-
function resetTableColumns() {
|
|
410
|
-
console.log("重置统计表格列配置");
|
|
411
|
-
if (!props.configure.props.modelCustom) {
|
|
412
|
-
if (!isEnableGroupHeader.value) {
|
|
413
|
-
tableColumnsConfig.value = props.configure.items;
|
|
414
|
-
} else {
|
|
415
|
-
groupColumnsConfig.value = props.configure.props.groupHeaders;
|
|
416
|
-
}
|
|
417
|
-
} else {
|
|
418
|
-
setCustomColumns(null);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
function setCustomColumns(resultData) {
|
|
422
|
-
if (props.configure.props.modelCustom) {
|
|
423
|
-
const func = getCustomFunc(props.pageContext, props.configure.props.modelCustom);
|
|
424
|
-
if (func) {
|
|
425
|
-
const resultValue = func.apply(func, [
|
|
426
|
-
{
|
|
427
|
-
pageContext: props.pageContext,
|
|
428
|
-
configureObj: props.configure,
|
|
429
|
-
value: resultData
|
|
430
|
-
}
|
|
431
|
-
]);
|
|
432
|
-
if (isPromise(resultValue)) {
|
|
433
|
-
resultValue.then((res) => {
|
|
434
|
-
tableColumnsConfig.value = res.columns;
|
|
435
42
|
});
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
43
|
+
}), i2.forEach((e5) => {
|
|
44
|
+
r2.forEach((n3) => {
|
|
45
|
+
var _a3;
|
|
46
|
+
const r3 = (_a3 = oe.value.find((e6) => e6.props.base.prop === n3)) == null ? void 0 : _a3.props.base.name, a3 = { uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: `${e5}${n3}`, name: `${e5}${r3}`, displayOrder: t2.length + 1, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "number" == typeof o4[0][`${e5}${n3}`] ? "number" : "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } };
|
|
47
|
+
t2.push(a3);
|
|
48
|
+
});
|
|
49
|
+
}), t2;
|
|
50
|
+
}(oe.value, e3, q.configure.props.dataOrigin.rowToColumn.titleColumns, q.configure.props.dataOrigin.rowToColumn.dataColumns);
|
|
51
|
+
oe.value = o3;
|
|
52
|
+
}
|
|
53
|
+
} else
|
|
54
|
+
Ce("columnToRow") && (Z.value || (oe.value = _(q.configure)), e3 = z(e3, q.configure));
|
|
55
|
+
if (q.configure.props.dataOrigin.dataFormatting) {
|
|
56
|
+
const o3 = k(q.pageContext, q.configure.props.dataOrigin.dataFormatting);
|
|
57
|
+
if (o3) {
|
|
58
|
+
const n2 = o3.apply(o3, [{ tableData: e3 }]);
|
|
59
|
+
n2 && (e3 = n2);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (Object.keys(se.value).length > 0 && e3 && e3.length > 0 && D(se.value, e3, q.pageContext.entity), ((_a2 = q.configure.pageination) == null ? void 0 : _a2.enable) ? function(e4) {
|
|
63
|
+
"frontend" === q.configure.pageination.type ? (ge.value = me.length, ke(1, q.configure.pageination.pageSize)) : "backend" === q.configure.pageination.type && (ee.value = me, q.configure.pageination.totalFrom && (ge.value = e4.result[q.configure.pageination.totalFrom]));
|
|
64
|
+
}(o2) : ee.value = e3, q.configure.props.highOrder.groupField && q.configure.props.highOrder.groupField.length > 0) {
|
|
65
|
+
const e4 = q.configure.props.highOrder.groupField;
|
|
66
|
+
ee.value = function(e5, o3) {
|
|
67
|
+
var _a3, _b;
|
|
68
|
+
if (0 === ue.value.length)
|
|
69
|
+
return e5;
|
|
70
|
+
const n2 = [], r2 = (_a3 = q.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = q.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), a2 = {};
|
|
71
|
+
e5.forEach((e6) => {
|
|
72
|
+
const n3 = o3.map((o4) => e6[o4]).join("|");
|
|
73
|
+
a2[n3] || (a2[n3] = []), a2[n3].push(e6);
|
|
74
|
+
});
|
|
75
|
+
const i2 = Object.values(a2);
|
|
76
|
+
for (let e6 = 0; e6 < i2.length; e6++) {
|
|
77
|
+
const o4 = i2[e6], a3 = {};
|
|
78
|
+
t2 == null ? void 0 : t2.forEach((e7) => {
|
|
79
|
+
const n3 = e7.props.base.prop, r3 = P(ue.value[n3], o4, n3, q.pageContext);
|
|
80
|
+
a3[n3] = r3;
|
|
81
|
+
}), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
|
|
82
|
+
const n3 = e7.props.base.prop;
|
|
83
|
+
a3[n3] = K(e7.props.base.summaryTitle, o4[0]);
|
|
84
|
+
}), n2.push(a3), pe.push(n2.length - 1);
|
|
85
|
+
}
|
|
86
|
+
return n2;
|
|
87
|
+
}(ee.value, e4);
|
|
88
|
+
}
|
|
89
|
+
!function(e4) {
|
|
90
|
+
if (q.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
|
|
91
|
+
const o3 = U();
|
|
92
|
+
o3 && e4.unshift(o3);
|
|
93
|
+
}
|
|
94
|
+
}(oe.value);
|
|
95
|
+
}
|
|
96
|
+
function Ce(e3) {
|
|
97
|
+
return q.configure.props.dataOrigin.transition === e3 && q.configure.props.dataOrigin.groupField && q.configure.props.dataOrigin.groupField.length > 0 && q.configure.props.dataOrigin[e3].titleColumns && q.configure.props.dataOrigin[e3].titleColumns.length > 0 && q.configure.props.dataOrigin[e3].dataColumns && q.configure.props.dataOrigin[e3].dataColumns.length > 0;
|
|
98
|
+
}
|
|
99
|
+
function be(e3) {
|
|
100
|
+
const o2 = le.value[e3.column.property] ? le.value[e3.column.property].titleStyle : null, n2 = M == null ? void 0 : M.titleStyle;
|
|
101
|
+
return N(e3, { cellTitleStyle: o2, titleStyle: n2 }, q);
|
|
102
|
+
}
|
|
103
|
+
function xe(e3) {
|
|
104
|
+
return A(e3, pe, q);
|
|
105
|
+
}
|
|
106
|
+
function Oe(e3) {
|
|
107
|
+
const o2 = le.value[e3.column.property] ? le.value[e3.column.property].cellStyle : null;
|
|
108
|
+
return J(e3, o2, q);
|
|
109
|
+
}
|
|
110
|
+
de && de.maxHeight && (fe = de.maxHeight), !fe && de && de.fixHeight && (fe = de.fixHeight), fe && (fe = Number(fe + "")), n(() => {
|
|
111
|
+
const e3 = x(q.pageContext, q.configure);
|
|
112
|
+
if (e3)
|
|
113
|
+
ve(e3);
|
|
114
|
+
else if ("variable" === q.configure.props.dataOrigin.dataSource) {
|
|
115
|
+
he();
|
|
116
|
+
const o2 = O(q.pageContext.entity, q.configure.props.dataOrigin.variable);
|
|
117
|
+
o2 && ye(o2, e3);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const Se = (e3) => {
|
|
121
|
+
const { columns: o2, data: n2 } = e3, r2 = [];
|
|
122
|
+
return o2.forEach((e4, o3) => {
|
|
123
|
+
if (ae.value[e4.property]) {
|
|
124
|
+
const t2 = ae.value[e4.property].label;
|
|
125
|
+
r2[o3] = y("div", {}, [K(t2, n2)]);
|
|
126
|
+
} else if (ie.value[e4.property]) {
|
|
127
|
+
const t2 = n2.filter((e5, o4) => !pe.includes(o4));
|
|
128
|
+
r2[o3] = P(ie.value[e4.property], t2, e4.property, q.pageContext);
|
|
129
|
+
}
|
|
130
|
+
}), r2;
|
|
131
|
+
};
|
|
132
|
+
function we({ row: e3, column: o2, rowIndex: n2, columnIndex: r2 }) {
|
|
133
|
+
const t2 = o2.property, a2 = q.configure.props.highOrder;
|
|
134
|
+
if (a2.scopeFunc) {
|
|
135
|
+
const t3 = k(q.pageContext, a2.scopeFunc);
|
|
136
|
+
if (t3) {
|
|
137
|
+
const a3 = t3.apply(t3, [{ tableData: ee.value, row: e3, column: o2, rowIndex: n2, columnIndex: r2 }]);
|
|
138
|
+
if (a3)
|
|
139
|
+
return a3;
|
|
140
|
+
}
|
|
141
|
+
} else if (a2 && a2.mergeColumn, a2 && a2.mergeRow && a2.mergeRow.includes(t2) && 0 === n2)
|
|
142
|
+
return { rowspan: ee.value.length, colspan: 1 };
|
|
143
|
+
}
|
|
144
|
+
function je(e3, o2) {
|
|
145
|
+
"frontend" === q.configure.pageination.type ? ke(e3, o2) : Ee(e3, o2);
|
|
146
|
+
}
|
|
147
|
+
function Fe(e3, o2) {
|
|
148
|
+
"frontend" === q.configure.pageination.type ? ke(e3, o2) : Ee(e3, o2);
|
|
149
|
+
}
|
|
150
|
+
function ke(e3, o2) {
|
|
151
|
+
me && (ee.value = me.slice((e3 - 1) * o2, e3 * o2));
|
|
152
|
+
}
|
|
153
|
+
function Ee(e3, o2) {
|
|
154
|
+
q.configure.pageination.currentPageSet && w(q.pageContext.entity, q.configure.pageination.currentPageSet, e3), q.configure.pageination.pageSizeSet && w(q.pageContext.entity, q.configure.pageination.pageSizeSet, o2), j(q.pageContext, q.configure.uuid);
|
|
155
|
+
}
|
|
156
|
+
function Ie(e3) {
|
|
157
|
+
const o2 = e3.showCondition;
|
|
158
|
+
return F(q.pageContext, o2);
|
|
159
|
+
}
|
|
160
|
+
function Re(e3) {
|
|
161
|
+
if (q.configure.props.modelCustom) {
|
|
162
|
+
const o2 = k(q.pageContext, q.configure.props.modelCustom);
|
|
163
|
+
if (o2) {
|
|
164
|
+
const n2 = o2.apply(o2, [{ pageContext: q.pageContext, configureObj: q.configure, value: e3 }]);
|
|
165
|
+
S(n2) ? n2.then((e4) => {
|
|
166
|
+
oe.value = e4.columns;
|
|
167
|
+
}) : oe.value = n2.columns;
|
|
440
168
|
}
|
|
441
169
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
170
|
+
}
|
|
171
|
+
function $e(e3, o2, n2) {
|
|
172
|
+
e3.forEach((e4) => {
|
|
173
|
+
const r2 = e4.props.base.prop, t2 = e4.props.base.name;
|
|
174
|
+
let a2 = { name: r2, label: t2, i18nKey: t2 };
|
|
175
|
+
e4.children && e4.childern.length > 0 && (a2.children = [], $e(e4.children, a2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(a2);
|
|
447
176
|
});
|
|
448
|
-
return (_ctx, _cache) => {
|
|
449
|
-
const _component_el_table = resolveComponent("el-table");
|
|
450
|
-
return openBlock(), createElementBlock("div", {
|
|
451
|
-
style: normalizeStyle(unref(runtimeStyle)),
|
|
452
|
-
class: normalizeClass([unref(runtimeClass), "amb-widget-chart"]),
|
|
453
|
-
ref: "thisRef"
|
|
454
|
-
}, [
|
|
455
|
-
withDirectives(createVNode(_sfc_main$1, {
|
|
456
|
-
ref_key: "headerRef",
|
|
457
|
-
ref: headerRef,
|
|
458
|
-
headerInfo: unref(headerInfo),
|
|
459
|
-
configure: __props.configure,
|
|
460
|
-
pageContext: __props.pageContext
|
|
461
|
-
}, null, 8, ["headerInfo", "configure", "pageContext"]), [
|
|
462
|
-
[vShow, unref(headerInfo).showHeader]
|
|
463
|
-
]),
|
|
464
|
-
createVNode(_component_el_table, {
|
|
465
|
-
ref_key: "gridRef",
|
|
466
|
-
ref: gridRef,
|
|
467
|
-
data: tableData.value,
|
|
468
|
-
style: { "width": "100%" },
|
|
469
|
-
"header-cell-style": getHeaderCellStyle,
|
|
470
|
-
"row-style": getRowStyle,
|
|
471
|
-
"cell-style": getCellStyle,
|
|
472
|
-
"show-summary": showSummary.value,
|
|
473
|
-
stripe: __props.configure.props.base.stripe,
|
|
474
|
-
"summary-method": getSummaries,
|
|
475
|
-
"span-method": spanMethod
|
|
476
|
-
}, {
|
|
477
|
-
default: withCtx(() => [
|
|
478
|
-
isEnableGroupHeader.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(groupColumnsConfig.value, (item, index) => {
|
|
479
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
480
|
-
!item.isLeaf ? (openBlock(), createBlock(_sfc_main$2, {
|
|
481
|
-
key: 0,
|
|
482
|
-
configure: __props.configure,
|
|
483
|
-
pageContext: __props.pageContext,
|
|
484
|
-
groupColumn: item,
|
|
485
|
-
columnsConfigKeyValues: columnsConfigKeyValues.value
|
|
486
|
-
}, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"])) : calacShowColumn(columnsConfigKeyValues.value[item.columnUuid]) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
487
|
-
key: 1,
|
|
488
|
-
configure: __props.configure,
|
|
489
|
-
pageContext: __props.pageContext,
|
|
490
|
-
column: columnsConfigKeyValues.value[item.columnUuid]
|
|
491
|
-
}, null, 8, ["configure", "pageContext", "column"])) : createCommentVNode("", true)
|
|
492
|
-
], 64);
|
|
493
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(tableColumnsConfig.value, (column, index) => {
|
|
494
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
495
|
-
calacShowColumn(column) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
496
|
-
key: 0,
|
|
497
|
-
column,
|
|
498
|
-
configure: __props.configure,
|
|
499
|
-
pageContext: __props.pageContext
|
|
500
|
-
}, null, 8, ["column", "configure", "pageContext"])) : createCommentVNode("", true)
|
|
501
|
-
], 64);
|
|
502
|
-
}), 128))
|
|
503
|
-
]),
|
|
504
|
-
_: 1
|
|
505
|
-
}, 8, ["data", "show-summary", "stripe"]),
|
|
506
|
-
__props.configure.pageination && __props.configure.pageination.enable ? (openBlock(), createBlock(_sfc_main$4, {
|
|
507
|
-
key: 0,
|
|
508
|
-
configure: __props.configure,
|
|
509
|
-
"table-data": tableData.value,
|
|
510
|
-
total: total.value,
|
|
511
|
-
onPageChange: pageChange,
|
|
512
|
-
onPageSizeChange: pageSizeChange
|
|
513
|
-
}, null, 8, ["configure", "table-data", "total"])) : createCommentVNode("", true)
|
|
514
|
-
], 6);
|
|
515
|
-
};
|
|
516
177
|
}
|
|
517
|
-
|
|
178
|
+
return L2({ updateChartDatas: ve, exportChart: function() {
|
|
179
|
+
let e3 = [], o2 = [];
|
|
180
|
+
o2 = Z.value ? q.configure.props.groupHeaders : q.configure.items;
|
|
181
|
+
let n2 = [];
|
|
182
|
+
$e(o2, e3, n2);
|
|
183
|
+
return { isTable: true, dataArr: function(e4) {
|
|
184
|
+
let o3 = [];
|
|
185
|
+
ee.value && (o3 = G(ee.value), o3.forEach((o4) => {
|
|
186
|
+
e4.forEach((e5) => {
|
|
187
|
+
const n3 = V(o4, e5.props.format, e5, q.pageContext, q.configure);
|
|
188
|
+
o4[e5.props.base.prop] = n3;
|
|
189
|
+
});
|
|
190
|
+
}));
|
|
191
|
+
return o3;
|
|
192
|
+
}(n2), columns: e3 };
|
|
193
|
+
} }), (o2, n2) => {
|
|
194
|
+
const r2 = t("el-table");
|
|
195
|
+
return a(), i("div", { style: u(p(M)), class: l([p(Q), "amb-widget-chart"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Y, headerInfo: p(X), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[g, p(X).showHeader]]), c(r2, { ref_key: "gridRef", ref: ce, data: ee.value, style: { width: "100%" }, "max-height": p(fe), "header-cell-style": be, "row-style": xe, "cell-style": Oe, "show-summary": te.value, stripe: e2.configure.props.base.stripe, "summary-method": Se, "span-method": we }, { default: f(() => [Z.value ? (a(true), i(m, { key: 0 }, d(ne.value, (o3, n3) => (a(), i(m, { key: n3 }, [o3.isLeaf ? Ie(re.value[o3.columnUuid]) ? (a(), h(I, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: re.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : v("", true) : (a(), h(E, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: re.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(m, { key: 1 }, d(oe.value, (o3, n3) => (a(), i(m, { key: n3 }, [Ie(o3) ? (a(), h(I, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : v("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), h(R, { key: 0, configure: e2.configure, "table-data": ee.value, total: ge.value, onPageChange: je, onPageSizeChange: Fe }, null, 8, ["configure", "table-data", "total"])) : v("", true)], 6);
|
|
196
|
+
};
|
|
197
|
+
} });
|
|
518
198
|
export {
|
|
519
|
-
|
|
199
|
+
L as default
|
|
520
200
|
};
|