super-page-runtime 2.0.19 → 2.0.22

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 (189) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +16 -14
  2. package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +202 -0
  4. package/dist/es/components/runtime/utils/common-util.d.ts +2 -2
  5. package/dist/es/components/runtime/utils/common-util.js +7 -11
  6. package/dist/es/components/runtime/utils/events/event-util.js +9 -14
  7. package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/events/standard-event.js +124 -110
  9. package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
  10. package/dist/es/components/runtime/utils/global-refs.js +12 -0
  11. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  12. package/dist/es/components/runtime/utils/page-helper-util.js +4 -4
  13. package/dist/es/components/runtime/utils/page-init-util.js +5 -3
  14. package/dist/es/components/runtime/utils/table-utils.js +4 -5
  15. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
  16. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
  17. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
  18. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
  19. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
  20. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +12 -13
  21. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  22. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
  23. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
  24. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
  25. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
  26. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
  27. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
  28. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
  29. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  30. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
  31. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -39
  32. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  33. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
  34. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
  35. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
  36. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
  38. package/dist/es/components/runtime/views/super-page.vue.js +2 -2
  39. package/package.json +3 -2
  40. package/dist/lib/_virtual/AttributeMap.js +0 -4
  41. package/dist/lib/_virtual/Delta.js +0 -4
  42. package/dist/lib/_virtual/Op.js +0 -4
  43. package/dist/lib/_virtual/OpIterator.js +0 -4
  44. package/dist/lib/_virtual/__vite-browser-external.js +0 -3
  45. package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
  46. package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
  47. package/dist/lib/_virtual/dayjs.min.js +0 -4
  48. package/dist/lib/_virtual/index.js +0 -4
  49. package/dist/lib/_virtual/index2.js +0 -4
  50. package/dist/lib/_virtual/index3.js +0 -4
  51. package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
  52. package/dist/lib/assets/chart-themes/theme1.js +0 -7
  53. package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
  54. package/dist/lib/assets/chart-themes/theme2.js +0 -7
  55. package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
  56. package/dist/lib/assets/chart-themes/theme3.js +0 -7
  57. package/dist/lib/components/runtime/index.d.ts +0 -4
  58. package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
  59. package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
  60. package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
  61. package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
  62. package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
  63. package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
  64. package/dist/lib/components/runtime/utils/common-util.js +0 -94
  65. package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
  66. package/dist/lib/components/runtime/utils/eventBus.js +0 -10
  67. package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
  68. package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
  69. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
  70. package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
  71. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
  72. package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
  73. package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
  74. package/dist/lib/components/runtime/utils/global-refs.js +0 -65
  75. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
  76. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
  77. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
  78. package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
  79. package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
  80. package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
  81. package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
  82. package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
  83. package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
  84. package/dist/lib/components/runtime/utils/store-util.js +0 -17
  85. package/dist/lib/components/runtime/utils/store.d.ts +0 -2
  86. package/dist/lib/components/runtime/utils/store.js +0 -3
  87. package/dist/lib/components/runtime/utils/table-utils.js +0 -24
  88. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
  89. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
  90. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
  91. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
  92. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
  93. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
  94. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
  95. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
  96. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
  97. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
  98. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
  99. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
  100. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
  101. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
  102. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
  103. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
  104. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
  105. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
  106. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
  107. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
  108. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
  109. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
  110. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
  111. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
  112. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
  113. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
  114. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
  115. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
  116. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
  117. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
  118. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
  119. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
  120. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
  121. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
  122. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
  123. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
  124. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
  125. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
  126. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
  127. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
  128. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
  129. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
  130. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
  131. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
  132. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
  133. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
  134. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
  135. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
  136. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
  137. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
  138. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
  139. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
  140. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
  141. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
  142. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
  143. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
  144. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
  145. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
  146. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
  147. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
  148. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
  149. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
  150. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
  151. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
  152. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
  153. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
  154. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
  155. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
  156. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
  157. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
  158. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
  159. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
  160. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
  161. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
  162. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
  163. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
  164. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
  165. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
  166. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
  167. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
  168. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
  169. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
  170. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
  171. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
  172. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
  173. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
  174. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
  175. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
  176. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
  177. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
  178. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
  179. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
  180. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
  181. package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
  182. package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
  183. package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
  184. package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
  185. package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
  186. package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
  187. package/dist/lib/favicon.ico +0 -0
  188. package/dist/lib/index.d.ts +0 -8
  189. package/dist/lib/index.js +0 -15
