super-page-runtime 2.1.933 → 2.2.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.
Files changed (183) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/index.d.ts +2 -1
  6. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  7. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
  8. package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
  9. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  10. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  11. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  12. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  13. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  14. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  15. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  16. package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
  17. package/dist/es/components/runtime/utils/common-util.js +76 -153
  18. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  19. package/dist/es/components/runtime/utils/events/event-util.js +343 -727
  20. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  21. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
  22. package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
  23. package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
  24. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  25. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  26. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  27. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  28. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  29. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  30. package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
  31. package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
  32. package/dist/es/components/runtime/utils/page-init-util.js +132 -370
  33. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  34. package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
  35. package/dist/es/components/runtime/utils/page-store.js +8 -12
  36. package/dist/es/components/runtime/utils/store-util.js +9 -13
  37. package/dist/es/components/runtime/utils/store.js +2 -2
  38. package/dist/es/components/runtime/utils/table-utils.js +45 -84
  39. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  40. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  42. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  44. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  46. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  48. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  50. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  51. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  56. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -169
  57. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  58. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
  59. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
  60. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  62. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  64. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  66. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  68. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
  69. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
  70. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  71. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  72. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  73. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
  75. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  76. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  77. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +197 -510
  80. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
  81. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  82. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  83. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
  84. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  85. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
  87. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  88. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  89. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  91. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  93. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  95. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  97. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  99. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  101. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  103. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  105. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  107. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +302 -803
  108. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +249 -594
  110. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  111. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  113. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  115. package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
  116. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  117. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  119. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  120. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  121. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  123. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  124. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  125. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +66 -239
  126. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  127. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
  128. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  129. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  130. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  131. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +51 -173
  132. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  133. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  134. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -249
  136. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  138. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  140. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  141. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  142. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +61 -189
  144. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  145. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +87 -244
  146. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +77 -261
  148. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  150. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  152. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  154. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  155. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  156. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
  157. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
  158. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
  159. package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
  160. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
  161. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  162. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  163. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  164. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  165. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  166. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  167. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  168. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  169. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  170. package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
  171. package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
  172. package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
  173. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
  174. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
  175. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  176. package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
  177. package/dist/es/components/runtime/views/super-page.vue.js +222 -708
  178. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  179. package/dist/es/i18n/langs/cn.js +2 -55
  180. package/dist/es/i18n/langs/en.js +2 -55
  181. package/dist/es/index.d.ts +2 -2
  182. package/dist/es/index.js +6 -4
  183. package/package.json +3 -2
