super-page-runtime 2.2.29-tmp2 → 2.2.32

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 (167) 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/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +135 -443
  7. package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
  8. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
  15. package/dist/es/components/runtime/utils/common-util.js +76 -156
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -8
  17. package/dist/es/components/runtime/utils/events/event-util.js +362 -775
  18. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
  20. package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  23. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  24. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
  26. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  27. package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
  28. package/dist/es/components/runtime/utils/page-init-util.js +141 -406
  29. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  30. package/dist/es/components/runtime/utils/page-store.js +23 -68
  31. package/dist/es/components/runtime/utils/store-util.js +9 -13
  32. package/dist/es/components/runtime/utils/store.js +2 -2
  33. package/dist/es/components/runtime/utils/table-utils.d.ts +4 -0
  34. package/dist/es/components/runtime/utils/table-utils.js +40 -81
  35. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  36. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +21 -83
  38. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  40. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  42. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  44. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  46. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -203
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +46 -162
  56. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -109
  58. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -166
  60. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -117
  62. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -118
  64. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +29 -160
  70. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +212 -594
  75. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  76. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  78. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  80. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  81. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  83. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  85. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  87. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  89. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  91. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  93. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  95. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  97. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  99. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +317 -810
  100. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +262 -635
  102. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  103. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  105. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  107. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  108. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  111. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  112. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  113. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  115. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +68 -239
  117. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -109
  119. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  121. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +56 -188
  123. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  125. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -245
  127. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  129. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  130. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  131. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  132. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  133. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +64 -194
  135. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +88 -249
  137. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +80 -263
  139. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  141. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  143. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  145. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  147. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +89 -188
  148. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -272
  150. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  153. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  157. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  158. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  159. package/dist/es/components/runtime/views/home-chart.vue.js +41 -160
  160. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
  162. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  163. package/dist/es/components/runtime/views/super-page.vue.js +226 -754
  164. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  165. package/dist/es/i18n/langs/cn.js +2 -55
  166. package/dist/es/i18n/langs/en.js +2 -55
  167. package/package.json +2 -2
@@ -4,717 +4,337 @@ import { executeExpression } from "agilebuilder-ui/src/utils/calculator/calculat
4
4
  import { getComponentRef } from "./global-refs.js";
5
5
  import { watch } from "vue";
6
6
  import { deepCopy, getBaseUrl } from "./common-util.js";
