super-page-runtime 0.0.2-tmp7 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/es/components/runtime/index.d.ts +1 -3
  2. package/dist/es/components/runtime/index.js +4 -0
  3. package/dist/es/components/runtime/utils/api/api-util.js +3 -3
  4. package/dist/es/components/runtime/utils/assemblys-config.js +2 -9
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +1 -14
  6. package/dist/es/components/runtime/utils/common-util.d.ts +0 -5
  7. package/dist/es/components/runtime/utils/common-util.js +2 -15
  8. package/dist/es/components/runtime/utils/eventBus.js +1 -1
  9. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  10. package/dist/es/components/runtime/utils/events/standard-event.js +6 -6
  11. package/dist/es/components/runtime/utils/events/validator-util.js +3 -3
  12. package/dist/es/components/runtime/utils/global-refs.js +1 -1
  13. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +0 -2
  14. package/dist/es/components/runtime/utils/page-helper-util.d.ts +0 -19
  15. package/dist/es/components/runtime/utils/page-helper-util.js +3 -119
  16. package/dist/es/components/runtime/utils/page-init-util.js +2 -2
  17. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  18. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
  19. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +2 -2
  21. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +8 -203
  22. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +6 -6
  23. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +6 -6
  24. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +6 -6
  25. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +6 -6
  26. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
  27. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +3 -3
  28. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +3 -3
  29. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  30. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +1 -1
  31. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +1 -1
  32. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +1 -1
  33. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
  35. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +1 -1
  37. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -3
  38. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +1 -1
  39. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +5 -5
  40. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +1 -1
  41. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -1
  42. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +1 -1
  43. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +4 -4
  44. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +1 -1
  45. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  46. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +1 -1
  47. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -1
  50. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +1 -1
  51. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -1
  52. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +3 -3
  53. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +1 -1
  54. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +1 -1
  55. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +1 -1
  56. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +1 -1
  57. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +1 -1
  58. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
  59. package/dist/es/components/runtime/views/super-page.vue.js +8 -22
  60. package/dist/es/components/super-page-dialog/index.d.ts +3 -0
  61. package/dist/es/components/{runtime/views → super-page-dialog}/super-page-dialog.vue.js +2 -3
  62. package/dist/es/components/super-page-dialog/super-page-dialog.vue2.js +4 -0
  63. package/dist/es/components/wf-editor/index.d.ts +3 -0
  64. package/dist/es/components/wf-editor/index.js +4 -0
  65. package/dist/es/components/wf-editor/wf-editor.css +4 -0
  66. package/dist/es/components/wf-editor/wf-editor.vue.js +16 -0
  67. package/dist/es/index.d.ts +4 -7
  68. package/dist/es/index.js +3 -12
  69. package/dist/favicon.ico +0 -0
  70. package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -0
  71. package/dist/lib/assets/chart-themes/theme1.js +7 -0
  72. package/dist/lib/assets/chart-themes/theme2.js +7 -0
  73. package/dist/lib/assets/chart-themes/theme3.js +7 -0
  74. package/dist/lib/components/runtime/index.d.ts +3 -0
  75. package/dist/lib/components/runtime/index.js +3 -0
  76. package/dist/lib/components/runtime/utils/api/api-util.d.ts +11 -0
  77. package/dist/lib/components/runtime/utils/api/api-util.js +128 -0
  78. package/dist/lib/components/runtime/utils/assemblys-config.js +258 -0
  79. package/dist/lib/components/runtime/utils/charts/chart-util.js +15 -0
  80. package/dist/lib/components/runtime/utils/common-util.d.ts +11 -0
  81. package/dist/lib/components/runtime/utils/common-util.js +81 -0
  82. package/dist/lib/components/runtime/utils/eventBus.d.ts +7 -0
  83. package/dist/lib/components/runtime/utils/eventBus.js +10 -0
  84. package/dist/lib/components/runtime/utils/events/event-util.d.ts +48 -0
  85. package/dist/lib/components/runtime/utils/events/event-util.js +526 -0
  86. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +61 -0
  87. package/dist/lib/components/runtime/utils/events/standard-event.js +1624 -0
  88. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +4 -0
  89. package/dist/lib/components/runtime/utils/events/validator-util.js +389 -0
  90. package/dist/lib/components/runtime/utils/global-refs.d.ts +59 -0
  91. package/dist/lib/components/runtime/utils/global-refs.js +65 -0
  92. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +221 -0
  93. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +9 -0
  94. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +87 -0
  95. package/dist/lib/components/runtime/utils/page-helper-util.js +503 -0
  96. package/dist/lib/components/runtime/utils/page-init-util.d.ts +38 -0
  97. package/dist/lib/components/runtime/utils/page-init-util.js +200 -0
  98. package/dist/lib/components/runtime/utils/store-util.d.ts +15 -0
  99. package/dist/lib/components/runtime/utils/store-util.js +17 -0
  100. package/dist/lib/components/runtime/utils/store.d.ts +2 -0
  101. package/dist/lib/components/runtime/utils/store.js +3 -0
  102. package/dist/lib/components/runtime/utils/table-utils.js +24 -0
  103. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
  104. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
  105. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
  106. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
  107. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
  108. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
  109. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
  110. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +53 -0
  111. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
  112. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +49 -0
  113. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
  114. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +50 -0
  115. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
  116. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +50 -0
  117. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
  118. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +51 -0
  119. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
  120. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +147 -0
  121. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
  122. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
  123. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
  124. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
  125. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
  126. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
  127. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
  128. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
  129. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
  130. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
  131. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +74 -0
  132. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
  133. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +79 -0
  134. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
  135. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +43 -0
  136. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
  137. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +44 -0
  138. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
  139. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +30 -0
  140. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
  141. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +69 -0
  142. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
  143. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +75 -0
  144. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +642 -0
  145. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
  146. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +453 -0
  147. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
  148. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
  149. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +87 -0
  150. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
  151. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +22 -0
  152. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +3 -0
  153. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
  154. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
  155. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
  156. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
  157. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
  158. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +63 -0
  159. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
  160. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
  161. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
  162. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
  163. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
  164. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
  165. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
  166. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
  167. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
  168. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +127 -0
  169. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
  170. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
  171. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
  172. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
  173. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
  174. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
  175. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
  176. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +162 -0
  177. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
  178. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
  179. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
  180. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
  181. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
  182. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
  183. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
  184. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
  185. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
  186. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +142 -0
  187. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +3 -0
  188. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
  189. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
  190. package/dist/lib/components/runtime/views/super-page.vue.d.ts +91 -0
  191. package/dist/lib/components/runtime/views/super-page.vue.js +481 -0
  192. package/dist/lib/components/runtime/views/super-page.vue2.js +3 -0
  193. package/dist/lib/components/super-page-dialog/index.d.ts +3 -0
  194. package/dist/lib/components/super-page-dialog/index.js +3 -0
  195. package/dist/lib/components/super-page-dialog/super-page-dialog.vue.d.ts +36 -0
  196. package/dist/lib/components/super-page-dialog/super-page-dialog.vue.js +73 -0
  197. package/dist/lib/components/super-page-dialog/super-page-dialog.vue2.js +3 -0
  198. package/dist/lib/components/wf-editor/index.d.ts +3 -0
  199. package/dist/lib/components/wf-editor/index.js +3 -0
  200. package/dist/lib/components/wf-editor/wf-editor.css +4 -0
  201. package/dist/lib/components/wf-editor/wf-editor.vue.d.ts +2 -0
  202. package/dist/lib/components/wf-editor/wf-editor.vue.js +15 -0
  203. package/dist/lib/favicon.ico +0 -0
  204. package/dist/lib/index.d.ts +5 -0
  205. package/dist/lib/index.js +8 -0
  206. package/dist/super-page-runtime.umd.js +213932 -0
  207. package/package.json +68 -70
  208. package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
  209. package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
  210. package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
  211. package/dist/es/assets/images/button/button-group.png.js +0 -4
  212. package/dist/es/assets/images/button/button.png.js +0 -4
  213. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +0 -11
  214. package/dist/es/components/runtime/utils/page-permission-util.d.ts +0 -26
  215. package/dist/es/components/runtime/utils/page-permission-util.js +0 -525
  216. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -62
  217. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -4
  218. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -57
  219. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -4
  220. package/dist/es/components/runtime/views/wf-editor.vue.js +0 -7
  221. package/dist/es/components/runtime/views/wf-editor.vue2.js +0 -25
  222. package/dist/es/components/runtime/views/wf-editor.vue3.js +0 -1
  223. package/dist/es/style.css +0 -4
  224. /package/dist/es/components/{runtime/views/super-page-dialog.vue2.js → super-page-dialog/index.js} +0 -0
  225. /package/dist/es/components/{runtime/views → super-page-dialog}/super-page-dialog.vue.d.ts +0 -0
  226. /package/dist/es/components/{runtime/views → wf-editor}/wf-editor.vue.d.ts +0 -0
