super-page-runtime 2.1.933 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/index.d.ts +2 -1
  6. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  7. package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
  8. package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
  9. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  10. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  11. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  12. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  13. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  14. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  15. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  16. package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
  17. package/dist/es/components/runtime/utils/common-util.js +76 -153
  18. package/dist/es/components/runtime/utils/eventBus.js +3 -9
  19. package/dist/es/components/runtime/utils/events/event-util.js +343 -727
  20. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  21. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
  22. package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
  23. package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
  24. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  25. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  26. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  27. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  28. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  29. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  30. package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
  31. package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
  32. package/dist/es/components/runtime/utils/page-init-util.js +132 -370
  33. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  34. package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
  35. package/dist/es/components/runtime/utils/page-store.js +8 -12
  36. package/dist/es/components/runtime/utils/store-util.js +9 -13
  37. package/dist/es/components/runtime/utils/store.js +2 -2
  38. package/dist/es/components/runtime/utils/table-utils.js +45 -84
  39. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  40. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
  42. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  44. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  46. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  48. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  50. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  51. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  56. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -169
  57. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  58. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
  59. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
  60. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
  62. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
  64. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
  66. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
  68. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
  69. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
  70. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  71. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  72. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  73. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
  75. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  76. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  77. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  78. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +197 -510
  80. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
  81. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  82. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  83. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
  84. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  85. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
  87. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  88. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  89. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  91. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  93. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  95. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  97. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  99. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  100. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  101. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  103. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  105. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  107. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +302 -803
  108. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +249 -594
  110. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  111. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  113. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  115. package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
  116. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  117. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  119. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  120. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  121. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  123. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  124. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  125. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +66 -239
  126. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  127. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
  128. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  129. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  130. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  131. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +51 -173
  132. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  133. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  134. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  135. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -249
  136. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  137. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  138. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  139. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  140. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  141. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  142. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  143. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +61 -189
  144. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  145. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +87 -244
  146. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +77 -261
  148. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  150. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  152. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  153. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  154. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  155. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  156. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
  157. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
  158. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
  159. package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
  160. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
  161. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  162. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  163. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  164. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  165. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  166. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  167. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  168. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  169. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  170. package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
  171. package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
  172. package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
  173. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
  174. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
  175. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  176. package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
  177. package/dist/es/components/runtime/views/super-page.vue.js +222 -708
  178. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  179. package/dist/es/i18n/langs/cn.js +2 -55
  180. package/dist/es/i18n/langs/en.js +2 -55
  181. package/dist/es/index.d.ts +2 -2
  182. package/dist/es/index.js +6 -4
  183. package/package.json +3 -2
@@ -16,7 +16,12 @@ export declare function queryPageDesignByCode(pageCode: string): Promise<any>;
16
16
  * 转换页面设计对象为运行时对象
17
17
  * @param pageDesign 页面设计对象
18
18
  */
19
- export declare function convertToPageContext(pageDesign: PageDesign, pageRequest: object): PageContext | null;
19
+ export declare function convertToPageContext(pageDesign: PageDesign): PageContext | null;
20
+ /**
21
+ * 获取请求对象的值
22
+ */
23
+ export declare function packageAdditionalMapWithLocationSearch(requestObj: any): any;
24
+ export declare function packageAdditionalMapWithPageRequest(pageRequest: object, requestObj: any): void;
20
25
  export declare function packageAdditionalMapWithRoute(route: any, requestObj: any): void;
21
26
  export declare function getModelFields(formItemConfigure: any, prop?: string): string[];