@@ -1,622 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const request = require("../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/request.js");
4
- const dayjs_min = require("../../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js");
5
- const calculatorUtil = require("../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/calculator/calculator-util.js");
6
- const globalRefs = require("./global-refs.js");
7
- function getComponentOptionConfigs(component, pageContext2) {
8
- if (!component.props || !component.props.dataOrigin) {
9
- return;
10
- }
11
- const dataOriginInfo = component.props.dataOrigin;
12
- const infoObj = {
13
- uuid: component.uuid
14
- };
15
- if (dataOriginInfo.optionValueSetType == "optionGroup") {
16
- infoObj.type = "optionGroup";
17
- infoObj.props = {
18
- code: dataOriginInfo.optionGroup
19
- };
20
- } else if (dataOriginInfo.optionValueSetType == "dynamicData") {
21
- infoObj.type = "dynamicData";
22
- infoObj.filterType = dataOriginInfo.filterType;
23
- infoObj.props = {
24
- code: dataOriginInfo.dynamicDataSourceCode
25
- };
26
- } else if (dataOriginInfo.optionValueSetType == "dataTable") {
27
- infoObj.filterType = dataOriginInfo.filterType;
28
- const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
29
- Object.assign(infoObj, tempObj);
30
- } else if (dataOriginInfo.optionValueSetType == "service") {
31
- infoObj.filterType = dataOriginInfo.filterType;
32
- const tempObj = getServiceQueryInfo(dataOriginInfo, pageContext2);
33
- Object.assign(infoObj, tempObj);
34
- }
35
- if (infoObj.type) {
36
- return infoObj;
37
- } else {
38
- return void 0;
39
- }
40
- }
41
- function getTableQueryInfo(dataOriginInfo, pageContext2) {
42
- const infoObj = {};
43
- infoObj.type = "dataTable";
44
- infoObj.props = {
45
- tableName: dataOriginInfo.tableName,
46
- systemCode: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode,
47
- systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysVersion : pageContext2.systemVersion
48
- };
49
- if (dataOriginInfo.sortFields) {
50
- const sortFields = [];
51
- for (const field of dataOriginInfo.sortFields) {
52
- if (field.name) {
53
- sortFields.push({
54
- prop: field.name,
55
- order: field.type ? field.type : "asc"
56
- });
57
- }
58
- }
59
- infoObj.props.sorts = sortFields;
60
- }
61
- const autoMonitorFields = [];
62
- if (dataOriginInfo.filterList) {
63
- const searchForm = [];
64
- for (const f of dataOriginInfo.filterList) {
65
- if (!f.propName) {
66
- continue;
67
- }
68
- if (!f.propDbName) {
69
- f.propDbName = f.propName;
70
- }
71
- const tempObj = {};
72
- Object.assign(tempObj, f);
73
- const paramsNames = getParamNames(f.propValue);
74
- for (const p of paramsNames) {
75
- if (p && (p.startsWith("${data.") || p.startsWith("${task.") || p.startsWith("${page."))) {
76
- if (!autoMonitorFields.includes(p)) {
77
- autoMonitorFields.push(p);
78
- }
79
- }
80
- }
81
- if (f.propValue)
82
- ;
83
- searchForm.push(tempObj);
84
- }
85
- infoObj.props.searchForm = searchForm;
86
- }
87
- infoObj.props.monitorFields = autoMonitorFields;
88
- const queryFields = [];
89
- if (dataOriginInfo.tableValueField) {
90
- infoObj.props.valueField = dataOriginInfo.tableValueField;
91
- }
92
- if (dataOriginInfo.tableLableField && queryFields.indexOf(dataOriginInfo.tableLableField) == -1) {
93
- infoObj.props.lableField = dataOriginInfo.tableLableField;
94
- }
95
- if (dataOriginInfo.autoSets) {
96
- for (const field of dataOriginInfo.autoSets) {
97
- if (field.source && queryFields.indexOf(field.source) == -1) {
98
- queryFields.push(field.source);
99
- }
100
- }
101
- }
102
- infoObj.props.queryFields = queryFields;
103
- infoObj.props.pageSize = dataOriginInfo.displayQuantity;
104
- return infoObj;
105
- }
106
- function getServiceQueryInfo(dataOriginInfo, pageContext2) {
107
- const infoObj = {};
108
- infoObj.type = "service";
109
- infoObj.props = {
110
- serivceCode: dataOriginInfo.serviceCode,
111
- systemCode: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode,
112
- systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode
113
- };
114
- if (dataOriginInfo.serviceInputs) {
115
- const searchForm = [];
116
- for (const f of dataOriginInfo.serviceInputs) {
117
- if (!f.name || f.value) {
118
- continue;
119
- }
120
- const tempObj = {};
121
- Object.assign(tempObj, f);
122
- searchForm.push(tempObj);
123
- }
124
- infoObj.props.inputs = searchForm;
125
- }
126
- infoObj.props.dataSetField = dataOriginInfo.serviceDataSetField;
127
- infoObj.props.valueField = dataOriginInfo.serviceValueField;
128
- infoObj.props.labelField = dataOriginInfo.serviceLabelField;
129
- return infoObj;
130
- }
131
- function updateChartDatasources(pageContext2, dataSourceConfs, appendParams) {
132
- return new Promise((resolve, reject) => {
133
- if (!dataSourceConfs || dataSourceConfs.length == 0) {
134
- reject(new Error("无需查询的统计图配置!"));
135
- return;
136
- }
137
- const entityData2 = pageContext2.entity ? pageContext2.entity : {};
138
- const additionalParamMap = {};
139
- if (entityData2.request) {
140
- Object.assign(additionalParamMap, entityData2.request);
141
- }
142
- if (entityData2.page) {
143
- Object.assign(additionalParamMap, entityData2.page);
144
- }
145
- if (appendParams) {
146
- Object.assign(additionalParamMap, appendParams);
147
- }
148
- const taskMap = {};
149
- if (entityData2.task) {
150
- Object.assign(taskMap, entityData2.task);
151
- }
152
- const param = {
153
- entityMap: entityData2.data,
154
- additionalParamMap,
155
- taskMap,
156
- dataSourceList: dataSourceConfs,
157
- systemCode: pageContext2.systemCode,
158
- pageCode: pageContext2.code
159
- };
160
- const url = window["$vueApp"].config.globalProperties.baseAPI + "common/common-data/find-chart-datas";
161
- request.post(url, param).then((result) => {
162
- if (!pageContext2.chartDataSourceMap) {
163
- pageContext2.chartDataSourceMap = {};
164
- }
165
- for (const uuid in result) {
166
- pageContext2.chartDataSourceMap[uuid] = result[uuid];
167
- const componentObj = globalRefs.getComponentRef(pageContext2, uuid);
168
- if (componentObj && componentObj.updateChartDatas) {
169
- componentObj.updateChartDatas(result[uuid]);
170
- }
171
- }
172
- console.log("查询统计图数据完成", result);
173
- resolve(result);
174
- }).catch((error) => {
175
- console.log("查询统计图数据失败", error);
176
- reject(error);
177
- });
178
- });
179
- }
180
- function updateOptionDatasources(pageContext2, dataSourceConfs, query) {
181
- return new Promise((resolve, reject) => {
182
- if (!dataSourceConfs || dataSourceConfs.length == 0) {
183
- reject(new Error("无需查询的配置!"));
184
- return;
185
- }
186
- const entityData2 = pageContext2.entity ? pageContext2.entity : {};
187
- const additionalParamMap = {};
188
- if (entityData2.request) {
189
- Object.assign(additionalParamMap, entityData2.request);
190
- }
191
- if (entityData2.page) {
192
- Object.assign(additionalParamMap, entityData2.page);
193
- }
194
- additionalParamMap.query = query;
195
- const param = {
196
- entityMap: entityData2.data,
197
- additionalParamMap,
198
- dataSourceList: dataSourceConfs,
199
- systemCode: pageContext2.systemCode,
200
- query
201
- };
202
- const url = window["$vueApp"].config.globalProperties.baseAPI + "common/common-data/find-datas";
203
- request.post(url, param).then((result) => {
204
- if (!pageContext2.optionSourceMap) {
205
- pageContext2.optionSourceMap = {};
206
- }
207
- for (const uuid in result) {
208
- pageContext2.optionSourceMap[uuid] = result[uuid];
209
- const componentObj = globalRefs.getComponentRef(pageContext2, uuid);
210
- if (componentObj && componentObj.updateOptions) {
211
- componentObj.updateOptions(result[uuid]);
212
- }
213
- }
214
- console.log("查询选项数据完成", result);
215
- resolve(result);
216
- }).catch((error) => {
217
- console.log("查询选项数据失败", error);
218
- reject(error);
219
- });
220
- });
221
- }
222
- function getOptionDatasFromPage(pageContext2, configure2) {
223
- if (!pageContext2 || !pageContext2.optionSourceMap || !configure2) {
224
- return [];
225
- }
226
- const cacheOptions = pageContext2.optionSourceMap[configure2.uuid];
227
- return cacheOptions ? cacheOptions : [];
228
- }
229
- function getChartDatasFromPage(pageContext2, configure2) {
230
- if (!pageContext2 || !pageContext2.chartDataSourceMap || !configure2) {
231
- return null;
232
- }
233
- const cacheDatas = pageContext2.chartDataSourceMap[configure2.uuid];
234
- return cacheDatas;
235
- }
236
- function queryOptionDatasources(pageContext2, dataSourceConf, query) {
237
- return updateOptionDatasources(pageContext2, dataSourceConf ? [dataSourceConf] : [], query);
238
- }
239
- function queryOptions(component, pageContext2, query) {
240
- if (!component.props || !component.props.dataOrigin) {
241
- return new Promise(function(resolve, reject) {
242
- resolve([]);
243
- });
244
- }
245
- const dataOriginInfo = component.props.dataOrigin;
246
- if (dataOriginInfo.optionValueSetType == "dynamicData") {
247
- if (!dataOriginInfo.dynamicDataSourceCode) {
248
- return new Promise(function(resolve, reject) {
249
- throw new Error("未指定动态数据源!");
250
- });
251
- }
252
- return queryByDynamicCode(dataOriginInfo.dynamicDataSourceCode, query);
253
- } else if (dataOriginInfo.optionValueSetType == "dataTable") {
254
- if (!dataOriginInfo.tableName) {
255
- return new Promise(function(resolve, reject) {
256
- throw new Error("未指定查询的数据表!");
257
- });
258
- }
259
- const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
260
- return queryByTable(tempObj);
261
- } else {
262
- return new Promise(function(resolve, reject) {
263
- throw new Error("无有效的查询设置!");
264
- });
265
- }
266
- }
267
- function queryByDynamicCode(dynamicCode, query) {
268
- const param = {
269
- code: dynamicCode,
270
- query
271
- };
272
- return request.post("", param);
273
- }
274
- function queryByTable(tableQueryInfo) {
275
- const param = tableQueryInfo.props;
276
- return request.post("", param);
277
- }
278
- function autoSetAfterSelect(component, pageContext2, autoSets, selItems) {
279
- if (!autoSets || autoSets.length == 0) {
280
- return;
281
- }
282
- const entity = pageContext2.entity ? pageContext2.entity : {};
283
- for (const as of autoSets) {
284
- if (!as.source || !as.target) {
285
- continue;
286
- }
287
- const values = getValuesByField(selItems, as.source);
288
- let targetField = as.target;
289
- if (!targetField || !targetField.startsWith("${")) {
290
- continue;
291
- }
292
- targetField = targetField.substring(2, targetField.length - 1);
293
- const fields = targetField.split(".");
294
- setVariableValue(entity, fields, values.join(","));
295
- }
296
- }
297
- function getValuesByField(items, fieldName) {
298
- if (!items) {
299
- return [""];
300
- } else {
301
- const values = [];
302
- for (const i of items) {
303
- let val = i[fieldName];
304
- if (val == void 0 || val == null) {
305
- val = "";
306
- }
307
- values.push(val);
308
- }
309
- return values;
310
- }
311
- }
312
- function getVariableValue(entity, fields) {
313
- if (!entity || !fields || fields.length == 0) {
314
- return;
315
- }
316
- let tempObj = entity;
317
- for (let i = 0; i < fields.length; i++) {
318
- if (tempObj == void 0) {
319
- return tempObj;
320
- }
321
- const fieldName = fields[i];
322
- tempObj = tempObj[fieldName];
323
- }
324
- return tempObj;
325
- }
326
- function setVariableValue(entity, fields, newValue) {
327
- if (!entity || !fields || fields.length == 0) {
328
- return;
329
- }
330
- let tempObj = entity;
331
- for (let i = 0; i < fields.length; i++) {
332
- const fieldName = fields[i];
333
- if (i + 1 == fields.length) {
334
- tempObj[fieldName] = newValue;
335
- } else {
336
- tempObj = tempObj[fieldName];
337
- if (tempObj == void 0) {
338
- tempObj[fieldName] = {};
339
- tempObj = tempObj[fieldName];
340
- }
341
- }
342
- }
343
- }
344
- function formatVariableValue(pageContext2, variable) {
345
- if (!pageContext2 || variable == "" || variable == null || variable == void 0) {
346
- return variable;
347
- }
348
- const entity = pageContext2.entity ? pageContext2.entity : {};
349
- const t = getParamNames(variable);
350
- for (const c in t) {
351
- const param = t[c];
352
- const paramValue = getValueFromVariable(entity, param);
353
- variable = variable.replace(
354
- param,
355
- paramValue == void 0 || paramValue == null ? "" : paramValue
356
- );
357
- }
358
- return variable;
359
- }
360
- function getParamNames(variable) {
361
- if (!variable) {
362
- return [];
363
- }
364
- const reg = /\$\{[^\{|\}]+\}/g;
365
- return variable.match(reg);
366
- }
367
- function formatValueByType(value, formatType, formatInfo) {
368
- if (!formatType || value == "" || value == null || value == void 0) {
369
- return value;
370
- }
371
- console.log("aaa", value, formatType, formatInfo);
372
- formatInfo = formatInfo ? formatInfo : {};
373
- if (formatType == "number" || formatType == "percent") {
374
- if (isNaN(value)) {
375
- return value;
376
- }
377
- let precision = parseInt(formatInfo.decimalDigit);
378
- if (precision == null || isNaN(precision)) {
379
- precision = -1;
380
- }
381
- value = parseFloat(value);
382
- if (formatType == "percent") {
383
- value = value * 100;
384
- }
385
- if (precision > -1) {
386
- value = parseFloat(value.toFixed(precision));
387
- }
388
- if (formatType == "percent") {
389
- value = value + "%";
390
- } else {
391
- if (formatInfo.thousandsSeparator) {
392
- const parts = value.toString().split(".");
393
- parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
394
- value = parts.length > 1 ? parts.join(".") : parts[0];
395
- }
396
- if (formatInfo.symbol) {
397
- value = formatInfo.symbol + "" + value;
398
- }
399
- }
400
- return value;
401
- } else if (formatType == "date" || formatType == "time") {
402
- let formatStr = "";
403
- if (formatType == "date") {
404
- formatStr = formatInfo.dateFormat;
405
- if (!formatStr) {
406
- formatStr = "YYYY-MM-DD";
407
- }
408
- } else {
409
- formatStr = formatInfo.timeFormat;
410
- if (!formatStr) {
411
- formatStr = "HH:mm:ss";
412
- }
413
- }
414
- return dayjs_min(value).format(formatStr);
415
- } else if (formatType == "custom" && formatInfo.formatEventUuid) {
416
- console.log("自定义方法", formatInfo);
417
- }
418
- return value;
419
- }
420
- function getValueFromVariable(entity, variable) {
421
- if (variable == null || variable == void 0) {
422
- return variable;
423
- }
424
- if (variable.startsWith("${") && variable.endsWith("}")) {
425
- let paramName = variable.substring(2, variable.length - 1);
426
- let paramType = null;
427
- let valueSource = null;
428
- if (paramName.startsWith("data.")) {
429
- paramName = paramName.substring(5);
430
- valueSource = entity.data;
431
- paramType = "data";
432
- } else if (paramName.startsWith("page.")) {
433
- paramName = paramName.substring(5);
434
- paramType = "page";
435
- valueSource = entity.page;
436
- } else if (paramName.startsWith("task.")) {
437
- paramName = paramName.substring(5);
438
- paramType = "task";
439
- valueSource = entity.task;
440
- } else if (paramName.startsWith("request.")) {
441
- paramName = paramName.substring(8);
442
- paramType = "request";
443
- valueSource = entity.request;
444
- } else if (paramName.startsWith("context.")) {
445
- paramName = paramName.substring(8);
446
- paramType = "context";
447
- valueSource = entity.context;
448
- } else if (paramName.startsWith("system.")) {
449
- paramName = paramName.substring(7);
450
- paramType = "system";
451
- valueSource = entity.system;
452
- } else if (paramName.startsWith("fixed.")) {
453
- return paramName.substring(6);
454
- }
455
- if (!paramName || !paramName) {
456
- console.log("获取变量失败", variable, entity);
457
- return "";
458
- }
459
- return getValueFromSource(valueSource, paramName, paramType);
460
- } else {
461
- return variable;
462
- }
463
- }
464
- function getValueFromSource(valueSource, paramName, paramType) {
465
- if (!valueSource || !paramName) {
466
- return void 0;
467
- }
468
- const firstIndex = paramName.indexOf(".");
469
- if (firstIndex > -1) {
470
- const tempParamName = paramName.substring(0, firstIndex);
471
- const newParamName = paramName.substring(firstIndex + 1);
472
- return getValueFromSource(valueSource[tempParamName], newParamName, paramType);
473
- } else {
474
- if (paramType == "context") {
475
- if (paramName == "currentDate" || paramName == "currentTime") {
476
- return /* @__PURE__ */ new Date();
477
- }
478
- }
479
- return valueSource[paramName];
480
- }
481
- }
482
- function openLink(component, pageContext2) {
483
- const linkPage = component && component.props && component.props.linkPage ? component.props.linkPage : {};
484
- if (!linkPage.linkType) {
485
- alert("未指定打开方式!");
486
- return;
487
- }
488
- let linkUrl = "";
489
- if (linkPage.linkType == "url") {
490
- linkUrl = linkPage.jumpPageUrl;
491
- if (!linkUrl) {
492
- alert("未设置链接地址!");
493
- return;
494
- }
495
- } else {
496
- if (!linkPage.jumpPageCode) {
497
- alert("未选择页面!");
498
- return;
499
- }
500
- linkUrl = "page:" + linkPage.jumpPageCode;
501
- }
502
- let appendParams = "";
503
- if (linkPage.isNeedId) {
504
- const entity = pageContext2.entity ? pageContext2.entity : {};
505
- const data = entity.data ? entity.data : {};
506
- appendParams = "id=" + (data.id ? data.id : "");
507
- }
508
- if (linkPage.appendParams) {
509
- for (const p of linkPage.appendParams) {
510
- if (!p.name) {
511
- continue;
512
- }
513
- if (appendParams.length > 0) {
514
- appendParams += "&";
515
- }
516
- appendParams += p.name + "=";
517
- appendParams += formatVariableValue(pageContext2, p.value);
518
- }
519
- }
520
- if (appendParams) {
521
- if (linkUrl.indexOf("?") == -1) {
522
- linkUrl += "?";
523
- } else {
524
- linkUrl += "&";
525
- }
526
- linkUrl += appendParams;
527
- }
528
- alert("链接到:" + linkUrl);
529
- }
530
- function caculateShowCondition(pageContext, configure, showConditions) {
531
- if (!showConditions || showConditions.length == 0 || !pageContext || !pageContext.entity) {
532
- return true;
533
- }
534
- const entityData = pageContext.entity;
535
- let conditions = "";
536
- const maxLen = showConditions.length;
537
- for (let i = 0; i < maxLen; i++) {
538
- const condition = showConditions[i];
539
- const propName = condition.propName;
540
- let operator = condition.operator;
541
- if (!propName || propName === "") {
542
- continue;
543
- }
544
- if (!operator) {
545
- operator = "EQ";
546
- }
547
- const leftValue = getValueFromVariable(entityData, propName);
548
- let propValue = getValueFromVariable(entityData, condition.propValue);
549
- const dataType = condition.dataType;
550
- if (operator == "CONTAIN" || operator == "NOT_CONTAIN") {
551
- if (leftValue && !leftValue.includes) {
552
- operator = operator == "CONTAIN" ? "EQ" : "NET";
553
- }
554
- }
555
- let variableIsNullStr = condition.variableIsNull;
556
- if (!variableIsNullStr) {
557
- variableIsNullStr = "null";
558
- }
559
- let conditionResult = void 0;
560
- if (propValue === void 0 || propValue === "") {
561
- propValue = null;
562
- if (variableIsNullStr === "null") {
563
- operator = "IS_NULL";
564
- } else if (variableIsNullStr === "notequal") {
565
- operator = "IS_NOT_NULL";
566
- } else {
567
- conditionResult = true;
568
- }
569
- }
570
- if (conditionResult == void 0) {
571
- try {
572
- conditionResult = calculatorUtil.executeExpression(leftValue, operator, propValue, dataType);
573
- } catch (e) {
574
- console.log("executeExpression error", e);
575
- conditionResult = false;
576
- }
577
- }
578
- const leftBracket = condition.leftBracket;
579
- const rightBracket = condition.rightBracket;
580
- let joinSign = condition.joinSign;
581
- if (leftBracket && leftBracket !== null && leftBracket !== "") {
582
- conditions = conditions + leftBracket;
583
- conditions = conditions + " ";
584
- }
585
- conditions += conditionResult + " ";
586
- if (rightBracket && rightBracket !== null && rightBracket !== "") {
587
- conditions = conditions + rightBracket;
588
- conditions = conditions + " ";
589
- }
590
- if (i < maxLen - 1) {
591
- if (joinSign && joinSign !== null && joinSign !== "") {
592
- const joinSignIgnoreCase = joinSign.toLowerCase();
593
- if (joinSignIgnoreCase === "and") {
594
- joinSign = joinSignIgnoreCase.replace("and", "&&");
595
- } else if (joinSignIgnoreCase === "or") {
596
- joinSign = joinSignIgnoreCase.replace("or", "||");
597
- }
598
- conditions += joinSign + " ";
599
- }
600
- }
601
- }
602
- if (conditions) {
603
- return eval("(" + conditions + ")");
604
- } else {
605
- return true;
606
- }
607
- }
608
- exports.autoSetAfterSelect = autoSetAfterSelect;
609
- exports.caculateShowCondition = caculateShowCondition;
610
- exports.formatValueByType = formatValueByType;
611
- exports.formatVariableValue = formatVariableValue;
612
- exports.getChartDatasFromPage = getChartDatasFromPage;
613
- exports.getComponentOptionConfigs = getComponentOptionConfigs;
614
- exports.getOptionDatasFromPage = getOptionDatasFromPage;
615
- exports.getValueFromSource = getValueFromSource;
616
- exports.getVariableValue = getVariableValue;
617
- exports.openLink = openLink;
618
- exports.queryOptionDatasources = queryOptionDatasources;
619
- exports.queryOptions = queryOptions;
620
- exports.setVariableValue = setVariableValue;
621
- exports.updateChartDatasources = updateChartDatasources;
622
- exports.updateOptionDatasources = updateOptionDatasources;
@@ -1,38 +0,0 @@
1
- import { Component, PageContext, PageDesign } from './interfaces/page-design-types';
2
-
3
- /**
4
- * 查询页面设计对象
5
- * @param pageId
6
- * @returns
7
- */
8
- export declare function queryPageDesign(pageId: number): Promise<any>;
9
- /**
10
- * 查询页面设计对象
11
- * @param pageCode
12
- * @returns
13
- */
14
- export declare function queryPageDesignByCode(pageCode: string): Promise<any>;
15
- /**
16
- * 转换页面设计对象为运行时对象
17
- * @param pageDesign 页面设计对象
18
- */
19
- export declare function convertToPageContext(pageDesign: PageDesign, pageRequest: object): PageContext | null;
20
- /**
21
- * 获取表单元素模型名称
22
- * @param pageContext 页面对象
23
- * @param formItemConfigure 表单元素配置参数
24
- */
25
- export declare function getFormModelFields(pageContext: PageContext, formItemConfigure: Component): string[];
26
- /**
27
- * 获取组件的权限编码
28
- * @param configure
29
- * @param pageContext
30
- * @returns
31
- */
32
- export declare function getPermissionCodes(configure: Component, pageContext: PageContext): string;
33
- /**
34
- * 查询页面中所有列表配置
35
- * @param pageCode
36
- * @returns
37
- */
38
- export declare function queryPageSuperGrids(pageDesign: any, pageContext: any, publishVersion: any): Promise<any>;