@@ -0,0 +1,503 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const http = require("D:/MyToolbox/ws-idea/agile-builder/dev-platform/agile-builder-super-design/node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/request.js");
4
+ const dayjs = require("D:/MyToolbox/ws-idea/agile-builder/dev-platform/agile-builder-super-design/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js");
5
+ const calculatorUtil_js = require("D:/MyToolbox/ws-idea/agile-builder/dev-platform/agile-builder-super-design/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 getTableQueryInfo(dataOriginInfo, pageContext2) {
8
+ const infoObj = {};
9
+ infoObj.type = "dataTable";
10
+ infoObj.props = {
11
+ tableName: dataOriginInfo.tableName,
12
+ systemCode: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode,
13
+ systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysVersion : pageContext2.systemVersion
14
+ };
15
+ if (dataOriginInfo.sortFields) {
16
+ const sortFields = [];
17
+ for (const field of dataOriginInfo.sortFields) {
18
+ if (field.name) {
19
+ sortFields.push({
20
+ prop: field.name,
21
+ order: field.type ? field.type : "asc"
22
+ });
23
+ }
24
+ }
25
+ infoObj.props.sorts = sortFields;
26
+ }
27
+ const autoMonitorFields = [];
28
+ if (dataOriginInfo.filterList) {
29
+ const searchForm = [];
30
+ for (const f of dataOriginInfo.filterList) {
31
+ if (!f.propName) {
32
+ continue;
33
+ }
34
+ if (!f.propDbName) {
35
+ f.propDbName = f.propName;
36
+ }
37
+ const tempObj = {};
38
+ Object.assign(tempObj, f);
39
+ const paramsNames = getParamNames(f.propValue);
40
+ for (const p of paramsNames) {
41
+ if (p && (p.startsWith("${data.") || p.startsWith("${task.") || p.startsWith("${page."))) {
42
+ if (!autoMonitorFields.includes(p)) {
43
+ autoMonitorFields.push(p);
44
+ }
45
+ }
46
+ }
47
+ if (f.propValue)
48
+ ;
49
+ searchForm.push(tempObj);
50
+ }
51
+ infoObj.props.searchForm = searchForm;
52
+ }
53
+ infoObj.props.monitorFields = autoMonitorFields;
54
+ const queryFields = [];
55
+ if (dataOriginInfo.tableValueField) {
56
+ infoObj.props.valueField = dataOriginInfo.tableValueField;
57
+ }
58
+ if (dataOriginInfo.tableLableField && queryFields.indexOf(dataOriginInfo.tableLableField) == -1) {
59
+ infoObj.props.lableField = dataOriginInfo.tableLableField;
60
+ }
61
+ if (dataOriginInfo.autoSets) {
62
+ for (const field of dataOriginInfo.autoSets) {
63
+ if (field.source && queryFields.indexOf(field.source) == -1) {
64
+ queryFields.push(field.source);
65
+ }
66
+ }
67
+ }
68
+ infoObj.props.queryFields = queryFields;
69
+ infoObj.props.pageSize = dataOriginInfo.displayQuantity;
70
+ return infoObj;
71
+ }
72
+ function updateOptionDatasources(pageContext2, dataSourceConfs, query) {
73
+ return new Promise((resolve, reject) => {
74
+ if (!dataSourceConfs || dataSourceConfs.length == 0) {
75
+ reject(new Error("无需查询的配置!"));
76
+ return;
77
+ }
78
+ const entityData2 = pageContext2.entity ? pageContext2.entity : {};
79
+ const additionalParamMap = {};
80
+ if (entityData2.request) {
81
+ Object.assign(additionalParamMap, entityData2.request);
82
+ }
83
+ if (entityData2.page) {
84
+ Object.assign(additionalParamMap, entityData2.page);
85
+ }
86
+ additionalParamMap.query = query;
87
+ const param = {
88
+ entityMap: entityData2.data,
89
+ additionalParamMap,
90
+ dataSourceList: dataSourceConfs,
91
+ systemCode: pageContext2.systemCode,
92
+ query
93
+ };
94
+ const url = window["$vueApp"].config.globalProperties.baseAPI + "common/common-data/find-datas";
95
+ http.post(url, param).then((result) => {
96
+ if (!pageContext2.optionSourceMap) {
97
+ pageContext2.optionSourceMap = {};
98
+ }
99
+ for (const uuid in result) {
100
+ pageContext2.optionSourceMap[uuid] = result[uuid];
101
+ const componentObj = globalRefs.getComponentRef(pageContext2, uuid);
102
+ if (componentObj && componentObj.updateOptions) {
103
+ componentObj.updateOptions(result[uuid]);
104
+ }
105
+ }
106
+ console.log("查询选项数据完成", result);
107
+ resolve(result);
108
+ }).catch((error) => {
109
+ console.log("查询选项数据失败", error);
110
+ reject(error);
111
+ });
112
+ });
113
+ }
114
+ function getOptionDatasFromPage(pageContext2, configure2) {
115
+ if (!pageContext2 || !pageContext2.optionSourceMap || !configure2) {
116
+ return [];
117
+ }
118
+ const cacheOptions = pageContext2.optionSourceMap[configure2.uuid];
119
+ return cacheOptions ? cacheOptions : [];
120
+ }
121
+ function queryOptionDatasources(pageContext2, dataSourceConf, query) {
122
+ return updateOptionDatasources(pageContext2, dataSourceConf ? [dataSourceConf] : [], query);
123
+ }
124
+ function queryOptions(component, pageContext2, query) {
125
+ if (!component.props || !component.props.dataOrigin) {
126
+ return new Promise(function(resolve, reject) {
127
+ resolve([]);
128
+ });
129
+ }
130
+ const dataOriginInfo = component.props.dataOrigin;
131
+ if (dataOriginInfo.optionValueSetType == "dynamicData") {
132
+ if (!dataOriginInfo.dynamicDataSourceCode) {
133
+ return new Promise(function(resolve, reject) {
134
+ throw new Error("未指定动态数据源!");
135
+ });
136
+ }
137
+ return queryByDynamicCode(dataOriginInfo.dynamicDataSourceCode, query);
138
+ } else if (dataOriginInfo.optionValueSetType == "dataTable") {
139
+ if (!dataOriginInfo.tableName) {
140
+ return new Promise(function(resolve, reject) {
141
+ throw new Error("未指定查询的数据表!");
142
+ });
143
+ }
144
+ const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
145
+ return queryByTable(tempObj);
146
+ } else {
147
+ return new Promise(function(resolve, reject) {
148
+ throw new Error("无有效的查询设置!");
149
+ });
150
+ }
151
+ }
152
+ function queryByDynamicCode(dynamicCode, query) {
153
+ const param = {
154
+ code: dynamicCode,
155
+ query
156
+ };
157
+ return http.post("", param);
158
+ }
159
+ function queryByTable(tableQueryInfo) {
160
+ const param = tableQueryInfo.props;
161
+ return http.post("", param);
162
+ }
163
+ function autoSetAfterSelect(component, pageContext2, autoSets, selItems) {
164
+ if (!autoSets || autoSets.length == 0) {
165
+ return;
166
+ }
167
+ const entity = pageContext2.entity ? pageContext2.entity : {};
168
+ for (const as of autoSets) {
169
+ if (!as.source || !as.target) {
170
+ continue;
171
+ }
172
+ const values = getValuesByField(selItems, as.source);
173
+ let targetField = as.target;
174
+ if (!targetField || !targetField.startsWith("${")) {
175
+ continue;
176
+ }
177
+ targetField = targetField.substring(2, targetField.length - 1);
178
+ const fields = targetField.split(".");
179
+ setVariableValue(entity, fields, values.join(","));
180
+ }
181
+ }
182
+ function getValuesByField(items, fieldName) {
183
+ if (!items) {
184
+ return [""];
185
+ } else {
186
+ const values = [];
187
+ for (const i of items) {
188
+ let val = i[fieldName];
189
+ if (val == void 0 || val == null) {
190
+ val = "";
191
+ }
192
+ values.push(val);
193
+ }
194
+ return values;
195
+ }
196
+ }
197
+ function getVariableValue(entity, fields) {
198
+ if (!entity || !fields || fields.length == 0) {
199
+ return;
200
+ }
201
+ let tempObj = entity;
202
+ for (let i = 0; i < fields.length; i++) {
203
+ if (tempObj == void 0) {
204
+ return tempObj;
205
+ }
206
+ const fieldName = fields[i];
207
+ tempObj = tempObj[fieldName];
208
+ }
209
+ return tempObj;
210
+ }
211
+ function setVariableValue(entity, fields, newValue) {
212
+ if (!entity || !fields || fields.length == 0) {
213
+ return;
214
+ }
215
+ let tempObj = entity;
216
+ for (let i = 0; i < fields.length; i++) {
217
+ const fieldName = fields[i];
218
+ if (i + 1 == fields.length) {
219
+ tempObj[fieldName] = newValue;
220
+ } else {
221
+ tempObj = tempObj[fieldName];
222
+ if (tempObj == void 0) {
223
+ tempObj[fieldName] = {};
224
+ tempObj = tempObj[fieldName];
225
+ }
226
+ }
227
+ }
228
+ }
229
+ function formatVariableValue(pageContext2, variable) {
230
+ if (!pageContext2 || variable == "" || variable == null || variable == void 0) {
231
+ return variable;
232
+ }
233
+ const entity = pageContext2.entity ? pageContext2.entity : {};
234
+ const t = getParamNames(variable);
235
+ for (const c in t) {
236
+ const param = t[c];
237
+ const paramValue = getValueFromVariable(entity, param);
238
+ variable = variable.replace(
239
+ param,
240
+ paramValue == void 0 || paramValue == null ? "" : paramValue
241
+ );
242
+ }
243
+ return variable;
244
+ }
245
+ function getParamNames(variable) {
246
+ if (!variable) {
247
+ return [];
248
+ }
249
+ const reg = /\$\{[^\{|\}]+\}/g;
250
+ return variable.match(reg);
251
+ }
252
+ function formatValueByType(value, formatType, formatInfo) {
253
+ if (!formatType || value == "" || value == null || value == void 0) {
254
+ return value;
255
+ }
256
+ console.log("aaa", value, formatType, formatInfo);
257
+ formatInfo = formatInfo ? formatInfo : {};
258
+ if (formatType == "number" || formatType == "percent") {
259
+ if (isNaN(value)) {
260
+ return value;
261
+ }
262
+ let precision = parseInt(formatInfo.decimalDigit);
263
+ if (precision == null || isNaN(precision)) {
264
+ precision = -1;
265
+ }
266
+ value = parseFloat(value);
267
+ if (formatType == "percent") {
268
+ value = value * 100;
269
+ }
270
+ if (precision > -1) {
271
+ value = parseFloat(value.toFixed(precision));
272
+ }
273
+ if (formatType == "percent") {
274
+ value = value + "%";
275
+ } else {
276
+ if (formatInfo.thousandsSeparator) {
277
+ const parts = value.toString().split(".");
278
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
279
+ value = parts.length > 1 ? parts.join(".") : parts[0];
280
+ }
281
+ if (formatInfo.symbol) {
282
+ value = formatInfo.symbol + "" + value;
283
+ }
284
+ }
285
+ return value;
286
+ } else if (formatType == "date" || formatType == "time") {
287
+ let formatStr = "";
288
+ if (formatType == "date") {
289
+ formatStr = formatInfo.dateFormat;
290
+ if (!formatStr) {
291
+ formatStr = "YYYY-MM-DD";
292
+ }
293
+ } else {
294
+ formatStr = formatInfo.timeFormat;
295
+ if (!formatStr) {
296
+ formatStr = "HH:mm:ss";
297
+ }
298
+ }
299
+ return dayjs(value).format(formatStr);
300
+ } else if (formatType == "custom" && formatInfo.formatEventUuid) {
301
+ console.log("自定义方法", formatInfo);
302
+ }
303
+ return value;
304
+ }
305
+ function getValueFromVariable(entity, variable) {
306
+ if (variable == null || variable == void 0) {
307
+ return variable;
308
+ }
309
+ if (variable.startsWith("${") && variable.endsWith("}")) {
310
+ let paramName = variable.substring(2, variable.length - 1);
311
+ let paramType = null;
312
+ let valueSource = null;
313
+ if (paramName.startsWith("data.")) {
314
+ paramName = paramName.substring(5);
315
+ valueSource = entity.data;
316
+ paramType = "data";
317
+ } else if (paramName.startsWith("page.")) {
318
+ paramName = paramName.substring(5);
319
+ paramType = "page";
320
+ valueSource = entity.page;
321
+ } else if (paramName.startsWith("task.")) {
322
+ paramName = paramName.substring(5);
323
+ paramType = "task";
324
+ valueSource = entity.task;
325
+ } else if (paramName.startsWith("request.")) {
326
+ paramName = paramName.substring(8);
327
+ paramType = "request";
328
+ valueSource = entity.request;
329
+ } else if (paramName.startsWith("context.")) {
330
+ paramName = paramName.substring(8);
331
+ paramType = "context";
332
+ valueSource = entity.context;
333
+ } else if (paramName.startsWith("system.")) {
334
+ paramName = paramName.substring(7);
335
+ paramType = "system";
336
+ valueSource = entity.system;
337
+ } else if (paramName.startsWith("fixed.")) {
338
+ return paramName.substring(6);
339
+ }
340
+ if (!paramName || !paramName) {
341
+ console.log("获取变量失败", variable, entity);
342
+ return "";
343
+ }
344
+ return getValueFromSource(valueSource, paramName, paramType);
345
+ } else {
346
+ return variable;
347
+ }
348
+ }
349
+ function getValueFromSource(valueSource, paramName, paramType) {
350
+ if (!valueSource || !paramName) {
351
+ return void 0;
352
+ }
353
+ const firstIndex = paramName.indexOf(".");
354
+ if (firstIndex > -1) {
355
+ const tempParamName = paramName.substring(0, firstIndex);
356
+ const newParamName = paramName.substring(firstIndex + 1);
357
+ return getValueFromSource(valueSource[tempParamName], newParamName, paramType);
358
+ } else {
359
+ if (paramType == "context") {
360
+ if (paramName == "currentDate" || paramName == "currentTime") {
361
+ return /* @__PURE__ */ new Date();
362
+ }
363
+ }
364
+ return valueSource[paramName];
365
+ }
366
+ }
367
+ function openLink(component, pageContext2) {
368
+ const linkPage = component && component.props && component.props.linkPage ? component.props.linkPage : {};
369
+ if (!linkPage.linkType) {
370
+ alert("未指定打开方式!");
371
+ return;
372
+ }
373
+ let linkUrl = "";
374
+ if (linkPage.linkType == "url") {
375
+ linkUrl = linkPage.jumpPageUrl;
376
+ if (!linkUrl) {
377
+ alert("未设置链接地址!");
378
+ return;
379
+ }
380
+ } else {
381
+ if (!linkPage.jumpPageCode) {
382
+ alert("未选择页面!");
383
+ return;
384
+ }
385
+ linkUrl = "page:" + linkPage.jumpPageCode;
386
+ }
387
+ let appendParams = "";
388
+ if (linkPage.isNeedId) {
389
+ const entity = pageContext2.entity ? pageContext2.entity : {};
390
+ const data = entity.data ? entity.data : {};
391
+ appendParams = "id=" + (data.id ? data.id : "");
392
+ }
393
+ if (linkPage.appendParams) {
394
+ for (const p of linkPage.appendParams) {
395
+ if (!p.name) {
396
+ continue;
397
+ }
398
+ if (appendParams.length > 0) {
399
+ appendParams += "&";
400
+ }
401
+ appendParams += p.name + "=";
402
+ appendParams += formatVariableValue(pageContext2, p.value);
403
+ }
404
+ }
405
+ if (appendParams) {
406
+ if (linkUrl.indexOf("?") == -1) {
407
+ linkUrl += "?";
408
+ } else {
409
+ linkUrl += "&";
410
+ }
411
+ linkUrl += appendParams;
412
+ }
413
+ alert("链接到:" + linkUrl);
414
+ }
415
+ function caculateShowCondition(pageContext, configure, showConditions) {
416
+ if (!showConditions || showConditions.length == 0 || !pageContext || !pageContext.entity) {
417
+ return true;
418
+ }
419
+ const entityData = pageContext.entity;
420
+ let conditions = "";
421
+ const maxLen = showConditions.length;
422
+ for (let i = 0; i < maxLen; i++) {
423
+ const condition = showConditions[i];
424
+ const propName = condition.propName;
425
+ let operator = condition.operator;
426
+ if (!propName || propName === "") {
427
+ continue;
428
+ }
429
+ if (!operator) {
430
+ operator = "EQ";
431
+ }
432
+ const leftValue = getValueFromVariable(entityData, propName);
433
+ let propValue = getValueFromVariable(entityData, condition.propValue);
434
+ const dataType = condition.dataType;
435
+ if (operator == "CONTAIN" || operator == "NOT_CONTAIN") {
436
+ if (leftValue && !leftValue.includes) {
437
+ operator = operator == "CONTAIN" ? "EQ" : "NET";
438
+ }
439
+ }
440
+ let variableIsNullStr = condition.variableIsNull;
441
+ if (!variableIsNullStr) {
442
+ variableIsNullStr = "null";
443
+ }
444
+ let conditionResult = void 0;
445
+ if (propValue === void 0 || propValue === "") {
446
+ propValue = null;
447
+ if (variableIsNullStr === "null") {
448
+ operator = "IS_NULL";
449
+ } else if (variableIsNullStr === "notequal") {
450
+ operator = "IS_NOT_NULL";
451
+ } else {
452
+ conditionResult = true;
453
+ }
454
+ }
455
+ if (conditionResult == void 0) {
456
+ try {
457
+ conditionResult = calculatorUtil_js.executeExpression(leftValue, operator, propValue, dataType);
458
+ } catch (e) {
459
+ console.log("executeExpression error", e);
460
+ conditionResult = false;
461
+ }
462
+ }
463
+ const leftBracket = condition.leftBracket;
464
+ const rightBracket = condition.rightBracket;
465
+ let joinSign = condition.joinSign;
466
+ if (leftBracket && leftBracket !== null && leftBracket !== "") {
467
+ conditions = conditions + leftBracket;
468
+ conditions = conditions + " ";
469
+ }
470
+ conditions += conditionResult + " ";
471
+ if (rightBracket && rightBracket !== null && rightBracket !== "") {
472
+ conditions = conditions + rightBracket;
473
+ conditions = conditions + " ";
474
+ }
475
+ if (i < maxLen - 1) {
476
+ if (joinSign && joinSign !== null && joinSign !== "") {
477
+ const joinSignIgnoreCase = joinSign.toLowerCase();
478
+ if (joinSignIgnoreCase === "and") {
479
+ joinSign = joinSignIgnoreCase.replace("and", "&&");
480
+ } else if (joinSignIgnoreCase === "or") {
481
+ joinSign = joinSignIgnoreCase.replace("or", "||");
482
+ }
483
+ conditions += joinSign + " ";
484
+ }
485
+ }
486
+ }
487
+ if (conditions) {
488
+ return eval("(" + conditions + ")");
489
+ } else {
490
+ return true;
491
+ }
492
+ }
493
+ exports.autoSetAfterSelect = autoSetAfterSelect;
494
+ exports.caculateShowCondition = caculateShowCondition;
495
+ exports.formatValueByType = formatValueByType;
496
+ exports.formatVariableValue = formatVariableValue;
497
+ exports.getOptionDatasFromPage = getOptionDatasFromPage;
498
+ exports.getVariableValue = getVariableValue;
499
+ exports.openLink = openLink;
500
+ exports.queryOptionDatasources = queryOptionDatasources;
501
+ exports.queryOptions = queryOptions;
502
+ exports.setVariableValue = setVariableValue;
503
+ exports.updateOptionDatasources = updateOptionDatasources;
@@ -0,0 +1,38 @@
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>;