22
27
  /**
@@ -1,400 +1,162 @@
1
- import http from "agilebuilder-ui/src/utils/request";
2
- import { getAdditionalParamMap } from "./events/standard-event.js";
3
- import { PageDimensions } from "./interfaces/page-design-types.js";
4
- import { setVariableValue, formatVariableValue, getFormPropName } from "./page-helper-util.js";
5
- import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
6
- import { functions } from "./api/page-expose-util.js";
7
- import { isWorkflowPage, deepCopy } from "./common-util.js";
8
- import { packageCustomValidator } from "./events/validator-util.js";
9
- function queryPageDesignByCode(pageCode) {
10
- return http.get(
11
- window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + pageCode
12
- );
1
+ import e from "agilebuilder-ui/src/utils/request";
2
+ import { getAdditionalParamMap as t } from "./events/standard-event.js";
3
+ import { PageDimensions as s } from "./interfaces/page-design-types.js";
4
+ import { getFormPropName as n, setVariableValue as i, formatVariableValue as o } from "./page-helper-util.js";
5
+ import { getSessionCache as r } from "agilebuilder-ui/src/utils/auth";
6
+ import { functions as l } from "./api/page-expose-util.js";
7
+ import { isWorkflowPage as a, deepCopy as p } from "./common-util.js";
8
+ import { packageCustomValidator as u } from "./events/validator-util.js";
9
+ function d(t2) {
10
+ return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
13
11
  }
14
- function convertToPageContext(pageDesign, pageRequest) {
12
+ function m(e2) {
15
13
  var _a;
16
- if (pageDesign == null) {
17
- return null;
18
- }
19
- const pageContext = {
20
- uuid: pageDesign.uuid,
21
- name: pageDesign.name,
22
- label: pageDesign.label,
23
- code: pageDesign.code,
24
- version: pageDesign.version,
25
- dimensions: pageDesign.dimensions,
26
- systemCode: pageDesign.systemCode,
27
- systemVersion: pageDesign.systemVersion,
28
- backendUrl: pageDesign.backendUrl,
29
- rules: {},
30
- // rules: pageDesign.rules, // 表单验证规则。在runtime object-render中实时获得
31
- tableUuids: pageDesign.tableUuids,
32
- // 表格uuid集合
33
- listCodesMap: pageDesign.listCodesMap,
34
- // 列表编码和列表绑定编码对应关系,key是列表编码,value是绑定编码
35
- formNoRuleCode: pageDesign.props ? pageDesign.props.formNoRuleCode : null,
36
- // 表单编号规则
37
- judgeHeavyList: getJudgeHeavyList(pageDesign),
38
- // 判重组合字段集合配置
39
- // conversionCodes: pageDesign.conversionCodes, // 数据转换规则。按钮上配置的,此处不需要
40
- pageType: pageDesign.pageType,
41
- // 页面类型:form、list、chart
42
- beanName: pageDesign.props ? pageDesign.props.beanName : null,
43
- // 业务处理类,继承CommonBaseService接口的类
44
- importBeanName: pageDesign.props ? pageDesign.props.importBeanName : null,
45
- // 导入处理类,继承ImportDefinitionService接口的类
46
- subTablePageInfo: pageDesign.subTablePageInfo,
47
- // 列表分页信息,格式是:{列表编码: 每页显示多少条记录},表单页面中校验有分页的子表时提示使用,提示信息格式:第 {pageNum} 页第 {row} 行记录
48
- workflowCode: pageDesign.workflowCode,
49
- workflowVersion: pageDesign.workflowVersion,
50
- refercePropMap: (_a = pageDesign.runtime) == null ? void 0 : _a.refercePropMap,
51
- //当前表单页面中引用字段信息集合,get请求时需要使用,格式为{tableName:[字段名,.. ... ], tableName:[字段名,.. ... ]}
52
- subTableWatchProps: pageDesign.subTableWatchProps,
53
- dataTypeMaps: pageDesign.dataTypeMaps,
54
- // 列表页面时后台会传该属性到前端
55
- isWorkflowEntity: pageDesign.isWorkflowEntity,
56
- // 列表页面时后台会传该属性到前端。列表删除时会用到该属性。
57
- entity: {
58
- data: {},
59
- task: {},
60
- request: getRequestObject(pageRequest),
61
- //初始化request对象
62
- page: {},
63
- context: pageDesign.contextParam,
64
- system: pageDesign.systemParam
65
- }
66
- };
67
- if (pageDesign.props && pageDesign.props.notIdInitializationList) {
68
- let notIdInitializationList = pageDesign.props.notIdInitializationList;
69
- if (typeof notIdInitializationList === "string") {
70
- notIdInitializationList = JSON.parse(notIdInitializationList);
71
- }
72
- if (notIdInitializationList.length > 0) {
73
- pageContext["notIdInitializationList"] = notIdInitializationList;
74
- }
75
- }
76
- if (pageDesign.variables) {
77
- const pageObj = pageContext.entity.page;
78
- for (const variable of pageDesign.variables) {
79
- if (variable.name) {
80
- if (variable.isArrayElement) {
81
- pageObj[variable.name] = [];
82
- } else if (variable.defaultValue) {
83
- pageObj[variable.name] = variable.defaultValue;
84
- } else {
85
- pageObj[variable.name] = void 0;
86
- }
87
- }
88
- }
89
- }
90
- Object.assign(pageContext, pageDesign);
91
- pageContext.dimensions = getPageDimensions();
92
- pageContext.events = pageDesign.runtime && pageDesign.runtime.events ? pageDesign.runtime.events : [];
93
- return pageContext;
14
+ if (null == e2) return null;
15
+ const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: c(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
16
+ if (e2.props && e2.props.notIdInitializationList) {
17
+ let s2 = e2.props.notIdInitializationList;
18
+ "string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
19
+ }
20
+ if (e2.variables) {
21
+ const s2 = t2.entity.page;
22
+ for (const t3 of e2.variables) t3.name && (t3.isArrayElement ? s2[t3.name] = [] : t3.defaultValue ? s2[t3.name] = t3.defaultValue : s2[t3.name] = void 0);
23
+ }
24
+ return Object.assign(t2, e2), t2.dimensions = function() {
25
+ const e3 = window.outerWidth;
26
+ if (!e3) return s.PC;
27
+ return e3 > 768 ? s.PC : e3 > 414 ? s.IPAD : s.PHONE;
28
+ }(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
94
29
  }
95
- function getJudgeHeavyList(pageDesign) {
30
+ function c(e2) {
96
31
  try {
97
- if (pageDesign.props && pageDesign.props.judgeHeavyList.length > 0) {
98
- pageDesign.props.judgeHeavyList.forEach((item) => {
99
- if (item.duplicateFieldList && item.duplicateFieldList.length > 0) {
100
- item.duplicateFieldList = item.duplicateFieldList.map((field) => {
101
- if (typeof field === "string") {
102
- return { propDbName: field };
103
- }
104
- return field;
105
- });
106
- }
107
- });
108
- return pageDesign.props.judgeHeavyList;
109
- } else {
110
- return null;
111
- }
112
- } catch (e) {
113
- console.error("getJudgeHeavyList error:", e);
32
+ return e2.props && e2.props.judgeHeavyList.length > 0 ? (e2.props.judgeHeavyList.forEach((e3) => {
33
+ e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
34
+ }), e2.props.judgeHeavyList) : null;
35
+ } catch (e3) {
114
36
  }
115
37
  }
116
- function getPageDimensions() {
117
- const winWidth = window.outerWidth;
118
- if (!winWidth) {
119
- return PageDimensions.PC;
120
- }
121
- if (winWidth > 768) {
122
- return PageDimensions.PC;
123
- } else if (winWidth > 414) {
124
- return PageDimensions.IPAD;
125
- } else {
126
- return PageDimensions.PHONE;
127
- }
128
- }
129
- function getRequestObject(pageRequest) {
130
- const requestObj = {};
131
- if (pageRequest) {
132
- console.log("getRequestObject11----pageRequest=", pageRequest);
133
- const paramStoreId = pageRequest.paramStoreId;
134
- packageAdditionalMap(paramStoreId, requestObj);
135
- delete pageRequest.paramStoreId;
136
- Object.assign(requestObj, pageRequest);
137
- console.log("getRequestObject22----requestObj=", requestObj);
138
- }
139
- let url = decodeURI(window.location.href);
140
- if (url && url.includes("?")) {
141
- url = url.substring(url.lastIndexOf("?") + 1);
142
- const strs = url.split("&");
143
- for (const str of strs) {
144
- const paramStrs = str.split("=");
145
- requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
38
+ function f(e2) {
39
+ let t2 = decodeURI(window.location.href);
40
+ if (t2 && t2.includes("?")) {
41
+ t2 = t2.substring(t2.lastIndexOf("?") + 1);
42
+ const s2 = t2.split("&");
43
+ for (const t3 of s2) {
44
+ const s3 = t3.split("=");
45
+ e2[s3[0]] = s3.length > 1 ? s3[1] : "";
146
46
  }
147
47
  }
148
- if (requestObj["_t_"]) ;
149
- return requestObj;
48
+ e2._t_;
150
49
  }
151
- function packageAdditionalMapWithRoute(route, requestObj) {
152
- console.log("packageAdditionalMapWithRoute----route=", route);
153
- if (route) {
154
- if (route.params) {
155
- Object.assign(requestObj, route.params);
156
- }
157
- console.log("packageAdditionalMapWithRoute----route.query=", route.query);
158
- if (route.query) {
159
- Object.assign(requestObj, route.query);
160
- const paramStoreId = route.query.paramStoreId;
161
- packageAdditionalMap(paramStoreId, requestObj);
162
- }
163
- console.log("packageAdditionalMapWithRoute----requestObj=", requestObj);
50
+ function g(e2, t2) {
51
+ if (e2) {
52
+ Object.assign(t2, e2);
53
+ h(e2.paramStoreId, t2), delete e2.paramStoreId;
164
54
  }
165
55
  }
166
- function packageAdditionalMap(paramStoreId, requestObj) {
167
- if (paramStoreId) {
168
- const additionalParamMapJson = getSessionCache(paramStoreId);
169
- if (additionalParamMapJson) {
170
- const additionalParamMap = JSON.parse(additionalParamMapJson);
171
- Object.assign(requestObj, additionalParamMap);
172
- console.log("已获取到附加参数", additionalParamMap);
173
- }
56
+ function b(e2, t2) {
57
+ if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
58
+ Object.assign(t2, e2.query);
59
+ h(e2.query.paramStoreId, t2);
174
60
  }
175
61
  }
176
- function getModelFields(formItemConfigure, prop) {
177
- let propsBase;
178
- let propName = prop;
179
- if (!prop) {
180
- propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
181
- propName = propsBase.prop;
182
- }
183
- let fields = null;
184
- if (prop && !prop.startsWith("${")) {
185
- fields = ["data", prop];
186
- } else if (formItemConfigure && (!propName || !propName.startsWith("${"))) {
187
- fields = ["page", formItemConfigure.uuid];
188
- } else if (propName.startsWith("${")) {
189
- propName = propName.substring(2, propName.length - 1);
190
- fields = propName.split(".");
191
- if (formItemConfigure && fields.length < 2) {
192
- fields = [formItemConfigure.uuid];
62
+ function h(e2, t2) {
63
+ if (e2) {
64
+ const s2 = r(e2);
65
+ if (s2) {
66
+ const e3 = JSON.parse(s2);
67
+ Object.assign(t2, e3);
193
68
  }
194
- } else if (formItemConfigure) {
195
- fields = ["page", formItemConfigure.uuid];
196
- }
197
- if (!fields && !formItemConfigure) {
198
- return ["temp"];
199
69
  }
200
- return fields;
201
70
  }
202
- function getFormModelFields(pageContext, formItemConfigure, prop) {
203
- const fields = getModelFields(formItemConfigure, prop);
204
- const entity = pageContext.entity;
205
- if (entity.data.ID == void 0 && entity.data.id == void 0) {
206
- let propsBase;
207
- let componentType;
208
- let multiple = false;
209
- if (formItemConfigure) {
210
- propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
211
- componentType = formItemConfigure.name;
212
- multiple = propsBase.multiple;
213
- }
214
- const defaultValueSet = propsBase ? propsBase.defaultValue : null;
215
- const defaultValue = getDefaultValue(pageContext, defaultValueSet, componentType, multiple);
216
- if (defaultValue !== void 0 && defaultValue !== null) {
217
- setVariableValue(entity, fields, defaultValue);
218
- }
219
- }
220
- return fields;
71
+ function y(e2, t2) {
72
+ let s2, n2 = t2;
73
+ t2 || (s2 = e2.props.base ? e2.props.base : {}, n2 = s2.prop);
74
+ let i2 = null;
75
+ return t2 && !t2.startsWith("${") ? i2 = ["data", t2] : !e2 || n2 && n2.startsWith("${") ? n2.startsWith("${") ? (n2 = n2.substring(2, n2.length - 1), i2 = n2.split("."), e2 && i2.length < 2 && (i2 = [e2.uuid])) : e2 && (i2 = ["page", e2.uuid]) : i2 = ["page", e2.uuid], i2 || e2 ? i2 : ["temp"];
221
76
  }
222
- function getDefaultValue(pageContext, defaultValueSet, componentType, multiple) {
223
- let defaultValue;
224
- if (defaultValueSet) {
225
- defaultValue = formatVariableValue(pageContext, defaultValueSet);
226
- if (defaultValue != null && defaultValue != void 0 && componentType) {
227
- let isMultiple = false;
228
- if (componentType == "checkbox") {
229
- isMultiple = true;
230
- } else if (componentType == "select") {
231
- isMultiple = multiple;
232
- }
233
- if (isMultiple) {
234
- defaultValue = (defaultValue + "").split(",");
235
- }
236
- }
237
- }
238
- return defaultValue;
77
+ function E(e2, t2, s2) {
78
+ const n2 = y(t2, s2), o2 = e2.entity;
79
+ if (null == o2.data.ID && null == o2.data.id) {
80
+ let s3, r2, l2 = false;
81
+ t2 && (s3 = t2.props.base ? t2.props.base : {}, r2 = t2.name, l2 = s3.multiple);
82
+ const a2 = v(e2, s3 ? s3.defaultValue : null, r2, l2);
83
+ null != a2 && i(o2, n2, a2);
84
+ }
85
+ return n2;
239
86
  }
240
- function getPermissionCodes(configure, pageContext) {
241
- if (!pageContext || !configure || pageContext.isTest) {
242
- return "true";
87
+ function v(e2, t2, s2, n2) {
88
+ let i2;
89
+ if (t2 && (i2 = o(e2, t2), null != i2 && null != i2 && s2)) {
90
+ let e3 = false;
91
+ "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = n2), e3 && (i2 = (i2 + "").split(","));
243
92
  }
244
- const codes = [];
245
- if (configure.autoPermissions) {
246
- for (const p of configure.autoPermissions) {
247
- codes.push(pageContext.code + "." + p.simpleCode);
248
- }
249
- }
250
- if (configure.functionCodes) {
251
- const sourceTypes = configure.sourceTypes ? configure.sourceTypes : [];
252
- const functionCodes = configure.functionCodes;
253
- for (let i = 0; i < functionCodes.length; i++) {
254
- const functionCode = functionCodes[i];
255
- const sourceType = i < sourceTypes.length ? sourceTypes[i] : "";
256
- let newCode = "";
257
- if (sourceType == "service") {
258
- newCode = functionCode;
259
- } else {
260
- newCode = pageContext.code + "." + functionCode;
261
- }
262
- if (!codes.includes(newCode)) {
263
- codes.push(newCode);
264
- }
265
- }
266
- }
267
- return codes.join(",");
93
+ return i2;
268
94
  }
269
- function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
270
- const tableRuntimes = pageDesign.tableRuntimes;
271
- const additionalParamMap = getAdditionalParamMap(pageContext);
272
- let additionalParamMapJson;
273
- const pageCode = pageContext.code;
274
- if (additionalParamMap && Object.keys(additionalParamMap) > 0) {
275
- additionalParamMapJson = JSON.stringify(additionalParamMap);
276
- }
277
- return http.post(
278
- window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/super-grids",
279
- {
280
- tableRuntimes,
281
- additionalParamMapJson,
282
- pageCode,
283
- publishVersion,
284
- pageType: pageDesign.pageType
285
- }
286
- );
95
+ function P(e2, t2) {
96
+ if (!t2 || !e2 || t2.isTest) return "true";
97
+ const s2 = [];
98
+ if (e2.autoPermissions) for (const n2 of e2.autoPermissions) s2.push(t2.code + "." + n2.simpleCode);
99
+ if (e2.functionCodes) {
100
+ const n2 = e2.sourceTypes ? e2.sourceTypes : [], i2 = e2.functionCodes;
101
+ for (let e3 = 0; e3 < i2.length; e3++) {
102
+ const o2 = i2[e3];
103
+ let r2 = "";
104
+ r2 = "service" == (e3 < n2.length ? n2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
105
+ }
106
+ }
107
+ return s2.join(",");
108
+ }
109
+ function w(s2, n2, i2) {
110
+ const o2 = s2.tableRuntimes, r2 = t(n2);
111
+ let l2;
112
+ const a2 = n2.code;
113
+ return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: i2, pageType: s2.pageType });
287
114
  }
288
- function packageFormRules(pageContext, configure) {
115
+ function C(e2, t2) {
289
116
  var _a, _b;
290
- const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
291
- const isWorkflow = isWorkflowPage(pageContext);
292
- let allFieldsDisabled = false;
293
- if (isWorkflow) {
294
- if (configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
295
- const allFields = pageContext.fieldPermissionMap.get("all_fields");
296
- if ((allFields == null ? void 0 : allFields["canEdit"]) === false && ((_a = configure.runtime) == null ? void 0 : _a.props)) {
297
- configure.runtime.props.state = "disabled";
298
- allFieldsDisabled = true;
299
- }
300
- }
301
- }
302
- if (prop) {
303
- const propName = getFormPropName(prop);
304
- if (!pageContext.rules) {
305
- pageContext.rules = {};
306
- }
307
- if (configure.props.rules && configure.props.rules.length > 0) {
308
- if (!pageContext.rules[propName]) {
309
- pageContext.rules[propName] = [];
310
- }
311
- configure.props.rules.forEach((fieldRule) => {
312
- packageCustomValidator(fieldRule);
313
- });
314
- pageContext.rules[propName] = configure.props.rules;
315
- }
316
- if (!allFieldsDisabled && configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
317
- const propEditPermission = pageContext.fieldPermissionMap.get(propName);
318
- if (!configure.runtime.props) {
319
- configure.runtime.props = {};
320
- }
321
- if (propEditPermission) {
322
- if (propEditPermission["canEdit"] === false) {
323
- configure.runtime.props.state = "disabled";
324
- } else if (propEditPermission["canEdit"]) {
325
- configure.runtime.props.state = "";
326
- configure.runtime.props.required = true;
327
- }
328
- } else {
329
- configure.runtime.props.state = "";
330
- }
331
- }
332
- if ((_b = configure.props) == null ? void 0 : _b.customRuleEvents) {
333
- if (!pageContext.customRuleEvents) {
334
- pageContext.customRuleEvents = [];
335
- }
336
- pageContext.customRuleEvents.push({
337
- prop: propName,
338
- events: configure.props.customRuleEvents
339
- });
340
- }
117
+ const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
118
+ let i2 = false;
119
+ if (a(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
120
+ const s3 = e2.fieldPermissionMap.get("all_fields");
121
+ false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", i2 = true);
122
+ }
123
+ if (s2) {
124
+ const o2 = n(s2);
125
+ if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[o2] || (e2.rules[o2] = []), t2.props.rules.forEach((e3) => {
126
+ u(e3);
127
+ }), e2.rules[o2] = t2.props.rules), !i2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
128
+ const s3 = e2.fieldPermissionMap.get(o2);
129
+ t2.runtime.props || (t2.runtime.props = {}), s3 ? false === s3.canEdit ? t2.runtime.props.state = "disabled" : s3.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true) : t2.runtime.props.state = "";
130
+ }
131
+ ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
341
132
  }
342
133
  }
343
- function controlObjectRenderState(pageContext, propName) {
344
- if (pageContext.initInfo) {
345
- const types = [
346
- "dynamicControlFormEdit",
347
- "disableElement",
348
- "enableElement",
349
- "hideElement",
350
- "showElement"
351
- ];
352
- types.forEach((type) => {
353
- const infos = pageContext.initInfo[type];
354
- if (infos) {
355
- if (type === "dynamicControlFormEdit") {
356
- let settings = infos.filter(
357
- (item) => item.name === "_all_fields" || item.name === propName
358
- );
359
- if (settings && settings.length > 0) {
360
- settings = settings.filter((item) => item.name === "_all_fields");
361
- if (settings && settings.length > 0) {
362
- const copySetting = deepCopy(settings[0]);
363
- copySetting.name = propName;
364
- settings = [copySetting];
365
- }
366
- }
367
- functions.dynamicControlFormEdit(pageContext, settings, false);
368
- } else if (type === "disableElement") {
369
- if (infos.indexOf(propName) >= 0) {
370
- functions.disableElement(pageContext, [propName], false);
371
- }
372
- } else if (type === "enableElement") {
373
- if (infos.indexOf(propName) >= 0) {
374
- functions.enableElement(pageContext, [propName], false);
375
- }
376
- } else if (type === "hideElement") {
377
- if (infos.indexOf(propName) >= 0) {
378
- functions.hideElement(pageContext, [propName], false);
379
- }
380
- } else if (type === "showElement") {
381
- if (infos.indexOf(propName) >= 0) {
382
- functions.showElement(pageContext, [propName], false);
383
- }
134
+ function I(e2, t2) {
135
+ if (e2.initInfo) {
136
+ ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
137
+ const n2 = e2.initInfo[s2];
138
+ if (n2) if ("dynamicControlFormEdit" === s2) {
139
+ let s3 = n2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
140
+ if (s3 && s3.length > 0 && (s3 = s3.filter((e3) => "_all_fields" === e3.name), s3 && s3.length > 0)) {
141
+ const e3 = p(s3[0]);
142
+ e3.name = t2, s3 = [e3];
384
143
  }
385
- }
144
+ l.dynamicControlFormEdit(e2, s3, false);
145
+ } else "disableElement" === s2 ? n2.indexOf(t2) >= 0 && l.disableElement(e2, [t2], false) : "enableElement" === s2 ? n2.indexOf(t2) >= 0 && l.enableElement(e2, [t2], false) : "hideElement" === s2 ? n2.indexOf(t2) >= 0 && l.hideElement(e2, [t2], false) : "showElement" === s2 && n2.indexOf(t2) >= 0 && l.showElement(e2, [t2], false);
386
146
  });
387
147
  }
388
148
  }
389
149
  export {
390
- controlObjectRenderState,
391
- convertToPageContext,
392
- getDefaultValue,
393
- getFormModelFields,
394
- getModelFields,
395
- getPermissionCodes,
396
- packageAdditionalMapWithRoute,
397
- packageFormRules,
398
- queryPageDesignByCode,
399
- queryPageSuperGrids
150
+ I as controlObjectRenderState,
151
+ m as convertToPageContext,
152
+ v as getDefaultValue,
153
+ E as getFormModelFields,
154
+ y as getModelFields,
155
+ P as getPermissionCodes,
156
+ f as packageAdditionalMapWithLocationSearch,
157
+ g as packageAdditionalMapWithPageRequest,
158
+ b as packageAdditionalMapWithRoute,
159
+ C as packageFormRules,
160
+ d as queryPageDesignByCode,
161
+ w as queryPageSuperGrids
400
162
  };