super-page-runtime 2.1.93 → 2.1.97

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