super-page-runtime 2.1.92 → 2.1.95

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