7
- function getComponentOptionConfigs(component, pageContext2) {
8
- if (!component.props || !component.props.dataOrigin) {
9
- return;
10
- }
11
- if (component.name && component.name === "table") {
12
- return;
13
- }
14
- const dataOriginInfo = component.props.dataOrigin;
15
- const infoObj = {
16
- uuid: component.uuid
17
- };
18
- if (dataOriginInfo.optionValueSetType == "optionGroup") {
19
- infoObj.type = "optionGroup";
20
- infoObj.props = {
21
- code: dataOriginInfo.optionGroup
22
- };
23
- } else if (dataOriginInfo.optionValueSetType == "dynamicData") {
24
- infoObj.type = "dynamicData";
25
- infoObj.filterType = dataOriginInfo.filterType;
26
- infoObj.props = {
27
- code: dataOriginInfo.dynamicDataSourceCode
28
- };
29
- } else if (dataOriginInfo.optionValueSetType == "dataTable") {
30
- infoObj.filterType = dataOriginInfo.filterType;
31
- const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
32
- Object.assign(infoObj, tempObj);
33
- } else if (dataOriginInfo.optionValueSetType == "service") {
34
- infoObj.filterType = dataOriginInfo.filterType;
35
- const tempObj = getServiceQueryInfo(dataOriginInfo, pageContext2);
36
- Object.assign(infoObj, tempObj);
37
- }
38
- if (infoObj.type) {
39
- return infoObj;
40
- } else {
41
- return void 0;
42
- }
7
+ function getComponentOptionConfigs(t, e) {
8
+ if (!t.props || !t.props.dataOrigin) return;
9
+ if (t.name && "table" === t.name) return;
10
+ const o = t.props.dataOrigin, n = { uuid: t.uuid };
11
+ if ("optionGroup" == o.optionValueSetType) n.type = "optionGroup", n.props = { code: o.optionGroup };
12
+ else if ("dynamicData" == o.optionValueSetType) n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
13
+ else if ("dataTable" == o.optionValueSetType) {
14
+ n.filterType = o.filterType;
15
+ const t2 = getTableQueryInfo(o, e);
16
+ Object.assign(n, t2);
17
+ } else if ("service" == o.optionValueSetType) {
18
+ n.filterType = o.filterType;
19
+ const t2 = getServiceQueryInfo(o, e);
20
+ Object.assign(n, t2);
21
+ }
22
+ return n.type ? n : void 0;
43
23
  }
44
- function getTableQueryInfo(dataOriginInfo, pageContext2) {
45
- const infoObj = {};
46
- infoObj.type = "dataTable";
47
- infoObj.props = {
48
- tableName: dataOriginInfo.tableName,
49
- systemCode: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode,
50
- systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysVersion : pageContext2.systemVersion
51
- };
52
- if (dataOriginInfo.sortFields) {
53
- const sortFields = [];
54
- for (const field of dataOriginInfo.sortFields) {
55
- if (field.name) {
56
- sortFields.push({
57
- prop: field.name,
58
- order: field.type ? field.type : "asc"
59
- });
60
- }
61
- }
62
- infoObj.props.sorts = sortFields;
63
- }
64
- const autoMonitorFields = [];
65
- if (dataOriginInfo.filterList) {
66
- const searchForm = [];
67
- for (const f of dataOriginInfo.filterList) {
68
- if (!f.propName) {
69
- continue;
70
- }
71
- if (!f.propDbName) {
72
- f.propDbName = f.propName;
73
- }
74
- const tempObj = {};
75
- Object.assign(tempObj, f);
76
- const paramsNames = getParamNames(f.propValue);
77
- for (const p of paramsNames) {
78
- if (p && (p.startsWith("${data.") || p.startsWith("${task.") || p.startsWith("${page."))) {
79
- if (!autoMonitorFields.includes(p)) {
80
- autoMonitorFields.push(p);
81
- }
82
- }
83
- }
84
- if (f.propValue) ;
85
- searchForm.push(tempObj);
86
- }
87
- infoObj.props.searchForm = searchForm;
88
- }
89
- infoObj.props.monitorFields = autoMonitorFields;
90
- const queryFields = [];
91
- if (dataOriginInfo.tableValueField) {
92
- infoObj.props.valueField = dataOriginInfo.tableValueField;
93
- }
94
- if (dataOriginInfo.tableLableField && queryFields.indexOf(dataOriginInfo.tableLableField) == -1) {
95
- infoObj.props.lableField = dataOriginInfo.tableLableField;
96
- }
97
- if (dataOriginInfo.autoSets) {
98
- for (const field of dataOriginInfo.autoSets) {
99
- if (field.source && queryFields.indexOf(field.source) == -1) {
100
- queryFields.push(field.source);
101
- }
102
- }
103
- }
104
- infoObj.props.queryFields = queryFields;
105
- infoObj.props.pageSize = dataOriginInfo.displayQuantity;
106
- return infoObj;
24
+ function getTableQueryInfo(t, e) {
25
+ const o = { type: "dataTable" };
26
+ if (o.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysVersion : e.systemVersion }, t.sortFields) {
27
+ const e2 = [];
28
+ for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
29
+ o.props.sorts = e2;
30
+ }
31
+ const n = [];
32
+ if (t.filterList) {
33
+ const e2 = [];
34
+ for (const o2 of t.filterList) {
35
+ if (!o2.propName) continue;
36
+ o2.propDbName || (o2.propDbName = o2.propName);
37
+ const t2 = {};
38
+ Object.assign(t2, o2);
39
+ const r2 = getParamNames(o2.propValue);
40
+ for (const t3 of r2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
41
+ o2.propValue, e2.push(t2);
42
+ }
43
+ o.props.searchForm = e2;
44
+ }
45
+ o.props.monitorFields = n;
46
+ const r = [];
47
+ if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == r.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == r.indexOf(e2.source) && r.push(e2.source);
48
+ return o.props.queryFields = r, o.props.pageSize = t.displayQuantity, o;
107
49
  }
108
- function getServiceQueryInfo(dataOriginInfo, pageContext2) {
109
- const infoObj = {};
110
- infoObj.type = "service";
111
- infoObj.props = {
112
- serivceCode: dataOriginInfo.serviceCode,
113
- systemCode: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode,
114
- systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode
115
- };
116
- if (dataOriginInfo.serviceInputs) {
117
- const searchForm = [];
118
- for (const f of dataOriginInfo.serviceInputs) {
119
- if (!f.name || f.value) {
120
- continue;
121
- }
122
- const tempObj = {};
123
- Object.assign(tempObj, f);
124
- searchForm.push(tempObj);
125
- }
126
- infoObj.props.inputs = searchForm;
127
- }
128
- infoObj.props.dataSetField = dataOriginInfo.serviceDataSetField;
129
- infoObj.props.valueField = dataOriginInfo.serviceValueField;
130
- infoObj.props.labelField = dataOriginInfo.serviceLabelField;
131
- return infoObj;
50
+ function getServiceQueryInfo(t, e) {
51
+ const o = { type: "service" };
52
+ if (o.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysCode : e.systemCode }, t.serviceInputs) {
53
+ const e2 = [];
54
+ for (const o2 of t.serviceInputs) {
55
+ if (!o2.name || o2.value) continue;
56
+ const t2 = {};
57
+ Object.assign(t2, o2), e2.push(t2);
58
+ }
59
+ o.props.inputs = e2;
60
+ }
61
+ return o.props.dataSetField = t.serviceDataSetField, o.props.valueField = t.serviceValueField, o.props.labelField = t.serviceLabelField, o;
132
62
  }
133
- function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isInit) {
134
- return new Promise((resolve, reject) => {
135
- if (!dataSourceConfs || dataSourceConfs.length == 0) {
136
- reject(new Error("无需查询的统计图配置!"));
137
- return;
138
- }
139
- const dataSourceConfsCopy = deepCopy(dataSourceConfs);
140
- dataSourceConfsCopy.forEach((item) => {
141
- const services = item.services;
142
- if (services && services.length > 0) {
143
- const serviceInputs = services[0].serviceInputs;
144
- if (serviceInputs) {
145
- services[0].serviceInParams = {};
146
- serviceInputs.forEach((inParam) => {
147
- const paramName = inParam.name;
148
- const paramValue = inParam.value;
149
- services[0].serviceInParams[paramName] = getValueFromVariable(
150
- pageContext2.entity,
151
- paramValue
152
- );
153
- });
154
- delete services[0].serviceInputs;
155
- }
63
+ function updateChartDatasources(t, e, o, n) {
64
+ return new Promise((r, a) => {
65
+ if (!e || 0 == e.length) return void a(new Error("无需查询的统计图配置!"));
66
+ const s = deepCopy(e);
67
+ s.forEach((e2) => {
68
+ const o2 = e2.services;
69
+ if (o2 && o2.length > 0) {
70
+ const e3 = o2[0].serviceInputs;
71
+ e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
72
+ const n2 = e4.name, r2 = e4.value;
73
+ o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, r2);
74
+ }), delete o2[0].serviceInputs);
156
75
  }
157
76
  });
158
- const entityData2 = pageContext2.entity ? pageContext2.entity : {};
159
- const additionalParamMap = {};
160
- if (entityData2.request) {
161
- Object.assign(additionalParamMap, entityData2.request);
162
- }
163
- if (entityData2.page) {
164
- Object.assign(additionalParamMap, entityData2.page);
165
- }
166
- if (appendParams) {
167
- Object.assign(additionalParamMap, appendParams);
168
- }
169
- const taskMap = {};
170
- if (entityData2.task) {
171
- Object.assign(taskMap, entityData2.task);
172
- }
173
- const param = {
174
- entityMap: entityData2.data,
175
- additionalParamMap,
176
- taskMap,
177
- dataSourceList: dataSourceConfsCopy,
178
- systemCode: pageContext2.systemCode,
179
- pageCode: pageContext2.code
180
- };
181
- const backendUrl = pageContext2.backendUrl;
182
- const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
183
- const url = baseUrl + "/common/common-data/find-chart-datas";
184
- http.post(url, param, {
185
- headers: { customSystem: pageContext2.systemCode }
186
- }).then((result) => {
77
+ const i = t.entity ? t.entity : {}, u = {};
78
+ i.request && Object.assign(u, i.request), i.page && Object.assign(u, i.page), o && Object.assign(u, o);
79
+ const l = {};
80
+ i.task && Object.assign(l, i.task);
81
+ const c = { entityMap: i.data, additionalParamMap: u, taskMap: l, dataSourceList: s, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
82
+ http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
187
83
  var _a, _b;
188
- if (!pageContext2.chartDataSourceMap) {
189
- pageContext2.chartDataSourceMap = {};
190
- }
191
- for (const uuid in result) {
192
- pageContext2.chartDataSourceMap[uuid] = result[uuid];
193
- const componentObj = getComponentRef(pageContext2, uuid);
194
- if (componentObj) {
195
- const chartConfig = componentObj.getConfigure();
196
- if (!isInit || chartConfig && (chartConfig.initializationQuery === void 0 || chartConfig.initializationQuery)) {
197
- if (componentObj.updateChartDatas) {
198
- componentObj.updateChartDatas(result[uuid]);
199
- if ((_b = (_a = chartConfig.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet) {
200
- const serviceData = result[uuid] && result[uuid].length > 0 ? result[uuid][0] : {};
201
- const chartData = serviceData && serviceData.result ? serviceData.result : {};
202
- let datas = null;
203
- if (chartConfig.serviceDataField) {
204
- datas = chartData[chartConfig.serviceDataField];
205
- } else {
206
- if (chartData) {
207
- if (Array.isArray(chartData)) {
208
- datas = chartData;
209
- } else {
210
- datas = [chartData];
211
- }
212
- }
213
- }
214
- if (!datas) {
215
- datas = [];
216
- }
217
- setValueForVariableName(
218
- pageContext2.entity,
219
- chartConfig.runtime.dataConfig.resultSet,
220
- datas
221
- );
222
- }
223
- }
84
+ t.chartDataSourceMap || (t.chartDataSourceMap = {});
85
+ for (const o2 in e2) {
86
+ t.chartDataSourceMap[o2] = e2[o2];
87
+ const r2 = getComponentRef(t, o2);
88
+ if (r2) {
89
+ const a2 = r2.getConfigure();
90
+ if ((!n || a2 && (void 0 === a2.initializationQuery || a2.initializationQuery)) && r2.updateChartDatas && (r2.updateChartDatas(e2[o2]), (_b = (_a = a2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
91
+ const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, r3 = n2 && n2.result ? n2.result : {};
92
+ let s2 = null;
93
+ a2.serviceDataField ? s2 = r3[a2.serviceDataField] : r3 && (s2 = Array.isArray(r3) ? r3 : [r3]), s2 || (s2 = []), setValueForVariableName(t.entity, a2.runtime.dataConfig.resultSet, s2);
224
94
  }
225
95
  }
226
96
  }
227
- console.log("查询统计图数据完成", result);
228
- resolve(result);
229
- }).catch((error) => {
230
- console.log("查询统计图数据失败", error);
231
- reject(error);
97
+ r(e2);
98
+ }).catch((t2) => {
99
+ a(t2);
232
100
  });
233
101
  });
234
102
  }
235
- function updateChartDatasourcesByComponent(pageContext2, componentUuid) {
236
- const chartDataSource = pageContext2.initChartServiceConfigs.find(
237
- (item) => item.uuid === componentUuid
238
- );
239
- if (chartDataSource) {
240
- updateChartDatasources(pageContext2, [chartDataSource], null, false);
241
- }
103
+ function updateChartDatasourcesByComponent(t, e) {
104
+ const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
105
+ o && updateChartDatasources(t, [o], null, false);
242
106
  }
243
- function updateOptionDatasources(pageContext2, dataSourceConfs, query) {
244
- return new Promise((resolve, reject) => {
245
- if (!dataSourceConfs || dataSourceConfs.length == 0) {
246
- reject(new Error("无需查询的配置!"));
247
- return;
248
- }
249
- const entityData2 = pageContext2.entity ? pageContext2.entity : {};
250
- const additionalParamMap = {};
251
- if (entityData2.request) {
252
- Object.assign(additionalParamMap, entityData2.request);
253
- }
254
- if (entityData2.page) {
255
- Object.assign(additionalParamMap, entityData2.page);
256
- }
257
- additionalParamMap.query = query;
258
- const param = {
259
- entityMap: entityData2.data,
260
- additionalParamMap,
261
- dataSourceList: dataSourceConfs,
262
- systemCode: pageContext2.systemCode,
263
- query
264
- };
265
- const backendUrl = pageContext2.backendUrl;
266
- const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
267
- const url = baseUrl + "/common/common-data/find-datas";
268
- http.post(url, param).then((result) => {
269
- if (!pageContext2.optionSourceMap) {
270
- pageContext2.optionSourceMap = {};
271
- }
272
- for (const uuid in result) {
273
- pageContext2.optionSourceMap[uuid] = result[uuid];
274
- const componentObj = getComponentRef(pageContext2, uuid);
275
- if (componentObj && componentObj.updateOptions) {
276
- componentObj.updateOptions(result[uuid]);
277
- }
107
+ function updateOptionDatasources(t, e, o) {
108
+ return new Promise((n, r) => {
109
+ if (!e || 0 == e.length) return void r(new Error("无需查询的配置!"));
110
+ const a = t.entity ? t.entity : {}, s = {};
111
+ a.request && Object.assign(s, a.request), a.page && Object.assign(s, a.page), s.query = o;
112
+ const i = { entityMap: a.data, additionalParamMap: s, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
113
+ http.post(l, i).then((e2) => {
114
+ t.optionSourceMap || (t.optionSourceMap = {});
115
+ for (const o2 in e2) {
116
+ t.optionSourceMap[o2] = e2[o2];
117
+ const n2 = getComponentRef(t, o2);
118
+ n2 && n2.updateOptions && n2.updateOptions(e2[o2]);
278
119
  }
279
- console.log("查询选项数据完成", result);
280
- resolve(result);
281
- }).catch((error) => {
282
- console.log("查询选项数据失败", error);
283
- reject(error);
120
+ n(e2);
121
+ }).catch((t2) => {
122
+ r(t2);
284
123
  });
285
124
  });
286
125
  }
287
- function getOptionDatasFromPage(pageContext2, configure) {
288
- return getComponentOptionDatasFromPage(pageContext2, configure.uuid);
126
+ function getOptionDatasFromPage(t, e) {
127
+ return getComponentOptionDatasFromPage(t, e.uuid);
289
128
  }
290
- function getComponentOptionDatasFromPage(pageContext2, configureUuid) {
291
- const optionSourceMap = getOptionDatasSourceMap(pageContext2);
292
- const cacheOptions = optionSourceMap[configureUuid];
293
- return cacheOptions ? cacheOptions : [];
129
+ function getComponentOptionDatasFromPage(t, e) {
130
+ const o = getOptionDatasSourceMap(t)[e];
131
+ return o || [];
294
132
  }
295
- function getOptionDatasSourceMap(pageContext2) {
296
- if (!pageContext2 || !pageContext2.optionSourceMap) {
297
- return {};
298
- }
299
- const cacheOptions = pageContext2.optionSourceMap;
300
- return cacheOptions ? cacheOptions : {};
133
+ function getOptionDatasSourceMap(t) {
134
+ if (!t || !t.optionSourceMap) return {};
135
+ const e = t.optionSourceMap;
136
+ return e || {};
301
137
  }
302
- function getChartDatasFromPage(pageContext2, configure) {
303
- if (!pageContext2 || !pageContext2.chartDataSourceMap || !configure) {
304
- return null;
305
- }
306
- const cacheDatas = pageContext2.chartDataSourceMap[configure.uuid];
307
- return cacheDatas;
138
+ function getChartDatasFromPage(t, e) {
139
+ if (!t || !t.chartDataSourceMap || !e) return null;
140
+ return t.chartDataSourceMap[e.uuid];
308
141
  }
309
- function queryOptionDatasources(pageContext2, dataSourceConf, query) {
310
- return updateOptionDatasources(pageContext2, dataSourceConf ? [dataSourceConf] : [], query);
142
+ function queryOptionDatasources(t, e, o) {
143
+ return updateOptionDatasources(t, e ? [e] : [], o);
311
144
  }
312
- function autoSetAfterSelect(component, pageContext2, autoSets, selItems) {
313
- if (!autoSets || autoSets.length == 0) {
314
- return;
315
- }
316
- const entity = pageContext2.entity ? pageContext2.entity : {};
317
- for (const as of autoSets) {
318
- if (!as.source || !as.target) {
319
- continue;
320
- }
321
- const values = getValuesByField(selItems, as.source);
322
- let targetField = as.target;
323
- if (!targetField || !targetField.startsWith("${")) {
324
- continue;
325
- }
326
- targetField = targetField.substring(2, targetField.length - 1);
327
- const fields = targetField.split(".");
328
- setVariableValue(entity, fields, values.join(","));
145
+ function autoSetAfterSelect(t, e, o, n) {
146
+ if (!o || 0 == o.length) return;
147
+ const r = e.entity ? e.entity : {};
148
+ for (const t2 of o) {
149
+ if (!t2.source || !t2.target) continue;
150
+ const e2 = getValuesByField(n, t2.source);
151
+ let o2 = t2.target;
152
+ if (!o2 || !o2.startsWith("${")) continue;
153
+ o2 = o2.substring(2, o2.length - 1);
154
+ setVariableValue(r, o2.split("."), e2.join(","));
329
155
  }
330
156
  }
331
- function getValuesByField(items, fieldName) {
332
- if (!items) {
333
- return [""];
334
- } else {
335
- const values = [];
336
- for (const i of items) {
337
- let val = i[fieldName];
338
- if (val == void 0 || val == null) {
339
- val = "";
340
- }
341
- values.push(val);
157
+ function getValuesByField(t, e) {
158
+ if (t) {
159
+ const o = [];
160
+ for (const n of t) {
161
+ let t2 = n[e];
162
+ null != t2 && null != t2 || (t2 = ""), o.push(t2);
342
163
  }
343
- return values;
164
+ return o;
344
165
  }
166
+ return [""];
345
167
  }
346
- function getVariableValue(entity, fields) {
347
- if (!entity || !fields || fields.length == 0) {
348
- return;
349
- }
350
- let tempObj = entity;
351
- for (let i = 0; i < fields.length; i++) {
352
- if (tempObj == void 0) {
353
- return tempObj;
354
- }
355
- const fieldName = fields[i];
356
- tempObj = tempObj[fieldName];
357
- }
358
- return tempObj;
168
+ function getVariableValue(t, e) {
169
+ if (!t || !e || 0 == e.length) return;
170
+ let o = t;
171
+ for (let t2 = 0; t2 < e.length; t2++) {
172
+ if (null == o) return o;
173
+ o = o[e[t2]];
174
+ }
175
+ return o;
359
176
  }
360
- function setValueForVariableName(entity, variableName, newValue) {
361
- if (!variableName || !variableName.startsWith("${")) {
362
- return;
363
- }
364
- variableName = variableName.substring(2, variableName.length - 1);
365
- const fields = variableName.split(".");
366
- setVariableValue(entity, fields, newValue);
177
+ function setValueForVariableName(t, e, o) {
178
+ if (!e || !e.startsWith("${")) return;
179
+ setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
367
180
  }
368
- function setVariableValue(entity, fields, newValue) {
369
- if (!entity || !fields || fields.length == 0) {
370
- return;
371
- }
372
- let tempObj = entity;
373
- for (let i = 0; i < fields.length; i++) {
374
- const fieldName = fields[i];
375
- if (i + 1 === fields.length) {
376
- tempObj[fieldName] = newValue;
377
- } else {
378
- if (tempObj[fieldName] === void 0) {
379
- tempObj[fieldName] = {};
380
- }
381
- tempObj = tempObj[fieldName];
382
- }
181
+ function setVariableValue(t, e, o) {
182
+ if (!t || !e || 0 == e.length) return;
183
+ let n = t;
184
+ for (let t2 = 0; t2 < e.length; t2++) {
185
+ const r = e[t2];
186
+ t2 + 1 === e.length ? n[r] = o : (void 0 === n[r] && (n[r] = {}), n = n[r]);
383
187
  }
384
188
  }
385
- function setVariableValueWithProp(entity, prop, newValue) {
386
- if (!entity || !prop) {
387
- return;
388
- }
389
- const fields = prop.split(".");
390
- setVariableValue(entity, fields, newValue);
189
+ function setVariableValueWithProp(t, e, o) {
190
+ if (!t || !e) return;
191
+ setVariableValue(t, e.split("."), o);
391
192
  }
392
- function formatVariableValue(pageContext2, variable) {
393
- if (!pageContext2 || variable == "" || variable == null || variable == void 0) {
394
- return variable;
395
- }
396
- const entity = pageContext2.entity ? pageContext2.entity : {};
397
- const t = getParamNames(variable);
398
- for (const c in t) {
399
- const param = t[c];
400
- const paramValue = getValueFromVariable(entity, param);
401
- if (paramValue && Object.prototype.toString.call(paramValue) === "[object Date]") {
402
- return dayjs(paramValue).format("YYYY-MM-DD hh:mm:ss");
403
- } else if (paramValue && typeof paramValue === "number") {
404
- return paramValue;
405
- }
406
- variable = variable.replace(
407
- param,
408
- paramValue === void 0 || paramValue === null ? "" : paramValue
409
- );
410
- }
411
- return variable;
193
+ function formatVariableValue(t, e) {
194
+ if (!t || "" == e || null == e || null == e) return e;
195
+ const o = t.entity ? t.entity : {}, n = getParamNames(e);
196
+ for (const t2 in n) {
197
+ const r = n[t2], a = getValueFromVariable(o, r);
198
+ if (a && "[object Date]" === Object.prototype.toString.call(a)) return dayjs(a).format("YYYY-MM-DD hh:mm:ss");
199
+ if (a && "number" == typeof a) return a;
200
+ e = e.replace(r, null == a ? "" : a);
201
+ }
202
+ return e;
412
203
  }
413
- function getParamNames(variable) {
414
- if (!variable) {
415
- return [];
416
- }
417
- const reg = /\$\{[^\{|\}]+\}/g;
418
- const paramNames = variable.match(reg);
419
- return paramNames ? paramNames : [];
204
+ function getParamNames(t) {
205
+ if (!t) return [];
206
+ const e = t.match(/\$\{[^\{|\}]+\}/g);
207
+ return e || [];
420
208
  }
421
- function formatValueByType(value, formatType, formatInfo) {
422
- if (!formatType || value == "" || value == null || value == void 0) {
423
- return value;
424
- }
425
- console.log("aaa", value, formatType, formatInfo);
426
- formatInfo = formatInfo ? formatInfo : {};
427
- if (formatType == "number" || formatType == "percent") {
428
- if (isNaN(value)) {
429
- return value;
430
- }
431
- let precision = parseInt(formatInfo.decimalDigit);
432
- if (precision == null || isNaN(precision)) {
433
- precision = -1;
434
- }
435
- value = parseFloat(value);
436
- if (formatType == "percent") {
437
- value = value * 100;
438
- }
439
- if (precision > -1) {
440
- value = parseFloat(value.toFixed(precision));
441
- }
442
- if (formatType == "percent") {
443
- value = value + "%";
444
- } else {
445
- if (formatInfo.thousandsSeparator) {
446
- const parts = value.toString().split(".");
447
- parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
448
- value = parts.length > 1 ? parts.join(".") : parts[0];
449
- }
450
- if (formatInfo.symbol) {
451
- value = formatInfo.symbol + "" + value;
452
- }
453
- }
454
- return value;
455
- } else if (formatType == "date" || formatType == "time") {
456
- let formatStr = "";
457
- if (formatType == "date") {
458
- formatStr = formatInfo.dateFormat;
459
- if (!formatStr) {
460
- formatStr = "YYYY-MM-DD";
461
- }
462
- } else {
463
- formatStr = formatInfo.timeFormat;
464
- if (!formatStr) {
465
- formatStr = "HH:mm:ss";
209
+ function formatValueByType(t, e, o) {
210
+ if (!e || "" == t || null == t || null == t) return t;
211
+ if (o = o || {}, "number" == e || "percent" == e) {
212
+ if (isNaN(t)) return t;
213
+ let n = parseInt(o.decimalDigit);
214
+ if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e) t += "%";
215
+ else {
216
+ if (o.thousandsSeparator) {
217
+ const e2 = t.toString().split(".");
218
+ e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
466
219
  }
220
+ o.symbol && (t = o.symbol + "" + t);
467
221
  }
468
- return dayjs(value).format(formatStr);
469
- } else if (formatType == "custom" && formatInfo.formatEventUuid) {
470
- console.log("自定义方法", formatInfo);
222
+ return t;
471
223
  }
472
- return value;
473
- }
474
- function getValueFromVariable(entity, variable, row2) {
475
- if (variable == null || variable == void 0) {
476
- return variable;
477
- }
478
- if (variable.startsWith("${") && variable.endsWith("}")) {
479
- let paramName = variable.substring(2, variable.length - 1);
480
- let paramType = null;
481
- let valueSource = null;
482
- if (paramName.startsWith("data.")) {
483
- paramName = paramName.substring(5);
484
- valueSource = entity.data;
485
- paramType = "data";
486
- } else if (paramName.startsWith("page.")) {
487
- paramName = paramName.substring(5);
488
- paramType = "page";
489
- valueSource = entity.page;
490
- } else if (paramName.startsWith("task.")) {
491
- paramName = paramName.substring(5);
492
- paramType = "task";
493
- valueSource = entity.task;
494
- } else if (paramName.startsWith("request.")) {
495
- paramName = paramName.substring(8);
496
- paramType = "request";
497
- valueSource = entity.request;
498
- } else if (paramName.startsWith("context.")) {
499
- paramName = paramName.substring(8);
500
- paramType = "context";
501
- valueSource = entity.context;
502
- } else if (paramName.startsWith("system.")) {
503
- paramName = paramName.substring(7);
504
- paramType = "system";
505
- valueSource = entity.system;
506
- } else if (paramName.startsWith("fixed.")) {
507
- return paramName.substring(6);
508
- } else if (paramName.startsWith("row.")) {
509
- paramName = paramName.substring(4);
510
- valueSource = row2;
511
- paramType = "row";
512
- }
513
- if (!paramName) {
514
- console.log("获取变量失败", variable, entity);
515
- return "";
516
- }
517
- return getValueFromSource(valueSource, paramName, paramType);
518
- } else {
519
- return variable;
224
+ if ("date" == e || "time" == e) {
225
+ let n = "";
226
+ return "date" == e ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(t).format(n);
520
227
  }
228
+ return "custom" == e && o.formatEventUuid, t;
521
229
  }
522
- function getValueFromSource(valueSource, paramName, paramType) {
523
- if (paramType != "context" && !valueSource || !paramName) {
524
- return void 0;
525
- }
526
- const firstIndex = paramName.indexOf(".");
527
- if (firstIndex > -1) {
528
- const tempParamName = paramName.substring(0, firstIndex);
529
- const newParamName = paramName.substring(firstIndex + 1);
530
- let childValue = valueSource[tempParamName];
531
- if (childValue && Array.isArray(childValue) && childValue.length > 0) {
532
- childValue = childValue[0];
533
- }
534
- return getValueFromSource(childValue, newParamName, paramType);
535
- } else {
536
- if (paramType == "context") {
537
- if (paramName == "currentDate" || paramName == "currentTime") {
538
- return /* @__PURE__ */ new Date();
539
- } else if (paramName.startsWith("currentDate") && paramName.length > 11) {
540
- const str = paramName.substring(11);
541
- const symbol = str.substring(0, 1);
542
- let num = parseInt(str.substring(1, str.length - 1), 10);
543
- const unit = str.substring(str.length - 1);
544
- const date = /* @__PURE__ */ new Date();
545
- num = "+" === symbol ? num : -num;
546
- if (unit === "d" || unit === "w") {
547
- num = unit === "w" ? num * 7 : num;
548
- date.setDate(date.getDate() + num);
549
- } else if (unit === "m") {
550
- date.setMonth(date.getMonth() + num);
551
- } else if (unit === "y") {
552
- date.setFullYear(date.getFullYear() + num);
553
- }
554
- return date;
555
- }
556
- if (!valueSource) {
557
- return void 0;
558
- }
559
- }
560
- return valueSource[paramName];
561
- }
230
+ function getValueFromVariable(t, e, o) {
231
+ if (null == e || null == e) return e;
232
+ if (e.startsWith("${") && e.endsWith("}")) {
233
+ let n = e.substring(2, e.length - 1), r = null, a = null;
234
+ if (n.startsWith("data.")) n = n.substring(5), a = t.data, r = "data";
235
+ else if (n.startsWith("page.")) n = n.substring(5), r = "page", a = t.page;
236
+ else if (n.startsWith("task.")) n = n.substring(5), r = "task", a = t.task;
237
+ else if (n.startsWith("request.")) n = n.substring(8), r = "request", a = t.request;
238
+ else if (n.startsWith("context.")) n = n.substring(8), r = "context", a = t.context;
239
+ else if (n.startsWith("system.")) n = n.substring(7), r = "system", a = t.system;
240
+ else {
241
+ if (n.startsWith("fixed.")) return n.substring(6);
242
+ n.startsWith("row.") && (n = n.substring(4), a = o, r = "row");
243
+ }
244
+ return n ? getValueFromSource(a, n, r) : "";
245
+ }
246
+ return e;
247
+ }
248
+ function getValueFromSource(t, e, o) {
249
+ if ("context" != o && !t || !e) return;
250
+ const n = e.indexOf(".");
251
+ if (n > -1) {
252
+ const r = e.substring(0, n), a = e.substring(n + 1);
253
+ let s = t[r];
254
+ return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, a, o);
255
+ }
256
+ if ("context" == o) {
257
+ if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
258
+ if (e.startsWith("currentDate") && e.length > 11) {
259
+ const t2 = e.substring(11), o2 = t2.substring(0, 1);
260
+ let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
261
+ const r = t2.substring(t2.length - 1), a = /* @__PURE__ */ new Date();
262
+ return n2 = "+" === o2 ? n2 : -n2, "d" === r || "w" === r ? (n2 = "w" === r ? 7 * n2 : n2, a.setDate(a.getDate() + n2)) : "m" === r ? a.setMonth(a.getMonth() + n2) : "y" === r && a.setFullYear(a.getFullYear() + n2), a;
263
+ }
264
+ if (!t) return;
265
+ }
266
+ return t[e];
562
267
  }
563
268
  function caculateShowCondition(pageContext, showConditions, row) {
564
- if (!showConditions || showConditions.length == 0 || !pageContext || !pageContext.entity) {
565
- return true;
566
- }
269
+ if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity) return true;
567
270
  const entityData = pageContext.entity;
568
271
  let conditions = "";
569
272
  const maxLen = showConditions.length;
570
- for (let i = 0; i < maxLen; i++) {
571
- const condition = showConditions[i];
572
- const propName = condition.propName;
573
- let operator = condition.operator;
574
- if (!propName || propName === "") {
575
- continue;
576
- }
577
- if (!operator) {
578
- operator = "EQ";
579
- }
580
- const leftValue = getValueFromVariable(entityData, propName, row);
581
- let propValue = getValueFromVariable(entityData, condition.propValue, row);
582
- const dataType = condition.dataType;
583
- if (operator == "CONTAIN" || operator == "NOT_CONTAIN") {
584
- if (leftValue && !leftValue.includes) {
585
- operator = operator == "CONTAIN" ? "EQ" : "NET";
586
- }
587
- }
588
- let variableIsNullStr = condition.variableIsNull;
589
- if (!variableIsNullStr) {
590
- variableIsNullStr = "null";
591
- }
592
- let conditionResult = void 0;
593
- if (propValue === void 0 || propValue === "") {
594
- propValue = null;
595
- if (variableIsNullStr === "null") {
596
- operator = "IS_NULL";
597
- } else if (variableIsNullStr === "notequal") {
598
- operator = "IS_NOT_NULL";
599
- } else {
600
- conditionResult = true;
601
- }
602
- }
603
- if (conditionResult == void 0) {
604
- try {
605
- conditionResult = executeExpression(leftValue, operator, propValue, dataType);
606
- } catch (e) {
607
- console.log("executeExpression error", e);
608
- conditionResult = false;
609
- }
610
- }
611
- const leftBracket = condition.leftBracket;
612
- const rightBracket = condition.rightBracket;
613
- let joinSign = condition.joinSign;
614
- if (leftBracket && leftBracket !== null && leftBracket !== "") {
615
- conditions = conditions + leftBracket;
616
- conditions = conditions + " ";
617
- }
618
- conditions += conditionResult + " ";
619
- if (rightBracket && rightBracket !== null && rightBracket !== "") {
620
- conditions = conditions + rightBracket;
621
- conditions = conditions + " ";
622
- }
623
- if (i < maxLen - 1) {
624
- if (joinSign && joinSign !== null && joinSign !== "") {
625
- const joinSignIgnoreCase = joinSign.toLowerCase();
626
- if (joinSignIgnoreCase === "and") {
627
- joinSign = joinSignIgnoreCase.replace("and", "&&");
628
- } else if (joinSignIgnoreCase === "or") {
629
- joinSign = joinSignIgnoreCase.replace("or", "||");
630
- }
631
- conditions += joinSign + " ";
632
- }
633
- }
634
- }
635
- if (conditions) {
636
- return eval("(" + conditions + ")");
637
- } else {
638
- return true;
639
- }
273
+ for (let t = 0; t < maxLen; t++) {
274
+ const e = showConditions[t], o = e.propName;
275
+ let n = e.operator;
276
+ if (!o || "" === o) continue;
277
+ n || (n = "EQ");
278
+ const r = getValueFromVariable(entityData, o, row);
279
+ let a = getValueFromVariable(entityData, e.propValue, row);
280
+ const s = e.dataType;
281
+ "CONTAIN" != n && "NOT_CONTAIN" != n || r && !r.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
282
+ let i = e.variableIsNull, u;
283
+ if (i || (i = "null"), void 0 !== a && "" !== a || (a = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true), null == u) try {
284
+ u = executeExpression(r, n, a, s);
285
+ } catch (t2) {
286
+ u = false;
287
+ }
288
+ const l = e.leftBracket, c = e.rightBracket;
289
+ let p = e.joinSign;
290
+ if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
291
+ const t2 = p.toLowerCase();
292
+ "and" === t2 ? p = t2.replace("and", "&&") : "or" === t2 && (p = t2.replace("or", "||")), conditions += p + " ";
293
+ }
294
+ }
295
+ return !conditions || eval("(" + conditions + ")");
640
296
  }
641
- function monitorFieldChange(pageContext2, monitorFields, triggerFunc) {
642
- if (!triggerFunc || !pageContext2 || !monitorFields || monitorFields.length == 0) {
643
- return;
644
- }
645
- const monitorFieldInfos = [];
646
- const preFields = [];
647
- for (let propName of monitorFields) {
648
- if (propName.startsWith("${")) {
649
- propName = propName.substring(2, propName.length - 1);
650
- const fields = propName.split(".");
651
- if (fields[0] === "page" || fields[0] === "task" || fields[0] === "data") {
652
- monitorFieldInfos.push(fields);
653
- if (!preFields.includes(fields[0])) {
654
- preFields.push(fields[0]);
655
- }
656
- }
657
- }
658
- }
659
- const entity = pageContext2.entity;
660
- let firstValue = getMonitorFieldValues(monitorFieldInfos, entity);
661
- let monitorTimeout = false;
662
- for (const preField of preFields) {
663
- watch(entity[preField], () => {
664
- if (monitorTimeout) {
665
- clearTimeout(monitorTimeout);
666
- }
667
- monitorTimeout = setTimeout(function() {
668
- const newValue = getMonitorFieldValues(monitorFieldInfos, entity);
669
- if (firstValue != newValue) {
670
- firstValue = newValue;
671
- triggerFunc();
672
- }
673
- }, 200);
674
- });
675
- }
297
+ function monitorFieldChange(t, e, o) {
298
+ if (!o || !t || !e || 0 == e.length) return;
299
+ const n = [], r = [];
300
+ for (let t2 of e) if (t2.startsWith("${")) {
301
+ t2 = t2.substring(2, t2.length - 1);
302
+ const e2 = t2.split(".");
303
+ "page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), r.includes(e2[0]) || r.push(e2[0]));
304
+ }
305
+ const a = t.entity;
306
+ let s = getMonitorFieldValues(n, a), i = false;
307
+ for (const t2 of r) watch(a[t2], () => {
308
+ i && clearTimeout(i), i = setTimeout(function() {
309
+ const t3 = getMonitorFieldValues(n, a);
310
+ s != t3 && (s = t3, o());
311
+ }, 200);
312
+ });
676
313
  }
677
- function getMonitorFieldValues(monitorFieldInfos, entity) {
678
- let values = "";
679
- for (const fieldInfo of monitorFieldInfos) {
680
- values += "_" + getVariableValue(entity, fieldInfo);
681
- }
682
- return values;
314
+ function getMonitorFieldValues(t, e) {
315
+ let o = "";
316
+ for (const n of t) o += "_" + getVariableValue(e, n);
317
+ return o;
683
318
  }
684
- function getFormPropName(prop) {
685
- if (prop && prop.indexOf("${") >= 0) {
686
- return prop.substring(prop.indexOf(".") + 1, prop.lastIndexOf("}"));
687
- } else {
688
- return prop;
689
- }
319
+ function getFormPropName(t) {
320
+ return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
690
321
  }
691
- function getSizeConfig(pageContext2, configure) {
692
- const pageModeType = getPageModeType(pageContext2);
693
- let sizeConfig;
694
- if (configure.props && configure.props.size && configure.props.size[pageModeType]) {
695
- sizeConfig = configure.props.size[pageModeType];
696
- }
697
- if (!sizeConfig && configure.props && configure.props.size) {
698
- sizeConfig = configure.props.size["pc"];
699
- }
700
- return sizeConfig;
322
+ function getSizeConfig(t, e) {
323
+ const o = getPageModeType(t);
324
+ let n;
325
+ return e.props && e.props.size && e.props.size[o] && (n = e.props.size[o]), !n && e.props && e.props.size && (n = e.props.size.pc), n;
701
326
  }
702
- function getPageModeType(pageContext2) {
703
- let dimensions = pageContext2.dimensions;
704
- if (!dimensions) {
705
- dimensions = "pc";
706
- }
707
- return dimensions;
327
+ function getPageModeType(t) {
328
+ let e = t.dimensions;
329
+ return e || (e = "pc"), e;
708
330
  }
709
- function isPromise(p) {
710
- return p && Object.prototype.toString.call(p) === "[object Promise]";
331
+ function isPromise(t) {
332
+ return t && "[object Promise]" === Object.prototype.toString.call(t);
711
333
  }
712
- function decomposeVariable(variable) {
713
- if (!variable) {
714
- return [];
715
- }
716
- const paramNames = variable.match(/\${(.*?)}/);
717
- return paramNames ? paramNames[1].split(".") : [];
334
+ function decomposeVariable(t) {
335
+ if (!t) return [];
336
+ const e = t.match(/\${(.*?)}/);
337
+ return e ? e[1].split(".") : [];
718
338
  }
719
339
  export {
720
340
  autoSetAfterSelect,