@@ -1,520 +1,207 @@
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 _sfc_main$1 from "../common/common-chart-header.vue.js";
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 _sfc_main$2 from "./group-column.vue.js";
6
- import _sfc_main$3 from "./normal-column.vue.js";
7
- import _sfc_main$4 from "./table-pageination.vue.js";
8
- import { getSummaryTitleColumn, getSummaryDataColumn, rowDataToColumn, getColumnToRowTableConfig, colDataToRow, computeFormula, summaryStatistics, replacePlaceholders, getHeaderCellStyleUtil, getRowStyleUtil, getCellStyleUtil, getIndexColumn } from "./chart-table-util.js";
9
- const _sfc_main = /* @__PURE__ */ defineComponent({
10
- __name: "table-runtime",
11
- props: {
12
- configure: {
13
- type: Object,
14
- default: () => {
15
- return {};
16
- }
17
- },
18
- pageContext: {
19
- type: Object,
20
- default: () => {
21
- return {};
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, createElementBlock as a, openBlock as i, normalizeClass as u, normalizeStyle as p, unref as l, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as m, withCtx as d, Fragment as h, renderList 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 k } from "../../../../utils/page-helper-util.js";
4
+ import { getCustomFunc as E } from "../../../../utils/events/event-util.js";
5
+ import F from "./group-column.vue.js";
6
+ import $ from "./normal-column.vue.js";
7
+ import R from "./table-pageination.vue.js";
8
+ import { getSummaryTitleColumn as H, getSummaryDataColumn as I, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as G, replacePlaceholders as K, getIndexColumn as N, getHeaderCellStyleUtil as J, getRowStyleUtil as U, getCellStyleUtil as V, formatColContent as A } from "./chart-table-util.js";
9
+ import { deepCopy as L } from "../../../../utils/common-util.js";
10
+ const q = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: q2 }) {
11
+ var _a;
12
+ const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ae = o(false), ie = o({}), ue = o({}), pe = o({}), le = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
13
+ let me, de = [];
14
+ B.configure.props.modelCustom || (ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items, (_a = B.configure.items) == null ? void 0 : _a.forEach((e3) => {
15
+ te.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (se.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (ce.value[e3.props.base.prop] = e3.formula);
16
+ })), ae.value = B.configure.props.base.showSummary, (ae.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ie.value = H(B.configure), ae.value && (ue.value = I(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (pe.value = I(B.configure, "group")));
17
+ let he = b(B.pageContext, B.configure);
18
+ function ve() {
19
+ const e3 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
20
+ r(() => o2.reduce((e4, o3) => e4[o3], B.pageContext.entity), (e4) => {
21
+ e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? He(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
94
22
  });
95
- function watchVariableDataChange() {
96
- const match = props.configure.props.dataOrigin.variable.match(/\${(.*?)}/);
97
- const path = match ? match[1].split(".") : [];
98
- watch(
99
- () => path.reduce((obj, key) => obj[key], props.pageContext.entity),
100
- (newVal) => {
101
- console.log("统计表格监听数据变量的变化 newVal:", newVal);
102
- if (newVal) {
103
- loadTable(JSON.parse(JSON.stringify(newVal)), null);
104
- } else {
105
- tableData.value = [];
106
- resetTableColumns();
107
- }
108
- }
109
- );
110
- }
111
- function updateChartDatas(resultData) {
112
- if (!resultData) {
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);
23
+ }
24
+ function ye(e3) {
25
+ e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
26
+ He(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? de = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (ve(), de = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
27
+ de && Ce(de, e4);
28
+ }(e3), e3.hasRender = true, X && (X.autoRefresh = false));
29
+ }
30
+ function Ce(e3, o2) {
31
+ var _a2;
32
+ if (be("rowToColumn")) {
33
+ if (e3 = T(e3, B.configure, ne.value), !ee.value) {
34
+ const o3 = function(e4, o4, n2) {
35
+ const r2 = B.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = B.configure.props.dataOrigin.rowToColumn.dataColumns, a2 = e4.props.dataOrigin.groupField;
36
+ if ((!a2 || 0 === a2.length) && n2.length > 0) {
37
+ const e5 = [];
38
+ return e5.push(P("$GroupColumn", B.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string")), Object.keys(n2[0]).forEach((o5, n3) => {
39
+ if ("$GroupColumn" === o5) return;
40
+ const r3 = P(o5, o5, n3 + 1, "string");
41
+ e5.push(r3);
42
+ }), e5;
264
43
  }
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: ""
44
+ {
45
+ const e5 = [...o4].filter((e6) => !r2.includes(e6.props.base.prop) && !t2.includes(e6.props.base.prop)), a3 = new RegExp(`(${t2.join("|")})$`), i2 = /* @__PURE__ */ new Set();
46
+ return n2.forEach((e6) => {
47
+ Object.keys(e6).forEach((e7) => {
48
+ if (t2.some((o5) => e7.includes(o5))) {
49
+ const o5 = e7.split(a3)[0];
50
+ i2.add(o5);
302
51
  }
303
- }
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
- });
436
- } else {
437
- tableColumnsConfig.value = resultValue.columns;
52
+ });
53
+ }), i2.forEach((o5) => {
54
+ t2.forEach((r3) => {
55
+ var _a3;
56
+ (_a3 = ne.value.find((e6) => e6.props.base.prop === r3)) == null ? void 0 : _a3.props.base.name;
57
+ const t3 = P(`${o5}${r3}`, `${o5}${r3}`, e5.length + 1, "number" == typeof n2[0][`${o5}${r3}`] ? "number" : "string");
58
+ e5.push(t3);
59
+ });
60
+ }), e5;
438
61
  }
439
- }
62
+ }(B.configure, ne.value, e3);
63
+ ne.value = o3;
64
+ }
65
+ } else be("columnToRow") && (ee.value || (ne.value = _(B.configure)), e3 = z(e3, B.configure));
66
+ if (B.configure.props.dataOrigin.dataFormatting) {
67
+ const o3 = E(B.pageContext, B.configure.props.dataOrigin.dataFormatting);
68
+ if (o3) {
69
+ const n2 = o3.apply(o3, [{ tableData: e3 }]);
70
+ n2 && (e3 = n2);
71
+ }
72
+ }
73
+ if (Object.keys(ce.value).length > 0 && e3 && e3.length > 0 && D(ce.value, e3, B.pageContext.entity), ((_a2 = B.configure.pageination) == null ? void 0 : _a2.enable) ? function(e4) {
74
+ "frontend" === B.configure.pageination.type ? (fe.value = de.length, Fe(1, B.configure.pageination.pageSize)) : "backend" === B.configure.pageination.type && (oe.value = de, B.configure.pageination.totalFrom && (fe.value = e4.result[B.configure.pageination.totalFrom]));
75
+ }(o2) : oe.value = e3, B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) {
76
+ const e4 = B.configure.props.highOrder.groupField;
77
+ oe.value = function(e5, o3) {
78
+ var _a3, _b;
79
+ if (0 === pe.value.length) return e5;
80
+ const n2 = [], r2 = (_a3 = B.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = B.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), a2 = {};
81
+ e5.forEach((e6) => {
82
+ const n3 = o3.map((o4) => e6[o4]).join("|");
83
+ a2[n3] || (a2[n3] = []), a2[n3].push(e6);
84
+ });
85
+ const i2 = Object.values(a2);
86
+ for (let e6 = 0; e6 < i2.length; e6++) {
87
+ const o4 = i2[e6], a3 = {};
88
+ t2 == null ? void 0 : t2.forEach((e7) => {
89
+ const n3 = e7.props.base.prop, r3 = G(pe.value[n3], o4, n3, B.pageContext);
90
+ a3[n3] = r3;
91
+ }), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
92
+ const n3 = e7.props.base.prop;
93
+ a3[n3] = K(e7.props.base.summaryTitle, o4[0]);
94
+ }), n2.push(a3), le.push(n2.length - 1);
95
+ }
96
+ return n2;
97
+ }(oe.value, e4);
98
+ }
99
+ !function(e4) {
100
+ if (B.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
101
+ const o3 = N();
102
+ o3 && e4.unshift(o3);
103
+ }
104
+ }(ne.value);
105
+ }
106
+ function be(e3) {
107
+ return B.configure.props.dataOrigin.transition === e3 && B.configure.props.dataOrigin[e3].titleColumns && B.configure.props.dataOrigin[e3].titleColumns.length > 0 && B.configure.props.dataOrigin[e3].dataColumns && B.configure.props.dataOrigin[e3].dataColumns.length > 0;
108
+ }
109
+ function xe(e3) {
110
+ const o2 = se.value[e3.column.property] ? se.value[e3.column.property].titleStyle : null, n2 = Q == null ? void 0 : Q.titleStyle;
111
+ return J(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
112
+ }
113
+ function Oe(e3) {
114
+ return U(e3, le, B);
115
+ }
116
+ function Se(e3) {
117
+ const o2 = se.value[e3.column.property] ? se.value[e3.column.property].cellStyle : null;
118
+ return V(e3, o2, B);
119
+ }
120
+ he && he.maxHeight && (me = he.maxHeight), !me && he && he.fixHeight && (me = he.fixHeight), me && (me = Number(me + "")), n(() => {
121
+ const e3 = x(B.pageContext, B.configure);
122
+ if (e3) ye(e3);
123
+ else if ("variable" === B.configure.props.dataOrigin.dataSource) {
124
+ ve();
125
+ const o2 = O(B.pageContext.entity, B.configure.props.dataOrigin.variable);
126
+ o2 && Ce(o2, e3);
127
+ }
128
+ });
129
+ const we = (e3) => {
130
+ const { columns: o2, data: n2 } = e3, r2 = [];
131
+ return o2.forEach((e4, o3) => {
132
+ if (ie.value[e4.property]) {
133
+ const t2 = ie.value[e4.property].label;
134
+ r2[o3] = y("div", {}, [K(t2, n2)]);
135
+ } else if (ue.value[e4.property]) {
136
+ const t2 = n2.filter((e5, o4) => !le.includes(o4));
137
+ r2[o3] = G(ue.value[e4.property], t2, e4.property, B.pageContext);
138
+ }
139
+ }), r2;
140
+ };
141
+ function je({ row: e3, column: o2, rowIndex: n2, columnIndex: r2 }) {
142
+ const t2 = o2.property, a2 = B.configure.props.highOrder;
143
+ if (a2.scopeFunc) {
144
+ const t3 = E(B.pageContext, a2.scopeFunc);
145
+ if (t3) {
146
+ const a3 = t3.apply(t3, [{ tableData: oe.value, row: e3, column: o2, rowIndex: n2, columnIndex: r2 }]);
147
+ if (a3) return a3;
148
+ }
149
+ } else if (a2 && a2.mergeColumn, a2 && a2.mergeRow && a2.mergeRow.includes(t2) && 0 === n2) return { rowspan: oe.value.length, colspan: 1 };
150
+ }
151
+ function ke(e3, o2) {
152
+ "frontend" === B.configure.pageination.type ? Fe(e3, o2) : $e(e3, o2);
153
+ }
154
+ function Ee(e3, o2) {
155
+ "frontend" === B.configure.pageination.type ? Fe(e3, o2) : $e(e3, o2);
156
+ }
157
+ function Fe(e3, o2) {
158
+ de && (oe.value = de.slice((e3 - 1) * o2, e3 * o2));
159
+ }
160
+ function $e(e3, o2) {
161
+ B.configure.pageination.currentPageSet && w(B.pageContext.entity, B.configure.pageination.currentPageSet, e3), B.configure.pageination.pageSizeSet && w(B.pageContext.entity, B.configure.pageination.pageSizeSet, o2), j(B.pageContext, B.configure.uuid);
162
+ }
163
+ function Re(e3) {
164
+ const o2 = e3.showCondition;
165
+ return k(B.pageContext, o2);
166
+ }
167
+ function He(e3) {
168
+ if (B.configure.props.modelCustom) {
169
+ const o2 = E(B.pageContext, B.configure.props.modelCustom);
170
+ if (o2) {
171
+ const n2 = o2.apply(o2, [{ pageContext: B.pageContext, configureObj: B.configure, value: e3 }]);
172
+ S(n2) ? n2.then((e4) => {
173
+ ne.value = e4.columns;
174
+ }) : ne.value = n2.columns;
440
175
  }
441
176
  }
442
- function exportChart() {
443
- }
444
- __expose({
445
- updateChartDatas,
446
- exportChart
177
+ }
178
+ function Ie(e3, o2, n2) {
179
+ e3.forEach((e4) => {
180
+ const r2 = e4.props.base.prop, t2 = e4.props.base.name;
181
+ let a2 = { name: r2, label: t2, i18nKey: t2 };
182
+ e4.children && e4.childern.length > 0 && (a2.children = [], Ie(e4.children, a2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(a2);
447
183
  });
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
184
  }
517
- });
185
+ return q2({ updateChartDatas: ye, exportChart: function() {
186
+ let e3 = [], o2 = [];
187
+ o2 = ee.value ? B.configure.props.groupHeaders : B.configure.items;
188
+ let n2 = [];
189
+ Ie(o2, e3, n2);
190
+ return { isTable: true, dataArr: function(e4) {
191
+ let o3 = [];
192
+ oe.value && (o3 = L(oe.value), o3.forEach((o4) => {
193
+ e4.forEach((e5) => {
194
+ const n3 = A(o4, e5.props.format, e5, B.pageContext, B.configure);
195
+ o4[e5.props.base.prop] = n3;
196
+ });
197
+ }));
198
+ return o3;
199
+ }(n2), columns: e3 };
200
+ } }), (o2, n2) => {
201
+ const r2 = t("el-table");
202
+ return i(), a("div", { style: p(l(Q)), class: u([l(W), "amb-widget-chart"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(me), "header-cell-style": xe, "row-style": Oe, "cell-style": Se, "show-summary": ae.value, stripe: e2.configure.props.base.stripe, "summary-method": we, "span-method": je }, { default: d(() => [ee.value ? (i(true), a(h, { key: 0 }, v(re.value, (o3, n3) => (i(), a(h, { key: n3 }, [o3.isLeaf ? Re(te.value[o3.columnUuid]) ? (i(), g($, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (i(), g(F, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (i(true), a(h, { key: 1 }, v(ne.value, (o3, n3) => (i(), a(h, { key: n3 }, [Re(o3) ? (i(), g($, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (i(), g(R, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: ke, onPageSizeChange: Ee }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
203
+ };
204
+ } });
518
205
  export {
519
- _sfc_main as default
206
+ q as default
520
207
  };